1 diff -Nur ncurses-4.2/ncurses/tinfo/read_termcap.c ncurses-4.2.orig/ncurses/tinfo/read_termcap.c
2 --- ncurses-4.2/ncurses/tinfo/read_termcap.c Tue Dec 8 20:47:42 1998
3 +++ ncurses-4.2.orig/ncurses/tinfo/read_termcap.c Tue Dec 8 20:47:13 1998
5 for (i = 0; i < filecount; i++) {
7 T(("Looking for %s in %s", tn, termpaths[i]));
8 - if ((fp = fopen(termpaths[i], "r")) != (FILE *)0)
9 + if ((_nc_access(termpaths[i], R_OK) < 0)
10 + || (fp = fopen(termpaths[i], "r")) == (FILE *)0)
12 + T(("Could not open %s (error %d)", termpaths[i], errno));
14 _nc_set_source(termpaths[i]);