Insure flook compile without warning when ENVFUN is 0.

This commit is contained in:
Renaud 2013-09-19 13:50:27 +08:00
parent d266ec4b2a
commit 669b7396d4
1 changed files with 4 additions and 3 deletions

View File

@ -76,15 +76,15 @@ boolean fexist( const char *fname)
*/
char *flook( const char *fname, int hflag)
{
char *home; /* path to home directory */
char *path; /* environmental PATH variable */
char *sp; /* pointer into path spec */
int i; /* index */
static char fspec[NSTRING]; /* full path spec to search */
#if ENVFUNC
char *path; /* environmental PATH variable */
if (hflag) {
char *home; /* path to home directory */
home = getenv("HOME");
if (home != NULL) {
/* build home dir file spec */
@ -109,6 +109,7 @@ char *flook( const char *fname, int hflag)
path = getenv("PATH");
if (path != NULL)
while (*path) {
char *sp; /* pointer into path spec */
/* build next possible file spec */
sp = fspec;