Lines Matching refs:pattern
40 * Compares a filename or pathname to a pattern.
59 fnmatch(pattern, string, flags)
60 const char *pattern, *string;
68 switch (c = *pattern++) {
85 c = *pattern;
88 c = *++pattern;
95 /* Optimize for pattern with * at end or before /. */
111 if (!fnmatch(pattern, string, flags & ~FNM_PERIOD))
128 switch (rangematch(pattern, *string, flags, &newp)) {
132 pattern = newp;
141 if ((c = *pattern++) == EOS) {
143 --pattern;
164 rangematch(pattern, test, flags, newp)
165 const char *pattern;
180 if ( (negate = (*pattern == '!' || *pattern == '^')) )
181 ++pattern;
192 c = *pattern++;
195 c = *pattern++;
205 if (*pattern == '-'
206 && (c2 = *(pattern+1)) != EOS && c2 != ']') {
207 pattern += 2;
209 c2 = *pattern++;
226 } while ((c = *pattern++) != ']');
228 *newp = (char *)pattern;