]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/read_termcap.c
ncurses 5.9 - patch 20110604
[ncurses.git] / ncurses / tinfo / read_termcap.c
index b39a5bebaa472dba1223fa98341bcb0a87ae1d43..eac37fa3d5d164e6d4af0a21b7f3a8f491bc0ea5 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 
 #include <ctype.h>
 #include <sys/types.h>
-#include <sys/stat.h>
 #include <tic.h>
 
-MODULE_ID("$Id: read_termcap.c,v 1.74 2010/01/23 17:57:43 tom Exp $")
+MODULE_ID("$Id: read_termcap.c,v 1.76 2011/06/05 00:48:00 tom Exp $")
 
 #if !PURE_TERMINFO
 
@@ -1063,7 +1062,7 @@ _nc_read_termcap_entry(const char *const tn, TERMTYPE *const tp)
     for (j = 0; j < filecount; j++) {
        bool omit = FALSE;
        if (stat(termpaths[j], &test_stat[j]) != 0
-           || (test_stat[j].st_mode & S_IFMT) != S_IFREG) {
+           || !S_ISREG(test_stat[j].st_mode)) {
            omit = TRUE;
        } else {
            for (k = 0; k < j; k++) {