*bufflenptr = plength;
160convlength += p - pp;
161 if(dummyrun) p = use_buffer;
166 #ifndef SUPPORT_UNICODE 169GETCHARLENTEST(c, posix, clength);
174sc = nextisliteral? 0 : c;
175nextisliteral =
FALSE;
194 if(c <= 127 &&
islower(c))
break;
218memcpy(p, posix - clength,
CU2BYTES(clength));
279 if(extended) nextisliteral =
TRUE;
else 285lastspecial = *p++ = *posix++;
288 elsenextisliteral =
TRUE;
293 if(!extended || bracount == 0)
gotoESCAPE_LITERAL;
306 if(!extended)
gotoESCAPE_LITERAL;
329 if(extended)
gotoCOPY_SPECIAL;
346memcpy(p, posix - clength,
CU2BYTES(clength));
355convlength += p - pp;
356*bufflenptr = convlength;
388 if(
out->output <
out->output_end)
389*
out->output++ = chr;
415 while(--length != 0);
418 out->output_size = output_size;
478 static const char*posix_classes =
"alnum:alpha:ascii:blank:cntrl:digit:" 479 "graph:lower:print:punct:space:upper:word:xdigit:";
482 const char*class_ptr;
488 if(pattern >= pattern_end)
return0;
492 if(c < CHAR_a || c >
CHAR_z)
break;
495 if(c !=
CHAR_COLON|| pattern >= pattern_end ||
499class_ptr = posix_classes;
504 if(*class_ptr ==
CHAR_NUL)
return0;
524 while(*class_ptr !=
CHAR_COLON) class_ptr++;
543 #if PCRE2_CODE_UNIT_WIDTH != 8 594 int len, class_index;
598 if(pattern >= pattern_end)
609 if(pattern >= pattern_end)
649 while(pattern < pattern_end)
651char_start = pattern;
658 if(!is_negative && !no_wildsep && separator_seen)
674 if(pattern >= pattern_end)
break;
681 if(class_index != 0)
690separator_seen =
TRUE;
699char_start = pattern;
702 if(pattern >= pattern_end)
break;
704 if(escape != 0 && c == escape)
706char_start = pattern;
721 if(prev_c < separator && separator < c) separator_seen =
TRUE;
728 if(escape != 0 && c == escape)
730char_start = pattern;
733 if(pattern >= pattern_end)
break;
744 if(c == separator) separator_seen =
TRUE;
809 BOOLwith_escape, is_start, after_separator;
814 #ifdef SUPPORT_UNICODE 815 if(
utf&& (separator >= 128 || escape >= 128))
826 out.output = use_buffer;
827 out.output_end = use_buffer + use_length;
828 out.output_size = 0;
842 else if(!no_starstar && pattern + 1 < pattern_end &&
854 while(pattern < pattern_end)
860is_start = pattern == pattern_start + 1;
868 if(!no_starstar && pattern < pattern_end && *pattern ==
CHAR_ASTERISK)
870after_separator = is_start || (pattern[-2] == separator);
872 dopattern++;
while(pattern < pattern_end &&
875 if(pattern >= pattern_end)
881after_starstar =
TRUE;
883 if(after_separator && escape != 0 && *pattern == escape &&
884pattern + 1 < pattern_end && pattern[1] == separator)
889 if(*pattern != separator)
continue;
908 if(!after_separator || *pattern != separator)
939 dopattern++;
while(pattern < pattern_end &&
945 if(pattern >= pattern_end)
952 if(is_start)
continue;
976 if(pattern >= pattern_end)
994&
out,
utf, separator, with_escape, escape, no_wildsep);
999 if(escape != 0 && c == escape)
1001 if(pattern >= pattern_end)
1029 if(!dummyrun &&
out.output_size != (
PCRE2_SIZE) (
out.output - use_buffer))
1035*bufflenptr = pattern - pattern_start;
1039*bufflenptr =
out.output_size - 1;
1078(pattype & (~pattype+1)) != pattype ||
1086 if(ccontext ==
NULL) ccontext =
1091 #ifndef SUPPORT_UNICODE 1104*bufflenptr = erroroffset;
1113 if(buffptr !=
NULL&& *buffptr !=
NULL)
1115use_buffer = *buffptr;
1116use_length = *bufflenptr;
1122 for(
i= 0;
i< 2;
i++)
1131use_buffer, use_length, bufflenptr, dummyrun, ccontext);
1136rc =
convert_posix(pattype, pattern, plength,
utf, use_buffer, use_length,
1137bufflenptr, dummyrun, ccontext);
1158use_buffer = *buffptr;
1159use_length = *bufflenptr + 1;
1181 if(converted !=
NULL)
std::ofstream out("events_result.xml")
main entry point for tests
static SQLCHAR output[256]
#define TRUE
bool replacment for C indicating true.
#define FALSE
bool replacment for C indicating false.
#define pcre2_convert_context
#define PCRE2_ZERO_TERMINATED
#define PCRE2_ERROR_BADOPTION
#define PCRE2_ERROR_INTERNAL
#define PCRE2_CONVERT_POSIX_BASIC
#define PCRE2_ERROR_UNICODE_NOT_SUPPORTED
#define PCRE2_CONVERT_POSIX_EXTENDED
#define PCRE2_CONVERT_GLOB_NO_STARSTAR
#define PCRE2_CONVERT_NO_UTF_CHECK
#define PCRE2_ERROR_CONVERT_SYNTAX
#define PCRE2_ERROR_END_BACKSLASH
#define PCRE2_CALL_CONVENTION
#define PCRE2_CONVERT_UTF
#define PCRE2_CONVERT_GLOB
#define PCRE2_CONVERT_GLOB_NO_WILD_SEPARATOR
#define PCRE2_ERROR_NOMEMORY
#define PCRE2_ERROR_MISSING_SQUARE_BRACKET
struct pcre2_output_context pcre2_output_context
static int convert_glob(uint32_t options, PCRE2_SPTR pattern, PCRE2_SIZE plength, BOOL utf, PCRE2_UCHAR *use_buffer, PCRE2_SIZE use_length, PCRE2_SIZE *bufflenptr, BOOL dummyrun, pcre2_convert_context *ccontext)
PCRE2_EXPORT void PCRE2_CALL_CONVENTION pcre2_converted_pattern_free(PCRE2_UCHAR *converted)
static int convert_glob_parse_range(PCRE2_SPTR *from, PCRE2_SPTR pattern_end, pcre2_output_context *out, BOOL utf, PCRE2_UCHAR separator, BOOL with_escape, PCRE2_UCHAR escape, BOOL no_wildsep)
static void convert_glob_write(pcre2_output_context *out, PCRE2_UCHAR chr)
@ POSIX_CLASS_NOT_STARTED
static int convert_posix(uint32_t pattype, PCRE2_SPTR pattern, PCRE2_SIZE plength, BOOL utf, PCRE2_UCHAR *use_buffer, PCRE2_SIZE use_length, PCRE2_SIZE *bufflenptr, BOOL dummyrun, pcre2_convert_context *ccontext)
static void convert_glob_print_commit(pcre2_output_context *out)
#define STR_COLON_RIGHT_SQUARE_BRACKET
#define DUMMY_BUFFER_SIZE
static int convert_glob_parse_class(PCRE2_SPTR *from, PCRE2_SPTR pattern_end, pcre2_output_context *out)
static BOOL convert_glob_char_in_class(int class_index, PCRE2_UCHAR c)
static const char * pcre2_escaped_literals
static void convert_glob_write_str(pcre2_output_context *out, PCRE2_SIZE length)
static void convert_glob_print_separator(pcre2_output_context *out, PCRE2_UCHAR separator, BOOL with_escape)
PCRE2_EXPORT int PCRE2_CALL_CONVENTION pcre2_pattern_convert(PCRE2_SPTR pattern, PCRE2_SIZE plength, uint32_t options, PCRE2_UCHAR **buffptr, PCRE2_SIZE *bufflenptr, pcre2_convert_context *ccontext)
static const char * posix_meta_escapes
static void convert_glob_print_wildcard(pcre2_output_context *out, PCRE2_UCHAR separator, BOOL with_escape)
#define PCRE2_CODE_UNIT_WIDTH
#define CHAR_LESS_THAN_SIGN
struct pcre2_memctl pcre2_memctl
#define STR_RIGHT_PARENTHESIS
#define CHAR_VERTICAL_LINE
#define STR_LEFT_CURLY_BRACKET
#define CHAR_LEFT_SQUARE_BRACKET
#define CHAR_QUESTION_MARK
#define STR_QUESTION_MARK
#define STR_LEFT_SQUARE_BRACKET
#define CHAR_EXCLAMATION_MARK
#define STR_RIGHT_CURLY_BRACKET
#define CHAR_RIGHT_PARENTHESIS
#define STR_RIGHT_SQUARE_BRACKET
#define CHAR_RIGHT_SQUARE_BRACKET
#define CHAR_RIGHT_CURLY_BRACKET
#define CHAR_LEFT_PARENTHESIS
#define CHAR_CIRCUMFLEX_ACCENT
#define STR_CIRCUMFLEX_ACCENT
#define CHAR_LEFT_CURLY_BRACKET
#define STR_LEFT_PARENTHESIS
#define CHAR_GREATER_THAN_SIGN
#define STR_VERTICAL_LINE
#define GETCHARINCTEST(c, eptr)
int valid_utf(PCRE2_SPTR8, PCRE2_SIZE, PCRE2_SIZE *)
void(* free)(void *, void *)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4