Lines Matching full:pattern

42  * Compares a filename or pathname to a pattern.
75 fnmatch(const char *pattern, const char *string, int flags) in fnmatch() argument
79 return (fnmatch1(pattern, string, string, flags, initial, initial)); in fnmatch()
83 fnmatch1(const char *pattern, const char *string, const char *stringstart, in fnmatch1() argument
95 pclen = mbrtowc(&pc, pattern, MB_LEN_MAX, &patmbs); in fnmatch1()
98 pattern += pclen; in fnmatch1()
124 c = *pattern; in fnmatch1()
127 c = *++pattern; in fnmatch1()
134 /* Optimize for pattern with * at end or before /. */ in fnmatch1()
154 bt_pattern = pattern, bt_patmbs = patmbs; in fnmatch1()
167 switch (rangematch(pattern, sc, flags, &newp, in fnmatch1()
172 pattern = newp; in fnmatch1()
181 pclen = mbrtowc(&pc, pattern, MB_LEN_MAX, in fnmatch1()
186 pattern += pclen; in fnmatch1()
221 pattern = bt_pattern, patmbs = bt_patmbs; in fnmatch1()
231 rangematch(const char *pattern, wchar_t test, int flags, char **newp, in rangematch() argument
248 if ((negate = (*pattern == '!' || *pattern == '^'))) in rangematch()
249 ++pattern; in rangematch()
260 origpat = pattern; in rangematch()
262 if (*pattern == ']' && pattern > origpat) { in rangematch()
263 pattern++; in rangematch()
265 } else if (*pattern == '\0') { in rangematch()
267 } else if (*pattern == '/' && (flags & FNM_PATHNAME)) { in rangematch()
269 } else if (*pattern == '\\' && !(flags & FNM_NOESCAPE)) in rangematch()
270 pattern++; in rangematch()
271 pclen = mbrtowc(&c, pattern, MB_LEN_MAX, patmbs); in rangematch()
274 pattern += pclen; in rangematch()
279 if (*pattern == '-' && *(pattern + 1) != EOS && in rangematch()
280 *(pattern + 1) != ']') { in rangematch()
281 if (*++pattern == '\\' && !(flags & FNM_NOESCAPE)) in rangematch()
282 if (*pattern != EOS) in rangematch()
283 pattern++; in rangematch()
284 pclen = mbrtowc(&c2, pattern, MB_LEN_MAX, patmbs); in rangematch()
287 pattern += pclen; in rangematch()
304 *newp = (char *)pattern; in rangematch()