inpcom.c, simplify using is_plain_filename(), fix incorrect comments
This commit is contained in:
parent
e0c398024f
commit
7524882f67
|
|
@ -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
|
||||
|
||||
/* If this is an abs pathname, or there is no sourcepath var, just
|
||||
* do an fopen.
|
||||
*/
|
||||
if (strchr(name, DIR_TERM) || !cp_getvar("sourcepath", CP_LIST, &v))
|
||||
return (fopen(name, mode));
|
||||
|
||||
#endif
|
||||
|
||||
/* If this is not a plain basename, or there is no sourcepath var, just
|
||||
* do an fopen.
|
||||
*/
|
||||
if (!is_plain_filename(name) || !cp_getvar("sourcepath", CP_LIST, &v))
|
||||
return (fopen(name, mode));
|
||||
|
||||
for (; v; v = v->va_next) {
|
||||
|
||||
switch (v->va_type) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue