Lines Matching refs:pattern
51 * catalog the C files (based upon pattern matching) in the subtree
67 char *pattern, *ptr, *fname_ptr, saved_char;
89 pattern = mod_ptr->mod_str;
92 * Pattern is a file pattern.
95 * a file pattern and the entry is a directory,
115 * in the pattern.
117 num_pattern_slash = count_slashes(pattern);
130 * Assume fname is /A/B/C/D/E and the pattern is D/E.
141 if ((pattern[0] == '.') && (pattern[1] == '.') &&
142 (pattern[2] == '/')) {
143 pattern = strchr(pattern, '/');
149 if (fnmatch(pattern, ptr, FNM_PATHNAME) == 0) {
164 * First, make copies, since both the pattern and
168 * since pattern matching is done for the string AFTER
171 * pattern is "dir3/", we do NOT want to include every
182 (void) strlcpy(pattern_cp, pattern,
208 /* Count the # of slashes in the pattern and fname */
236 * For example: if pattern is C/D/, and fname_cp is
251 * number of slashes as the pattern.
270 * component with the pattern we are looking
313 * - filename is A/B/C/D/E and pattern may be D/E/
314 * - filename is D/E and pattern may be D/E/
318 /* strip the trailing slash from the pattern */
559 char *pattern;
564 pattern = modifier_str;
566 /* see if the pattern is an include or an exclude */
567 if (pattern[0] == '!') {
569 pattern++;
572 is_dir = (pattern[0] != '\0' && pattern[strlen(pattern) - 1] == '/');
578 new_mod_ptr->mod_str = safe_strdup(pattern);
613 char full_path[PATH_MAX], pattern[PATH_MAX];
649 * Take those chars and put them into 'pattern'.
657 (void) strlcpy(pattern, beg_pattern,
660 (void) strlcpy(pattern, beg_pattern, sizeof (pattern));
664 * At this point, search for 'pattern' as a *subdirectory* of
687 * In the case of a match against 'pattern',
698 if (fnmatch(pattern, dir_entry->d_name,
749 * Iterate through all the dirnames which match the pattern and