Lines Matching refs:pattern
125 convert_posix(uint32_t pattype, PCRE2_SPTR pattern, PCRE2_SIZE plength, in convert_posix() argument
130 PCRE2_SPTR posix = pattern; in convert_posix()
482 PCRE2_SPTR pattern = start; in convert_glob_parse_class() local
489 if (pattern >= pattern_end) return 0; in convert_glob_parse_class()
491 c = *pattern++; in convert_glob_parse_class()
496 if (c != CHAR_COLON || pattern >= pattern_end || in convert_glob_parse_class()
497 *pattern != CHAR_RIGHT_SQUARE_BRACKET) in convert_glob_parse_class()
507 pattern = start; in convert_glob_parse_class()
509 while (*pattern == (PCRE2_UCHAR) *class_ptr) in convert_glob_parse_class()
511 if (*pattern == CHAR_COLON) in convert_glob_parse_class()
513 pattern += 2; in convert_glob_parse_class()
516 do convert_glob_write(out, *start++); while (start < pattern); in convert_glob_parse_class()
518 *from = pattern; in convert_glob_parse_class()
521 pattern++; in convert_glob_parse_class()
584 PCRE2_SPTR pattern = *from; in convert_glob_parse_range() local
591 if (pattern >= pattern_end) in convert_glob_parse_range()
593 *from = pattern; in convert_glob_parse_range()
597 if (*pattern == CHAR_EXCLAMATION_MARK in convert_glob_parse_range()
598 || *pattern == CHAR_CIRCUMFLEX_ACCENT) in convert_glob_parse_range()
600 pattern++; in convert_glob_parse_range()
602 if (pattern >= pattern_end) in convert_glob_parse_range()
604 *from = pattern; in convert_glob_parse_range()
632 if (*pattern == CHAR_RIGHT_SQUARE_BRACKET) in convert_glob_parse_range()
639 pattern++; in convert_glob_parse_range()
642 while (pattern < pattern_end) in convert_glob_parse_range()
644 char_start = pattern; in convert_glob_parse_range()
645 GETCHARINCTEST(c, pattern); in convert_glob_parse_range()
663 *from = pattern; in convert_glob_parse_range()
667 if (pattern >= pattern_end) break; in convert_glob_parse_range()
669 if (c == CHAR_LEFT_SQUARE_BRACKET && *pattern == CHAR_COLON) in convert_glob_parse_range()
671 *from = pattern; in convert_glob_parse_range()
676 pattern = *from; in convert_glob_parse_range()
688 *pattern != CHAR_RIGHT_SQUARE_BRACKET) in convert_glob_parse_range()
692 char_start = pattern; in convert_glob_parse_range()
693 GETCHARINCTEST(c, pattern); in convert_glob_parse_range()
695 if (pattern >= pattern_end) break; in convert_glob_parse_range()
699 char_start = pattern; in convert_glob_parse_range()
700 GETCHARINCTEST(c, pattern); in convert_glob_parse_range()
702 else if (c == CHAR_LEFT_SQUARE_BRACKET && *pattern == CHAR_COLON) in convert_glob_parse_range()
704 *from = pattern; in convert_glob_parse_range()
710 *from = pattern; in convert_glob_parse_range()
723 char_start = pattern; in convert_glob_parse_range()
724 GETCHARINCTEST(c, pattern); in convert_glob_parse_range()
726 if (pattern >= pattern_end) break; in convert_glob_parse_range()
739 do convert_glob_write(out, *char_start++); while (char_start < pattern); in convert_glob_parse_range()
742 *from = pattern; in convert_glob_parse_range()
787 convert_glob(uint32_t options, PCRE2_SPTR pattern, PCRE2_SIZE plength, in convert_glob() argument
792 PCRE2_SPTR pattern_start = pattern; in convert_glob()
793 PCRE2_SPTR pattern_end = pattern + plength; in convert_glob()
831 if (pattern < pattern_end && pattern[0] == CHAR_ASTERISK) in convert_glob()
835 else if (!no_starstar && pattern + 1 < pattern_end && in convert_glob()
836 pattern[1] == CHAR_ASTERISK) in convert_glob()
847 while (pattern < pattern_end) in convert_glob()
849 c = *pattern++; in convert_glob()
853 is_start = pattern == pattern_start + 1; in convert_glob()
861 if (!no_starstar && pattern < pattern_end && *pattern == CHAR_ASTERISK) in convert_glob()
863 after_separator = is_start || (pattern[-2] == separator); in convert_glob()
865 do pattern++; while (pattern < pattern_end && in convert_glob()
866 *pattern == CHAR_ASTERISK); in convert_glob()
868 if (pattern >= pattern_end) in convert_glob()
876 if (after_separator && escape != 0 && *pattern == escape && in convert_glob()
877 pattern + 1 < pattern_end && pattern[1] == separator) in convert_glob()
878 pattern++; in convert_glob()
882 if (*pattern != separator) continue; in convert_glob()
895 pattern++; in convert_glob()
901 if (!after_separator || *pattern != separator) in convert_glob()
926 pattern++; in convert_glob()
930 if (pattern < pattern_end && *pattern == CHAR_ASTERISK) in convert_glob()
932 do pattern++; while (pattern < pattern_end && in convert_glob()
933 *pattern == CHAR_ASTERISK); in convert_glob()
938 if (pattern >= pattern_end) in convert_glob()
969 if (pattern >= pattern_end) in convert_glob()
986 result = convert_glob_parse_range(&pattern, pattern_end, in convert_glob()
994 if (pattern >= pattern_end) in convert_glob()
999 c = *pattern++; in convert_glob()
1028 *bufflenptr = pattern - pattern_start; in convert_glob()
1057 pcre2_pattern_convert(PCRE2_SPTR pattern, PCRE2_SIZE plength, uint32_t options, in pcre2_pattern_convert() argument
1068 if (pattern == NULL || bufflenptr == NULL) return PCRE2_ERROR_NULL; in pcre2_pattern_convert()
1078 if (plength == PCRE2_ZERO_TERMINATED) plength = PRIV(strlen)(pattern); in pcre2_pattern_convert()
1094 rc = PRIV(valid_utf)(pattern, plength, &erroroffset); in pcre2_pattern_convert()
1123 rc = convert_glob(options & ~PCRE2_CONVERT_GLOB, pattern, plength, utf, in pcre2_pattern_convert()
1129 rc = convert_posix(pattype, pattern, plength, utf, use_buffer, use_length, in pcre2_pattern_convert()