Lines Matching refs:pattern

629  * tomoyo_const_part_length - Evaluate the initial length without a pattern in a token.
633 * Returns the initial length without a pattern in @filename.
689 * tomoyo_file_matches_pattern2 - Pattern matching without '/' character and "\-" pattern.
693 * @pattern: The start of pattern to compare.
694 * @pattern_end: The end of pattern to compare.
696 * Returns true if @filename matches @pattern, false otherwise.
700 const char *pattern,
703 while (filename < filename_end && pattern < pattern_end) {
708 if (*pattern != '\\') {
709 if (*filename++ != *pattern++)
714 pattern++;
715 switch (*pattern) {
751 && strncmp(filename + 1, pattern, 3) == 0) {
753 pattern += 2;
762 pattern + 1, pattern_end))
765 if (c == '.' && *pattern == '@')
774 break; /* Bad pattern. */
779 c = *pattern;
793 pattern + 1, pattern_end))
796 return false; /* Not matched or bad pattern. */
799 pattern++;
801 while (*pattern == '\\' &&
802 (*(pattern + 1) == '*' || *(pattern + 1) == '@'))
803 pattern += 2;
804 return filename == filename_end && pattern == pattern_end;
812 * @pattern: The start of pattern to compare.
813 * @pattern_end: The end of pattern to compare.
815 * Returns true if @filename matches @pattern, false otherwise.
819 const char *pattern,
822 const char *pattern_start = pattern;
826 while (pattern < pattern_end - 1) {
827 /* Split at "\-" pattern. */
828 if (*pattern++ != '\\' || *pattern++ != '-')
833 pattern - 2);
839 pattern_start = pattern;
847 * tomoyo_path_matches_pattern2 - Do pathname pattern matching.
850 * @p: The start of pattern to compare.
878 /* Ignore trailing "\*" and "\@" in @pattern. */
885 * The "\{" pattern is permitted only after '/' character.
887 * Also, the "\}" pattern is permitted only before '/' character
892 return false; /* Bad pattern. */
894 /* Compare current component with pattern. */
912 * tomoyo_path_matches_pattern - Check whether the given filename matches the given pattern.
915 * @pattern: The pattern to compare.
938 const struct tomoyo_path_info *pattern)
941 const char *p = pattern->name;
942 const int len = pattern->const_len;
944 /* If @pattern doesn't contain pattern, I can use strcmp(). */
945 if (!pattern->is_patterned)
946 return !tomoyo_pathcmp(filename, pattern);
948 if (filename->is_dir != pattern->is_dir)