Lines Matching refs:flags
50 static inline int foldcase(int ch, int flags) in foldcase() argument
53 if ((flags & FNM_CASEFOLD) != 0 && isupper(ch)) { in foldcase()
60 #define FOLDCASE(ch, flags) foldcase((unsigned char)(ch), (flags)) argument
62 static const char *rangematch(const char *pattern, int test, int flags) in rangematch() argument
83 for (need = true, ok = false, c = FOLDCASE(*pattern++, flags); c != ']' || need; in rangematch()
84 c = FOLDCASE(*pattern++, flags)) { in rangematch()
90 if (c == '\\' && !(flags & FNM_NOESCAPE)) { in rangematch()
91 c = FOLDCASE(*pattern++, flags); in rangematch()
99 c2 = FOLDCASE(*(pattern + 1), flags); in rangematch()
102 if (c2 == '\\' && !(flags & FNM_NOESCAPE)) { in rangematch()
103 c2 = FOLDCASE(*pattern++, flags); in rangematch()
122 static int fnmatchx(const char *pattern, const char *string, int flags, size_t recursion) in fnmatchx() argument
136 c = FOLDCASE(*pattern++, flags); in fnmatchx()
139 if ((flags & FNM_LEADING_DIR) && *string == '/') { in fnmatchx()
149 if (*string == '/' && (flags & FNM_PATHNAME)) { in fnmatchx()
153 if (*string == '.' && (flags & FNM_PERIOD) && in fnmatchx()
155 ((flags & FNM_PATHNAME) && *(string - 1) == '/'))) { in fnmatchx()
162 c = FOLDCASE(*pattern, flags); in fnmatchx()
165 c = FOLDCASE(*++pattern, flags); in fnmatchx()
168 if (*string == '.' && (flags & FNM_PERIOD) && in fnmatchx()
170 ((flags & FNM_PATHNAME) && *(string - 1) == '/'))) { in fnmatchx()
176 if (flags & FNM_PATHNAME) { in fnmatchx()
177 return (flags & FNM_LEADING_DIR) || in fnmatchx()
184 } else if (c == '/' && flags & FNM_PATHNAME) { in fnmatchx()
195 test = FOLDCASE(*string, flags); in fnmatchx()
200 int e = fnmatchx(pattern, string, flags & ~FNM_PERIOD, recursion); in fnmatchx()
206 if (test == '/' && flags & FNM_PATHNAME) { in fnmatchx()
219 if (*string == '/' && flags & FNM_PATHNAME) { in fnmatchx()
223 r = rangematch(pattern, FOLDCASE(*string, flags), flags); in fnmatchx()
239 if (!(flags & FNM_NOESCAPE)) { in fnmatchx()
240 c = FOLDCASE(*pattern++, flags); in fnmatchx()
248 if (c != FOLDCASE(*string++, flags)) { in fnmatchx()
258 int fnmatch(const char *pattern, const char *string, int flags) in fnmatch() argument
260 return fnmatchx(pattern, string, flags, 64); in fnmatch()