| version 1.21, 2008/02/01 23:29:54 |
version 1.22, 2008/02/22 18:33:51 |
| Line 61 __RCSID("$NetBSD$"); |
|
| Line 61 __RCSID("$NetBSD$"); |
|
| * expand {1,2}{a,b} to 1a 1b 2a 2b |
* expand {1,2}{a,b} to 1a 1b 2a 2b |
| * GLOB_PERIOD: |
* GLOB_PERIOD: |
| * allow metacharacters to match leading dots in filenames. |
* allow metacharacters to match leading dots in filenames. |
| |
* GLOB_NO_DOTDIRS: |
| |
* . and .. are hidden from wildcards, even if GLOB_PERIOD is set. |
| * gl_matchc: |
* gl_matchc: |
| * Number of matches in the current invocation of glob. |
* Number of matches in the current invocation of glob. |
| */ |
*/ |
| Line 727 glob3(Char *pathbuf, Char *pathend, Char |
|
| Line 729 glob3(Char *pathbuf, Char *pathend, Char |
|
| if (dp->d_name[0] == DOT && *pattern != DOT) |
if (dp->d_name[0] == DOT && *pattern != DOT) |
| continue; |
continue; |
| /* |
/* |
| |
* If GLOB_NO_DOTDIRS is set, . and .. vanish. |
| |
*/ |
| |
if ((pglob->gl_flags & GLOB_NO_DOTDIRS) && |
| |
(dp->d_name[0] == DOT) && |
| |
((dp->d_name[1] == EOS) || |
| |
((dp->d_name[1] == DOT) && (dp->d_name[2] == EOS)))) |
| |
continue; |
| |
/* |
| * The resulting string contains EOS, so we can |
* The resulting string contains EOS, so we can |
| * use the pathlim character, if it is the nul |
* use the pathlim character, if it is the nul |
| */ |
*/ |