version 1.68.2.1, 2017/03/20 06:58:04 |
version 1.68.2.2, 2017/04/26 02:53:35 |
Line 803 DirExpandInt(const char *word, Lst path, |
|
Line 803 DirExpandInt(const char *word, Lst path, |
|
*----------------------------------------------------------------------- |
*----------------------------------------------------------------------- |
*/ |
*/ |
static int |
static int |
DirPrintWord(void *word, void *dummy) |
DirPrintWord(void *word, void *dummy MAKE_ATTR_UNUSED) |
{ |
{ |
fprintf(debug_file, "%s ", (char *)word); |
fprintf(debug_file, "%s ", (char *)word); |
|
|
return(dummy ? 0 : 0); |
return 0; |
} |
} |
|
|
/*- |
/*- |
Line 1315 Dir_FindFile(const char *name, Lst path) |
|
Line 1315 Dir_FindFile(const char *name, Lst path) |
|
fprintf(debug_file, " Trying exact path matches...\n"); |
fprintf(debug_file, " Trying exact path matches...\n"); |
} |
} |
|
|
if (!hasLastDot && cur && (file = DirLookupAbs(cur, name, cp)) != NULL) |
if (!hasLastDot && cur && ((file = DirLookupAbs(cur, name, cp)) |
return *file?file:NULL; |
!= NULL)) { |
|
if (file[0] == '\0') { |
|
free(file); |
|
return NULL; |
|
} |
|
return file; |
|
} |
|
|
(void)Lst_Open(path); |
(void)Lst_Open(path); |
while ((ln = Lst_Next(path)) != NULL) { |
while ((ln = Lst_Next(path)) != NULL) { |
Line 1325 Dir_FindFile(const char *name, Lst path) |
|
Line 1331 Dir_FindFile(const char *name, Lst path) |
|
continue; |
continue; |
if ((file = DirLookupAbs(p, name, cp)) != NULL) { |
if ((file = DirLookupAbs(p, name, cp)) != NULL) { |
Lst_Close(path); |
Lst_Close(path); |
return *file?file:NULL; |
if (file[0] == '\0') { |
|
free(file); |
|
return NULL; |
|
} |
|
return file; |
} |
} |
} |
} |
Lst_Close(path); |
Lst_Close(path); |
|
|
if (hasLastDot && cur && (file = DirLookupAbs(cur, name, cp)) != NULL) |
if (hasLastDot && cur && ((file = DirLookupAbs(cur, name, cp)) |
return *file?file:NULL; |
!= NULL)) { |
|
if (file[0] == '\0') { |
|
free(file); |
|
return NULL; |
|
} |
|
return file; |
|
} |
} |
} |
|
|
/* |
/* |
Line 1851 Dir_PrintDirectories(void) |
|
Line 1867 Dir_PrintDirectories(void) |
|
} |
} |
|
|
static int |
static int |
DirPrintDir(void *p, void *dummy) |
DirPrintDir(void *p, void *dummy MAKE_ATTR_UNUSED) |
{ |
{ |
fprintf(debug_file, "%s ", ((Path *)p)->name); |
fprintf(debug_file, "%s ", ((Path *)p)->name); |
return (dummy ? 0 : 0); |
return 0; |
} |
} |
|
|
void |
void |