Lines Matching defs:flags
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)
38 if (!type && !(flags & GLOB_MARK)) type = DT_REG;
58 } else if (pat[i] == '\\' && !(flags & GLOB_NOESCAPE)) {
103 if ((flags & GLOB_MARK) && (!type||type==DT_LNK) && !stat(buf, &st)) {
108 if (errno!=ENOENT && (errfunc(buf, errno) || (flags & GLOB_ERR)))
112 if (append(tail, buf, pos, (flags & GLOB_MARK) && type==DT_DIR))
119 if (p2 && !(flags & GLOB_NOESCAPE)) {
129 if (errfunc(buf, errno) || (flags & GLOB_ERR))
145 int fnm_flags= ((flags & GLOB_NOESCAPE) ? FNM_NOESCAPE : 0)
146 | ((!(flags & GLOB_PERIOD)) ? FNM_PERIOD : 0);
153 if (p2 && (flags & GLOB_PERIOD) && de->d_name[0]=='.'
160 int r = do_glob(buf, pos+l, de->d_type, p2 ? p2 : "", flags, errfunc, tail);
169 if (readerr && (errfunc(buf, errno) || (flags & GLOB_ERR)))
227 int glob(const char *restrict pat, int flags, int (*errfunc)(const char *path, int err), glob_t *restrict g)
231 size_t offs = (flags & GLOB_DOOFFS) ? g->gl_offs : 0;
237 if (!(flags & GLOB_APPEND)) {
249 if ((flags & (GLOB_TILDE | GLOB_TILDE_CHECK)) && *p == '~')
252 error = do_glob(buf, pos, 0, s, flags, errfunc, &tail);
263 if (flags & GLOB_NOCHECK) {
272 if (flags & GLOB_APPEND) {
294 if (!(flags & GLOB_NOSORT))