Lines Matching refs:pattern

47  *	Set in gl_flags if pattern contained a globbing character.
279 * The main glob() routine: compiles the pattern (optionally processing
280 * quotes), calls glob1() to do the real pattern matching, and finally
286 glob(const char *pattern, int flags, int (*errfunc) (const char *, int),
296 patnext = (const unsigned char *) pattern;
317 patbuf = xmalloc((strlen(pattern) + 1) * sizeof(*patbuf));
414 * If there was no match we are going to append the pattern
416 * and the pattern did not contain any magic characters
423 globextend(pattern, pglob);
428 /* copy pattern, interpreting quotes */
429 copy = xmalloc(strlen(pattern) + 1);
431 src = pattern;
454 glob1(Char *pattern, glob_t *pglob, int no_match)
462 if (*pattern == EOS)
464 err = glob2(&pathbuf, pattern, pglob, no_match);
471 * of recursion for each segment in the pattern that contains one or
475 glob2(struct strbuf *pathbuf, const Char *pattern, glob_t *pglob, int no_match)
483 * loop over pattern segments until end of pattern or until segment with
488 if (*pattern == EOS) { /* end of pattern? */
512 p = pattern;
521 pattern = p;
522 while (*pattern == SEP)
523 strbuf_append1(pathbuf, *pattern++);
527 return (glob3(pathbuf, pattern, p, pglob, no_match));
535 glob3(struct strbuf *pathbuf, const Char *pattern, const Char *restpattern,
562 if (dp->d_name[0] == DOT && *pattern != DOT)
567 if (match(pathbuf->s + orig_len, pattern, restpattern, (int) m_not)
635 * pattern matching function for filenames. Each occurrence of the *
636 * pattern causes a recursion level.