Lines Matching +full:class +full:- +full:d
13 * glob_match - Shell-style pattern matching, like !fnmatch(pat, str, 0)
14 * @pat: Shell-style pattern to match, e.g. "*.[ch]".
17 * Perform shell-style glob matching, returning true (1) if the match
21 * (And, inside character classes, !, - and ].)
25 * does not preprocess the patterns. It is non-recursive, and run-time
35 * are complemented by a leading !; this does not support the regex-style
36 * [^a-z] syntax.
51 * Loop over each token (character or class) in pat, matching in glob_match()
57 unsigned char d = *pat++; in glob_match() local
59 switch (d) { in glob_match()
64 case '*': /* Any-length wildcard */ in glob_match()
68 back_str = --str; /* Allow zero-length match */ in glob_match()
70 case '[': { /* Character class */ in glob_match()
74 char const *class = pat + inverted; in glob_match() local
75 unsigned char a = *class++; in glob_match()
78 * Iterate over each span in the character class. in glob_match()
80 * range a-b. The first span may begin with ']'. in glob_match()
88 if (class[0] == '-' && class[1] != ']') { in glob_match()
89 b = class[1]; in glob_match()
94 class += 2; in glob_match()
98 } while ((a = *class++) != ']'); in glob_match()
102 pat = class; in glob_match()
106 d = *pat++; in glob_match()
110 if (c == d) { in glob_match()
111 if (d == '\0') in glob_match()