Lines Matching refs:pattern
13 The match() routine recursively compares a string to a "pattern" (regular
18 pattern to lowercase if indicated by the global var pInfo->lcflag (which
22 GRR: reversed order of text, pattern in matche() (now same as match());
43 Match the pattern (wildcard) against the string (fixed):
45 match(string, pattern, ignore_case);
47 returns TRUE if string matches pattern, FALSE otherwise. In the pattern:
56 characters allowed in the [..] pattern construct. Other characters are
109 int recmatch OF((ZCONST uch *pattern, ZCONST uch *string, int ignore_case));
112 static int recmatch OF((ZCONST uch *pattern, ZCONST uch *string,
119 int match(string, pattern, ignore_case)
120 ZCONST char *string, *pattern;
125 int j = strlen(pattern);
138 strcpy(dospattern, pattern);
155 return recmatch((uch *)pattern, (uch *)string, ignore_case) == 1;
161 ZCONST uch *p; /* sh pattern to match */
164 /* Recursively compare the sh pattern p with the string s and return 1 if
166 * pattern. This routine recurses on itself no more deeply than the number
167 * of characters in the pattern. */
169 unsigned int c; /* pattern char or start of range in [-] loop */
171 /* Get first character, the pattern for new recmatch calls follows */
174 /* If that was the end of the pattern, match if string empty too */
205 /* end of pattern: matched if at end of string, else continue */
208 /* continue to match if at '/' in pattern, else give up */
331 put("String (return for new pattern): ");