Lines Matching refs:pattern

624  * tomoyo_const_part_length - Evaluate the initial length without a pattern in a token.
628 * Returns the initial length without a pattern in @filename.
684 * tomoyo_file_matches_pattern2 - Pattern matching without '/' character and "\-" pattern.
688 * @pattern: The start of pattern to compare.
689 * @pattern_end: The end of pattern to compare.
691 * Returns true if @filename matches @pattern, false otherwise.
695 const char *pattern,
698 while (filename < filename_end && pattern < pattern_end) {
703 if (*pattern != '\\') {
704 if (*filename++ != *pattern++)
709 pattern++;
710 switch (*pattern) {
746 && strncmp(filename + 1, pattern, 3) == 0) {
748 pattern += 2;
757 pattern + 1, pattern_end))
760 if (c == '.' && *pattern == '@')
769 break; /* Bad pattern. */
774 c = *pattern;
788 pattern + 1, pattern_end))
791 return false; /* Not matched or bad pattern. */
794 pattern++;
796 while (*pattern == '\\' &&
797 (*(pattern + 1) == '*' || *(pattern + 1) == '@'))
798 pattern += 2;
799 return filename == filename_end && pattern == pattern_end;
807 * @pattern: The start of pattern to compare.
808 * @pattern_end: The end of pattern to compare.
810 * Returns true if @filename matches @pattern, false otherwise.
814 const char *pattern,
817 const char *pattern_start = pattern;
821 while (pattern < pattern_end - 1) {
822 /* Split at "\-" pattern. */
823 if (*pattern++ != '\\' || *pattern++ != '-')
828 pattern - 2);
834 pattern_start = pattern;
842 * tomoyo_path_matches_pattern2 - Do pathname pattern matching.
845 * @p: The start of pattern to compare.
873 /* Ignore trailing "\*" and "\@" in @pattern. */
880 * The "\{" pattern is permitted only after '/' character.
882 * Also, the "\}" pattern is permitted only before '/' character
887 return false; /* Bad pattern. */
889 /* Compare current component with pattern. */
907 * tomoyo_path_matches_pattern - Check whether the given filename matches the given pattern.
910 * @pattern: The pattern to compare.
933 const struct tomoyo_path_info *pattern)
936 const char *p = pattern->name;
937 const int len = pattern->const_len;
939 /* If @pattern doesn't contain pattern, I can use strcmp(). */
940 if (!pattern->is_patterned)
941 return !tomoyo_pathcmp(filename, pattern);
943 if (filename->is_dir != pattern->is_dir)