Lines Matching refs:tail
20 static int append(struct match **tail, const char *name, size_t len, int mark)
24 (*tail)->next = new;
31 *tail = new;
35 static int do_glob(char *buf, size_t pos, int type, char *pat, int flags, int (*errfunc)(const char *path, int err), struct match **tail)
112 if (append(tail, buf, pos, (flags & GLOB_MARK) && type==DT_DIR))
160 int r = do_glob(buf, pos+l, de->d_type, p2 ? p2 : "", flags, errfunc, tail);
229 struct match head = { .next = NULL }, *tail = &head;
252 error = do_glob(buf, pos, 0, s, flags, errfunc, &tail);
261 for (cnt=0, tail=head.next; tail; tail=tail->next, cnt++);
264 tail = &head;
265 if (append(&tail, pat, strlen(pat), 0))
289 for (i=0, tail=head.next; i<cnt; tail=tail->next, i++)
290 g->gl_pathv[offs + i] = tail->name;