Lines Matching refs:pattern
139 and replacing strings matching PATTERN with REPLACE.
140 If PATTERN_PERCENT is not nil, PATTERN has already been
149 patsubst_expand (char *o, char *text, char *pattern, char *replace,
158 /* We call find_percent on REPLACE before checking PATTERN so that REPLACE
159 will be collapsed before we call subst_expand if PATTERN has no %. */
182 pattern_percent = find_percent (pattern);
187 /* With no % in the pattern, this is just a simple substitution. */
188 return subst_expand (o, text, pattern, replace,
189 strlen (pattern), strlen (replace), 1);
191 /* Record the length of PATTERN before and after the %
193 pattern_prepercent_len = pattern_percent - pattern - 1;
206 && (*t != *pattern
208 || !strneq (t + 1, pattern + 1, pattern_prepercent_len - 1)))
232 matched the % in the pattern. */
281 /* Return 1 if PATTERN matches STR, 0 if not. */
284 pattern_matches (char *pattern, char *percent, char *str)
290 unsigned int len = strlen (pattern) + 1;
292 bcopy (pattern, new_chars, len);
293 pattern = new_chars;
294 percent = find_percent (pattern);
296 return streq (pattern, str);
302 if (strlength < (percent - pattern) + sfxlen
303 || !strneq (pattern, str, percent - pattern))
1008 /* Run each pattern through the words, killing words. */