Lines Matching refs:match

11   match.c
13 The match() routine recursively compares a string to a "pattern" (regular
14 expression), returning TRUE if a match is found or FALSE if not. This
15 version is specifically for use with unzip.c: as did the previous match()
22 GRR: reversed order of text, pattern in matche() (now same as match());
45 match(string, pattern, ignore_case);
60 side or outside a [..] construct, and match the character exactly, precede
78 #ifndef THEOS /* the Theos port defines its own variant of match() */
108 #define match(s,p,ic) (recmatch((ZCONST uch *)p,(ZCONST uch *)s,ic) == 1)
117 /* match() is a shell to recmatch() to return only Boolean values. */
119 int match(string, pattern, ignore_case)
132 "*." to "*". In either case, continue with the normal (Unix-like) match
134 match.) This causes "a*.*" and "a*." to behave as MS-DOS users expect.
144 if (p) { /* found a dot: match fails */
161 ZCONST uch *p; /* sh pattern to match */
162 ZCONST uch *s; /* string to which to match it */
165 * they match, and 0 or 2 if they don't or if there is a syntax error in the
174 /* If that was the end of the pattern, match if string empty too */
179 * If WILD_STOP_AT_DIR is defined, it won't match '/' */
201 /* single '*': this doesn't match slashes */
208 /* continue to match if at '/' in pattern, else give up */
221 return 2; /* 2 means give up--match will return false */
228 int r; /* flag true to match anything but the range */
230 if (*s == 0) /* need a character to match */
260 /* bracket match failed */
336 match(str, pat, 0) ? "YES" : "NO",
337 match(str, pat, 1) ? "YES" : "NO");