Lines Matching refs:pathbuf

468     struct strbuf pathbuf = strbuf_INIT;  in glob1()  local
476 err = glob2(&pathbuf, pattern, pglob, no_match); in glob1()
477 xfree(pathbuf.s); in glob1()
487 glob2(struct strbuf *pathbuf, const Char *pattern, glob_t *pglob, int no_match) in glob2() argument
501 strbuf_terminate(pathbuf); in glob2()
503 if (Lstat(pathbuf->s, &sbuf)) in glob2()
507 pathbuf->s[pathbuf->len - 1] != SEP) && in glob2()
511 (Stat(pathbuf->s, &sbuf) == 0) && in glob2()
515 strbuf_append1(pathbuf, SEP); in glob2()
516 strbuf_terminate(pathbuf); in glob2()
519 globextend(pathbuf->s, pglob); in glob2()
525 orig_len = pathbuf->len; in glob2()
529 strbuf_append1(pathbuf, *p++); in glob2()
535 strbuf_append1(pathbuf, *pattern++); in glob2()
538 pathbuf->len = orig_len; in glob2()
539 return (glob3(pathbuf, pattern, p, pattern, pglob, no_match)); in glob2()
564 glob3(struct strbuf *pathbuf, const Char *pattern, const Char *restpattern, in glob3() argument
577 strbuf_terminate(pathbuf); in glob3()
578 orig_len = pathbuf->len; in glob3()
597 glob2(pathbuf, restpattern - 1, pglob, no_match) : in glob3()
598 glob2(pathbuf, restpattern + 1, pglob, no_match) : in glob3()
599 glob3(pathbuf, pattern, restpattern, termstar, pglob, no_match); in glob3()
602 pathbuf->len = orig_len; in glob3()
603 strbuf_terminate(pathbuf); in glob3()
606 if (*pathbuf->s && (Lstat(pathbuf->s, &sbuf) || !S_ISDIR(sbuf.st_mode) in glob3()
613 if (!(dirp = Opendir(pathbuf->s))) { in glob3()
615 if ((pglob->gl_errfunc && (*pglob->gl_errfunc) (pathbuf->s, errno)) || in glob3()
629 pathbuf->len = orig_len; in glob3()
630 strbuf_append(pathbuf, dp->d_name); in glob3()
631 strbuf_terminate(pathbuf); in glob3()
636 (Lstat(pathbuf->s, &sbuf) || S_ISLNK(sbuf.st_mode))) in glob3()
639 if (match(pathbuf->s + orig_len, pattern, termstar, in glob3()
642 strbuf_append1(pathbuf, SEP); in glob3()
643 strbuf_terminate(pathbuf); in glob3()
644 if ((err = glob2(pathbuf, pglobstar, pglob, no_match)) != 0) in glob3()
647 if (match(pathbuf->s + orig_len, pattern, restpattern, in glob3()
650 if ((err = glob2(pathbuf, restpattern, pglob, no_match)) != 0) in glob3()