X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Fread_termcap.c;h=eac37fa3d5d164e6d4af0a21b7f3a8f491bc0ea5;hp=b39a5bebaa472dba1223fa98341bcb0a87ae1d43;hb=331f875facea2b7897c1ce0425ce0d111cc4175b;hpb=d1a026123ac051716cdc16278345c1fb5c843b79 diff --git a/ncurses/tinfo/read_termcap.c b/ncurses/tinfo/read_termcap.c index b39a5beb..eac37fa3 100644 --- a/ncurses/tinfo/read_termcap.c +++ b/ncurses/tinfo/read_termcap.c @@ -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 * @@ -54,10 +54,9 @@ #include #include -#include #include -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++) {