Browse Source

inpcom.c, simplify using is_plain_filename(), fix incorrect comments

pre-master-46
rlar 12 years ago
parent
commit
7524882f67
  1. 14
      src/frontend/inpcom.c

14
src/frontend/inpcom.c

@ -1004,22 +1004,14 @@ inp_pathopen(char *name, char *mode)
return (fp);
}
/* If this is an abs pathname, or there is no sourcepath var, just
* do an fopen.
*/
if (strchr(name, DIR_TERM) || strchr(name, DIR_TERM_LINUX) ||
!cp_getvar("sourcepath", CP_LIST, &v))
return (fopen(name, mode));
#else
#endif
/* If this is an abs pathname, or there is no sourcepath var, just
/* If this is not a plain basename, or there is no sourcepath var, just
* do an fopen.
*/
if (strchr(name, DIR_TERM) || !cp_getvar("sourcepath", CP_LIST, &v))
if (!is_plain_filename(name) || !cp_getvar("sourcepath", CP_LIST, &v))
return (fopen(name, mode));
#endif
for (; v; v = v->va_next) {
switch (v->va_type) {

Loading…
Cancel
Save