Lines Matching +defs:list +defs:flags

107     int flags,
110 const int nocase = flags & FNM_CASEFOLD;
111 const int escape = !(flags & FNM_NOESCAPE);
183 int flags,
186 const int period = !(flags & FNM_DOTMATCH);
187 const int pathname = flags & FNM_PATHNAME;
188 const int escape = !(flags & FNM_NOESCAPE);
189 const int nocase = flags & FNM_CASEFOLD;
229 if ((t = bracket(p + 1, pend, s, send, flags, enc)) != 0) {
276 int flags)
281 const int period = !(flags & FNM_DOTMATCH);
282 const int pathname = flags & FNM_PATHNAME;
294 if (fnmatch_helper(&p, &s, flags, enc) == 0) {
318 return fnmatch_helper(&p, &s, flags, enc);
1015 (void)((flags & GLOB_VERBOSE) && rb_protect(sys_warning_1, (VALUE)(val), 0))
1030 do_stat(const char *path, struct stat *pst, int flags)
1041 do_lstat(const char *path, struct stat *pst, int flags)
1051 do_opendir(const char *path, int flags, rb_encoding *enc)
1073 has_magic(const char *p, const char *pend, int flags, rb_encoding *enc)
1075 const int escape = !(flags & FNM_NOESCAPE);
1076 const int nocase = flags & FNM_CASEFOLD;
1105 find_dirsep(const char *p, const char *pend, int flags, rb_encoding *enc)
1107 const int escape = !(flags & FNM_NOESCAPE);
1173 static void glob_free_pattern(struct glob_pattern *list);
1176 glob_make_pattern(const char *p, const char *e, int flags, rb_encoding *enc)
1178 struct glob_pattern *list, *tmp, **tail = &list;
1194 const char *m = find_dirsep(p, e, flags, enc);
1195 int magic = has_magic(p, m, flags, enc);
1200 while (!has_magic(m+1, m2 = find_dirsep(m+1, e, flags, enc), flags, enc) &&
1231 glob_free_pattern(list);
1239 return list;
1243 glob_free_pattern(struct glob_pattern *list)
1245 while (list) {
1246 struct glob_pattern *tmp = list;
1247 list = list->next;
1310 int flags,
1319 int escape = !(flags & FNM_NOESCAPE);
1347 if (do_lstat(path, &st, flags) == 0) {
1357 if (do_stat(path, &st, flags) == 0) {
1385 dirp = do_opendir(*path ? path : ".", flags, enc);
1397 if (!(flags & FNM_DOTMATCH)) continue;
1411 if (recursive && dotfile < ((flags & FNM_DOTMATCH) ? 2 : 1)) {
1414 if (do_lstat(buf, &st, flags) == 0)
1438 if (fnmatch(p->str, enc, dp->d_name, flags) == 0)
1444 flags, func, arg, enc);
1482 if (*cur2 && fnmatch((*cur2)->str, enc, name, flags) == 0) {
1496 new_end, flags, func, arg, enc);
1510 ruby_glob0(const char *path, int flags, ruby_glob_func *func, VALUE arg, rb_encoding *enc)
1512 struct glob_pattern *list;
1519 flags |= FNM_SYSCASE;
1532 list = glob_make_pattern(root, root + strlen(root), flags, enc);
1533 if (!list) {
1537 status = glob_helper(buf, 0, UNKNOWN, UNKNOWN, &list, &list + 1, flags, func, arg, enc);
1538 glob_free_pattern(list);
1545 ruby_glob(const char *path, int flags, ruby_glob_func *func, VALUE arg)
1547 return ruby_glob0(path, flags & ~GLOB_VERBOSE, func, arg,
1563 rb_glob2(const char *path, int flags,
1573 if (flags & FNM_SYSCASE) {
1577 return ruby_glob0(path, flags | GLOB_VERBOSE, rb_glob_caller, (VALUE)&args,
1595 ruby_brace_expand(const char *str, int flags, ruby_glob_func *func, VALUE arg,
1598 const int escape = !(flags & FNM_NOESCAPE);
1641 status = ruby_brace_expand(buf, flags, func, arg, enc);
1656 int flags;
1664 return ruby_glob0(path, arg->flags, arg->func, arg->value, enc);
1668 ruby_brace_glob0(const char *str, int flags, ruby_glob_func *func, VALUE arg,
1675 args.flags = flags;
1676 return ruby_brace_expand(str, flags, glob_brace, (VALUE)&args, enc);
1680 ruby_brace_glob(const char *str, int flags, ruby_glob_func *func, VALUE arg)
1682 return ruby_brace_glob0(str, flags & ~GLOB_VERBOSE, func, arg,
1687 ruby_brace_glob_with_enc(const char *str, int flags, ruby_glob_func *func, VALUE arg, rb_encoding *enc)
1689 return ruby_brace_glob0(str, flags & ~GLOB_VERBOSE, func, arg, enc);
1693 push_glob(VALUE ary, VALUE str, int flags)
1704 return ruby_brace_glob0(RSTRING_PTR(str), flags | GLOB_VERBOSE,
1709 rb_push_glob(VALUE str, int flags) /* '\0' is delimiter */
1722 flags);
1736 dir_globs(long argc, VALUE *argv, int flags)
1745 status = push_glob(ary, str, flags);
1773 * Dir.glob( pattern, [flags] ) -> array
1774 * Dir.glob( pattern, [flags] ) {| filename | block } -> nil
1780 * <code>File::fnmatch</code> for the meaning of the <i>flags</i>
1843 int flags;
1846 flags = NUM2INT(rflags);
1848 flags = 0;
1852 ary = rb_push_glob(str, flags);
1856 ary = dir_globs(RARRAY_LEN(v), RARRAY_PTR(v), flags);
1950 return (fnmatch(pattern, enc, RSTRING_PTR(path), arg->flags) == 0);
1955 * File.fnmatch( pattern, path, [flags] ) -> (true or false)
1956 * File.fnmatch?( pattern, path, [flags] ) -> (true or false)
1983 * <i>flags</i> is a bitwise OR of the <code>FNM_xxx</code>
1984 * parameters. The same glob pattern and flags are used by
2039 int flags;
2042 flags = NUM2INT(rflags);
2044 flags = 0;
2049 if (flags & FNM_EXTGLOB) {
2053 args.flags = flags;
2054 if (ruby_brace_expand(RSTRING_PTR(pattern), flags, fnmatch_brace,
2061 if (fnmatch(RSTRING_PTR(pattern), enc, RSTRING_PTR(path), flags) == 0)
2110 * ways to list directories and their contents. See also