Lines Matching refs:pattern

124 convert_posix(uint32_t pattype, PCRE2_SPTR pattern, PCRE2_SIZE plength,  in convert_posix()  argument
129 PCRE2_SPTR posix = pattern; in convert_posix()
481 PCRE2_SPTR pattern = start; in convert_glob_parse_class() local
488 if (pattern >= pattern_end) return 0; in convert_glob_parse_class()
490 c = *pattern++; in convert_glob_parse_class()
495 if (c != CHAR_COLON || pattern >= pattern_end || in convert_glob_parse_class()
496 *pattern != CHAR_RIGHT_SQUARE_BRACKET) in convert_glob_parse_class()
506 pattern = start; in convert_glob_parse_class()
508 while (*pattern == (PCRE2_UCHAR) *class_ptr) in convert_glob_parse_class()
510 if (*pattern == CHAR_COLON) in convert_glob_parse_class()
512 pattern += 2; in convert_glob_parse_class()
515 do convert_glob_write(out, *start++); while (start < pattern); in convert_glob_parse_class()
517 *from = pattern; in convert_glob_parse_class()
520 pattern++; in convert_glob_parse_class()
591 PCRE2_SPTR pattern = *from; in convert_glob_parse_range() local
598 if (pattern >= pattern_end) in convert_glob_parse_range()
600 *from = pattern; in convert_glob_parse_range()
604 if (*pattern == CHAR_EXCLAMATION_MARK in convert_glob_parse_range()
605 || *pattern == CHAR_CIRCUMFLEX_ACCENT) in convert_glob_parse_range()
607 pattern++; in convert_glob_parse_range()
609 if (pattern >= pattern_end) in convert_glob_parse_range()
611 *from = pattern; in convert_glob_parse_range()
639 if (*pattern == CHAR_RIGHT_SQUARE_BRACKET) in convert_glob_parse_range()
646 pattern++; in convert_glob_parse_range()
649 while (pattern < pattern_end) in convert_glob_parse_range()
651 char_start = pattern; in convert_glob_parse_range()
652 GETCHARINCTEST(c, pattern); in convert_glob_parse_range()
670 *from = pattern; in convert_glob_parse_range()
674 if (pattern >= pattern_end) break; in convert_glob_parse_range()
676 if (c == CHAR_LEFT_SQUARE_BRACKET && *pattern == CHAR_COLON) in convert_glob_parse_range()
678 *from = pattern; in convert_glob_parse_range()
683 pattern = *from; in convert_glob_parse_range()
695 *pattern != CHAR_RIGHT_SQUARE_BRACKET) in convert_glob_parse_range()
699 char_start = pattern; in convert_glob_parse_range()
700 GETCHARINCTEST(c, pattern); in convert_glob_parse_range()
702 if (pattern >= pattern_end) break; in convert_glob_parse_range()
706 char_start = pattern; in convert_glob_parse_range()
707 GETCHARINCTEST(c, pattern); in convert_glob_parse_range()
709 else if (c == CHAR_LEFT_SQUARE_BRACKET && *pattern == CHAR_COLON) in convert_glob_parse_range()
711 *from = pattern; in convert_glob_parse_range()
717 *from = pattern; in convert_glob_parse_range()
730 char_start = pattern; in convert_glob_parse_range()
731 GETCHARINCTEST(c, pattern); in convert_glob_parse_range()
733 if (pattern >= pattern_end) break; in convert_glob_parse_range()
746 do convert_glob_write(out, *char_start++); while (char_start < pattern); in convert_glob_parse_range()
749 *from = pattern; in convert_glob_parse_range()
794 convert_glob(uint32_t options, PCRE2_SPTR pattern, PCRE2_SIZE plength, in convert_glob() argument
799 PCRE2_SPTR pattern_start = pattern; in convert_glob()
800 PCRE2_SPTR pattern_end = pattern + plength; in convert_glob()
838 if (pattern < pattern_end && pattern[0] == CHAR_ASTERISK) in convert_glob()
842 else if (!no_starstar && pattern + 1 < pattern_end && in convert_glob()
843 pattern[1] == CHAR_ASTERISK) in convert_glob()
854 while (pattern < pattern_end) in convert_glob()
856 c = *pattern++; in convert_glob()
860 is_start = pattern == pattern_start + 1; in convert_glob()
868 if (!no_starstar && pattern < pattern_end && *pattern == CHAR_ASTERISK) in convert_glob()
870 after_separator = is_start || (pattern[-2] == separator); in convert_glob()
872 do pattern++; while (pattern < pattern_end && in convert_glob()
873 *pattern == CHAR_ASTERISK); in convert_glob()
875 if (pattern >= pattern_end) in convert_glob()
883 if (after_separator && escape != 0 && *pattern == escape && in convert_glob()
884 pattern + 1 < pattern_end && pattern[1] == separator) in convert_glob()
885 pattern++; in convert_glob()
889 if (*pattern != separator) continue; in convert_glob()
902 pattern++; in convert_glob()
908 if (!after_separator || *pattern != separator) in convert_glob()
933 pattern++; in convert_glob()
937 if (pattern < pattern_end && *pattern == CHAR_ASTERISK) in convert_glob()
939 do pattern++; while (pattern < pattern_end && in convert_glob()
940 *pattern == CHAR_ASTERISK); in convert_glob()
945 if (pattern >= pattern_end) in convert_glob()
976 if (pattern >= pattern_end) in convert_glob()
993 result = convert_glob_parse_range(&pattern, pattern_end, in convert_glob()
1001 if (pattern >= pattern_end) in convert_glob()
1006 c = *pattern++; in convert_glob()
1035 *bufflenptr = pattern - pattern_start; in convert_glob()
1064 pcre2_pattern_convert(PCRE2_SPTR pattern, PCRE2_SIZE plength, uint32_t options, in pcre2_pattern_convert() argument
1075 if (pattern == NULL || bufflenptr == NULL) return PCRE2_ERROR_NULL; in pcre2_pattern_convert()
1085 if (plength == PCRE2_ZERO_TERMINATED) plength = PRIV(strlen)(pattern); in pcre2_pattern_convert()
1101 rc = PRIV(valid_utf)(pattern, plength, &erroroffset); in pcre2_pattern_convert()
1130 rc = convert_glob(options & ~PCRE2_CONVERT_GLOB, pattern, plength, utf, in pcre2_pattern_convert()
1136 rc = convert_posix(pattype, pattern, plength, utf, use_buffer, use_length, in pcre2_pattern_convert()