422 |
find_read(void) |
find_read(void) |
423 |
{ |
{ |
424 |
static char val[MAXPATHLEN+1]; |
static char val[MAXPATHLEN+1]; |
425 |
|
extern int qflag; |
426 |
|
|
427 |
for (;;) { |
for (;;) { |
428 |
while (curp->p < curp->end) { |
while (curp->p < curp->end) { |
437 |
strlimcpy(path, makepath(dir, unit, NULL), sizeof(path)); |
strlimcpy(path, makepath(dir, unit, NULL), sizeof(path)); |
438 |
if (skipthisfile(path)) |
if (skipthisfile(path)) |
439 |
continue; |
continue; |
440 |
|
/* |
441 |
|
* GLOBAL cannot treat path which includes blanks. |
442 |
|
* It will be improved in the future. |
443 |
|
*/ |
444 |
|
if (locatestring(path, " ", MATCH_FIRST)) { |
445 |
|
if (!qflag) |
446 |
|
warning("'%s' ignored, because it includes blank in the path.", path); |
447 |
|
continue; |
448 |
|
} |
449 |
|
/* |
450 |
|
* A blank at the head of path means |
451 |
|
* other than source file. |
452 |
|
*/ |
453 |
if (regexec(suff, path, 0, 0, 0) == 0) { |
if (regexec(suff, path, 0, 0, 0) == 0) { |
454 |
/* source file */ |
/* source file */ |
455 |
strlimcpy(val, path, sizeof(val)); |
strlimcpy(val, path, sizeof(val)); |