X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Fread_termcap.c;h=5e8d85ede13b44a9c85e3f7d601d23e1ce4ffbd7;hp=29656e2b9364e75806533427de35146d7612cee1;hb=02c4e383be9337e73a0e75844dfd1047745adb28;hpb=a8e3f06ac309504143cd56ac9ec55889bfdf4914 diff --git a/ncurses/tinfo/read_termcap.c b/ncurses/tinfo/read_termcap.c index 29656e2b..5e8d85ed 100644 --- a/ncurses/tinfo/read_termcap.c +++ b/ncurses/tinfo/read_termcap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. * + * Copyright (c) 1998-2017,2018 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 * @@ -56,7 +56,7 @@ #include #include -MODULE_ID("$Id: read_termcap.c,v 1.93 2017/04/22 16:11:03 tom Exp $") +MODULE_ID("$Id: read_termcap.c,v 1.95 2018/04/07 21:12:50 tom Exp $") #if !PURE_TERMINFO @@ -66,10 +66,10 @@ MODULE_ID("$Id: read_termcap.c,v 1.93 2017/04/22 16:11:03 tom Exp $") #define TC_REF_LOOP -3 #define TC_UNRESOLVED -4 /* this is not returned by BSD cgetent */ -static NCURSES_CONST char * +static const char * get_termpath(void) { - NCURSES_CONST char *result; + const char *result; if (!use_terminfo_vars() || (result = getenv("TERMPATH")) == 0) result = TERMPATH; @@ -791,7 +791,7 @@ _nc_tgetent(char *bp, char **sourcename, int *lineno, const char *name) int i; char pathbuf[PBUFSIZ]; /* holds raw path of filenames */ CGETENT_CONST char *pathvec[PVECSIZ]; /* point to names in pathbuf */ - NCURSES_CONST char *termpath; + const char *termpath; string_desc desc; *lineno = 1; @@ -1141,7 +1141,8 @@ _nc_read_termcap_entry(const char *const tn, TERMTYPE2 *const tp) return (TGETENT_ERR); /* resolve all use references */ - _nc_resolve_uses2(TRUE, FALSE); + if (_nc_resolve_uses2(TRUE, FALSE) != TRUE) + return (TGETENT_ERR); /* find a terminal matching tn, if we can */ #if USE_GETCAP_CACHE