Lines Matching refs:s

152 pm_slashskip(const char *s) {  in pm_slashskip()  argument
153 while ((*s == '/') in pm_slashskip()
154 || (s[0] == '.' && s[1] == '/') in pm_slashskip()
155 || (s[0] == '.' && s[1] == '\0')) in pm_slashskip()
156 ++s; in pm_slashskip()
157 return (s); in pm_slashskip()
161 pm_slashskip_w(const wchar_t *s) { in pm_slashskip_w() argument
162 while ((*s == L'/') in pm_slashskip_w()
163 || (s[0] == L'.' && s[1] == L'/') in pm_slashskip_w()
164 || (s[0] == L'.' && s[1] == L'\0')) in pm_slashskip_w()
165 ++s; in pm_slashskip_w()
166 return (s); in pm_slashskip_w()
170 pm(const char *p, const char *s, int flags) in pm() argument
177 if (s[0] == '.' && s[1] == '/') in pm()
178 s = pm_slashskip(s + 1); in pm()
185 if (s[0] == '/') { in pm()
189 s = pm_slashskip(s); in pm()
191 return (*s == '\0'); in pm()
194 if (*s == '\0') in pm()
204 while (*s) { in pm()
205 if (archive_pathmatch(p, s, flags)) in pm()
207 ++s; in pm()
223 if (!pm_list(p + 1, end, *s, flags)) in pm()
229 if (*p != *s) in pm()
235 if (*s != '\\') in pm()
239 if (*p != *s) in pm()
244 if (*s != '/' && *s != '\0') in pm()
249 s = pm_slashskip(s); in pm()
253 --s; in pm()
260 return (*pm_slashskip(s) == '\0'); in pm()
265 if (*p != *s) in pm()
270 ++s; in pm()
275 pm_w(const wchar_t *p, const wchar_t *s, int flags) in pm_w() argument
282 if (s[0] == L'.' && s[1] == L'/') in pm_w()
283 s = pm_slashskip_w(s + 1); in pm_w()
290 if (s[0] == L'/') { in pm_w()
294 s = pm_slashskip_w(s); in pm_w()
296 return (*s == L'\0'); in pm_w()
299 if (*s == L'\0') in pm_w()
309 while (*s) { in pm_w()
310 if (archive_pathmatch_w(p, s, flags)) in pm_w()
312 ++s; in pm_w()
328 if (!pm_list_w(p + 1, end, *s, flags)) in pm_w()
334 if (*p != *s) in pm_w()
340 if (*s != L'\\') in pm_w()
344 if (*p != *s) in pm_w()
349 if (*s != L'/' && *s != L'\0') in pm_w()
354 s = pm_slashskip_w(s); in pm_w()
358 --s; in pm_w()
365 return (*pm_slashskip_w(s) == L'\0'); in pm_w()
370 if (*p != *s) in pm_w()
375 ++s; in pm_w()
381 __archive_pathmatch(const char *p, const char *s, int flags) in __archive_pathmatch() argument
385 return (s == NULL || *s == '\0'); in __archive_pathmatch()
386 else if (s == NULL) in __archive_pathmatch()
395 if (*p == '/' && *s != '/') in __archive_pathmatch()
402 while (*s == '/') in __archive_pathmatch()
403 ++s; in __archive_pathmatch()
404 return (pm(p, s, flags)); in __archive_pathmatch()
409 for ( ; s != NULL; s = strchr(s, '/')) { in __archive_pathmatch()
410 if (*s == '/') in __archive_pathmatch()
411 s++; in __archive_pathmatch()
412 if (pm(p, s, flags)) in __archive_pathmatch()
419 return (pm(p, s, flags)); in __archive_pathmatch()
423 __archive_pathmatch_w(const wchar_t *p, const wchar_t *s, int flags) in __archive_pathmatch_w() argument
427 return (s == NULL || *s == L'\0'); in __archive_pathmatch_w()
428 else if (s == NULL) in __archive_pathmatch_w()
437 if (*p == L'/' && *s != L'/') in __archive_pathmatch_w()
444 while (*s == L'/') in __archive_pathmatch_w()
445 ++s; in __archive_pathmatch_w()
446 return (pm_w(p, s, flags)); in __archive_pathmatch_w()
451 for ( ; s != NULL; s = wcschr(s, L'/')) { in __archive_pathmatch_w()
452 if (*s == L'/') in __archive_pathmatch_w()
453 s++; in __archive_pathmatch_w()
454 if (pm_w(p, s, flags)) in __archive_pathmatch_w()
461 return (pm_w(p, s, flags)); in __archive_pathmatch_w()