A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/pcre2test_8c_source.html below:

NCBI C++ ToolKit: src/util/regexp/pcre2test.c Source File

69 #if defined NATIVE_ZOS 86 #if defined(SUPPORT_LIBREADLINE) || defined(SUPPORT_LIBEDIT) 87 #if defined(SUPPORT_LIBREADLINE) 88 #include <readline/readline.h> 89 #include <readline/history.h> 91 #if defined(HAVE_EDITLINE_READLINE_H) 92 #include <editline/readline.h> 93 #elif defined(HAVE_EDIT_READLINE_READLINE_H) 94 #include <edit/readline/readline.h> 99 #ifdef RL_VERSION_MAJOR 109 #define INTERACTIVE(f) isatty(fileno(f)) 123 #if defined(_WIN32) || defined(WIN32) 126 #define INPUT_MODE "r" 127 #define OUTPUT_MODE "wb" 128 #define BINARY_INPUT_MODE "rb" 129 #define BINARY_OUTPUT_MODE "wb" 132 #define isatty _isatty 136 #define fileno _fileno 142 #define _setmode(handle, mode) setmode(handle, mode) 148 #include <sys/time.h> 149 #include <sys/resource.h> 150 #if defined NATIVE_ZOS 151 #define INPUT_MODE "r" 152 #define OUTPUT_MODE "w" 153 #define BINARY_INPUT_MODE "rb" 154 #define BINARY_OUTPUT_MODE "wb" 156 #define INPUT_MODE "rb" 157 #define OUTPUT_MODE "wb" 158 #define BINARY_INPUT_MODE "rb" 159 #define BINARY_OUTPUT_MODE "wb" 171 #include lib$routines 178 #if defined(DISABLE_PERCENT_ZT) || (defined(_MSC_VER) && (_MSC_VER < 1800)) || \ 179  (!defined(_MSC_VER) && (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L))) 181 #define PTR_FORM "lld" 182 #define SIZ_FORM "llu" 184 #define PTR_FORM "ld" 185 #define SIZ_FORM "lu" 188 #define PTR_FORM "td" 189 #define SIZ_FORM "zu" 196 #define glue(a,b) a##b 197 #define G(a,b) glue(a,b) 201 #ifndef CLOCKS_PER_SEC 203 #define CLOCKS_PER_SEC CLK_TCK 205 #define CLOCKS_PER_SEC 100 209 #define CFORE_UNSET UINT32_MAX 210 #define CONVERT_UNSET UINT32_MAX 211 #define DFA_WS_DIMENSION 1000 212 #define DEFAULT_OVECCOUNT 15 213 #define JUNK_OFFSET 0xdeadbeef 214 #define LOCALESIZE 32 215 #define LOOPREPEAT 500000 216 #define MALLOCLISTSIZE 20 217 #define PARENS_NEST_DEFAULT 220 218 #define PATSTACKSIZE 20 219 #define REPLACE_MODSIZE 100 220 #define VERSION_SIZE 64 224 #define JIT_DEFAULT (PCRE2_JIT_COMPLETE|\ 225  PCRE2_JIT_PARTIAL_SOFT|\ 226  PCRE2_JIT_PARTIAL_HARD) 231 #define REPLACE_BUFFSIZE 1024 236 #define PCRE16_MODE 16 237 #define PCRE32_MODE 32 249 #define PRINTABLE(c) ((c) >= 64 && (c) < 255) 251 #define PRINTABLE(c) ((c) >= 32 && (c) < 127) 254 #define PRINTOK(c) ((use_tables != NULL && c < 256)? isprint(c) : PRINTABLE(c)) 273 #define PRIV(name) name 274 #define PCRE2_CODE_UNIT_WIDTH 0 275 #define PCRE2_BUILDING_PCRE2TEST 284 #define PCRE2_PCRE2TEST 292 #if ULONG_MAX > UINT32_MAX 293 #define U32OVERFLOW(x) (x > UINT32_MAX) 295 #define U32OVERFLOW(x) (x == UINT32_MAX) 298 #if LONG_MAX > INT32_MAX 299 #define S32OVERFLOW(x) (x > INT32_MAX || x < INT32_MIN) 301 #define S32OVERFLOW(x) (x == INT32_MAX || x == INT32_MIN) 314 #undef PCRE2_CODE_UNIT_WIDTH 316 #ifdef SUPPORT_PCRE2_8 317 #define PCRE2_CODE_UNIT_WIDTH 8 318 #define PCRE2_SUFFIX(a) G(a,8) 321 #undef PCRE2_CODE_UNIT_WIDTH 325 #ifdef SUPPORT_PCRE2_16 326 #define PCRE2_CODE_UNIT_WIDTH 16 327 #define PCRE2_SUFFIX(a) G(a,16) 330 #undef PCRE2_CODE_UNIT_WIDTH 334 #ifdef SUPPORT_PCRE2_32 335 #define PCRE2_CODE_UNIT_WIDTH 32 336 #define PCRE2_SUFFIX(a) G(a,32) 339 #undef PCRE2_CODE_UNIT_WIDTH 343 #define PCRE2_SUFFIX(a) a 354 #define PCRE2_CODE_UNIT_WIDTH 8 356 #define PCRE2_SPTR PCRE2_SPTR8 358 #undef PCRE2_CODE_UNIT_WIDTH 367 #if defined SUPPORT_PCRE2_8 368 #define DEFAULT_TEST_MODE PCRE8_MODE 369 #define VERSION_TYPE PCRE2_UCHAR8 370 #define PCRE2_CONFIG pcre2_config_8 371 #define PCRE2_JIT_STACK pcre2_jit_stack_8 372 #define PCRE2_REAL_GENERAL_CONTEXT pcre2_real_general_context_8 373 #define PCRE2_REAL_COMPILE_CONTEXT pcre2_real_compile_context_8 374 #define PCRE2_REAL_CONVERT_CONTEXT pcre2_real_convert_context_8 375 #define PCRE2_REAL_MATCH_CONTEXT pcre2_real_match_context_8 377 #elif defined SUPPORT_PCRE2_16 378 #define DEFAULT_TEST_MODE PCRE16_MODE 379 #define VERSION_TYPE PCRE2_UCHAR16 380 #define PCRE2_CONFIG pcre2_config_16 381 #define PCRE2_JIT_STACK pcre2_jit_stack_16 382 #define PCRE2_REAL_GENERAL_CONTEXT pcre2_real_general_context_16 383 #define PCRE2_REAL_COMPILE_CONTEXT pcre2_real_compile_context_16 384 #define PCRE2_REAL_CONVERT_CONTEXT pcre2_real_convert_context_16 385 #define PCRE2_REAL_MATCH_CONTEXT pcre2_real_match_context_16 387 #elif defined SUPPORT_PCRE2_32 388 #define DEFAULT_TEST_MODE PCRE32_MODE 389 #define VERSION_TYPE PCRE2_UCHAR32 390 #define PCRE2_CONFIG pcre2_config_32 391 #define PCRE2_JIT_STACK pcre2_jit_stack_32 392 #define PCRE2_REAL_GENERAL_CONTEXT pcre2_real_general_context_32 393 #define PCRE2_REAL_COMPILE_CONTEXT pcre2_real_compile_context_32 394 #define PCRE2_REAL_CONVERT_CONTEXT pcre2_real_convert_context_32 395 #define PCRE2_REAL_MATCH_CONTEXT pcre2_real_match_context_32 421 #define cmdlistcount (sizeof(cmdlist)/sizeof(cmdstruct)) 429  "DEFAULT"

,

"CR"

,

"LF"

,

"CRLF"

,

"ANY"

,

"ANYCRLF"

,

"NUL"

};

446 #define convertlistcount (sizeof(convertlist)/sizeof(convertstruct)) 478 #define CTL_AFTERTEXT 0x00000001u 479 #define CTL_ALLAFTERTEXT 0x00000002u 480 #define CTL_ALLCAPTURES 0x00000004u 481 #define CTL_ALLUSEDTEXT 0x00000008u 482 #define CTL_ALTGLOBAL 0x00000010u 483 #define CTL_BINCODE 0x00000020u 484 #define CTL_CALLOUT_CAPTURE 0x00000040u 485 #define CTL_CALLOUT_INFO 0x00000080u 486 #define CTL_CALLOUT_NONE 0x00000100u 487 #define CTL_DFA 0x00000200u 488 #define CTL_EXPAND 0x00000400u 489 #define CTL_FINDLIMITS 0x00000800u 490 #define CTL_FINDLIMITS_NOHEAP 0x00001000u 491 #define CTL_FULLBINCODE 0x00002000u 492 #define CTL_GETALL 0x00004000u 493 #define CTL_GLOBAL 0x00008000u 494 #define CTL_HEXPAT 0x00010000u 495 #define CTL_INFO 0x00020000u 496 #define CTL_JITFAST 0x00040000u 497 #define CTL_JITVERIFY 0x00080000u 498 #define CTL_MARK 0x00100000u 499 #define CTL_MEMORY 0x00200000u 500 #define CTL_NULLCONTEXT 0x00400000u 501 #define CTL_POSIX 0x00800000u 502 #define CTL_POSIX_NOSUB 0x01000000u 503 #define CTL_PUSH 0x02000000u 504 #define CTL_PUSHCOPY 0x04000000u 505 #define CTL_PUSHTABLESCOPY 0x08000000u 506 #define CTL_STARTCHAR 0x10000000u 507 #define CTL_USE_LENGTH 0x20000000u 508 #define CTL_UTF8_INPUT 0x40000000u 509 #define CTL_ZERO_TERMINATE 0x80000000u 513 #define CTL_DEBUG (CTL_FULLBINCODE|CTL_INFO) 514 #define CTL_ANYINFO (CTL_DEBUG|CTL_BINCODE|CTL_CALLOUT_INFO) 515 #define CTL_ANYGLOB (CTL_ALTGLOBAL|CTL_GLOBAL) 519 #define CTL2_SUBSTITUTE_CALLOUT 0x00000001u 520 #define CTL2_SUBSTITUTE_EXTENDED 0x00000002u 521 #define CTL2_SUBSTITUTE_LITERAL 0x00000004u 522 #define CTL2_SUBSTITUTE_MATCHED 0x00000008u 523 #define CTL2_SUBSTITUTE_OVERFLOW_LENGTH 0x00000010u 524 #define CTL2_SUBSTITUTE_REPLACEMENT_ONLY 0x00000020u 525 #define CTL2_SUBSTITUTE_UNKNOWN_UNSET 0x00000040u 526 #define CTL2_SUBSTITUTE_UNSET_EMPTY 0x00000080u 527 #define CTL2_SUBJECT_LITERAL 0x00000100u 528 #define CTL2_CALLOUT_NO_WHERE 0x00000200u 529 #define CTL2_CALLOUT_EXTRA 0x00000400u 530 #define CTL2_ALLVECTOR 0x00000800u 531 #define CTL2_NULL_PATTERN 0x00001000u 532 #define CTL2_NULL_SUBJECT 0x00002000u 533 #define CTL2_NULL_REPLACEMENT 0x00004000u 534 #define CTL2_FRAMESIZE 0x00008000u 536 #define CTL2_HEAPFRAMES_SIZE 0x20000000u 537 #define CTL2_NL_SET 0x40000000u 538 #define CTL2_BSR_SET 0x80000000u 545 #define CTL_ALLPD (CTL_AFTERTEXT|\ 555 #define CTL2_ALLPD (CTL2_SUBSTITUTE_CALLOUT|\ 556  CTL2_SUBSTITUTE_EXTENDED|\ 557  CTL2_SUBSTITUTE_LITERAL|\ 558  CTL2_SUBSTITUTE_MATCHED|\ 559  CTL2_SUBSTITUTE_OVERFLOW_LENGTH|\ 560  CTL2_SUBSTITUTE_REPLACEMENT_ONLY|\ 561  CTL2_SUBSTITUTE_UNKNOWN_UNSET|\ 562  CTL2_SUBSTITUTE_UNSET_EMPTY|\ 564  CTL2_HEAPFRAMES_SIZE) 623 #define CO(name) offsetof(PCRE2_REAL_COMPILE_CONTEXT, name) 624 #define MO(name) offsetof(PCRE2_REAL_MATCH_CONTEXT, name) 625 #define PO(name) offsetof(patctl, name) 626 #define PD(name) PO(name) 627 #define DO(name) offsetof(datctl, name) 640 #define PCRE2_EXTRA_ASCII_ALL (PCRE2_EXTRA_ASCII_BSD|PCRE2_EXTRA_ASCII_BSS| \ 641  PCRE2_EXTRA_ASCII_BSW|PCRE2_EXTRA_ASCII_POSIX) 678

{

"convert_glob_escape"

,

MOD_PAT

,

MOD_CHR

, 0,

PO

(convert_glob_escape) },

679

{

"convert_glob_separator"

,

MOD_PAT

,

MOD_CHR

, 0,

PO

(convert_glob_separator) },

722

{

"max_pattern_compiled_length"

,

MOD_CTC

,

MOD_SIZ

, 0,

CO

(max_pattern_compiled_length) },

786 #define MODLISTCOUNT sizeof(modlist)/sizeof(modstruct) 790 #define POSIX_SUPPORTED_COMPILE_OPTIONS ( \ 791  PCRE2_CASELESS|PCRE2_DOTALL|PCRE2_LITERAL|PCRE2_MULTILINE|PCRE2_UCP| \ 792  PCRE2_UTF|PCRE2_UNGREEDY) 794 #define POSIX_SUPPORTED_COMPILE_EXTRA_OPTIONS (0) 796 #define POSIX_SUPPORTED_COMPILE_CONTROLS ( \ 797  CTL_AFTERTEXT|CTL_ALLAFTERTEXT|CTL_EXPAND|CTL_HEXPAT|CTL_POSIX| \ 798  CTL_POSIX_NOSUB|CTL_USE_LENGTH) 800 #define POSIX_SUPPORTED_COMPILE_CONTROLS2 (0) 802 #define POSIX_SUPPORTED_MATCH_OPTIONS ( \ 803  PCRE2_NOTBOL|PCRE2_NOTEMPTY|PCRE2_NOTEOL) 805 #define POSIX_SUPPORTED_MATCH_CONTROLS (CTL_AFTERTEXT|CTL_ALLAFTERTEXT) 806 #define POSIX_SUPPORTED_MATCH_CONTROLS2 (CTL2_NULL_SUBJECT) 810 #define PUSH_SUPPORTED_COMPILE_CONTROLS ( \ 811  CTL_BINCODE|CTL_CALLOUT_INFO|CTL_FULLBINCODE|CTL_HEXPAT|CTL_INFO| \ 812  CTL_JITVERIFY|CTL_MEMORY|CTL_PUSH|CTL_PUSHCOPY| \ 813  CTL_PUSHTABLESCOPY|CTL_USE_LENGTH) 815 #define PUSH_SUPPORTED_COMPILE_CONTROLS2 (CTL2_BSR_SET| \ 816  CTL2_HEAPFRAMES_SIZE|CTL2_FRAMESIZE|CTL2_NL_SET) 820 #define PUSH_COMPILE_ONLY_CONTROLS CTL_JITVERIFY 821 #define PUSH_COMPILE_ONLY_CONTROLS2 (0) 825 #define NOTPOP_CONTROLS (CTL_HEXPAT|CTL_POSIX|CTL_POSIX_NOSUB|CTL_PUSH| \ 826  CTL_PUSHCOPY|CTL_PUSHTABLESCOPY|CTL_USE_LENGTH) 862

{

"bincode"

,

'B'

, -1 },

863

{

"info"

,

'I'

, -1 },

864

{

"ascii_all"

,

'a'

, -1 },

865

{

"global"

,

'g'

, -1 },

866

{

"caseless"

,

'i'

, -1 },

867

{

"multiline"

,

'm'

, -1 },

868

{

"no_auto_capture"

,

'n'

, -1 },

869

{

"caseless_restrict"

,

'r'

, -1 },

870

{

"dotall"

,

's'

, -1 },

871

{

"extended"

,

'x'

, -1 }

874 #define C1MODLISTCOUNT sizeof(c1modlist)/sizeof(c1modstruct) 879 #if defined SUPPORT_PCRE2_8 882 #if defined SUPPORT_PCRE2_16 885 #if defined SUPPORT_PCRE2_32 900 #define SUPPORT_EBCDIC 1 901 #define EBCDIC_NL CHAR_LF 903 #define SUPPORT_EBCDIC 0 907 #ifdef NEVER_BACKSLASH_C 908 #define BACKSLASH_C 0 910 #define BACKSLASH_C 1 940 #define COPTLISTCOUNT sizeof(coptlist)/sizeof(coptstruct) 945 #undef SUPPORT_EBCDIC 997 #ifdef SUPPORT_PCRE2_8 1027 #ifdef SUPPORT_PCRE2_8 1036 #ifdef SUPPORT_PCRE2_16 1047 #ifdef SUPPORT_PCRE2_32 1061 #define CAST8VAR(x) CASTVAR(uint8_t *, x) 1062 #define SET(x,y) SETOP(x,y,=) 1063 #define SETPLUS(x,y) SETOP(x,y,+=) 1064 #define strlen8(x) strlen((char *)x) 1073 #if (defined (SUPPORT_PCRE2_8) + defined (SUPPORT_PCRE2_16) + \ 1074  defined (SUPPORT_PCRE2_32)) >= 2 1078 #if defined(SUPPORT_PCRE2_8) && defined(SUPPORT_PCRE2_16) && defined(SUPPORT_PCRE2_32) 1080 #define CASTFLD(t,a,b) ((test_mode == PCRE8_MODE)? (t)(G(a,8)->b) : \ 1081  (test_mode == PCRE16_MODE)? (t)(G(a,16)->b) : (t)(G(a,32)->b)) 1083 #define CASTVAR(t,x) ( \ 1084  (test_mode == PCRE8_MODE)? (t)G(x,8) : \ 1085  (test_mode == PCRE16_MODE)? (t)G(x,16) : (t)G(x,32)) 1087 #define CODE_UNIT(a,b) ( \ 1088  (test_mode == PCRE8_MODE)? (uint32_t)(((PCRE2_SPTR8)(a))[b]) : \ 1089  (test_mode == PCRE16_MODE)? (uint32_t)(((PCRE2_SPTR16)(a))[b]) : \ 1090  (uint32_t)(((PCRE2_SPTR32)(a))[b])) 1092 #define CONCTXCPY(a,b) \ 1093  if (test_mode == PCRE8_MODE) \ 1094  memcpy(G(a,8),G(b,8),sizeof(pcre2_convert_context_8)); \ 1095  else if (test_mode == PCRE16_MODE) \ 1096  memcpy(G(a,16),G(b,16),sizeof(pcre2_convert_context_16)); \ 1097  else memcpy(G(a,32),G(b,32),sizeof(pcre2_convert_context_32)) 1099 #define CONVERT_COPY(a,b,c) \ 1100  if (test_mode == PCRE8_MODE) \ 1101  memcpy(G(a,8),(char *)b,c); \ 1102  else if (test_mode == PCRE16_MODE) \ 1103  memcpy(G(a,16),(char *)b,(c)*2); \ 1104  else if (test_mode == PCRE32_MODE) \ 1105  memcpy(G(a,32),(char *)b,(c)*4) 1107 #define DATCTXCPY(a,b) \ 1108  if (test_mode == PCRE8_MODE) \ 1109  memcpy(G(a,8),G(b,8),sizeof(pcre2_match_context_8)); \ 1110  else if (test_mode == PCRE16_MODE) \ 1111  memcpy(G(a,16),G(b,16),sizeof(pcre2_match_context_16)); \ 1112  else memcpy(G(a,32),G(b,32),sizeof(pcre2_match_context_32)) 1114 #define FLD(a,b) ((test_mode == PCRE8_MODE)? G(a,8)->b : \ 1115  (test_mode == PCRE16_MODE)? G(a,16)->b : G(a,32)->b) 1117 #define PATCTXCPY(a,b) \ 1118  if (test_mode == PCRE8_MODE) \ 1119  memcpy(G(a,8),G(b,8),sizeof(pcre2_compile_context_8)); \ 1120  else if (test_mode == PCRE16_MODE) \ 1121  memcpy(G(a,16),G(b,16),sizeof(pcre2_compile_context_16)); \ 1122  else memcpy(G(a,32),G(b,32),sizeof(pcre2_compile_context_32)) 1124 #define PCHARS(lv, p, offset, len, utf, f) \ 1125  if (test_mode == PCRE32_MODE) \ 1126  lv = pchars32((PCRE2_SPTR32)(p)+offset, len, utf, f); \ 1127  else if (test_mode == PCRE16_MODE) \ 1128  lv = pchars16((PCRE2_SPTR16)(p)+offset, len, utf, f); \ 1130  lv = pchars8((PCRE2_SPTR8)(p)+offset, len, utf, f) 1132 #define PCHARSV(p, offset, len, utf, f) \ 1133  if (test_mode == PCRE32_MODE) \ 1134  (void)pchars32((PCRE2_SPTR32)(p)+offset, len, utf, f); \ 1135  else if (test_mode == PCRE16_MODE) \ 1136  (void)pchars16((PCRE2_SPTR16)(p)+offset, len, utf, f); \ 1138  (void)pchars8((PCRE2_SPTR8)(p)+offset, len, utf, f) 1140 #define PCRE2_CALLOUT_ENUMERATE(a,b,c) \ 1141  if (test_mode == PCRE8_MODE) \ 1142  a = pcre2_callout_enumerate_8(compiled_code8, \ 1143  (int (*)(struct pcre2_callout_enumerate_block_8 *, void *))b,c); \ 1144  else if (test_mode == PCRE16_MODE) \ 1145  a = pcre2_callout_enumerate_16(compiled_code16, \ 1146  (int(*)(struct pcre2_callout_enumerate_block_16 *, void *))b,c); \ 1148  a = pcre2_callout_enumerate_32(compiled_code32, \ 1149  (int (*)(struct pcre2_callout_enumerate_block_32 *, void *))b,c) 1151 #define PCRE2_CODE_COPY_FROM_VOID(a,b) \ 1152  if (test_mode == PCRE8_MODE) \ 1153  G(a,8) = pcre2_code_copy_8(b); \ 1154  else if (test_mode == PCRE16_MODE) \ 1155  G(a,16) = pcre2_code_copy_16(b); \ 1157  G(a,32) = pcre2_code_copy_32(b) 1159 #define PCRE2_CODE_COPY_TO_VOID(a,b) \ 1160  if (test_mode == PCRE8_MODE) \ 1161  a = (void *)pcre2_code_copy_8(G(b,8)); \ 1162  else if (test_mode == PCRE16_MODE) \ 1163  a = (void *)pcre2_code_copy_16(G(b,16)); \ 1165  a = (void *)pcre2_code_copy_32(G(b,32)) 1167 #define PCRE2_CODE_COPY_WITH_TABLES_TO_VOID(a,b) \ 1168  if (test_mode == PCRE8_MODE) \ 1169  a = (void *)pcre2_code_copy_with_tables_8(G(b,8)); \ 1170  else if (test_mode == PCRE16_MODE) \ 1171  a = (void *)pcre2_code_copy_with_tables_16(G(b,16)); \ 1173  a = (void *)pcre2_code_copy_with_tables_32(G(b,32)) 1175 #define PCRE2_COMPILE(a,b,c,d,e,f,g) \ 1176  if (test_mode == PCRE8_MODE) \ 1177  G(a,8) = pcre2_compile_8(b,c,d,e,f,g); \ 1178  else if (test_mode == PCRE16_MODE) \ 1179  G(a,16) = pcre2_compile_16(b,c,d,e,f,g); \ 1181  G(a,32) = pcre2_compile_32(b,c,d,e,f,g) 1183 #define PCRE2_CONVERTED_PATTERN_FREE(a) \ 1184  if (test_mode == PCRE8_MODE) pcre2_converted_pattern_free_8((PCRE2_UCHAR8 *)a); \ 1185  else if (test_mode == PCRE16_MODE) pcre2_converted_pattern_free_16((PCRE2_UCHAR16 *)a); \ 1186  else pcre2_converted_pattern_free_32((PCRE2_UCHAR32 *)a) 1188 #define PCRE2_DFA_MATCH(a,b,c,d,e,f,g,h,i,j) \ 1189  if (test_mode == PCRE8_MODE) \ 1190  a = pcre2_dfa_match_8(G(b,8),(PCRE2_SPTR8)c,d,e,f,G(g,8),h,i,j); \ 1191  else if (test_mode == PCRE16_MODE) \ 1192  a = pcre2_dfa_match_16(G(b,16),(PCRE2_SPTR16)c,d,e,f,G(g,16),h,i,j); \ 1194  a = pcre2_dfa_match_32(G(b,32),(PCRE2_SPTR32)c,d,e,f,G(g,32),h,i,j) 1196 #define PCRE2_GET_ERROR_MESSAGE(r,a,b) \ 1197  if (test_mode == PCRE8_MODE) \ 1198  r = pcre2_get_error_message_8(a,G(b,8),G(G(b,8),_size)); \ 1199  else if (test_mode == PCRE16_MODE) \ 1200  r = pcre2_get_error_message_16(a,G(b,16),G(G(b,16),_size/2)); \ 1202  r = pcre2_get_error_message_32(a,G(b,32),G(G(b,32),_size/4)) 1204 #define PCRE2_GET_MATCH_DATA_HEAPFRAMES_SIZE(r,a) \ 1205  if (test_mode == PCRE8_MODE) \ 1206  r = pcre2_get_match_data_heapframes_size_8(G(a,8)); \ 1207  else if (test_mode == PCRE16_MODE) \ 1208  r = pcre2_get_match_data_heapframes_size_16(G(a,16)); \ 1210  r = pcre2_get_match_data_heapframes_size_32(G(a,32)) 1212 #define PCRE2_GET_OVECTOR_COUNT(a,b) \ 1213  if (test_mode == PCRE8_MODE) \ 1214  a = pcre2_get_ovector_count_8(G(b,8)); \ 1215  else if (test_mode == PCRE16_MODE) \ 1216  a = pcre2_get_ovector_count_16(G(b,16)); \ 1218  a = pcre2_get_ovector_count_32(G(b,32)) 1220 #define PCRE2_GET_STARTCHAR(a,b) \ 1221  if (test_mode == PCRE8_MODE) \ 1222  a = pcre2_get_startchar_8(G(b,8)); \ 1223  else if (test_mode == PCRE16_MODE) \ 1224  a = pcre2_get_startchar_16(G(b,16)); \ 1226  a = pcre2_get_startchar_32(G(b,32)) 1228 #define PCRE2_JIT_COMPILE(r,a,b) \ 1229  if (test_mode == PCRE8_MODE) r = pcre2_jit_compile_8(G(a,8),b); \ 1230  else if (test_mode == PCRE16_MODE) r = pcre2_jit_compile_16(G(a,16),b); \ 1231  else r = pcre2_jit_compile_32(G(a,32),b) 1233 #define PCRE2_JIT_FREE_UNUSED_MEMORY(a) \ 1234  if (test_mode == PCRE8_MODE) pcre2_jit_free_unused_memory_8(G(a,8)); \ 1235  else if (test_mode == PCRE16_MODE) pcre2_jit_free_unused_memory_16(G(a,16)); \ 1236  else pcre2_jit_free_unused_memory_32(G(a,32)) 1238 #define PCRE2_JIT_MATCH(a,b,c,d,e,f,g,h) \ 1239  if (test_mode == PCRE8_MODE) \ 1240  a = pcre2_jit_match_8(G(b,8),(PCRE2_SPTR8)c,d,e,f,G(g,8),h); \ 1241  else if (test_mode == PCRE16_MODE) \ 1242  a = pcre2_jit_match_16(G(b,16),(PCRE2_SPTR16)c,d,e,f,G(g,16),h); \ 1244  a = pcre2_jit_match_32(G(b,32),(PCRE2_SPTR32)c,d,e,f,G(g,32),h) 1246 #define PCRE2_JIT_STACK_CREATE(a,b,c,d) \ 1247  if (test_mode == PCRE8_MODE) \ 1248  a = (PCRE2_JIT_STACK *)pcre2_jit_stack_create_8(b,c,d); \ 1249  else if (test_mode == PCRE16_MODE) \ 1250  a = (PCRE2_JIT_STACK *)pcre2_jit_stack_create_16(b,c,d); \ 1252  a = (PCRE2_JIT_STACK *)pcre2_jit_stack_create_32(b,c,d); 1254 #define PCRE2_JIT_STACK_ASSIGN(a,b,c) \ 1255  if (test_mode == PCRE8_MODE) \ 1256  pcre2_jit_stack_assign_8(G(a,8),(pcre2_jit_callback_8)b,c); \ 1257  else if (test_mode == PCRE16_MODE) \ 1258  pcre2_jit_stack_assign_16(G(a,16),(pcre2_jit_callback_16)b,c); \ 1260  pcre2_jit_stack_assign_32(G(a,32),(pcre2_jit_callback_32)b,c); 1262 #define PCRE2_JIT_STACK_FREE(a) \ 1263  if (test_mode == PCRE8_MODE) \ 1264  pcre2_jit_stack_free_8((pcre2_jit_stack_8 *)a); \ 1265  else if (test_mode == PCRE16_MODE) \ 1266  pcre2_jit_stack_free_16((pcre2_jit_stack_16 *)a); \ 1268  pcre2_jit_stack_free_32((pcre2_jit_stack_32 *)a); 1270 #define PCRE2_MAKETABLES(a,c) \ 1271  if (test_mode == PCRE8_MODE) a = pcre2_maketables_8(G(c,8)); \ 1272  else if (test_mode == PCRE16_MODE) a = pcre2_maketables_16(G(c,16)); \ 1273  else a = pcre2_maketables_32(G(c,32)) 1275 #define PCRE2_MAKETABLES_FREE(c,a) \ 1276  if (test_mode == PCRE8_MODE) pcre2_maketables_free_8(G(c,8),a); \ 1277  else if (test_mode == PCRE16_MODE) pcre2_maketables_free_16(G(c,16),a); \ 1278  else pcre2_maketables_free_32(G(c,32),a) 1280 #define PCRE2_MATCH(a,b,c,d,e,f,g,h) \ 1281  if (test_mode == PCRE8_MODE) \ 1282  a = pcre2_match_8(G(b,8),(PCRE2_SPTR8)c,d,e,f,G(g,8),h); \ 1283  else if (test_mode == PCRE16_MODE) \ 1284  a = pcre2_match_16(G(b,16),(PCRE2_SPTR16)c,d,e,f,G(g,16),h); \ 1286  a = pcre2_match_32(G(b,32),(PCRE2_SPTR32)c,d,e,f,G(g,32),h) 1288 #define PCRE2_MATCH_DATA_CREATE(a,b,c) \ 1289  if (test_mode == PCRE8_MODE) \ 1290  G(a,8) = pcre2_match_data_create_8(b,G(c,8)); \ 1291  else if (test_mode == PCRE16_MODE) \ 1292  G(a,16) = pcre2_match_data_create_16(b,G(c,16)); \ 1294  G(a,32) = pcre2_match_data_create_32(b,G(c,32)) 1296 #define PCRE2_MATCH_DATA_CREATE_FROM_PATTERN(a,b,c) \ 1297  if (test_mode == PCRE8_MODE) \ 1298  G(a,8) = pcre2_match_data_create_from_pattern_8(G(b,8),G(c,8)); \ 1299  else if (test_mode == PCRE16_MODE) \ 1300  G(a,16) = pcre2_match_data_create_from_pattern_16(G(b,16),G(c,16)); \ 1302  G(a,32) = pcre2_match_data_create_from_pattern_32(G(b,32),G(c,32)) 1304 #define PCRE2_MATCH_DATA_FREE(a) \ 1305  if (test_mode == PCRE8_MODE) \ 1306  pcre2_match_data_free_8(G(a,8)); \ 1307  else if (test_mode == PCRE16_MODE) \ 1308  pcre2_match_data_free_16(G(a,16)); \ 1310  pcre2_match_data_free_32(G(a,32)) 1312 #define PCRE2_PATTERN_CONVERT(a,b,c,d,e,f,g) \ 1313  if (test_mode == PCRE8_MODE) \ 1314  a = pcre2_pattern_convert_8(G(b,8),c,d,(PCRE2_UCHAR8 **)e,f,G(g,8)); \ 1315  else if (test_mode == PCRE16_MODE) \ 1316  a = pcre2_pattern_convert_16(G(b,16),c,d,(PCRE2_UCHAR16 **)e,f,G(g,16)); \ 1318  a = pcre2_pattern_convert_32(G(b,32),c,d,(PCRE2_UCHAR32 **)e,f,G(g,32)) 1320 #define PCRE2_PATTERN_INFO(a,b,c,d) \ 1321  if (test_mode == PCRE8_MODE) \ 1322  a = pcre2_pattern_info_8(G(b,8),c,d); \ 1323  else if (test_mode == PCRE16_MODE) \ 1324  a = pcre2_pattern_info_16(G(b,16),c,d); \ 1326  a = pcre2_pattern_info_32(G(b,32),c,d) 1328 #define PCRE2_PRINTINT(a) \ 1329  if (test_mode == PCRE8_MODE) \ 1330  pcre2_printint_8(compiled_code8,outfile,a); \ 1331  else if (test_mode == PCRE16_MODE) \ 1332  pcre2_printint_16(compiled_code16,outfile,a); \ 1334  pcre2_printint_32(compiled_code32,outfile,a) 1336 #define PCRE2_SERIALIZE_DECODE(r,a,b,c,d) \ 1337  if (test_mode == PCRE8_MODE) \ 1338  r = pcre2_serialize_decode_8((pcre2_code_8 **)a,b,c,G(d,8)); \ 1339  else if (test_mode == PCRE16_MODE) \ 1340  r = pcre2_serialize_decode_16((pcre2_code_16 **)a,b,c,G(d,16)); \ 1342  r = pcre2_serialize_decode_32((pcre2_code_32 **)a,b,c,G(d,32)) 1344 #define PCRE2_SERIALIZE_ENCODE(r,a,b,c,d,e) \ 1345  if (test_mode == PCRE8_MODE) \ 1346  r = pcre2_serialize_encode_8((const pcre2_code_8 **)a,b,c,d,G(e,8)); \ 1347  else if (test_mode == PCRE16_MODE) \ 1348  r = pcre2_serialize_encode_16((const pcre2_code_16 **)a,b,c,d,G(e,16)); \ 1350  r = pcre2_serialize_encode_32((const pcre2_code_32 **)a,b,c,d,G(e,32)) 1352 #define PCRE2_SERIALIZE_FREE(a) \ 1353  if (test_mode == PCRE8_MODE) \ 1354  pcre2_serialize_free_8(a); \ 1355  else if (test_mode == PCRE16_MODE) \ 1356  pcre2_serialize_free_16(a); \ 1358  pcre2_serialize_free_32(a) 1360 #define PCRE2_SERIALIZE_GET_NUMBER_OF_CODES(r,a) \ 1361  if (test_mode == PCRE8_MODE) \ 1362  r = pcre2_serialize_get_number_of_codes_8(a); \ 1363  else if (test_mode == PCRE16_MODE) \ 1364  r = pcre2_serialize_get_number_of_codes_16(a); \ 1366  r = pcre2_serialize_get_number_of_codes_32(a); \ 1368 #define PCRE2_SET_CALLOUT(a,b,c) \ 1369  if (test_mode == PCRE8_MODE) \ 1370  pcre2_set_callout_8(G(a,8),(int (*)(pcre2_callout_block_8 *, void *))b,c); \ 1371  else if (test_mode == PCRE16_MODE) \ 1372  pcre2_set_callout_16(G(a,16),(int (*)(pcre2_callout_block_16 *, void *))b,c); \ 1374  pcre2_set_callout_32(G(a,32),(int (*)(pcre2_callout_block_32 *, void *))b,c); 1376 #define PCRE2_SET_CHARACTER_TABLES(a,b) \ 1377  if (test_mode == PCRE8_MODE) \ 1378  pcre2_set_character_tables_8(G(a,8),b); \ 1379  else if (test_mode == PCRE16_MODE) \ 1380  pcre2_set_character_tables_16(G(a,16),b); \ 1382  pcre2_set_character_tables_32(G(a,32),b) 1384 #define PCRE2_SET_COMPILE_RECURSION_GUARD(a,b,c) \ 1385  if (test_mode == PCRE8_MODE) \ 1386  pcre2_set_compile_recursion_guard_8(G(a,8),b,c); \ 1387  else if (test_mode == PCRE16_MODE) \ 1388  pcre2_set_compile_recursion_guard_16(G(a,16),b,c); \ 1390  pcre2_set_compile_recursion_guard_32(G(a,32),b,c) 1392 #define PCRE2_SET_DEPTH_LIMIT(a,b) \ 1393  if (test_mode == PCRE8_MODE) \ 1394  pcre2_set_depth_limit_8(G(a,8),b); \ 1395  else if (test_mode == PCRE16_MODE) \ 1396  pcre2_set_depth_limit_16(G(a,16),b); \ 1398  pcre2_set_depth_limit_32(G(a,32),b) 1400 #define PCRE2_SET_GLOB_SEPARATOR(r,a,b) \ 1401  if (test_mode == PCRE8_MODE) \ 1402  r = pcre2_set_glob_separator_8(G(a,8),b); \ 1403  else if (test_mode == PCRE16_MODE) \ 1404  r = pcre2_set_glob_separator_16(G(a,16),b); \ 1406  r = pcre2_set_glob_separator_32(G(a,32),b) 1408 #define PCRE2_SET_GLOB_ESCAPE(r,a,b) \ 1409  if (test_mode == PCRE8_MODE) \ 1410  r = pcre2_set_glob_escape_8(G(a,8),b); \ 1411  else if (test_mode == PCRE16_MODE) \ 1412  r = pcre2_set_glob_escape_16(G(a,16),b); \ 1414  r = pcre2_set_glob_escape_32(G(a,32),b) 1416 #define PCRE2_SET_HEAP_LIMIT(a,b) \ 1417  if (test_mode == PCRE8_MODE) \ 1418  pcre2_set_heap_limit_8(G(a,8),b); \ 1419  else if (test_mode == PCRE16_MODE) \ 1420  pcre2_set_heap_limit_16(G(a,16),b); \ 1422  pcre2_set_heap_limit_32(G(a,32),b) 1424 #define PCRE2_SET_MATCH_LIMIT(a,b) \ 1425  if (test_mode == PCRE8_MODE) \ 1426  pcre2_set_match_limit_8(G(a,8),b); \ 1427  else if (test_mode == PCRE16_MODE) \ 1428  pcre2_set_match_limit_16(G(a,16),b); \ 1430  pcre2_set_match_limit_32(G(a,32),b) 1432 #define PCRE2_SET_MAX_PATTERN_COMPILED_LENGTH(a,b) \ 1433  if (test_mode == PCRE8_MODE) \ 1434  pcre2_set_max_pattern_compiled_length_8(G(a,8),b); \ 1435  else if (test_mode == PCRE16_MODE) \ 1436  pcre2_set_max_pattern_compiled_length_16(G(a,16),b); \ 1438  pcre2_set_max_pattern_compiled_length_32(G(a,32),b) 1440 #define PCRE2_SET_MAX_PATTERN_LENGTH(a,b) \ 1441  if (test_mode == PCRE8_MODE) \ 1442  pcre2_set_max_pattern_length_8(G(a,8),b); \ 1443  else if (test_mode == PCRE16_MODE) \ 1444  pcre2_set_max_pattern_length_16(G(a,16),b); \ 1446  pcre2_set_max_pattern_length_32(G(a,32),b) 1448 #define PCRE2_SET_MAX_VARLOOKBEHIND(a,b) \ 1449  if (test_mode == PCRE8_MODE) \ 1450  pcre2_set_max_varlookbehind_8(G(a,8),b); \ 1451  else if (test_mode == PCRE16_MODE) \ 1452  pcre2_set_max_varlookbehind_16(G(a,16),b); \ 1454  pcre2_set_max_varlookbehind_32(G(a,32),b) 1456 #define PCRE2_SET_OFFSET_LIMIT(a,b) \ 1457  if (test_mode == PCRE8_MODE) \ 1458  pcre2_set_offset_limit_8(G(a,8),b); \ 1459  else if (test_mode == PCRE16_MODE) \ 1460  pcre2_set_offset_limit_16(G(a,16),b); \ 1462  pcre2_set_offset_limit_32(G(a,32),b) 1464 #define PCRE2_SET_PARENS_NEST_LIMIT(a,b) \ 1465  if (test_mode == PCRE8_MODE) \ 1466  pcre2_set_parens_nest_limit_8(G(a,8),b); \ 1467  else if (test_mode == PCRE16_MODE) \ 1468  pcre2_set_parens_nest_limit_16(G(a,16),b); \ 1470  pcre2_set_parens_nest_limit_32(G(a,32),b) 1472 #define PCRE2_SET_SUBSTITUTE_CALLOUT(a,b,c) \ 1473  if (test_mode == PCRE8_MODE) \ 1474  pcre2_set_substitute_callout_8(G(a,8), \ 1475  (int (*)(pcre2_substitute_callout_block_8 *, void *))b,c); \ 1476  else if (test_mode == PCRE16_MODE) \ 1477  pcre2_set_substitute_callout_16(G(a,16), \ 1478  (int (*)(pcre2_substitute_callout_block_16 *, void *))b,c); \ 1480  pcre2_set_substitute_callout_32(G(a,32), \ 1481  (int (*)(pcre2_substitute_callout_block_32 *, void *))b,c) 1483 #define PCRE2_SUBSTITUTE(a,b,c,d,e,f,g,h,i,j,k,l) \ 1484  if (test_mode == PCRE8_MODE) \ 1485  a = pcre2_substitute_8(G(b,8),(PCRE2_SPTR8)c,d,e,f,G(g,8),h, \ 1486  (PCRE2_SPTR8)i,j,(PCRE2_UCHAR8 *)k,l); \ 1487  else if (test_mode == PCRE16_MODE) \ 1488  a = pcre2_substitute_16(G(b,16),(PCRE2_SPTR16)c,d,e,f,G(g,16),h, \ 1489  (PCRE2_SPTR16)i,j,(PCRE2_UCHAR16 *)k,l); \ 1491  a = pcre2_substitute_32(G(b,32),(PCRE2_SPTR32)c,d,e,f,G(g,32),h, \ 1492  (PCRE2_SPTR32)i,j,(PCRE2_UCHAR32 *)k,l) 1494 #define PCRE2_SUBSTRING_COPY_BYNAME(a,b,c,d,e) \ 1495  if (test_mode == PCRE8_MODE) \ 1496  a = pcre2_substring_copy_byname_8(G(b,8),G(c,8),(PCRE2_UCHAR8 *)d,e); \ 1497  else if (test_mode == PCRE16_MODE) \ 1498  a = pcre2_substring_copy_byname_16(G(b,16),G(c,16),(PCRE2_UCHAR16 *)d,e); \ 1500  a = pcre2_substring_copy_byname_32(G(b,32),G(c,32),(PCRE2_UCHAR32 *)d,e) 1502 #define PCRE2_SUBSTRING_COPY_BYNUMBER(a,b,c,d,e) \ 1503  if (test_mode == PCRE8_MODE) \ 1504  a = pcre2_substring_copy_bynumber_8(G(b,8),c,(PCRE2_UCHAR8 *)d,e); \ 1505  else if (test_mode == PCRE16_MODE) \ 1506  a = pcre2_substring_copy_bynumber_16(G(b,16),c,(PCRE2_UCHAR16 *)d,e); \ 1508  a = pcre2_substring_copy_bynumber_32(G(b,32),c,(PCRE2_UCHAR32 *)d,e) 1510 #define PCRE2_SUBSTRING_FREE(a) \ 1511  if (test_mode == PCRE8_MODE) pcre2_substring_free_8((PCRE2_UCHAR8 *)a); \ 1512  else if (test_mode == PCRE16_MODE) \ 1513  pcre2_substring_free_16((PCRE2_UCHAR16 *)a); \ 1514  else pcre2_substring_free_32((PCRE2_UCHAR32 *)a) 1516 #define PCRE2_SUBSTRING_GET_BYNAME(a,b,c,d,e) \ 1517  if (test_mode == PCRE8_MODE) \ 1518  a = pcre2_substring_get_byname_8(G(b,8),G(c,8),(PCRE2_UCHAR8 **)d,e); \ 1519  else if (test_mode == PCRE16_MODE) \ 1520  a = pcre2_substring_get_byname_16(G(b,16),G(c,16),(PCRE2_UCHAR16 **)d,e); \ 1522  a = pcre2_substring_get_byname_32(G(b,32),G(c,32),(PCRE2_UCHAR32 **)d,e) 1524 #define PCRE2_SUBSTRING_GET_BYNUMBER(a,b,c,d,e) \ 1525  if (test_mode == PCRE8_MODE) \ 1526  a = pcre2_substring_get_bynumber_8(G(b,8),c,(PCRE2_UCHAR8 **)d,e); \ 1527  else if (test_mode == PCRE16_MODE) \ 1528  a = pcre2_substring_get_bynumber_16(G(b,16),c,(PCRE2_UCHAR16 **)d,e); \ 1530  a = pcre2_substring_get_bynumber_32(G(b,32),c,(PCRE2_UCHAR32 **)d,e) 1532 #define PCRE2_SUBSTRING_LENGTH_BYNAME(a,b,c,d) \ 1533  if (test_mode == PCRE8_MODE) \ 1534  a = pcre2_substring_length_byname_8(G(b,8),G(c,8),d); \ 1535  else if (test_mode == PCRE16_MODE) \ 1536  a = pcre2_substring_length_byname_16(G(b,16),G(c,16),d); \ 1538  a = pcre2_substring_length_byname_32(G(b,32),G(c,32),d) 1540 #define PCRE2_SUBSTRING_LENGTH_BYNUMBER(a,b,c,d) \ 1541  if (test_mode == PCRE8_MODE) \ 1542  a = pcre2_substring_length_bynumber_8(G(b,8),c,d); \ 1543  else if (test_mode == PCRE16_MODE) \ 1544  a = pcre2_substring_length_bynumber_16(G(b,16),c,d); \ 1546  a = pcre2_substring_length_bynumber_32(G(b,32),c,d) 1548 #define PCRE2_SUBSTRING_LIST_GET(a,b,c,d) \ 1549  if (test_mode == PCRE8_MODE) \ 1550  a = pcre2_substring_list_get_8(G(b,8),(PCRE2_UCHAR8 ***)c,d); \ 1551  else if (test_mode == PCRE16_MODE) \ 1552  a = pcre2_substring_list_get_16(G(b,16),(PCRE2_UCHAR16 ***)c,d); \ 1554  a = pcre2_substring_list_get_32(G(b,32),(PCRE2_UCHAR32 ***)c,d) 1556 #define PCRE2_SUBSTRING_LIST_FREE(a) \ 1557  if (test_mode == PCRE8_MODE) \ 1558  pcre2_substring_list_free_8((PCRE2_UCHAR8 **)a); \ 1559  else if (test_mode == PCRE16_MODE) \ 1560  pcre2_substring_list_free_16((PCRE2_UCHAR16 **)a); \ 1562  pcre2_substring_list_free_32((PCRE2_UCHAR32 **)a) 1564 #define PCRE2_SUBSTRING_NUMBER_FROM_NAME(a,b,c) \ 1565  if (test_mode == PCRE8_MODE) \ 1566  a = pcre2_substring_number_from_name_8(G(b,8),G(c,8)); \ 1567  else if (test_mode == PCRE16_MODE) \ 1568  a = pcre2_substring_number_from_name_16(G(b,16),G(c,16)); \ 1570  a = pcre2_substring_number_from_name_32(G(b,32),G(c,32)) 1573  (test_mode == PCRE8_MODE)? (void *)G(x,8) : \ 1574  (test_mode == PCRE16_MODE)? (void *)G(x,16) : \ 1577 #define SETFLD(x,y,z) \ 1578  if (test_mode == PCRE8_MODE) G(x,8)->y = z; \ 1579  else if (test_mode == PCRE16_MODE) G(x,16)->y = z; \ 1582 #define SETFLDVEC(x,y,v,z) \ 1583  if (test_mode == PCRE8_MODE) G(x,8)->y[v] = z; \ 1584  else if (test_mode == PCRE16_MODE) G(x,16)->y[v] = z; \ 1585  else G(x,32)->y[v] = z 1587 #define SETOP(x,y,z) \ 1588  if (test_mode == PCRE8_MODE) G(x,8) z y; \ 1589  else if (test_mode == PCRE16_MODE) G(x,16) z y; \ 1592 #define SETCASTPTR(x,y) \ 1593  if (test_mode == PCRE8_MODE) \ 1594  G(x,8) = (uint8_t *)(y); \ 1595  else if (test_mode == PCRE16_MODE) \ 1596  G(x,16) = (uint16_t *)(y); \ 1598  G(x,32) = (uint32_t *)(y) 1600 #define STRLEN(p) ((test_mode == PCRE8_MODE)? ((int)strlen((char *)p)) : \ 1601  (test_mode == PCRE16_MODE)? ((int)strlen16((PCRE2_SPTR16)p)) : \ 1602  ((int)strlen32((PCRE2_SPTR32)p))) 1605  if (test_mode == PCRE8_MODE) G(a,8)(G(b,8)); \ 1606  else if (test_mode == PCRE16_MODE) G(a,16)(G(b,16)); \ 1607  else G(a,32)(G(b,32)) 1609 #define SUB2(a,b,c) \ 1610  if (test_mode == PCRE8_MODE) G(a,8)(G(b,8),G(c,8)); \ 1611  else if (test_mode == PCRE16_MODE) G(a,16)(G(b,16),G(c,16)); \ 1612  else G(a,32)(G(b,32),G(c,32)) 1614 #define TEST(x,r,y) ( \ 1615  (test_mode == PCRE8_MODE && G(x,8) r (y)) || \ 1616  (test_mode == PCRE16_MODE && G(x,16) r (y)) || \ 1617  (test_mode == PCRE32_MODE && G(x,32) r (y))) 1619 #define TESTFLD(x,f,r,y) ( \ 1620  (test_mode == PCRE8_MODE && G(x,8)->f r (y)) || \ 1621  (test_mode == PCRE16_MODE && G(x,16)->f r (y)) || \ 1622  (test_mode == PCRE32_MODE && G(x,32)->f r (y))) 1634 #if defined(SUPPORT_PCRE2_32) && defined(SUPPORT_PCRE2_16) 1640 #elif defined(SUPPORT_PCRE2_32) && defined(SUPPORT_PCRE2_8) 1654 #define BYTEONE (BITONE/8) 1655 #define BYTETWO (BITTWO/8) 1657 #define CASTFLD(t,a,b) \ 1658  ((test_mode == G(G(PCRE,BITONE),_MODE))? (t)(G(a,BITONE)->b) : \ 1659  (t)(G(a,BITTWO)->b)) 1661 #define CASTVAR(t,x) ( \ 1662  (test_mode == G(G(PCRE,BITONE),_MODE))? \ 1663  (t)G(x,BITONE) : (t)G(x,BITTWO)) 1665 #define CODE_UNIT(a,b) ( \ 1666  (test_mode == G(G(PCRE,BITONE),_MODE))? \ 1667  (uint32_t)(((G(PCRE2_SPTR,BITONE))(a))[b]) : \ 1668  (uint32_t)(((G(PCRE2_SPTR,BITTWO))(a))[b])) 1670 #define CONCTXCPY(a,b) \ 1671  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1672  memcpy(G(a,BITONE),G(b,BITONE),sizeof(G(pcre2_convert_context_,BITONE))); \ 1674  memcpy(G(a,BITTWO),G(b,BITTWO),sizeof(G(pcre2_convert_context_,BITTWO))) 1676 #define CONVERT_COPY(a,b,c) \ 1677  (test_mode == G(G(PCRE,BITONE),_MODE))? \ 1678  memcpy(G(a,BITONE),(char *)b,(c)*BYTEONE) : \ 1679  memcpy(G(a,BITTWO),(char *)b,(c)*BYTETWO) 1681 #define DATCTXCPY(a,b) \ 1682  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1683  memcpy(G(a,BITONE),G(b,BITONE),sizeof(G(pcre2_match_context_,BITONE))); \ 1685  memcpy(G(a,BITTWO),G(b,BITTWO),sizeof(G(pcre2_match_context_,BITTWO))) 1688  ((test_mode == G(G(PCRE,BITONE),_MODE))? G(a,BITONE)->b : G(a,BITTWO)->b) 1690 #define PATCTXCPY(a,b) \ 1691  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1692  memcpy(G(a,BITONE),G(b,BITONE),sizeof(G(pcre2_compile_context_,BITONE))); \ 1694  memcpy(G(a,BITTWO),G(b,BITTWO),sizeof(G(pcre2_compile_context_,BITTWO))) 1696 #define PCHARS(lv, p, offset, len, utf, f) \ 1697  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1698  lv = G(pchars,BITONE)((G(PCRE2_SPTR,BITONE))(p)+offset, len, utf, f); \ 1700  lv = G(pchars,BITTWO)((G(PCRE2_SPTR,BITTWO))(p)+offset, len, utf, f) 1702 #define PCHARSV(p, offset, len, utf, f) \ 1703  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1704  (void)G(pchars,BITONE)((G(PCRE2_SPTR,BITONE))(p)+offset, len, utf, f); \ 1706  (void)G(pchars,BITTWO)((G(PCRE2_SPTR,BITTWO))(p)+offset, len, utf, f) 1708 #define PCRE2_CALLOUT_ENUMERATE(a,b,c) \ 1709  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1710  a = G(pcre2_callout_enumerate,BITONE)(G(compiled_code,BITONE), \ 1711  (int (*)(struct G(pcre2_callout_enumerate_block_,BITONE) *, void *))b,c); \ 1713  a = G(pcre2_callout_enumerate,BITTWO)(G(compiled_code,BITTWO), \ 1714  (int (*)(struct G(pcre2_callout_enumerate_block_,BITTWO) *, void *))b,c) 1716 #define PCRE2_CODE_COPY_FROM_VOID(a,b) \ 1717  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1718  G(a,BITONE) = G(pcre2_code_copy_,BITONE)(b); \ 1720  G(a,BITTWO) = G(pcre2_code_copy_,BITTWO)(b) 1722 #define PCRE2_CODE_COPY_TO_VOID(a,b) \ 1723  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1724  a = (void *)G(pcre2_code_copy_,BITONE)(G(b,BITONE)); \ 1726  a = (void *)G(pcre2_code_copy_,BITTWO)(G(b,BITTWO)) 1728 #define PCRE2_CODE_COPY_WITH_TABLES_TO_VOID(a,b) \ 1729  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1730  a = (void *)G(pcre2_code_copy_with_tables_,BITONE)(G(b,BITONE)); \ 1732  a = (void *)G(pcre2_code_copy_with_tables_,BITTWO)(G(b,BITTWO)) 1734 #define PCRE2_COMPILE(a,b,c,d,e,f,g) \ 1735  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1736  G(a,BITONE) = G(pcre2_compile_,BITONE)(b,c,d,e,f,g); \ 1738  G(a,BITTWO) = G(pcre2_compile_,BITTWO)(b,c,d,e,f,g) 1740 #define PCRE2_CONVERTED_PATTERN_FREE(a) \ 1741  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1742  G(pcre2_converted_pattern_free_,BITONE)((G(PCRE2_UCHAR,BITONE) *)a); \ 1744  G(pcre2_converted_pattern_free_,BITTWO)((G(PCRE2_UCHAR,BITTWO) *)a) 1746 #define PCRE2_DFA_MATCH(a,b,c,d,e,f,g,h,i,j) \ 1747  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1748  a = G(pcre2_dfa_match_,BITONE)(G(b,BITONE),(G(PCRE2_SPTR,BITONE))c,d,e,f, \ 1749  G(g,BITONE),h,i,j); \ 1751  a = G(pcre2_dfa_match_,BITTWO)(G(b,BITTWO),(G(PCRE2_SPTR,BITTWO))c,d,e,f, \ 1754 #define PCRE2_GET_ERROR_MESSAGE(r,a,b) \ 1755  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1756  r = G(pcre2_get_error_message_,BITONE)(a,G(b,BITONE),G(G(b,BITONE),_size/BYTEONE)); \ 1758  r = G(pcre2_get_error_message_,BITTWO)(a,G(b,BITTWO),G(G(b,BITTWO),_size/BYTETWO)) 1760 #define PCRE2_GET_MATCH_DATA_HEAPFRAMES_SIZE(r,a) \ 1761  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1762  r = G(pcre2_get_match_data_heapframes_size_,BITONE)(G(a,BITONE)); \ 1764  r = G(pcre2_get_match_data_heapframes_size_,BITTWO)(G(a,BITTWO)) 1766 #define PCRE2_GET_OVECTOR_COUNT(a,b) \ 1767  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1768  a = G(pcre2_get_ovector_count_,BITONE)(G(b,BITONE)); \ 1770  a = G(pcre2_get_ovector_count_,BITTWO)(G(b,BITTWO)) 1772 #define PCRE2_GET_STARTCHAR(a,b) \ 1773  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1774  a = G(pcre2_get_startchar_,BITONE)(G(b,BITONE)); \ 1776  a = G(pcre2_get_startchar_,BITTWO)(G(b,BITTWO)) 1778 #define PCRE2_JIT_COMPILE(r,a,b) \ 1779  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1780  r = G(pcre2_jit_compile_,BITONE)(G(a,BITONE),b); \ 1782  r = G(pcre2_jit_compile_,BITTWO)(G(a,BITTWO),b) 1784 #define PCRE2_JIT_FREE_UNUSED_MEMORY(a) \ 1785  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1786  G(pcre2_jit_free_unused_memory_,BITONE)(G(a,BITONE)); \ 1788  G(pcre2_jit_free_unused_memory_,BITTWO)(G(a,BITTWO)) 1790 #define PCRE2_JIT_MATCH(a,b,c,d,e,f,g,h) \ 1791  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1792  a = G(pcre2_jit_match_,BITONE)(G(b,BITONE),(G(PCRE2_SPTR,BITONE))c,d,e,f, \ 1795  a = G(pcre2_jit_match_,BITTWO)(G(b,BITTWO),(G(PCRE2_SPTR,BITTWO))c,d,e,f, \ 1798 #define PCRE2_JIT_STACK_CREATE(a,b,c,d) \ 1799  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1800  a = (PCRE2_JIT_STACK *)G(pcre2_jit_stack_create_,BITONE)(b,c,d); \ 1802  a = (PCRE2_JIT_STACK *)G(pcre2_jit_stack_create_,BITTWO)(b,c,d); \ 1804 #define PCRE2_JIT_STACK_ASSIGN(a,b,c) \ 1805  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1806  G(pcre2_jit_stack_assign_,BITONE)(G(a,BITONE),(G(pcre2_jit_callback_,BITONE))b,c); \ 1808  G(pcre2_jit_stack_assign_,BITTWO)(G(a,BITTWO),(G(pcre2_jit_callback_,BITTWO))b,c); 1810 #define PCRE2_JIT_STACK_FREE(a) \ 1811  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1812  G(pcre2_jit_stack_free_,BITONE)((G(pcre2_jit_stack_,BITONE) *)a); \ 1814  G(pcre2_jit_stack_free_,BITTWO)((G(pcre2_jit_stack_,BITTWO) *)a); 1816 #define PCRE2_MAKETABLES(a,c) \ 1817  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1818  a = G(pcre2_maketables_,BITONE)(G(c,BITONE)); \ 1820  a = G(pcre2_maketables_,BITTWO)(G(c,BITTWO)) 1822 #define PCRE2_MAKETABLES_FREE(c,a) \ 1823  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1824  G(pcre2_maketables_free_,BITONE)(G(c,BITONE),a); \ 1826  G(pcre2_maketables_free_,BITTWO)(G(c,BITTWO),a) 1828 #define PCRE2_MATCH(a,b,c,d,e,f,g,h) \ 1829  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1830  a = G(pcre2_match_,BITONE)(G(b,BITONE),(G(PCRE2_SPTR,BITONE))c,d,e,f, \ 1833  a = G(pcre2_match_,BITTWO)(G(b,BITTWO),(G(PCRE2_SPTR,BITTWO))c,d,e,f, \ 1836 #define PCRE2_MATCH_DATA_CREATE(a,b,c) \ 1837  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1838  G(a,BITONE) = G(pcre2_match_data_create_,BITONE)(b,G(c,BITONE)); \ 1840  G(a,BITTWO) = G(pcre2_match_data_create_,BITTWO)(b,G(c,BITTWO)) 1842 #define PCRE2_MATCH_DATA_CREATE_FROM_PATTERN(a,b,c) \ 1843  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1844  G(a,BITONE) = G(pcre2_match_data_create_from_pattern_,BITONE)(G(b,BITONE),G(c,BITONE)); \ 1846  G(a,BITTWO) = G(pcre2_match_data_create_from_pattern_,BITTWO)(G(b,BITTWO),G(c,BITTWO)) 1848 #define PCRE2_MATCH_DATA_FREE(a) \ 1849  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1850  G(pcre2_match_data_free_,BITONE)(G(a,BITONE)); \ 1852  G(pcre2_match_data_free_,BITTWO)(G(a,BITTWO)) 1854 #define PCRE2_PATTERN_CONVERT(a,b,c,d,e,f,g) \ 1855  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1856  a = G(pcre2_pattern_convert_,BITONE)(G(b,BITONE),c,d,(G(PCRE2_UCHAR,BITONE) **)e,f,G(g,BITONE)); \ 1858  a = G(pcre2_pattern_convert_,BITTWO)(G(b,BITTWO),c,d,(G(PCRE2_UCHAR,BITTWO) **)e,f,G(g,BITTWO)) 1860 #define PCRE2_PATTERN_INFO(a,b,c,d) \ 1861  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1862  a = G(pcre2_pattern_info_,BITONE)(G(b,BITONE),c,d); \ 1864  a = G(pcre2_pattern_info_,BITTWO)(G(b,BITTWO),c,d) 1866 #define PCRE2_PRINTINT(a) \ 1867  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1868  G(pcre2_printint_,BITONE)(G(compiled_code,BITONE),outfile,a); \ 1870  G(pcre2_printint_,BITTWO)(G(compiled_code,BITTWO),outfile,a) 1872 #define PCRE2_SERIALIZE_DECODE(r,a,b,c,d) \ 1873  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1874  r = G(pcre2_serialize_decode_,BITONE)((G(pcre2_code_,BITONE) **)a,b,c,G(d,BITONE)); \ 1876  r = G(pcre2_serialize_decode_,BITTWO)((G(pcre2_code_,BITTWO) **)a,b,c,G(d,BITTWO)) 1878 #define PCRE2_SERIALIZE_ENCODE(r,a,b,c,d,e) \ 1879  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1880  r = G(pcre2_serialize_encode_,BITONE)((G(const pcre2_code_,BITONE) **)a,b,c,d,G(e,BITONE)); \ 1882  r = G(pcre2_serialize_encode_,BITTWO)((G(const pcre2_code_,BITTWO) **)a,b,c,d,G(e,BITTWO)) 1884 #define PCRE2_SERIALIZE_FREE(a) \ 1885  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1886  G(pcre2_serialize_free_,BITONE)(a); \ 1888  G(pcre2_serialize_free_,BITTWO)(a) 1890 #define PCRE2_SERIALIZE_GET_NUMBER_OF_CODES(r,a) \ 1891  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1892  r = G(pcre2_serialize_get_number_of_codes_,BITONE)(a); \ 1894  r = G(pcre2_serialize_get_number_of_codes_,BITTWO)(a) 1896 #define PCRE2_SET_CALLOUT(a,b,c) \ 1897  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1898  G(pcre2_set_callout_,BITONE)(G(a,BITONE), \ 1899  (int (*)(G(pcre2_callout_block_,BITONE) *, void *))b,c); \ 1901  G(pcre2_set_callout_,BITTWO)(G(a,BITTWO), \ 1902  (int (*)(G(pcre2_callout_block_,BITTWO) *, void *))b,c); 1904 #define PCRE2_SET_CHARACTER_TABLES(a,b) \ 1905  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1906  G(pcre2_set_character_tables_,BITONE)(G(a,BITONE),b); \ 1908  G(pcre2_set_character_tables_,BITTWO)(G(a,BITTWO),b) 1910 #define PCRE2_SET_COMPILE_RECURSION_GUARD(a,b,c) \ 1911  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1912  G(pcre2_set_compile_recursion_guard_,BITONE)(G(a,BITONE),b,c); \ 1914  G(pcre2_set_compile_recursion_guard_,BITTWO)(G(a,BITTWO),b,c) 1916 #define PCRE2_SET_DEPTH_LIMIT(a,b) \ 1917  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1918  G(pcre2_set_depth_limit_,BITONE)(G(a,BITONE),b); \ 1920  G(pcre2_set_depth_limit_,BITTWO)(G(a,BITTWO),b) 1922 #define PCRE2_SET_GLOB_ESCAPE(r,a,b) \ 1923  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1924  r = G(pcre2_set_glob_escape_,BITONE)(G(a,BITONE),b); \ 1926  r = G(pcre2_set_glob_escape_,BITTWO)(G(a,BITTWO),b) 1928 #define PCRE2_SET_GLOB_SEPARATOR(r,a,b) \ 1929  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1930  r = G(pcre2_set_glob_separator_,BITONE)(G(a,BITONE),b); \ 1932  r = G(pcre2_set_glob_separator_,BITTWO)(G(a,BITTWO),b) 1934 #define PCRE2_SET_HEAP_LIMIT(a,b) \ 1935  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1936  G(pcre2_set_heap_limit_,BITONE)(G(a,BITONE),b); \ 1938  G(pcre2_set_heap_limit_,BITTWO)(G(a,BITTWO),b) 1940 #define PCRE2_SET_MATCH_LIMIT(a,b) \ 1941  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1942  G(pcre2_set_match_limit_,BITONE)(G(a,BITONE),b); \ 1944  G(pcre2_set_match_limit_,BITTWO)(G(a,BITTWO),b) 1946 #define PCRE2_SET_MAX_PATTERN_COMPILED_LENGTH(a,b) \ 1947  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1948  G(pcre2_set_max_pattern_compiled_length_,BITONE)(G(a,BITONE),b); \ 1950  G(pcre2_set_max_pattern_compiled_length_,BITTWO)(G(a,BITTWO),b) 1952 #define PCRE2_SET_MAX_PATTERN_LENGTH(a,b) \ 1953  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1954  G(pcre2_set_max_pattern_length_,BITONE)(G(a,BITONE),b); \ 1956  G(pcre2_set_max_pattern_length_,BITTWO)(G(a,BITTWO),b) 1958 #define PCRE2_SET_MAX_VARLOOKBEHIND(a,b) \ 1959  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1960  G(pcre2_set_max_varlookbehind_,BITONE)(G(a,BITONE),b); \ 1962  G(pcre2_set_max_varlookbehind_,BITTWO)(G(a,BITTWO),b) 1964 #define PCRE2_SET_OFFSET_LIMIT(a,b) \ 1965  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1966  G(pcre2_set_offset_limit_,BITONE)(G(a,BITONE),b); \ 1968  G(pcre2_set_offset_limit_,BITTWO)(G(a,BITTWO),b) 1970 #define PCRE2_SET_PARENS_NEST_LIMIT(a,b) \ 1971  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1972  G(pcre2_set_parens_nest_limit_,BITONE)(G(a,BITONE),b); \ 1974  G(pcre2_set_parens_nest_limit_,BITTWO)(G(a,BITTWO),b) 1976 #define PCRE2_SET_SUBSTITUTE_CALLOUT(a,b,c) \ 1977  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1978  G(pcre2_set_substitute_callout_,BITONE)(G(a,BITONE), \ 1979  (int (*)(G(pcre2_substitute_callout_block_,BITONE) *, void *))b,c); \ 1981  G(pcre2_set_substitute_callout_,BITTWO)(G(a,BITTWO), \ 1982  (int (*)(G(pcre2_substitute_callout_block_,BITTWO) *, void *))b,c) 1984 #define PCRE2_SUBSTITUTE(a,b,c,d,e,f,g,h,i,j,k,l) \ 1985  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1986  a = G(pcre2_substitute_,BITONE)(G(b,BITONE),(G(PCRE2_SPTR,BITONE))c,d,e,f, \ 1987  G(g,BITONE),h,(G(PCRE2_SPTR,BITONE))i,j, \ 1988  (G(PCRE2_UCHAR,BITONE) *)k,l); \ 1990  a = G(pcre2_substitute_,BITTWO)(G(b,BITTWO),(G(PCRE2_SPTR,BITTWO))c,d,e,f, \ 1991  G(g,BITTWO),h,(G(PCRE2_SPTR,BITTWO))i,j, \ 1992  (G(PCRE2_UCHAR,BITTWO) *)k,l) 1994 #define PCRE2_SUBSTRING_COPY_BYNAME(a,b,c,d,e) \ 1995  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 1996  a = G(pcre2_substring_copy_byname_,BITONE)(G(b,BITONE),G(c,BITONE),\ 1997  (G(PCRE2_UCHAR,BITONE) *)d,e); \ 1999  a = G(pcre2_substring_copy_byname_,BITTWO)(G(b,BITTWO),G(c,BITTWO),\ 2000  (G(PCRE2_UCHAR,BITTWO) *)d,e) 2002 #define PCRE2_SUBSTRING_COPY_BYNUMBER(a,b,c,d,e) \ 2003  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 2004  a = G(pcre2_substring_copy_bynumber_,BITONE)(G(b,BITONE),c,\ 2005  (G(PCRE2_UCHAR,BITONE) *)d,e); \ 2007  a = G(pcre2_substring_copy_bynumber_,BITTWO)(G(b,BITTWO),c,\ 2008  (G(PCRE2_UCHAR,BITTWO) *)d,e) 2010 #define PCRE2_SUBSTRING_FREE(a) \ 2011  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 2012  G(pcre2_substring_free_,BITONE)((G(PCRE2_UCHAR,BITONE) *)a); \ 2013  else G(pcre2_substring_free_,BITTWO)((G(PCRE2_UCHAR,BITTWO) *)a) 2015 #define PCRE2_SUBSTRING_GET_BYNAME(a,b,c,d,e) \ 2016  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 2017  a = G(pcre2_substring_get_byname_,BITONE)(G(b,BITONE),G(c,BITONE),\ 2018  (G(PCRE2_UCHAR,BITONE) **)d,e); \ 2020  a = G(pcre2_substring_get_byname_,BITTWO)(G(b,BITTWO),G(c,BITTWO),\ 2021  (G(PCRE2_UCHAR,BITTWO) **)d,e) 2023 #define PCRE2_SUBSTRING_GET_BYNUMBER(a,b,c,d,e) \ 2024  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 2025  a = G(pcre2_substring_get_bynumber_,BITONE)(G(b,BITONE),c,\ 2026  (G(PCRE2_UCHAR,BITONE) **)d,e); \ 2028  a = G(pcre2_substring_get_bynumber_,BITTWO)(G(b,BITTWO),c,\ 2029  (G(PCRE2_UCHAR,BITTWO) **)d,e) 2031 #define PCRE2_SUBSTRING_LENGTH_BYNAME(a,b,c,d) \ 2032  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 2033  a = G(pcre2_substring_length_byname_,BITONE)(G(b,BITONE),G(c,BITONE),d); \ 2035  a = G(pcre2_substring_length_byname_,BITTWO)(G(b,BITTWO),G(c,BITTWO),d) 2037 #define PCRE2_SUBSTRING_LENGTH_BYNUMBER(a,b,c,d) \ 2038  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 2039  a = G(pcre2_substring_length_bynumber_,BITONE)(G(b,BITONE),c,d); \ 2041  a = G(pcre2_substring_length_bynumber_,BITTWO)(G(b,BITTWO),c,d) 2043 #define PCRE2_SUBSTRING_LIST_GET(a,b,c,d) \ 2044  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 2045  a = G(pcre2_substring_list_get_,BITONE)(G(b,BITONE), \ 2046  (G(PCRE2_UCHAR,BITONE) ***)c,d); \ 2048  a = G(pcre2_substring_list_get_,BITTWO)(G(b,BITTWO), \ 2049  (G(PCRE2_UCHAR,BITTWO) ***)c,d) 2051 #define PCRE2_SUBSTRING_LIST_FREE(a) \ 2052  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 2053  G(pcre2_substring_list_free_,BITONE)((G(PCRE2_UCHAR,BITONE) **)a); \ 2055  G(pcre2_substring_list_free_,BITTWO)((G(PCRE2_UCHAR,BITTWO) **)a) 2057 #define PCRE2_SUBSTRING_NUMBER_FROM_NAME(a,b,c) \ 2058  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 2059  a = G(pcre2_substring_number_from_name_,BITONE)(G(b,BITONE),G(c,BITONE)); \ 2061  a = G(pcre2_substring_number_from_name_,BITTWO)(G(b,BITTWO),G(c,BITTWO)) 2064  (test_mode == G(G(PCRE,BITONE),_MODE))? (void *)G(x,BITONE) : \ 2065  (void *)G(x,BITTWO)) 2067 #define SETFLD(x,y,z) \ 2068  if (test_mode == G(G(PCRE,BITONE),_MODE)) G(x,BITONE)->y = z; \ 2069  else G(x,BITTWO)->y = z 2071 #define SETFLDVEC(x,y,v,z) \ 2072  if (test_mode == G(G(PCRE,BITONE),_MODE)) G(x,BITONE)->y[v] = z; \ 2073  else G(x,BITTWO)->y[v] = z 2075 #define SETOP(x,y,z) \ 2076  if (test_mode == G(G(PCRE,BITONE),_MODE)) G(x,BITONE) z y; \ 2077  else G(x,BITTWO) z y 2079 #define SETCASTPTR(x,y) \ 2080  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 2081  G(x,BITONE) = (G(G(uint,BITONE),_t) *)(y); \ 2083  G(x,BITTWO) = (G(G(uint,BITTWO),_t) *)(y) 2085 #define STRLEN(p) ((test_mode == G(G(PCRE,BITONE),_MODE))? \ 2086  G(strlen,BITONE)((G(PCRE2_SPTR,BITONE))p) : \ 2087  G(strlen,BITTWO)((G(PCRE2_SPTR,BITTWO))p)) 2090  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 2091  G(a,BITONE)(G(b,BITONE)); \ 2093  G(a,BITTWO)(G(b,BITTWO)) 2095 #define SUB2(a,b,c) \ 2096  if (test_mode == G(G(PCRE,BITONE),_MODE)) \ 2097  G(a,BITONE))(G(b,BITONE),G(c,BITONE)); \ 2099  G(a,BITTWO))(G(b,BITTWO),G(c,BITTWO)) 2101 #define TEST(x,r,y) ( \ 2102  (test_mode == G(G(PCRE,BITONE),_MODE) && G(x,BITONE) r (y)) || \ 2103  (test_mode == G(G(PCRE,BITTWO),_MODE) && G(x,BITTWO) r (y))) 2105 #define TESTFLD(x,f,r,y) ( \ 2106  (test_mode == G(G(PCRE,BITONE),_MODE) && G(x,BITONE)->f r (y)) || \ 2107  (test_mode == G(G(PCRE,BITTWO),_MODE) && G(x,BITTWO)->f r (y))) 2117 #elif defined SUPPORT_PCRE2_8 2118 #define CASTFLD(t,a,b) (t)(G(a,8)->b) 2119 #define CASTVAR(t,x) (t)G(x,8) 2120 #define CODE_UNIT(a,b) (uint32_t)(((PCRE2_SPTR8)(a))[b]) 2121 #define CONCTXCPY(a,b) memcpy(G(a,8),G(b,8),sizeof(pcre2_convert_context_8)) 2122 #define CONVERT_COPY(a,b,c) memcpy(G(a,8),(char *)b, c) 2123 #define DATCTXCPY(a,b) memcpy(G(a,8),G(b,8),sizeof(pcre2_match_context_8)) 2124 #define FLD(a,b) G(a,8)->b 2125 #define PATCTXCPY(a,b) memcpy(G(a,8),G(b,8),sizeof(pcre2_compile_context_8)) 2126 #define PCHARS(lv, p, offset, len, utf, f) \ 2127  lv = pchars8((PCRE2_SPTR8)(p)+offset, len, utf, f) 2128 #define PCHARSV(p, offset, len, utf, f) \ 2129  (void)pchars8((PCRE2_SPTR8)(p)+offset, len, utf, f) 2130 #define PCRE2_CALLOUT_ENUMERATE(a,b,c) \ 2131  a = pcre2_callout_enumerate_8(compiled_code8, \ 2132  (int (*)(struct pcre2_callout_enumerate_block_8 *, void *))b,c) 2133 #define PCRE2_CODE_COPY_FROM_VOID(a,b) G(a,8) = pcre2_code_copy_8(b) 2134 #define PCRE2_CODE_COPY_TO_VOID(a,b) a = (void *)pcre2_code_copy_8(G(b,8)) 2135 #define PCRE2_CODE_COPY_WITH_TABLES_TO_VOID(a,b) a = (void *)pcre2_code_copy_with_tables_8(G(b,8)) 2136 #define PCRE2_COMPILE(a,b,c,d,e,f,g) G(a,8) = pcre2_compile_8(b,c,d,e,f,g) 2137 #define PCRE2_CONVERTED_PATTERN_FREE(a) \ 2138  pcre2_converted_pattern_free_8((PCRE2_UCHAR8 *)a) 2139 #define PCRE2_DFA_MATCH(a,b,c,d,e,f,g,h,i,j) \ 2140  a = pcre2_dfa_match_8(G(b,8),(PCRE2_SPTR8)c,d,e,f,G(g,8),h,i,j) 2141 #define PCRE2_GET_ERROR_MESSAGE(r,a,b) \ 2142  r = pcre2_get_error_message_8(a,G(b,8),G(G(b,8),_size)) 2143 #define PCRE2_GET_MATCH_DATA_HEAPFRAMES_SIZE(r,a) \ 2144  r = pcre2_get_match_data_heapframes_size_8(G(a,8)) 2145 #define PCRE2_GET_OVECTOR_COUNT(a,b) a = pcre2_get_ovector_count_8(G(b,8)) 2146 #define PCRE2_GET_STARTCHAR(a,b) a = pcre2_get_startchar_8(G(b,8)) 2147 #define PCRE2_JIT_COMPILE(r,a,b) r = pcre2_jit_compile_8(G(a,8),b) 2148 #define PCRE2_JIT_FREE_UNUSED_MEMORY(a) pcre2_jit_free_unused_memory_8(G(a,8)) 2149 #define PCRE2_JIT_MATCH(a,b,c,d,e,f,g,h) \ 2150  a = pcre2_jit_match_8(G(b,8),(PCRE2_SPTR8)c,d,e,f,G(g,8),h) 2151 #define PCRE2_JIT_STACK_CREATE(a,b,c,d) \ 2152  a = (PCRE2_JIT_STACK *)pcre2_jit_stack_create_8(b,c,d); 2153 #define PCRE2_JIT_STACK_ASSIGN(a,b,c) \ 2154  pcre2_jit_stack_assign_8(G(a,8),(pcre2_jit_callback_8)b,c); 2155 #define PCRE2_JIT_STACK_FREE(a) pcre2_jit_stack_free_8((pcre2_jit_stack_8 *)a); 2156 #define PCRE2_MAKETABLES(a,c) a = pcre2_maketables_8(G(c,8)) 2157 #define PCRE2_MAKETABLES_FREE(c,a) pcre2_maketables_free_8(G(c,8),a) 2158 #define PCRE2_MATCH(a,b,c,d,e,f,g,h) \ 2159  a = pcre2_match_8(G(b,8),(PCRE2_SPTR8)c,d,e,f,G(g,8),h) 2160 #define PCRE2_MATCH_DATA_CREATE(a,b,c) G(a,8) = pcre2_match_data_create_8(b,G(c,8)) 2161 #define PCRE2_MATCH_DATA_CREATE_FROM_PATTERN(a,b,c) \ 2162  G(a,8) = pcre2_match_data_create_from_pattern_8(G(b,8),G(c,8)) 2163 #define PCRE2_MATCH_DATA_FREE(a) pcre2_match_data_free_8(G(a,8)) 2164 #define PCRE2_PATTERN_CONVERT(a,b,c,d,e,f,g) a = pcre2_pattern_convert_8(G(b,8),c,d,(PCRE2_UCHAR8 **)e,f,G(g,8)) 2165 #define PCRE2_PATTERN_INFO(a,b,c,d) a = pcre2_pattern_info_8(G(b,8),c,d) 2166 #define PCRE2_PRINTINT(a) pcre2_printint_8(compiled_code8,outfile,a) 2167 #define PCRE2_SERIALIZE_DECODE(r,a,b,c,d) \ 2168  r = pcre2_serialize_decode_8((pcre2_code_8 **)a,b,c,G(d,8)) 2169 #define PCRE2_SERIALIZE_ENCODE(r,a,b,c,d,e) \ 2170  r = pcre2_serialize_encode_8((const pcre2_code_8 **)a,b,c,d,G(e,8)) 2171 #define PCRE2_SERIALIZE_FREE(a) pcre2_serialize_free_8(a) 2172 #define PCRE2_SERIALIZE_GET_NUMBER_OF_CODES(r,a) \ 2173  r = pcre2_serialize_get_number_of_codes_8(a) 2174 #define PCRE2_SET_CALLOUT(a,b,c) \ 2175  pcre2_set_callout_8(G(a,8),(int (*)(pcre2_callout_block_8 *, void *))b,c) 2176 #define PCRE2_SET_CHARACTER_TABLES(a,b) pcre2_set_character_tables_8(G(a,8),b) 2177 #define PCRE2_SET_COMPILE_RECURSION_GUARD(a,b,c) \ 2178  pcre2_set_compile_recursion_guard_8(G(a,8),b,c) 2179 #define PCRE2_SET_DEPTH_LIMIT(a,b) pcre2_set_depth_limit_8(G(a,8),b) 2180 #define PCRE2_SET_GLOB_ESCAPE(r,a,b) r = pcre2_set_glob_escape_8(G(a,8),b) 2181 #define PCRE2_SET_GLOB_SEPARATOR(r,a,b) r = pcre2_set_glob_separator_8(G(a,8),b) 2182 #define PCRE2_SET_HEAP_LIMIT(a,b) pcre2_set_heap_limit_8(G(a,8),b) 2183 #define PCRE2_SET_MATCH_LIMIT(a,b) pcre2_set_match_limit_8(G(a,8),b) 2184 #define PCRE2_SET_MAX_PATTERN_COMPILED_LENGTH(a,b) pcre2_set_max_pattern_compiled_length_8(G(a,8),b) 2185 #define PCRE2_SET_MAX_PATTERN_LENGTH(a,b) pcre2_set_max_pattern_length_8(G(a,8),b) 2186 #define PCRE2_SET_MAX_VARLOOKBEHIND(a,b) pcre2_set_max_varlookbehind_8(G(a,8),b) 2187 #define PCRE2_SET_OFFSET_LIMIT(a,b) pcre2_set_offset_limit_8(G(a,8),b) 2188 #define PCRE2_SET_PARENS_NEST_LIMIT(a,b) pcre2_set_parens_nest_limit_8(G(a,8),b) 2189 #define PCRE2_SET_SUBSTITUTE_CALLOUT(a,b,c) \ 2190  pcre2_set_substitute_callout_8(G(a,8), \ 2191  (int (*)(pcre2_substitute_callout_block_8 *, void *))b,c) 2192 #define PCRE2_SUBSTITUTE(a,b,c,d,e,f,g,h,i,j,k,l) \ 2193  a = pcre2_substitute_8(G(b,8),(PCRE2_SPTR8)c,d,e,f,G(g,8),h, \ 2194  (PCRE2_SPTR8)i,j,(PCRE2_UCHAR8 *)k,l) 2195 #define PCRE2_SUBSTRING_COPY_BYNAME(a,b,c,d,e) \ 2196  a = pcre2_substring_copy_byname_8(G(b,8),G(c,8),(PCRE2_UCHAR8 *)d,e) 2197 #define PCRE2_SUBSTRING_COPY_BYNUMBER(a,b,c,d,e) \ 2198  a = pcre2_substring_copy_bynumber_8(G(b,8),c,(PCRE2_UCHAR8 *)d,e) 2199 #define PCRE2_SUBSTRING_FREE(a) pcre2_substring_free_8((PCRE2_UCHAR8 *)a) 2200 #define PCRE2_SUBSTRING_GET_BYNAME(a,b,c,d,e) \ 2201  a = pcre2_substring_get_byname_8(G(b,8),G(c,8),(PCRE2_UCHAR8 **)d,e) 2202 #define PCRE2_SUBSTRING_GET_BYNUMBER(a,b,c,d,e) \ 2203  a = pcre2_substring_get_bynumber_8(G(b,8),c,(PCRE2_UCHAR8 **)d,e) 2204 #define PCRE2_SUBSTRING_LENGTH_BYNAME(a,b,c,d) \ 2205  a = pcre2_substring_length_byname_8(G(b,8),G(c,8),d) 2206 #define PCRE2_SUBSTRING_LENGTH_BYNUMBER(a,b,c,d) \ 2207  a = pcre2_substring_length_bynumber_8(G(b,8),c,d) 2208 #define PCRE2_SUBSTRING_LIST_GET(a,b,c,d) \ 2209  a = pcre2_substring_list_get_8(G(b,8),(PCRE2_UCHAR8 ***)c,d) 2210 #define PCRE2_SUBSTRING_LIST_FREE(a) \ 2211  pcre2_substring_list_free_8((PCRE2_UCHAR8 **)a) 2212 #define PCRE2_SUBSTRING_NUMBER_FROM_NAME(a,b,c) \ 2213  a = pcre2_substring_number_from_name_8(G(b,8),G(c,8)); 2214 #define PTR(x) (void *)G(x,8) 2215 #define SETFLD(x,y,z) G(x,8)->y = z 2216 #define SETFLDVEC(x,y,v,z) G(x,8)->y[v] = z 2217 #define SETOP(x,y,z) G(x,8) z y 2218 #define SETCASTPTR(x,y) G(x,8) = (uint8_t *)(y) 2219 #define STRLEN(p) (int)strlen((char *)p) 2220 #define SUB1(a,b) G(a,8)(G(b,8)) 2221 #define SUB2(a,b,c) G(a,8)(G(b,8),G(c,8)) 2222 #define TEST(x,r,y) (G(x,8) r (y)) 2223 #define TESTFLD(x,f,r,y) (G(x,8)->f r (y)) 2228 #elif defined SUPPORT_PCRE2_16 2229 #define CASTFLD(t,a,b) (t)(G(a,16)->b) 2230 #define CASTVAR(t,x) (t)G(x,16) 2231 #define CODE_UNIT(a,b) (uint32_t)(((PCRE2_SPTR16)(a))[b]) 2232 #define CONCTXCPY(a,b) memcpy(G(a,16),G(b,16),sizeof(pcre2_convert_context_16)) 2233 #define CONVERT_COPY(a,b,c) memcpy(G(a,16),(char *)b, (c)*2) 2234 #define DATCTXCPY(a,b) memcpy(G(a,16),G(b,16),sizeof(pcre2_match_context_16)) 2235 #define FLD(a,b) G(a,16)->b 2236 #define PATCTXCPY(a,b) memcpy(G(a,16),G(b,16),sizeof(pcre2_compile_context_16)) 2237 #define PCHARS(lv, p, offset, len, utf, f) \ 2238  lv = pchars16((PCRE2_SPTR16)(p)+offset, len, utf, f) 2239 #define PCHARSV(p, offset, len, utf, f) \ 2240  (void)pchars16((PCRE2_SPTR16)(p)+offset, len, utf, f) 2241 #define PCRE2_CALLOUT_ENUMERATE(a,b,c) \ 2242  a = pcre2_callout_enumerate_16(compiled_code16, \ 2243  (int (*)(struct pcre2_callout_enumerate_block_16 *, void *))b,c) 2244 #define PCRE2_CODE_COPY_FROM_VOID(a,b) G(a,16) = pcre2_code_copy_16(b) 2245 #define PCRE2_CODE_COPY_TO_VOID(a,b) a = (void *)pcre2_code_copy_16(G(b,16)) 2246 #define PCRE2_CODE_COPY_WITH_TABLES_TO_VOID(a,b) a = (void *)pcre2_code_copy_with_tables_16(G(b,16)) 2247 #define PCRE2_COMPILE(a,b,c,d,e,f,g) G(a,16) = pcre2_compile_16(b,c,d,e,f,g) 2248 #define PCRE2_CONVERTED_PATTERN_FREE(a) \ 2249  pcre2_converted_pattern_free_16((PCRE2_UCHAR16 *)a) 2250 #define PCRE2_DFA_MATCH(a,b,c,d,e,f,g,h,i,j) \ 2251  a = pcre2_dfa_match_16(G(b,16),(PCRE2_SPTR16)c,d,e,f,G(g,16),h,i,j) 2252 #define PCRE2_GET_ERROR_MESSAGE(r,a,b) \ 2253  r = pcre2_get_error_message_16(a,G(b,16),G(G(b,16),_size/2)) 2254 #define PCRE2_GET_OVECTOR_COUNT(a,b) a = pcre2_get_ovector_count_16(G(b,16)) 2255 #define PCRE2_GET_MATCH_DATA_HEAPFRAMES_SIZE(r,a) \ 2256  r = pcre2_get_match_data_heapframes_size_16(G(a,16)) 2257 #define PCRE2_GET_STARTCHAR(a,b) a = pcre2_get_startchar_16(G(b,16)) 2258 #define PCRE2_JIT_COMPILE(r,a,b) r = pcre2_jit_compile_16(G(a,16),b) 2259 #define PCRE2_JIT_FREE_UNUSED_MEMORY(a) pcre2_jit_free_unused_memory_16(G(a,16)) 2260 #define PCRE2_JIT_MATCH(a,b,c,d,e,f,g,h) \ 2261  a = pcre2_jit_match_16(G(b,16),(PCRE2_SPTR16)c,d,e,f,G(g,16),h) 2262 #define PCRE2_JIT_STACK_CREATE(a,b,c,d) \ 2263  a = (PCRE2_JIT_STACK *)pcre2_jit_stack_create_16(b,c,d); 2264 #define PCRE2_JIT_STACK_ASSIGN(a,b,c) \ 2265  pcre2_jit_stack_assign_16(G(a,16),(pcre2_jit_callback_16)b,c); 2266 #define PCRE2_JIT_STACK_FREE(a) pcre2_jit_stack_free_16((pcre2_jit_stack_16 *)a); 2267 #define PCRE2_MAKETABLES(a,c) a = pcre2_maketables_16(G(c,16)) 2268 #define PCRE2_MAKETABLES_FREE(c,a) pcre2_maketables_free_16(G(c,16),a) 2269 #define PCRE2_MATCH(a,b,c,d,e,f,g,h) \ 2270  a = pcre2_match_16(G(b,16),(PCRE2_SPTR16)c,d,e,f,G(g,16),h) 2271 #define PCRE2_MATCH_DATA_CREATE(a,b,c) G(a,16) = pcre2_match_data_create_16(b,G(c,16)) 2272 #define PCRE2_MATCH_DATA_CREATE_FROM_PATTERN(a,b,c) \ 2273  G(a,16) = pcre2_match_data_create_from_pattern_16(G(b,16),G(c,16)) 2274 #define PCRE2_MATCH_DATA_FREE(a) pcre2_match_data_free_16(G(a,16)) 2275 #define PCRE2_PATTERN_CONVERT(a,b,c,d,e,f,g) a = pcre2_pattern_convert_16(G(b,16),c,d,(PCRE2_UCHAR16 **)e,f,G(g,16)) 2276 #define PCRE2_PATTERN_INFO(a,b,c,d) a = pcre2_pattern_info_16(G(b,16),c,d) 2277 #define PCRE2_PRINTINT(a) pcre2_printint_16(compiled_code16,outfile,a) 2278 #define PCRE2_SERIALIZE_DECODE(r,a,b,c,d) \ 2279  r = pcre2_serialize_decode_16((pcre2_code_16 **)a,b,c,G(d,16)) 2280 #define PCRE2_SERIALIZE_ENCODE(r,a,b,c,d,e) \ 2281  r = pcre2_serialize_encode_16((const pcre2_code_16 **)a,b,c,d,G(e,16)) 2282 #define PCRE2_SERIALIZE_FREE(a) pcre2_serialize_free_16(a) 2283 #define PCRE2_SERIALIZE_GET_NUMBER_OF_CODES(r,a) \ 2284  r = pcre2_serialize_get_number_of_codes_16(a) 2285 #define PCRE2_SET_CALLOUT(a,b,c) \ 2286  pcre2_set_callout_16(G(a,16),(int (*)(pcre2_callout_block_16 *, void *))b,c); 2287 #define PCRE2_SET_CHARACTER_TABLES(a,b) pcre2_set_character_tables_16(G(a,16),b) 2288 #define PCRE2_SET_COMPILE_RECURSION_GUARD(a,b,c) \ 2289  pcre2_set_compile_recursion_guard_16(G(a,16),b,c) 2290 #define PCRE2_SET_DEPTH_LIMIT(a,b) pcre2_set_depth_limit_16(G(a,16),b) 2291 #define PCRE2_SET_GLOB_ESCAPE(r,a,b) r = pcre2_set_glob_escape_16(G(a,16),b) 2292 #define PCRE2_SET_GLOB_SEPARATOR(r,a,b) r = pcre2_set_glob_separator_16(G(a,16),b) 2293 #define PCRE2_SET_HEAP_LIMIT(a,b) pcre2_set_heap_limit_16(G(a,16),b) 2294 #define PCRE2_SET_MATCH_LIMIT(a,b) pcre2_set_match_limit_16(G(a,16),b) 2295 #define PCRE2_SET_MAX_VARLOOKBEHIND(a,b) pcre2_set_max_varlookbehind_16(G(a,16),b) 2296 #define PCRE2_SET_OFFSET_LIMIT(a,b) pcre2_set_offset_limit_16(G(a,16),b) 2297 #define PCRE2_SET_PARENS_NEST_LIMIT(a,b) pcre2_set_parens_nest_limit_16(G(a,16),b) 2298 #define PCRE2_SET_SUBSTITUTE_CALLOUT(a,b,c) \ 2299  pcre2_set_substitute_callout_16(G(a,16), \ 2300  (int (*)(pcre2_substitute_callout_block_16 *, void *))b,c) 2301 #define PCRE2_SUBSTITUTE(a,b,c,d,e,f,g,h,i,j,k,l) \ 2302  a = pcre2_substitute_16(G(b,16),(PCRE2_SPTR16)c,d,e,f,G(g,16),h, \ 2303  (PCRE2_SPTR16)i,j,(PCRE2_UCHAR16 *)k,l) 2304 #define PCRE2_SUBSTRING_COPY_BYNAME(a,b,c,d,e) \ 2305  a = pcre2_substring_copy_byname_16(G(b,16),G(c,16),(PCRE2_UCHAR16 *)d,e) 2306 #define PCRE2_SUBSTRING_COPY_BYNUMBER(a,b,c,d,e) \ 2307  a = pcre2_substring_copy_bynumber_16(G(b,16),c,(PCRE2_UCHAR16 *)d,e) 2308 #define PCRE2_SUBSTRING_FREE(a) pcre2_substring_free_16((PCRE2_UCHAR16 *)a) 2309 #define PCRE2_SUBSTRING_GET_BYNAME(a,b,c,d,e) \ 2310  a = pcre2_substring_get_byname_16(G(b,16),G(c,16),(PCRE2_UCHAR16 **)d,e) 2311 #define PCRE2_SUBSTRING_GET_BYNUMBER(a,b,c,d,e) \ 2312  a = pcre2_substring_get_bynumber_16(G(b,16),c,(PCRE2_UCHAR16 **)d,e) 2313 #define PCRE2_SUBSTRING_LENGTH_BYNAME(a,b,c,d) \ 2314  a = pcre2_substring_length_byname_16(G(b,16),G(c,16),d) 2315 #define PCRE2_SUBSTRING_LENGTH_BYNUMBER(a,b,c,d) \ 2316  a = pcre2_substring_length_bynumber_16(G(b,16),c,d) 2317 #define PCRE2_SUBSTRING_LIST_GET(a,b,c,d) \ 2318  a = pcre2_substring_list_get_16(G(b,16),(PCRE2_UCHAR16 ***)c,d) 2319 #define PCRE2_SUBSTRING_LIST_FREE(a) \ 2320  pcre2_substring_list_free_16((PCRE2_UCHAR16 **)a) 2321 #define PCRE2_SUBSTRING_NUMBER_FROM_NAME(a,b,c) \ 2322  a = pcre2_substring_number_from_name_16(G(b,16),G(c,16)); 2323 #define PTR(x) (void *)G(x,16) 2324 #define SETFLD(x,y,z) G(x,16)->y = z 2325 #define SETFLDVEC(x,y,v,z) G(x,16)->y[v] = z 2326 #define SETOP(x,y,z) G(x,16) z y 2327 #define SETCASTPTR(x,y) G(x,16) = (uint16_t *)(y) 2328 #define STRLEN(p) (int)strlen16((PCRE2_SPTR16)p) 2329 #define SUB1(a,b) G(a,16)(G(b,16)) 2330 #define SUB2(a,b,c) G(a,16)(G(b,16),G(c,16)) 2331 #define TEST(x,r,y) (G(x,16) r (y)) 2332 #define TESTFLD(x,f,r,y) (G(x,16)->f r (y)) 2337 #elif defined SUPPORT_PCRE2_32 2338 #define CASTFLD(t,a,b) (t)(G(a,32)->b) 2339 #define CASTVAR(t,x) (t)G(x,32) 2340 #define CODE_UNIT(a,b) (uint32_t)(((PCRE2_SPTR32)(a))[b]) 2341 #define CONCTXCPY(a,b) memcpy(G(a,32),G(b,32),sizeof(pcre2_convert_context_32)) 2342 #define CONVERT_COPY(a,b,c) memcpy(G(a,32),(char *)b, (c)*4) 2343 #define DATCTXCPY(a,b) memcpy(G(a,32),G(b,32),sizeof(pcre2_match_context_32)) 2344 #define FLD(a,b) G(a,32)->b 2345 #define PATCTXCPY(a,b) memcpy(G(a,32),G(b,32),sizeof(pcre2_compile_context_32)) 2346 #define PCHARS(lv, p, offset, len, utf, f) \ 2347  lv = pchars32((PCRE2_SPTR32)(p)+offset, len, utf, f) 2348 #define PCHARSV(p, offset, len, utf, f) \ 2349  (void)pchars32((PCRE2_SPTR32)(p)+offset, len, utf, f) 2350 #define PCRE2_CALLOUT_ENUMERATE(a,b,c) \ 2351  a = pcre2_callout_enumerate_32(compiled_code32, \ 2352  (int (*)(struct pcre2_callout_enumerate_block_32 *, void *))b,c) 2353 #define PCRE2_CODE_COPY_FROM_VOID(a,b) G(a,32) = pcre2_code_copy_32(b) 2354 #define PCRE2_CODE_COPY_TO_VOID(a,b) a = (void *)pcre2_code_copy_32(G(b,32)) 2355 #define PCRE2_CODE_COPY_WITH_TABLES_TO_VOID(a,b) a = (void *)pcre2_code_copy_with_tables_32(G(b,32)) 2356 #define PCRE2_COMPILE(a,b,c,d,e,f,g) G(a,32) = pcre2_compile_32(b,c,d,e,f,g) 2357 #define PCRE2_CONVERTED_PATTERN_FREE(a) \ 2358  pcre2_converted_pattern_free_32((PCRE2_UCHAR32 *)a) 2359 #define PCRE2_DFA_MATCH(a,b,c,d,e,f,g,h,i,j) \ 2360  a = pcre2_dfa_match_32(G(b,32),(PCRE2_SPTR32)c,d,e,f,G(g,32),h,i,j) 2361 #define PCRE2_GET_ERROR_MESSAGE(r,a,b) \ 2362  r = pcre2_get_error_message_32(a,G(b,32),G(G(b,32),_size/4)) 2363 #define PCRE2_GET_OVECTOR_COUNT(a,b) a = pcre2_get_ovector_count_32(G(b,32)) 2364 #define PCRE2_GET_MATCH_DATA_HEAPFRAMES_SIZE(r,a) \ 2365  r = pcre2_get_match_data_heapframes_size_32(G(a,32)) 2366 #define PCRE2_GET_STARTCHAR(a,b) a = pcre2_get_startchar_32(G(b,32)) 2367 #define PCRE2_JIT_COMPILE(r,a,b) r = pcre2_jit_compile_32(G(a,32),b) 2368 #define PCRE2_JIT_FREE_UNUSED_MEMORY(a) pcre2_jit_free_unused_memory_32(G(a,32)) 2369 #define PCRE2_JIT_MATCH(a,b,c,d,e,f,g,h) \ 2370  a = pcre2_jit_match_32(G(b,32),(PCRE2_SPTR32)c,d,e,f,G(g,32),h) 2371 #define PCRE2_JIT_STACK_CREATE(a,b,c,d) \ 2372  a = (PCRE2_JIT_STACK *)pcre2_jit_stack_create_32(b,c,d); 2373 #define PCRE2_JIT_STACK_ASSIGN(a,b,c) \ 2374  pcre2_jit_stack_assign_32(G(a,32),(pcre2_jit_callback_32)b,c); 2375 #define PCRE2_JIT_STACK_FREE(a) pcre2_jit_stack_free_32((pcre2_jit_stack_32 *)a); 2376 #define PCRE2_MAKETABLES(a,c) a = pcre2_maketables_32(G(c,32)) 2377 #define PCRE2_MAKETABLES_FREE(c,a) pcre2_maketables_free_32(G(c,32),a) 2378 #define PCRE2_MATCH(a,b,c,d,e,f,g,h) \ 2379  a = pcre2_match_32(G(b,32),(PCRE2_SPTR32)c,d,e,f,G(g,32),h) 2380 #define PCRE2_MATCH_DATA_CREATE(a,b,c) G(a,32) = pcre2_match_data_create_32(b,G(c,32)) 2381 #define PCRE2_MATCH_DATA_CREATE_FROM_PATTERN(a,b,c) \ 2382  G(a,32) = pcre2_match_data_create_from_pattern_32(G(b,32),G(c,32)) 2383 #define PCRE2_MATCH_DATA_FREE(a) pcre2_match_data_free_32(G(a,32)) 2384 #define PCRE2_PATTERN_CONVERT(a,b,c,d,e,f,g) a = pcre2_pattern_convert_32(G(b,32),c,d,(PCRE2_UCHAR32 **)e,f,G(g,32)) 2385 #define PCRE2_PATTERN_INFO(a,b,c,d) a = pcre2_pattern_info_32(G(b,32),c,d) 2386 #define PCRE2_PRINTINT(a) pcre2_printint_32(compiled_code32,outfile,a) 2387 #define PCRE2_SERIALIZE_DECODE(r,a,b,c,d) \ 2388  r = pcre2_serialize_decode_32((pcre2_code_32 **)a,b,c,G(d,32)) 2389 #define PCRE2_SERIALIZE_ENCODE(r,a,b,c,d,e) \ 2390  r = pcre2_serialize_encode_32((const pcre2_code_32 **)a,b,c,d,G(e,32)) 2391 #define PCRE2_SERIALIZE_FREE(a) pcre2_serialize_free_32(a) 2392 #define PCRE2_SERIALIZE_GET_NUMBER_OF_CODES(r,a) \ 2393  r = pcre2_serialize_get_number_of_codes_32(a) 2394 #define PCRE2_SET_CALLOUT(a,b,c) \ 2395  pcre2_set_callout_32(G(a,32),(int (*)(pcre2_callout_block_32 *, void *))b,c) 2396 #define PCRE2_SET_CHARACTER_TABLES(a,b) pcre2_set_character_tables_32(G(a,32),b) 2397 #define PCRE2_SET_COMPILE_RECURSION_GUARD(a,b,c) \ 2398  pcre2_set_compile_recursion_guard_32(G(a,32),b,c) 2399 #define PCRE2_SET_DEPTH_LIMIT(a,b) pcre2_set_depth_limit_32(G(a,32),b) 2400 #define PCRE2_SET_GLOB_ESCAPE(r,a,b) r = pcre2_set_glob_escape_32(G(a,32),b) 2401 #define PCRE2_SET_GLOB_SEPARATOR(r,a,b) r = pcre2_set_glob_separator_32(G(a,32),b) 2402 #define PCRE2_SET_HEAP_LIMIT(a,b) pcre2_set_heap_limit_32(G(a,32),b) 2403 #define PCRE2_SET_MATCH_LIMIT(a,b) pcre2_set_match_limit_32(G(a,32),b) 2404 #define PCRE2_SET_MAX_VARLOOKBEHIND(a,b) pcre2_set_max_varlookbehind_32(G(a,32),b) 2405 #define PCRE2_SET_OFFSET_LIMIT(a,b) pcre2_set_offset_limit_32(G(a,32),b) 2406 #define PCRE2_SET_PARENS_NEST_LIMIT(a,b) pcre2_set_parens_nest_limit_32(G(a,32),b) 2407 #define PCRE2_SET_SUBSTITUTE_CALLOUT(a,b,c) \ 2408  pcre2_set_substitute_callout_32(G(a,32), \ 2409  (int (*)(pcre2_substitute_callout_block_32 *, void *))b,c) 2410 #define PCRE2_SUBSTITUTE(a,b,c,d,e,f,g,h,i,j,k,l) \ 2411  a = pcre2_substitute_32(G(b,32),(PCRE2_SPTR32)c,d,e,f,G(g,32),h, \ 2412  (PCRE2_SPTR32)i,j,(PCRE2_UCHAR32 *)k,l) 2413 #define PCRE2_SUBSTRING_COPY_BYNAME(a,b,c,d,e) \ 2414  a = pcre2_substring_copy_byname_32(G(b,32),G(c,32),(PCRE2_UCHAR32 *)d,e) 2415 #define PCRE2_SUBSTRING_COPY_BYNUMBER(a,b,c,d,e) \ 2416  a = pcre2_substring_copy_bynumber_32(G(b,32),c,(PCRE2_UCHAR32 *)d,e); 2417 #define PCRE2_SUBSTRING_FREE(a) pcre2_substring_free_32((PCRE2_UCHAR32 *)a) 2418 #define PCRE2_SUBSTRING_GET_BYNAME(a,b,c,d,e) \ 2419  a = pcre2_substring_get_byname_32(G(b,32),G(c,32),(PCRE2_UCHAR32 **)d,e) 2420 #define PCRE2_SUBSTRING_GET_BYNUMBER(a,b,c,d,e) \ 2421  a = pcre2_substring_get_bynumber_32(G(b,32),c,(PCRE2_UCHAR32 **)d,e) 2422 #define PCRE2_SUBSTRING_LENGTH_BYNAME(a,b,c,d) \ 2423  a = pcre2_substring_length_byname_32(G(b,32),G(c,32),d) 2424 #define PCRE2_SUBSTRING_LENGTH_BYNUMBER(a,b,c,d) \ 2425  a = pcre2_substring_length_bynumber_32(G(b,32),c,d) 2426 #define PCRE2_SUBSTRING_LIST_GET(a,b,c,d) \ 2427  a = pcre2_substring_list_get_32(G(b,32),(PCRE2_UCHAR32 ***)c,d) 2428 #define PCRE2_SUBSTRING_LIST_FREE(a) \ 2429  pcre2_substring_list_free_32((PCRE2_UCHAR32 **)a) 2430 #define PCRE2_SUBSTRING_NUMBER_FROM_NAME(a,b,c) \ 2431  a = pcre2_substring_number_from_name_32(G(b,32),G(c,32)); 2432 #define PTR(x) (void *)G(x,32) 2433 #define SETFLD(x,y,z) G(x,32)->y = z 2434 #define SETFLDVEC(x,y,v,z) G(x,32)->y[v] = z 2435 #define SETOP(x,y,z) G(x,32) z y 2436 #define SETCASTPTR(x,y) G(x,32) = (uint32_t *)(y) 2437 #define STRLEN(p) (int)strlen32((PCRE2_SPTR32)p) 2438 #define SUB1(a,b) G(a,32)(G(b,32)) 2439 #define SUB2(a,b,c) G(a,32)(G(b,32),G(c,32)) 2440 #define TEST(x,r,y) (G(x,32) r (y)) 2441 #define TESTFLD(x,f,r,y) (G(x,32)->f r (y)) 2467

0, 1, 2, 3, 4, 5, 6, 7,

2468

8, 9, 10, 11, 12, 13, 14, 15,

2469

16, 17, 18, 19, 20, 21, 22, 23,

2470

24, 25, 26, 27, 28, 29, 30, 31,

2471

32, 33, 34, 35, 36, 37, 38, 39,

2472

40, 41, 42, 43, 44, 45, 46, 47,

2473

48, 49, 50, 51, 52, 53, 54, 55,

2474

56, 57, 58, 59, 60, 61, 62, 63,

2475

64, 97, 98, 99,100,101,102,103,

2476

104,105,106,107,108,109,110,111,

2477

112,113,114,115,116,117,118,119,

2478

120,121,122, 91, 92, 93, 94, 95,

2479

96, 97, 98, 99,100,101,102,103,

2480

104,105,106,107,108,109,110,111,

2481

112,113,114,115,116,117,118,119,

2482

120,121,122,123,124,125,126,127,

2483

128,129,130,131,132,133,134,135,

2484

136,137,138,139,140,141,142,143,

2485

144,145,146,147,148,149,150,151,

2486

152,153,154,155,156,157,158,159,

2487

160,161,162,163,164,165,166,167,

2488

168,169,170,171,172,173,174,175,

2489

176,177,178,179,180,181,182,183,

2490

184,185,186,187,188,189,190,191,

2491

192,193,194,195,196,197,198,199,

2492

200,201,202,203,204,205,206,207,

2493

208,209,210,211,212,213,214,215,

2494

216,217,218,219,220,221,222,223,

2495

224,225,226,227,228,229,230,231,

2496

232,233,234,235,236,237,238,239,

2497

240,241,242,243,244,245,246,247,

2498

248,249,250,251,252,253,254,255,

2502

0, 1, 2, 3, 4, 5, 6, 7,

2503

8, 9, 10, 11, 12, 13, 14, 15,

2504

16, 17, 18, 19, 20, 21, 22, 23,

2505

24, 25, 26, 27, 28, 29, 30, 31,

2506

32, 33, 34, 35, 36, 37, 38, 39,

2507

40, 41, 42, 43, 44, 45, 46, 47,

2508

48, 49, 50, 51, 52, 53, 54, 55,

2509

56, 57, 58, 59, 60, 61, 62, 63,

2510

64, 97, 98, 99,100,101,102,103,

2511

104,105,106,107,108,109,110,111,

2512

112,113,114,115,116,117,118,119,

2513

120,121,122, 91, 92, 93, 94, 95,

2514

96, 65, 66, 67, 68, 69, 70, 71,

2515

72, 73, 74, 75, 76, 77, 78, 79,

2516

80, 81, 82, 83, 84, 85, 86, 87,

2517

88, 89, 90,123,124,125,126,127,

2518

128,129,130,131,132,133,134,135,

2519

136,137,138,139,140,141,142,143,

2520

144,145,146,147,148,149,150,151,

2521

152,153,154,155,156,157,158,159,

2522

160,161,162,163,164,165,166,167,

2523

168,169,170,171,172,173,174,175,

2524

176,177,178,179,180,181,182,183,

2525

184,185,186,187,188,189,190,191,

2526

192,193,194,195,196,197,198,199,

2527

200,201,202,203,204,205,206,207,

2528

208,209,210,211,212,213,214,215,

2529

216,217,218,219,220,221,222,223,

2530

224,225,226,227,228,229,230,231,

2531

232,233,234,235,236,237,238,239,

2532

240,241,242,243,244,245,246,247,

2533

248,249,250,251,252,253,254,255,

2540

0x00,0x3e,0x00,0x00,0x01,0x00,0x00,0x00,

2541

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2542

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2543

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2545

0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03,

2546

0x7e,0x00,0x00,0x00,0x7e,0x00,0x00,0x00,

2547

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2548

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2550

0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03,

2551

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2552

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2553

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2555

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2556

0xfe,0xff,0xff,0x07,0x00,0x00,0x00,0x00,

2557

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2558

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2560

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2561

0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0x07,

2562

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2563

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2565

0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03,

2566

0xfe,0xff,0xff,0x87,0xfe,0xff,0xff,0x07,

2567

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2568

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2570

0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,

2571

0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,

2572

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2573

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2575

0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,

2576

0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,

2577

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2578

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2580

0x00,0x00,0x00,0x00,0xfe,0xff,0x00,0xfc,

2581

0x01,0x00,0x00,0xf8,0x01,0x00,0x00,0x78,

2582

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2583

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2585

0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,

2586

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,

2587

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2588

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2599

0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2600

0x00,0x01,0x01,0x01,0x01,0x01,0x00,0x00,

2601

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2602

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2603

0x01,0x00,0x00,0x00,0x80,0x00,0x00,0x00,

2604

0x80,0x80,0x80,0x80,0x00,0x00,0x80,0x00,

2605

0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,

2606

0x1c,0x1c,0x00,0x00,0x00,0x00,0x00,0x80,

2607

0x00,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x12,

2608

0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,

2609

0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,

2610

0x12,0x12,0x12,0x80,0x80,0x00,0x80,0x10,

2611

0x00,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x12,

2612

0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,

2613

0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,

2614

0x12,0x12,0x12,0x80,0x80,0x00,0x00,0x00,

2615

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2616

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2617

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2618

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2619

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2620

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2621

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2622

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2623

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2624

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2625

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2626

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2627

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2628

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2629

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

2630

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};

2638

8,9,10,11,12,13,14,15,

2639

16,17,18,19,20,21,22,23,

2640

24,25,26,27,28,29,30,31,

2641

32,33,34,35,36,37,38,39,

2642

40,41,42,43,44,45,46,47,

2643

48,49,50,51,52,53,54,55,

2644

56,57,58,59,60,61,62,63,

2645

64,97,98,99,100,101,102,103,

2646

104,105,106,107,108,109,110,111,

2647

112,113,114,115,116,117,118,119,

2648

120,121,122,91,92,93,94,95,

2649

96,97,98,99,100,101,102,103,

2650

104,105,106,107,108,109,110,111,

2651

112,113,114,115,116,117,118,119,

2652

120,121,122,123,124,125,126,127,

2653

128,129,130,131,132,133,134,135,

2654

136,137,138,139,140,141,142,143,

2655

144,145,146,147,148,149,150,151,

2656

152,153,154,155,156,157,158,159,

2657

160,161,162,163,164,165,166,167,

2658

168,169,170,171,172,173,174,175,

2659

176,177,178,179,180,181,182,183,

2660

184,185,186,187,188,189,190,191,

2661

224,225,226,227,228,229,230,231,

2662

232,233,234,235,236,237,238,239,

2663

240,241,242,243,244,245,246,215,

2664

248,249,250,251,252,253,254,223,

2665

224,225,226,227,228,229,230,231,

2666

232,233,234,235,236,237,238,239,

2667

240,241,242,243,244,245,246,247,

2668

248,249,250,251,252,253,254,255,

2670

8,9,10,11,12,13,14,15,

2671

16,17,18,19,20,21,22,23,

2672

24,25,26,27,28,29,30,31,

2673

32,33,34,35,36,37,38,39,

2674

40,41,42,43,44,45,46,47,

2675

48,49,50,51,52,53,54,55,

2676

56,57,58,59,60,61,62,63,

2677

64,97,98,99,100,101,102,103,

2678

104,105,106,107,108,109,110,111,

2679

112,113,114,115,116,117,118,119,

2680

120,121,122,91,92,93,94,95,

2681

96,65,66,67,68,69,70,71,

2682

72,73,74,75,76,77,78,79,

2683

80,81,82,83,84,85,86,87,

2684

88,89,90,123,124,125,126,127,

2685

128,129,130,131,132,133,134,135,

2686

136,137,138,139,140,141,142,143,

2687

144,145,146,147,148,149,150,151,

2688

152,153,154,155,156,157,158,159,

2689

160,161,162,163,164,165,166,167,

2690

168,169,170,171,172,173,174,175,

2691

176,177,178,179,180,181,182,183,

2692

184,185,186,187,188,189,190,191,

2693

224,225,226,227,228,229,230,231,

2694

232,233,234,235,236,237,238,239,

2695

240,241,242,243,244,245,246,215,

2696

248,249,250,251,252,253,254,223,

2697

192,193,194,195,196,197,198,199,

2698

200,201,202,203,204,205,206,207,

2699

208,209,210,211,212,213,214,247,

2700

216,217,218,219,220,221,222,255,

2706

126,0,0,0,126,0,0,0,

2714

254,255,255,7,0,0,0,0,

2716

255,255,127,127,0,0,0,0,

2718

0,0,0,0,254,255,255,7,

2720

0,0,0,128,255,255,127,255,

2722

254,255,255,135,254,255,255,7,

2724

255,255,127,255,255,255,127,255,

2725

0,0,0,0,254,255,255,255,

2726

255,255,255,255,255,255,255,127,

2727

0,0,0,0,254,255,255,255,

2728

255,255,255,255,255,255,255,255,

2729

0,2,0,0,255,255,255,255,

2730

255,255,255,255,255,255,255,127,

2731

0,0,0,0,255,255,255,255,

2732

255,255,255,255,255,255,255,255,

2733

0,0,0,0,254,255,0,252,

2734

1,0,0,248,1,0,0,120,

2735

0,0,0,0,254,255,255,255,

2736

0,0,128,0,0,0,128,0,

2737

255,255,255,255,0,0,0,0,

2739

255,255,255,255,0,0,0,0,

2746

128,128,128,128,0,0,128,0,

2747

28,28,28,28,28,28,28,28,

2748

28,28,0,0,0,0,0,128,

2749

0,26,26,26,26,26,26,18,

2750

18,18,18,18,18,18,18,18,

2751

18,18,18,18,18,18,18,18,

2752

18,18,18,128,128,0,128,16,

2753

0,26,26,26,26,26,26,18,

2754

18,18,18,18,18,18,18,18,

2755

18,18,18,18,18,18,18,18,

2756

18,18,18,128,128,0,0,0,

2765

18,18,18,18,18,18,18,18,

2766

18,18,18,18,18,18,18,18,

2767

18,18,18,18,18,18,18,0,

2768

18,18,18,18,18,18,18,18,

2769

18,18,18,18,18,18,18,18,

2770

18,18,18,18,18,18,18,18,

2771

18,18,18,18,18,18,18,0,

2772

18,18,18,18,18,18,18,18

2777 #if !defined(VPCOMPAT) && !defined(HAVE_MEMMOVE) 2794 unsigned char

*dest = (

unsigned char

*)d;

2795 const unsigned char

*src = (

const unsigned char

*)s;

2800  for

(

i

= 0;

i

<

n

; ++

i

) *(--dest) = *(--src);

2801  return

(

void

*)dest;

2805  for

(

i

= 0;

i

<

n

; ++

i

) *dest++ = *src++;

2806  return

(

void

*)(dest -

n

);

2811 #define memmove(d,s,n) emulated_memmove(d,s,n) 2816 #ifndef HAVE_STRERROR 2831 if

(n < 0 || n >=

sys_nerr

)

return "unknown error number"

;

2857 #ifdef DEBUG_SHOW_MALLOC_ADDRESSES 2858

fprintf(

outfile

,

" %p"

, block);

2866

fprintf(

outfile

,

" (not remembered)"

);

2897  if

(!found) fprintf(

outfile

,

" unremembered block"

);

2898 #ifdef DEBUG_SHOW_MALLOC_ADDRESSES 2899

fprintf(

outfile

,

" %p"

, block);

2932 static

PCRE2_JIT_STACK*

2936 return

(PCRE2_JIT_STACK *)arg;

2968 for

(

i

= -1;

i

< 6;

i

++)

2970  if

((d & 0x80) == 0)

break

;

2974 if

(

i

== -1) { *vptr = c;

return

1; }

2975 if

(

i

== 0 ||

i

== 6)

return

0;

2982 for

(j = 0; j <

i

; j++)

2984  if

(utf8bytes >= end)

return

0;

2987  if

((c & 0xc0) != 0x80)

return

-(j+1);

2989

d |= (c & 0x3f) << s;

2996 if

(j !=

i

)

return

-(

i

+1);

3025 char

tempbuffer[16];

3029  if

(

f

!=

NULL

) fprintf(

f

,

"%c"

, c);

3037  if

(

f

!=

NULL

) fprintf(

f

,

"\\x{%02x}"

, c);

3042  if

(

f

!=

NULL

) fprintf(

f

,

"\\x%02x"

, c);

3047 if

(

f

!=

NULL

)

n

= fprintf(

f

,

"\\x{%02x}"

, c);

3048  else n

= sprintf(tempbuffer,

"\\x{%02x}"

, c);

3050 return n

>= 0 ?

n

: 0;

3055 #ifdef SUPPORT_PCRE2_16 3063 while

(*pp != 0) pp++;

3064 return

(

int

)(pp - p);

3070 #ifdef SUPPORT_PCRE2_32 3078 while

(*pp != 0) pp++;

3079 return

(

int

)(pp - p);

3084 #ifdef SUPPORT_PCRE2_8 3099 if

(length < 0) length = *p++;

3101 while

(length-- > 0)

3106  if

(rc > 0 && rc <= length + 1)

3123 #ifdef SUPPORT_PCRE2_16 3136 if

(length < 0) length = *p++;

3137 while

(length-- > 0)

3140  if

(

utf

&& c >= 0xD800 && c < 0xDC00 && length > 0)

3142  int

d = *p & 0xffff;

3143  if

(d >= 0xDC00 && d <= 0xDFFF)

3145

c = ((c & 0x3ff) << 10) + (d & 0x3ff) + 0x10000;

3158 #ifdef SUPPORT_PCRE2_32 3172 if

(length < 0) length = *p++;

3173 while

(length-- > 0)

3205 if

(cvalue > 0x7fffffffu)

3210 for

(j =

i

; j > 0; j--)

3212

*utf8bytes-- = 0x80 | (cvalue & 0x3f);

3221 #ifdef SUPPORT_PCRE2_16 3262 if

(pbuffer16_size < 2*

len

+ 2)

3264  if

(pbuffer16 !=

NULL

)

free

(pbuffer16);

3265

pbuffer16_size = 2*

len

+ 2;

3266  if

(pbuffer16_size < 4096) pbuffer16_size = 4096;

3268  if

(pbuffer16 ==

NULL

)

3270

fprintf(stderr,

"pcre2test: malloc(%" SIZ_FORM ") failed for pbuffer16\n"

,

3279  for

(;

len

> 0;

len

--) *pp++ = *p++;

3281 else while

(

len

> 0)

3286  if

(chlen <= 0)

return

-1;

3287  if

(!

utf

&& c > 0xffff)

return

-3;

3288  if

(c > 0x10ffff)

return

-2;

3291  if

(c < 0x10000) *pp++ = c;

else 3294

*pp++ = 0xD800 | (c >> 10);

3295

*pp++ = 0xDC00 | (c & 0x3ff);

3300

*lenptr = pp - pbuffer16;

3307 #ifdef SUPPORT_PCRE2_32 3350 if

(pbuffer32_size < 4*

len

+ 4)

3352  if

(pbuffer32 !=

NULL

)

free

(pbuffer32);

3353

pbuffer32_size = 4*

len

+ 4;

3354  if

(pbuffer32_size < 8192) pbuffer32_size = 8192;

3356  if

(pbuffer32 ==

NULL

)

3358

fprintf(stderr,

"pcre2test: malloc(%" SIZ_FORM ") failed for pbuffer32\n"

,

3368  for

(;

len

> 0;

len

--) *pp++ = *p++;

3371 else while

(

len

> 0)

3377  if

(!

utf

&& *p == 0xff &&

len

> 1)

3379

topbit = 0x80000000u;

3384  if

(chlen <= 0)

return

-1;

3385  if

(

utf

&& c > 0x10ffff)

return

-2;

3392

*lenptr = pp - pbuffer32;

3402 #ifdef NEVERNEVERNEVER 3432  while

((*pp & 0xc0) == 0x80) pp--;

3443  if

((*pp & 0xfc00) == 0xdc00) pp--;

3471 if

(new_buffer ==

NULL

|| new_pbuffer8 ==

NULL

)

3473

fprintf(stderr,

"pcre2test: malloc(%d) failed\n"

, new_pbuffer8_size);

3532 #if defined(SUPPORT_LIBREADLINE) || defined(SUPPORT_LIBEDIT) 3537  if

(s ==

NULL

)

return

(here == start)?

NULL

: start;

3539  if

(

len

> 0) add_history(s);

3540  if

(

len

> rlen - 1)

len

= rlen - 1;

3541

memcpy(here, s,

len

);

3542

here[

len

] =

'\n'

;

3553  if

(fgets((

char

*)here, rlen,

f

) ==

NULL

)

3554  return

(here == start)?

NULL

: start;

3557

dlen = strlen((

char

*)here);

3563  if

(here > start && here[-1] ==

'\n'

)

return

start;

3574

fprintf(

outfile

,

"** Binary zero encountered in input\n"

);

3575

fprintf(

outfile

,

"** pcre2test run abandoned\n"

);

3582  size_t

start_offset = start -

buffer

;

3583  size_t

here_offset = here -

buffer

;

3585

start =

buffer

+ start_offset;

3586

here =

buffer

+ here_offset;

3614  if

(c != 0)

return

c;

3642  int

mid = (bot + top)/2;

3643  unsigned int

mlen = strlen(

modlist

[mid].name);

3647  if

(

len

== mlen)

return

mid;

3648

c = (

int

)

len

- (

int

)mlen;

3650  if

(c > 0) bot = mid + 1;

else

top = mid;

3683 void

*field =

NULL

;

3695

fprintf(

outfile

,

"** '%s' is not allowed in a Perl-compatible test\n"

,

3714  if

(dctl !=

NULL

) field = dctl;

3719  if

(pctl !=

NULL

) field = pctl;

3726  if

(dctl !=

NULL

) field = dctl;

3736

fprintf(

outfile

,

"** '%s' is not valid here\n"

, m->

name

);

3738

fprintf(

outfile

,

"** /%c is not valid here\n"

, c);

3742 return

(

char

*)field +

offset

;

3782  unsigned int i

,

len

;

3788  while

(

isspace

(*p) || *p ==

','

) p++;

3789  if

(*p == 0)

break

;

3793  for

(ep = p; *ep != 0 && *ep !=

','

; ep++);

3796  while

(ep > p &&

isspace

(ep[-1])) ep--;

3811  while

(pp < ep && *pp !=

'='

) pp++;

3825

fprintf(

outfile

,

"** Unrecognized modifier '%.*s'\n"

, (

int

)(ep-p), p);

3827

fprintf(

outfile

,

"** Single-character modifiers must come first\n"

);

3831  for

(cc = *p; cc !=

','

&& cc !=

'\n'

&& cc != 0; cc = *(++p))

3838

fprintf(

outfile

,

"** Unrecognized modifier '%c' in '%.*s'\n"

,

3839

*p, (

int

)(ep-mp), mp);

3854

fprintf(

outfile

,

"** Internal error: single-character equivalent " 3855  "modifier '%s' not found\n"

,

c1modlist

[

i

].fullname);

3888

fprintf(

outfile

,

"** '=' expected after '%s'\n"

, m->

name

);

3893

fprintf(

outfile

,

"** '-' is not valid for '%s'\n"

, m->

name

);

3900  else if

(*pp !=

','

&& *pp !=

'\n'

&& *pp !=

' '

&& *pp != 0)

3902

fprintf(

outfile

,

"** Unrecognized modifier '%.*s'\n"

, (

int

)(ep-p), p);

3941  else goto

INVALID_VALUE;

3956  len

= ((colon !=

NULL

&& colon < ep)? colon:ep) - pp;

3970  if

(*pp !=

':'

)

break

;

3975  if

(!

isdigit

(*pp))

goto

INVALID_VALUE;

3976

uli = strtoul((

const char

*)pp, &endptr, 10);

3979  if

(*endptr ==

':'

)

3981

uli = strtoul((

const char

*)endptr+1, &endptr, 10);

3994  if

(!

isdigit

(*pp))

goto

INVALID_VALUE;

3995

uli = strtoul((

const char

*)pp, &endptr, 10);

3996  if

(uli == ULONG_MAX)

goto

INVALID_VALUE;

3997 #if ULONG_MAX > PCRE2_SIZE_MAX 4013  if

(!

isdigit

(*pp))

goto

INVALID_VALUE;

4014

uli = strtoul((

const char

*)pp, &endptr, 10);

4021  if

(!

isdigit

(*pp) && *pp !=

'-'

)

goto

INVALID_VALUE;

4022

li = strtol((

const char

*)pp, &endptr, 10);

4029  for

(

i

= 0;

i

<

sizeof

(

newlines

)/

sizeof

(

char

*);

i

++)

4032  if

(

i

>=

sizeof

(

newlines

)/

sizeof

(

char

*))

goto

INVALID_VALUE;

4049  if

(

isdigit

(*pp) || *pp ==

'-'

)

4053

li = strtol((

const char

*)pp, &endptr, 10);

4059  while

(*((

int32_t

*)field) >= 0 &&

ct

-- > 0)

4060

field = (

char

*)field +

sizeof

(

int32_t

);

4063

fprintf(

outfile

,

"** Too many numeric '%s' modifiers\n"

, m->

name

);

4068  if

(

ct

> 0) ((

int32_t

*)field)[1] = -1;

4076  char

*nn = (

char

*)field;

4081

fprintf(

outfile

,

"** Group name in '%s' is too long\n"

, m->

name

);

4084  while

(*nn != 0) nn += strlen(nn) + 1;

4087

fprintf(

outfile

,

"** Too many characters in named '%s' modifiers\n"

,

4091

memcpy(nn, pp,

len

);

4102

fprintf(

outfile

,

"** Overlong value for '%s' (max %d code units)\n"

,

4106

memcpy(field, pp,

len

);

4112  if

(*pp !=

','

&& *pp !=

'\n'

&& *pp !=

' '

&& *pp != 0)

4114

fprintf(

outfile

,

"** Comma expected after modifier item '%s'\n"

, m->

name

);

4124

pctl->

locale

[0] != 0 ||

4127

fprintf(

outfile

,

"** '%s' is not valid here\n"

, m->

name

);

4135

fprintf(

outfile

,

"** Invalid value in '%.*s'\n"

, (

int

)(ep-p), p);

4159

PCRE2_PATTERN_INFO(rc, compiled_code, what,

NULL

);

4160

PCRE2_PATTERN_INFO(rc, compiled_code, what, where);

4161 if

(rc >= 0)

return

0;

4164

fprintf(

outfile

,

"Error %d from pcre2_pattern_info_%d(%d)\n"

, rc,

test_mode

,

4167

fprintf(

outfile

,

"Running in %d-bit mode but pattern was compiled in " 4176 #ifdef SUPPORT_PCRE2_8 4187

prmsg(

const char

**

msg

,

const char

*s)

4215

fprintf(

outfile

,

"%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s"

,

4223

((controls &

CTL_BINCODE

) != 0)?

" bincode"

:

""

,

4230

((controls &

CTL_DFA

) != 0)?

" dfa"

:

""

,

4231

((controls &

CTL_EXPAND

) != 0)?

" expand"

:

""

,

4236

((controls &

CTL_GETALL

) != 0)?

" getall"

:

""

,

4237

((controls &

CTL_GLOBAL

) != 0)?

" global"

:

""

,

4239

((controls &

CTL_HEXPAT

) != 0)?

" hex"

:

""

,

4240

((controls &

CTL_INFO

) != 0)?

" info"

:

""

,

4241

((controls &

CTL_JITFAST

) != 0)?

" jitfast"

:

""

,

4243

((controls &

CTL_MARK

) != 0)?

" mark"

:

""

,

4244

((controls &

CTL_MEMORY

) != 0)?

" memory"

:

""

,

4245

((controls2 &

CTL2_NL_SET

) != 0)?

" newline"

:

""

,

4249

((controls &

CTL_POSIX

) != 0)?

" posix"

:

""

,

4251

((controls &

CTL_PUSH

) != 0)?

" push"

:

""

,

4287 if

(options == 0) fprintf(

outfile

,

"%s <none>%s"

, before, after);

4288 else

fprintf(

outfile

,

"%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s"

,

4316

((options &

PCRE2_UCP

) != 0)?

" ucp"

:

""

,

4319

((options &

PCRE2_UTF

) != 0)?

" utf"

:

""

,

4342 if

(options == 0) fprintf(

outfile

,

"%s <none>%s"

, before, after);

4343 else

fprintf(

outfile

,

"%s%s%s%s%s%s%s%s%s%s%s%s%s%s"

,

4362 #ifdef SUPPORT_PCRE2_8 4370

show_match_options(

uint32_t

options)

4372

fprintf(

outfile

,

"%s%s%s%s%s%s%s%s%s%s%s%s%s%s"

,

4399 uint32_t

name_count, name_entry_size;

4406 #ifdef SUPPORT_PCRE2_8 4409 #ifdef SUPPORT_PCRE2_16 4412 #ifdef SUPPORT_PCRE2_32 4446

fprintf(

outfile

,

"Frame size for pcre2_match(): %" SIZ_FORM "\n"

, frame_size);

4459

PCRE2_GET_MATCH_DATA_HEAPFRAMES_SIZE(heapframes_size,

match_data

);

4474

PCRE2_GET_ERROR_MESSAGE(

len

, errorcode, pbuffer);

4477

fprintf(

outfile

,

"\n** pcre2test internal error: cannot interpret error " 4478  "number\n** Unexpected return (%d) from pcre2_get_error_message()\n"

,

len

);

4482

fprintf(

outfile

,

"%s"

, before);

4484

fprintf(

outfile

,

"%s"

, after);

4514

fprintf(

outfile

,

"Callout "

);

4521  for

(

i

= 0; callout_start_delims[

i

] != 0;

i

++)

4562

fprintf(

outfile

,

"------------------------------------------------------------------\n"

);

4571  BOOL

heap_limit_set, match_limit_set, depth_limit_set;

4572  uint32_t

backrefmax, bsr_convention, capture_count, first_ctype, first_cunit,

4573

hasbackslashc, hascrorlf, jchanged, last_ctype, last_cunit, match_empty,

4579

PCRE2_PATTERN_INFO(rc, compiled_code, 999,

NULL

);

4587

heap_limit_set =

TRUE

;

4591

heap_limit_set =

FALSE

;

4601

match_limit_set =

TRUE

;

4605

match_limit_set =

FALSE

;

4615

depth_limit_set =

TRUE

;

4619

depth_limit_set =

FALSE

;

4648

fprintf(

outfile

,

"Capture group count = %d\n"

, capture_count);

4651

fprintf(

outfile

,

"Max back reference = %d\n"

, backrefmax);

4659  if

(match_limit_set)

4662  if

(depth_limit_set)

4667

fprintf(

outfile

,

"Named capture groups:\n"

);

4668  for

(; namecount > 0; namecount--)

4681 #ifdef SUPPORT_PCRE2_32 4685  while

(*nameptr != 0)

4693 #ifdef SUPPORT_PCRE2_16 4697  while

(*nameptr != 0)

4702  if

(c >= 0xD800 && c < 0xDC00)

4703

c = ((c & 0x3ff) << 10) + (*nameptr++ & 0x3ff) + 0x10000;

4709 #ifdef SUPPORT_PCRE2_8 4716

PCHARSV(nametable, imm2_size, length,

FALSE

,

outfile

);

4719  while

(length++ < nameentrysize - imm2_size) putc(

' '

,

outfile

);

4721 #ifdef SUPPORT_PCRE2_32 4725 #ifdef SUPPORT_PCRE2_16 4729 #ifdef SUPPORT_PCRE2_8 4731

fprintf(

outfile

,

"%3d\n"

, (

int

)(

4739  if

(hascrorlf) fprintf(

outfile

,

"Contains explicit CR or LF match\n"

);

4740  if

(hasbackslashc) fprintf(

outfile

,

"Contains \\C\n"

);

4741  if

(match_empty) fprintf(

outfile

,

"May match empty string\n"

);

4762  if

((compile_options|overall_options) != 0)

4764  if

(compile_options == overall_options)

4776  if

(jchanged) fprintf(

outfile

,

"Duplicate name status changes\n"

);

4781  "any Unicode newline"

:

"CR, LF, or CRLF"

);

4785  switch

(newline_convention)

4788

fprintf(

outfile

,

"Forced newline is CR\n"

);

4792

fprintf(

outfile

,

"Forced newline is LF\n"

);

4796

fprintf(

outfile

,

"Forced newline is CRLF\n"

);

4800

fprintf(

outfile

,

"Forced newline is CR, LF, or CRLF\n"

);

4804

fprintf(

outfile

,

"Forced newline is any Unicode newline\n"

);

4808

fprintf(

outfile

,

"Forced newline is NUL\n"

);

4816  if

(first_ctype == 2)

4818

fprintf(

outfile

,

"First code unit at start or follows newline\n"

);

4820  else if

(first_ctype == 1)

4822  const char

*caseless =

4824  ""

:

" (caseless)"

;

4826

fprintf(

outfile

,

"First code unit = \'%c\'%s\n"

, first_cunit, caseless);

4829

fprintf(

outfile

,

"First code unit = "

);

4831

fprintf(

outfile

,

"%s\n"

, caseless);

4834  else if

(start_bits !=

NULL

)

4838

fprintf(

outfile

,

"Starting code units: "

);

4839  for

(

i

= 0;

i

< 256;

i

++)

4841  if

((start_bits[

i

/8] & (1u << (

i

&7))) != 0)

4855

fprintf(

outfile

,

"\\x%02x "

,

i

);

4863  if

(last_ctype != 0)

4865  const char

*caseless =

4867  ""

:

" (caseless)"

;

4869

fprintf(

outfile

,

"Last code unit = \'%c\'%s\n"

, last_cunit, caseless);

4872

fprintf(

outfile

,

"Last code unit = "

);

4874

fprintf(

outfile

,

"%s\n"

, caseless);

4879

fprintf(

outfile

,

"Subject length lower bound = %d\n"

, minlength);

4884  if

(

FLD

(compiled_code, executable_jit) !=

NULL

)

4885

fprintf(

outfile

,

"JIT compilation was successful\n"

);

4888

fprintf(

outfile

,

"JIT compilation was not successful"

);

4894

fprintf(

outfile

,

"JIT support is not available in this version of PCRE2\n"

);

4905

fprintf(

outfile

,

"Callout enumerate failed: error %d: "

, errorcode);

4933

fprintf(

outfile

,

"%s failed: error %d: "

,

msg

, rc);

4958 char

*filename = (

char

*)buffptr;

4959 while

(

isspace

(*filename)) filename++;

4960

endf = filename +

strlen8

(filename);

4961 while

(endf > filename &&

isspace

(endf[-1])) endf--;

4963 if

(endf == filename)

4965

fprintf(

outfile

,

"** File name expected after %s\n"

, name);

4970

*fptr = fopen((

const char

*)filename,

mode

);

4973

fprintf(

outfile

,

"** Failed to open '%s': %s\n"

, filename,

strerror

(errno));

5003 int

rc,

cmd

, cmdlen, yield;

5005 const char

*cmdname;

5015

cmdlen = strlen(cmdname);

5016  if

(

strncmp

((

char

*)(

buffer

+1), cmdname, cmdlen) == 0 &&

5024

argptr =

buffer

+ cmdlen + 1;

5028

fprintf(

outfile

,

"** #%s is not allowed after #perltest\n"

, cmdname);

5065

first_listed_newline = 0;

5068  while

(

isspace

(*argptr)) argptr++;

5069  if

(*argptr == 0)

break

;

5070  for

(

i

= 1;

i

<

sizeof

(

newlines

)/

sizeof

(

char

*);

i

++)

5077  if

(first_listed_newline == 0) first_listed_newline =

i

;

5080  while

(*argptr != 0 && !

isspace

(*argptr)) argptr++;

5093

fprintf(

outfile

,

"** Can't pop off an empty stack\n"

);

5118  if

(rc !=

PR_OK

)

return

rc;

5127

fprintf(

outfile

,

"** No stacked patterns to save\n"

);

5132  if

(rc !=

PR_OK

)

return

rc;

5149  for

(

i

= 0;

i

< 4;

i

++) fputc((serial_size >> (

i

*8)) & 255,

f

);

5150  if

(fwrite(serial, 1, serial_size,

f

) != serial_size)

5152

fprintf(

outfile

,

"** Wrong return from fwrite()\n"

);

5158

PCRE2_SERIALIZE_FREE(serial);

5171  if

(rc !=

PR_OK

)

return

rc;

5174  for

(

i

= 0;

i

< 4;

i

++) serial_size |= fgetc(

f

) << (

i

*8);

5176

serial =

malloc

(serial_size);

5177  if

(serial ==

NULL

)

5179

fprintf(

outfile

,

"** Failed to get memory (size %" SIZ_FORM ") for #load\n"

,

5185  i

= fread(serial, 1, serial_size,

f

);

5188  if

(

i

!= serial_size)

5190

fprintf(

outfile

,

"** Wrong return from fread()\n"

);

5195

PCRE2_SERIALIZE_GET_NUMBER_OF_CODES(rc, serial);

5204

fprintf(

outfile

,

"** Not enough space on pattern stack for %d pattern%s\n"

,

5205

rc, (rc == 1)?

""

:

"s"

);

5207

fprintf(

outfile

,

"** Decoding %d pattern%s\n"

, rc,

5208

(rc == 1)?

""

:

"s"

);

5227  if

(rc !=

PR_OK

)

return

rc;

5237

fprintf(

outfile

,

"** Failed: malloc failed for #loadtables\n"

);

5242

fprintf(

outfile

,

"** Wrong return from fread()\n"

);

5279 void

*use_pat_context;

5280 void

*use_pbuffer =

NULL

;

5290

fprintf(

outfile

,

"** The only allowed delimiter after #perltest is '/'\n"

);

5297

PATCTXCPY(pat_context, default_pat_context);

5306  if

(*p ==

'\\'

&& p[1] != 0) p++;

5310  if

(*p != 0)

break

;

5313

fprintf(

outfile

,

"** Unexpected EOF\n"

);

5323 if

(p[1] ==

'\\'

) *p++ =

'\\'

;

5346

fprintf(

outfile

,

"** The utf8_input modifier is not allowed in 8-bit mode\n"

);

5351

fprintf(

outfile

,

"** The utf and utf8_input modifiers are mutually exclusive\n"

);

5361

fprintf(

outfile

,

"** The convert and posix modifiers are mutually exclusive\n"

);

5371  if

(c != 0 && c != (c & (~c+1)))

5397  for

(pp =

buffer

+ 1; *pp != 0; pp++)

5399  if

(

isspace

(*pp))

continue

;

5404  if

(c ==

'\''

|| c ==

'"'

)

5412

fprintf(

outfile

,

"** Missing closing quote in hex pattern: " 5413  "opening quote is at offset %" PTR_FORM ".\n"

, pq -

buffer

- 2);

5427

fprintf(

outfile

,

"** Unexpected non-hex-digit '%c' at offset %" 5428  PTR_FORM " in hex pattern: quote missing?\n"

, c, pp -

buffer

- 2);

5433

fprintf(

outfile

,

"** Odd number of digits in hex pattern\n"

);

5439

fprintf(

outfile

,

"** Unexpected non-hex-digit '%c' at offset %" 5440  PTR_FORM " in hex pattern: quote missing?\n"

, d, pp -

buffer

- 1);

5445

*pt++ = ((

isdigit

(c)? (c -

'0'

) : (c -

'A'

+ 10)) << 4) +

5446

(

isdigit

(d)? (d -

'0'

) : (d -

'A'

+ 10));

5460  for

(pp =

buffer

+ 1; *pp != 0; pp++)

5469  if

(pp[0] ==

'\\'

&& pp[1] ==

'['

)

5472  for

(pe = pp + 2; *pe != 0; pe++)

5474  if

(pe[0] ==

']'

&& pe[1] ==

'{'

)

5482

uli = strtoul((

const char

*)pe, &endptr, 10);

5485

fprintf(

outfile

,

"** Pattern repeat count too large\n"

);

5495

fprintf(

outfile

,

"** Zero repeat not allowed\n"

);

5514  size_t

pc_offset = pc -

buffer

;

5515  size_t

pp_offset = pp -

buffer

;

5525

memcpy(pt, pc, length);

5550

fprintf(

outfile

,

"** 'Locale' and 'tables' must not both be set\n"

);

5563

PCRE2_MAKETABLES_FREE(general_context, (

void

*)

locale_tables

);

5579

fprintf(

outfile

,

"** 'Tables = 3' is invalid: binary tables have not " 5587

fprintf(

outfile

,

"** 'Tables' must specify 0, 1, 2, or 3.\n"

);

5591

PCRE2_SET_CHARACTER_TABLES(pat_context,

use_tables

);

5606 #ifdef SUPPORT_PCRE2_8 5609  const char

*

msg

=

"** Ignored with POSIX interface:"

;

5614

fprintf(

outfile

,

"** The POSIX interface is available only in 8-bit mode\n"

);

5618 #ifdef SUPPORT_PCRE2_8 5625  if

(

timeit

> 0) prmsg(&

msg

,

"timing"

);

5663

prmsg(&

msg

,

"max_pattern_length"

);

5664  if

(

FLD

(pat_context, max_pattern_compiled_length) !=

PCRE2_UNSET

)

5665

prmsg(&

msg

,

"max_pattern_compiled_length"

);

5667

prmsg(&

msg

,

"parens_nest_limit"

);

5669  if

(

msg

[0] == 0) fprintf(

outfile

,

"\n"

);

5694  size_t

bsize, usize;

5703

memcpy(

pbuffer8

+ bsize,

"DEADBEEF"

, 8);

5710

psize = (

int

)bsize - 1;

5711

fprintf(

outfile

,

"Failed: POSIX code %d: %.*s\n"

, rc, psize,

pbuffer8

);

5714

fprintf(

outfile

,

"** regerror() message truncated\n"

);

5715  if

(memcmp(

pbuffer8

+ bsize,

"DEADBEEF"

, 8) != 0)

5716

fprintf(

outfile

,

"** regerror() buffer overflow\n"

);

5735  "** The regcomp() function returned zero (success), but the values set\n" 5736  "** in the preg block are not valid for PCRE2. Check that pcre2test is\n" 5737  "** linked with PCRE2's pcre2posix module (-lpcre2-posix) and not with\n" 5738  "** some other POSIX regex library.\n**\n"

);

5754

fprintf(

outfile

,

"** Replacement text is not supported with 'push'.\n"

);

5762  "** Ignored when compiled pattern is stacked with 'push':"

);

5770  "** Applies only to compile when pattern is stacked with 'push':"

);

5779 #ifdef SUPPORT_PCRE2_16 5783 #ifdef SUPPORT_PCRE2_32 5790

fprintf(

outfile

,

"** Failed: invalid UTF-8 string cannot be " 5795

fprintf(

outfile

,

"** Failed: character value greater than 0x10ffff " 5796  "cannot be converted to UTF\n"

);

5800

fprintf(

outfile

,

"** Failed: character value greater than 0xffff " 5801  "cannot be converted to 16-bit in non-UTF mode\n"

);

5815  int

convert_return =

PR_OK

;

5817  void

*converted_pattern;

5824  if

(converted_pattern ==

NULL

)

5826

fprintf(

outfile

,

"** Failed: malloc failed for converted pattern\n"

);

5830  else

converted_pattern =

NULL

;

5836

CONCTXCPY(con_context, default_con_context);

5842

PCRE2_SET_GLOB_ESCAPE(rc, con_context, escape);

5845

fprintf(

outfile

,

"** Invalid glob escape '%c'\n"

,

5848  goto

CONVERT_FINISH;

5857

fprintf(

outfile

,

"** Invalid glob separator '%c'\n"

,

5860  goto

CONVERT_FINISH;

5864

PCRE2_PATTERN_CONVERT(rc, pbuffer, patlen, convert_options,

5865

&converted_pattern, &converted_length, con_context);

5869

fprintf(

outfile

,

"** Pattern conversion error at offset %" SIZ_FORM ": "

,

5879

PCHARSV(converted_pattern, 0, converted_length,

utf

,

outfile

);

5891

fprintf(

outfile

,

"** Pattern conversion is too long for the buffer\n"

);

5896

CONVERT_COPY(pbuffer, converted_pattern, converted_length + 1);

5897

patlen = converted_length;

5905  free

(converted_pattern);

5907

PCRE2_CONVERTED_PATTERN_FREE(converted_pattern);

5911  if

(convert_return !=

PR_OK

)

return

convert_return;

5919

valgrind_access_length = patlen;

5923

valgrind_access_length += 1;

5926 #ifdef SUPPORT_VALGRIND 5927 #ifdef SUPPORT_PCRE2_8 5930

VALGRIND_MAKE_MEM_NOACCESS(

pbuffer8

+ valgrind_access_length,

5934 #ifdef SUPPORT_PCRE2_16 5937

VALGRIND_MAKE_MEM_NOACCESS(pbuffer16 + valgrind_access_length,

5938

pbuffer16_size - valgrind_access_length*

sizeof

(

uint16_t

));

5941 #ifdef SUPPORT_PCRE2_32 5944

VALGRIND_MAKE_MEM_NOACCESS(pbuffer32 + valgrind_access_length,

5945

pbuffer32_size - valgrind_access_length*

sizeof

(

uint32_t

));

5949

(void)valgrind_access_length;

5976 #ifdef SUPPORT_PCRE2_8 5979 #ifdef SUPPORT_PCRE2_16 5982 #ifdef SUPPORT_PCRE2_32 5992

clock_t time_taken = 0;

5996

PCRE2_COMPILE(compiled_code, use_pbuffer, patlen,

6000  if

(

TEST

(compiled_code, !=,

NULL

))

6004

fprintf(

outfile

,

"Compile time %8.4f microseconds\n"

,

6010

PCRE2_COMPILE(compiled_code, use_pbuffer, patlen,

6011  pat_patctl

.

options

|use_forbid_utf, &errorcode, &erroroffset, use_pat_context);

6018 #ifdef SUPPORT_VALGRIND 6019 #ifdef SUPPORT_PCRE2_8 6022

VALGRIND_MAKE_MEM_UNDEFINED(

pbuffer8

+ valgrind_access_length,

6026 #ifdef SUPPORT_PCRE2_16 6029

VALGRIND_MAKE_MEM_UNDEFINED(pbuffer16, pbuffer16_size);

6032 #ifdef SUPPORT_PCRE2_32 6035

VALGRIND_MAKE_MEM_UNDEFINED(pbuffer32, pbuffer32_size);

6049

clock_t time_taken = 0;

6055

PCRE2_COMPILE(compiled_code, use_pbuffer, patlen,

6063

fprintf(

outfile

,

"JIT compilation was not successful"

);

6070

fprintf(

outfile

,

"JIT compile %8.4f microseconds\n"

,

6078

fprintf(

outfile

,

"JIT compilation was not successful"

);

6087 if

(

TEST

(compiled_code, ==,

NULL

))

6089

fprintf(

outfile

,

"Failed: error %d at offset %d: "

, errorcode,

6090

(

int

)erroroffset);

6103

fprintf(

outfile

,

"** \\P, \\p, and \\X are not allowed after the " 6104  "#forbid_utf command\n"

);

6134  if

(rc !=

PR_OK

)

return

rc;

6201

PCRE2_SET_MATCH_LIMIT(dat_context,

max

);

6202

PCRE2_SET_DEPTH_LIMIT(dat_context,

max

);

6203

PCRE2_SET_HEAP_LIMIT(dat_context,

max

);

6214

PCRE2_SET_HEAP_LIMIT(dat_context, mid);

6216 #ifdef SUPPORT_PCRE2_8 6219

match_data8->memctl.free(match_data8->heapframes,

6220

match_data8->memctl.memory_data);

6221

match_data8->heapframes =

NULL

;

6222

match_data8->heapframes_size = 0;

6226 #ifdef SUPPORT_PCRE2_16 6229

match_data16->memctl.free(match_data16->heapframes,

6230

match_data16->memctl.memory_data);

6231

match_data16->heapframes =

NULL

;

6232

match_data16->heapframes_size = 0;

6236 #ifdef SUPPORT_PCRE2_32 6239

match_data32->memctl.free(match_data32->heapframes,

6240

match_data32->memctl.memory_data);

6241

match_data32->heapframes =

NULL

;

6242

match_data32->heapframes_size = 0;

6251

PCRE2_SET_MATCH_LIMIT(dat_context, mid);

6255

PCRE2_SET_DEPTH_LIMIT(dat_context, mid);

6282  if

(capcount == errnumber)

6284  if

((mid & 0x80000000u) != 0)

6286

fprintf(

outfile

,

"Can't find minimum %s limit: check pattern for " 6287  "restriction\n"

,

msg

);

6294  else if

(capcount >= 0 ||

6306

fprintf(

outfile

,

"Minimum %s limit = 0\n"

,

msg

);

6311

fprintf(

outfile

,

"Minimum %s limit = %d\n"

,

msg

, mid);

6364

fprintf(

outfile

,

" STOPPED"

);

6369

fprintf(

outfile

,

" SKIPPED"

);

6398

FILE *

f

, *fdefault;

6399 uint32_t i

, pre_start, post_start, subject_length;

6418

fprintf(

f

,

"Backtrack\n"

);

6422

fprintf(

f

,

"Backtrack\nNo other matching paths\n"

);

6426

fprintf(

f

,

"New match attempt\n"

);

6446  for

(

i

= 0; callout_start_delims[

i

] != 0;

i

++)

6453  if

(!callout_capture) fprintf(

outfile

,

"\n"

);

6458 if

(callout_capture)

6465

fprintf(

outfile

,

"%2d: "

,

i

/2);

6467

fprintf(

outfile

,

"<unset>"

);

6484  if

(

f

!=

NULL

) fprintf(

f

,

"--->"

);

6510  if

(

f

!=

NULL

) fprintf(

f

,

"\n"

);

6530  for

(

i

= 0;

i

< pre_start;

i

++) fprintf(

outfile

,

" "

);

6535  for

(

i

= 0;

i

< post_start - 1;

i

++) fprintf(

outfile

,

" "

);

6539  for

(

i

= 0;

i

< subject_length - pre_start - post_start + 4;

i

++)

6546

fprintf(

outfile

,

"End of pattern"

);

6558

fprintf(

outfile

,

"Latest Mark: <unset>\n"

);

6561

fprintf(

outfile

,

"Latest Mark: "

);

6570 if

(callout_data_ptr !=

NULL

)

6572  int

callout_data = *((

int32_t

*)callout_data_ptr);

6573  if

(callout_data != 0)

6575

fprintf(

outfile

,

"Callout data = %d\n"

, callout_data);

6576  return

callout_data;

6626

PCRE2_SUBSTRING_COPY_BYNUMBER(rc,

match_data

,

n

, copybuffer, &length);

6629

fprintf(

outfile

,

"Copy substring %d failed (%d): "

,

n

, rc);

6634

PCRE2_SUBSTRING_LENGTH_BYNUMBER(rc,

match_data

,

n

, &length2);

6637

fprintf(

outfile

,

"Get substring %d length failed (%d): "

,

n

, rc);

6640  else if

(length2 != length)

6642

fprintf(

outfile

,

"Mismatched substring lengths: %" 6646

PCHARSV(copybuffer, 0, length,

utf

,

outfile

);

6660  int

namelen = strlen((

const char

*)nptr);

6661 #if defined SUPPORT_PCRE2_16 || defined SUPPORT_PCRE2_32 6664  if

(namelen == 0)

break

;

6666 #ifdef SUPPORT_PCRE2_8 6669 #ifdef SUPPORT_PCRE2_16 6672 #ifdef SUPPORT_PCRE2_32 6676

PCRE2_SUBSTRING_NUMBER_FROM_NAME(groupnumber, compiled_code, pbuffer);

6678

fprintf(

outfile

,

"Number not found for group '%s'\n"

, nptr);

6681

PCRE2_SUBSTRING_COPY_BYNAME(rc,

match_data

, pbuffer, copybuffer, &length);

6684

fprintf(

outfile

,

"Copy substring '%s' failed (%d): "

, nptr, rc);

6689

PCRE2_SUBSTRING_LENGTH_BYNAME(rc,

match_data

, pbuffer, &length2);

6692

fprintf(

outfile

,

"Get substring '%s' length failed (%d): "

, nptr, rc);

6695  else if

(length2 != length)

6697

fprintf(

outfile

,

"Mismatched substring lengths: %" 6701

PCHARSV(copybuffer, 0, length,

utf

,

outfile

);

6703  if

(groupnumber >= 0) fprintf(

outfile

,

" (group %d)\n"

, groupnumber);

6704  else

fprintf(

outfile

,

" (non-unique)\n"

);

6706

nptr += namelen + 1;

6717

PCRE2_SUBSTRING_GET_BYNUMBER(rc,

match_data

,

n

, &gotbuffer, &length);

6720

fprintf(

outfile

,

"Get substring %d failed (%d): "

,

n

, rc);

6726

PCHARSV(gotbuffer, 0, length,

utf

,

outfile

);

6728

PCRE2_SUBSTRING_FREE(gotbuffer);

6741  int

namelen = strlen((

const char

*)nptr);

6742 #if defined SUPPORT_PCRE2_16 || defined SUPPORT_PCRE2_32 6745  if

(namelen == 0)

break

;

6747 #ifdef SUPPORT_PCRE2_8 6750 #ifdef SUPPORT_PCRE2_16 6753 #ifdef SUPPORT_PCRE2_32 6757

PCRE2_SUBSTRING_NUMBER_FROM_NAME(groupnumber, compiled_code, pbuffer);

6759

fprintf(

outfile

,

"Number not found for group '%s'\n"

, nptr);

6761

PCRE2_SUBSTRING_GET_BYNAME(rc,

match_data

, pbuffer, &gotbuffer, &length);

6764

fprintf(

outfile

,

"Get substring '%s' failed (%d): "

, nptr, rc);

6770

PCHARSV(gotbuffer, 0, length,

utf

,

outfile

);

6772  if

(groupnumber >= 0) fprintf(

outfile

,

" (group %d)\n"

, groupnumber);

6773  else

fprintf(

outfile

,

" (non-unique)\n"

);

6774

PCRE2_SUBSTRING_FREE(gotbuffer);

6776

nptr += namelen + 1;

6786

PCRE2_SUBSTRING_LIST_GET(rc,

match_data

, &stringlist, &lengths);

6789

fprintf(

outfile

,

"get substring list failed (%d): "

, rc);

6794  for

(

i

= 0;

i

< capcount;

i

++)

6797

PCHARSV(stringlist[

i

], 0, lengths[

i

],

utf

,

outfile

);

6800  if

(stringlist[

i

] !=

NULL

)

6801

fprintf(

outfile

,

"string list not terminated by NULL\n"

);

6802

PCRE2_SUBSTRING_LIST_FREE(stringlist);

6830 for

(

i

= 0;

i

< 2*oveccount;

i

+= 2)

6835

fprintf(

outfile

,

"%2d: "

,

i

/2);

6837

fprintf(

outfile

,

"<unset>\n"

);

6839

fprintf(

outfile

,

"<unchanged>\n"

);

6841

fprintf(

outfile

,

"%ld %ld\n"

, (

unsigned long int

)start,

6842

(

unsigned long int

)end);

6869 void

*use_dat_context;

6871 BOOL

subject_literal;

6877 #ifdef SUPPORT_PCRE2_8 6880 #ifdef SUPPORT_PCRE2_16 6883 #ifdef SUPPORT_PCRE2_32 6895

DATCTXCPY(dat_context, default_dat_context);

6909 #ifdef SUPPORT_PCRE2_8 6911

((pcre2_real_code_8 *)preg.

re_pcre2_code

)->overall_options :

6912  FLD

(compiled_code, overall_options)) &

PCRE2_UTF

) != 0;

6934  for

(q = p;

n

> 0 && *q; q +=

n

)

n

=

utf82ord

(q, q_end, &cc);

6937

fprintf(

outfile

,

"** Failed: invalid UTF-8 string cannot be used as input " 6943 #ifdef SUPPORT_VALGRIND 6977 while

((c = *p++) != 0)

6984  if

(c ==

']'

&& start_rep !=

NULL

)

6992

fprintf(

outfile

,

"** Expected '{' after \\[....]\n"

);

6996

li = strtol((

const char

*)p, &endptr, 10);

6999

fprintf(

outfile

,

"** Repeat count too large\n"

);

7006

fprintf(

outfile

,

"** Expected '}' after \\[...]{...\n"

);

7013

fprintf(

outfile

,

"** Zero or negative repeat not allowed\n"

);

7018  if

(

PRIV

(ckd_smul)(&d, replen,

i

))

7020

fprintf(

outfile

,

"** Expanded content too large\n"

);

7028  size_t

rep_offset = start_rep -

dbuffer

;

7037

fprintf(stderr,

"pcre2test: realloc(%" SIZ_FORM ") failed\n"

,

7041

SETCASTPTR(q,

dbuffer

+ qoffset);

7042

start_rep =

dbuffer

+ rep_offset;

7047

memcpy(

CAST8VAR

(q), start_rep, replen);

7058  if

(c !=

'\\'

|| subject_literal)

7063

topbit = 0x80000000;

7073  else switch

((c = *p++))

7077  case 'b'

: c =

'\b'

;

break

;

7079  case 'f'

: c =

'\f'

;

break

;

7080  case 'n'

: c =

'\n'

;

break

;

7081  case 'r'

: c =

'\r'

;

break

;

7082  case 't'

: c =

'\t'

;

break

;

7083  case 'v'

: c =

'\v'

;

break

;

7085  case '0'

:

case '1'

:

case '2'

:

case '3'

:

7086  case '4'

:

case '5'

:

case '6'

:

case '7'

:

7088  while

(

i

++ < 2 &&

isdigit

(*p) && *p !=

'8'

&& *p !=

'9'

)

7089

c = c * 8 + *p++ -

'0'

;

7097  for

(pt++;

isdigit

(*pt) && *pt !=

'8'

&& *pt !=

'9'

; pt++)

7100

fprintf(

outfile

,

"** Too many octal digits in \\o{...} item; " 7101  "using only the first twelve.\n"

);

7102  else

c = c * 8 + *pt -

'0'

;

7104  if

(*pt ==

'}'

) p = pt + 1;

7105  else

fprintf(

outfile

,

"** Missing } after \\o{ (assumed)\n"

);

7123

fprintf(

outfile

,

"** Too many hex digits in \\x{...} item; " 7124  "using only the first eight.\n"

);

7125  else

c = c * 16 +

tolower

(*pt) - ((

isdigit

(*pt))?

'0'

:

'a'

- 10);

7146 #if defined SUPPORT_PCRE2_8 7163  if

(start_rep !=

NULL

)

7165

fprintf(

outfile

,

"** Nested replication is not supported\n"

);

7174

fprintf(

outfile

,

"** Unrecognized escape sequence \"\\%c\"\n"

, c);

7184 #ifdef SUPPORT_PCRE2_8 7191

fprintf(

outfile

,

"** Character \\x{%x} is greater than 0x7fffffff " 7192  "and so cannot be converted to UTF-8\n"

, c);

7201

fprintf(

outfile

,

"** Character \\x{%x} is greater than 255 " 7202  "and UTF-8 mode is not enabled.\n"

, c);

7203

fprintf(

outfile

,

"** Truncation will probably give the wrong " 7210 #ifdef SUPPORT_PCRE2_16 7217

fprintf(

outfile

,

"** Failed: character \\x{%x} is greater than " 7218  "0x10ffff and so cannot be converted to UTF-16\n"

, c);

7221  else if

(c >= 0x10000u)

7224

*q16++ = 0xD800 | (c >> 10);

7225

*q16++ = 0xDC00 | (c & 0x3ff);

7234

fprintf(

outfile

,

"** Character \\x{%x} is greater than 0xffff " 7235  "and UTF-16 mode is not enabled.\n"

, c);

7236

fprintf(

outfile

,

"** Truncation will probably give the wrong " 7244 #ifdef SUPPORT_PCRE2_32 7274  if

(c != 0 && c != (c & (~c+1)))

7287

fprintf(

outfile

,

"** Replacement callouts are not supported with null_context.\n"

);

7292

fprintf(

outfile

,

"** Ignored with replacement text: allcaptures\n"

);

7300

fprintf(

outfile

,

"** Ignored for DFA matching: allcaptures\n"

);

7302

fprintf(

outfile

,

"** Ignored for DFA matching: heapframes_size\n"

);

7319 #ifdef SUPPORT_VALGRIND 7332 #ifdef SUPPORT_PCRE2_8 7338  const char

*

msg

=

"** Ignored with POSIX interface:"

;

7341

prmsg(&

msg

,

"callout_error"

);

7343

prmsg(&

msg

,

"callout_fail"

);

7345

prmsg(&

msg

,

"copy"

);

7347

prmsg(&

msg

,

"get"

);

7366  if

(

msg

[0] == 0) fprintf(

outfile

,

"\n"

);

7371  if

(pmatch ==

NULL

)

7373

fprintf(

outfile

,

"** Failed to get memory for recording matching " 7398

fprintf(

outfile

,

"Matched with REG_NOSUB\n"

);

7400

fprintf(

outfile

,

"Matched without capture\n"

);

7407  if

(pmatch[

i

].rm_so >= 0)

7411  for

(j = last_printed + 1; j <

i

; j++)

7412

fprintf(

outfile

,

"%2d: <unset>\n"

, (

int

)j);

7416

start = pmatch[

i

].

rm_eo

;

7417

end = pmatch[

i

].

rm_so

;

7418

fprintf(

outfile

,

"Start of matched string is beyond its end - " 7419  "displaying from end to start.\n"

);

7421

fprintf(

outfile

,

"%2d: "

, (

int

)

i

);

7422

PCHARSV(pp, start, end - start,

utf

,

outfile

);

7428

fprintf(

outfile

,

"%2d+ "

, (

int

)

i

);

7431

PCHARSV(pp, pmatch[

i

].rm_eo,

len

- pmatch[

i

].rm_eo,

utf

,

outfile

);

7445

fprintf(

outfile

,

"** \\=posix_startend ignored for non-POSIX matching\n"

);

7451  FLD

(compiled_code, executable_jit) !=

NULL

)

7453

fprintf(

outfile

,

"** Showing all consulted text is not supported by JIT: ignored\n"

);

7475

fprintf(

outfile

,

"** \\=memory requires either a pattern or a subject " 7476  "context: ignored\n"

);

7495

PCRE2_JIT_STACK_ASSIGN(dat_context,

NULL

,

NULL

);

7515

PCRE2_MATCH_DATA_CREATE_FROM_PATTERN(

match_data

, compiled_code,

7532

fprintf(

outfile

,

"** Failed to get memory for recording matching " 7539

PCRE2_GET_OVECTOR_COUNT(oveccount,

match_data

);

7545

fprintf(

outfile

,

"** Ignored for DFA matching: replace\n"

);

7565 #ifdef SUPPORT_PCRE2_8 7568 #ifdef SUPPORT_PCRE2_16 7571 #ifdef SUPPORT_PCRE2_32 7578  for

(j = 0; j < 2*oveccount; j++) ovector[j] =

JUNK_OFFSET

;

7581

fprintf(

outfile

,

"** Timing is not supported with replace: ignored\n"

);

7584

fprintf(

outfile

,

"** Altglobal is not supported with replace: ignored\n"

);

7607

xoptions = emoption |

7623

SETCASTPTR(

r

, rbuffer);

7636

fprintf(

outfile

,

"Bad buffer size in replacement string\n"

);

7641

fprintf(

outfile

,

"Replacement buffer setting (%" SIZ_FORM ") is too " 7642  "large (max %" SIZ_FORM ")\n"

,

n

, nsize);

7655  if

(

utf

) badutf =

valid_utf

(pr, strlen((

const char

*)pr), &erroroffset);

7659  if

(!

utf

|| badutf)

7661  while

((c = *pr++) != 0)

7663 #ifdef SUPPORT_PCRE2_8 7666 #ifdef SUPPORT_PCRE2_16 7669 #ifdef SUPPORT_PCRE2_32 7677  else while

((c = *pr++) != 0)

7681 #ifdef SUPPORT_PCRE2_8 7685 #ifdef SUPPORT_PCRE2_16 7691

*r16++ = 0xD800 | (c >> 10);

7692

*r16++ = 0xDC00 | (c & 0x3ff);

7698 #ifdef SUPPORT_PCRE2_32 7715

PCRE2_SET_SUBSTITUTE_CALLOUT(dat_context,

NULL

,

NULL

);

7725

rbptr, rlen, nbuffer, &nsize);

7729

fprintf(

outfile

,

"Failed: error %d"

, rc);

7731

fprintf(

outfile

,

" at offset %ld in replacement"

, (

long int

)nsize);

7736

fprintf(

outfile

,

": %ld code units are needed"

, (

long int

)nsize);

7740

fprintf(

outfile

,

"%2d: "

, rc);

7763

ovecsave[0] = ovecsave[1] = ovecsave[2] =

PCRE2_UNSET

;

7765 for

(gmatched = 0;; gmatched++)

7773  for

(j = 0; j < 2*oveccount; j++) ovector[j] =

JUNK_OFFSET

;

7791

fprintf(

outfile

,

"Timing DFA restarts is not supported\n"

);

7799

PCRE2_DFA_MATCH(capcount, compiled_code, pp, arg_ulen,

7810

PCRE2_JIT_MATCH(capcount, compiled_code, pp, arg_ulen,

7821

PCRE2_MATCH(capcount, compiled_code, pp, arg_ulen,

7827

fprintf(

outfile

,

"Match time %7.4f microseconds\n"

,

7840

(

FLD

(compiled_code, executable_jit) ==

NULL

||

7849  if

(

FLD

(compiled_code, executable_jit) ==

NULL

||

7859

fprintf(

outfile

,

"Matched, but offsets vector is too small to show all matches\n"

);

7879

PCRE2_SET_CALLOUT(dat_context,

NULL

,

NULL

);

7890

PCRE2_DFA_MATCH(capcount, compiled_code, pp, arg_ulen,

7895

fprintf(

outfile

,

"Matched, but offsets vector is too small to show all matches\n"

);

7902

PCRE2_JIT_MATCH(capcount, compiled_code, pp, arg_ulen,

dat_datctl

.

offset

,

7909

fprintf(

outfile

,

"Matched, but too many substrings\n"

);

7926  if

(capcount > (

int

)oveccount)

7929  "** PCRE2 error: returned count %d is too big for ovector count %d\n"

,

7930

capcount, oveccount);

7931

capcount = oveccount;

7934

fprintf(

outfile

,

"** Global loop abandoned\n"

);

7947  "** PCRE2 error: flag not set after copy_matched_subject\n"

);

7951  "** PCRE2 error: copy_matched_subject has not copied\n"

);

7955  "** PCRE2 error: copy_matched_subject mismatch\n"

);

7968  if

(gmatched > 0 && ovecsave[0] == ovector[0] && ovecsave[1] == ovector[1])

7977  "** PCRE2 error: global repeat returned the same string as previous\n"

);

7978

fprintf(

outfile

,

"** Global loop abandoned\n"

);

7990  if

(capcount > (

int

)oveccount) capcount = oveccount;

8000  for

(

i

= 0;

i

< 2*capcount;

i

+= 2)

8008

start = ovector[

i

+1];

8010

fprintf(

outfile

,

"Start of matched string is beyond its end - " 8011  "displaying from end to start.\n"

);

8014

fprintf(

outfile

,

"%2d: "

,

i

/2);

8020

fprintf(

outfile

,

"<unset>\n"

);

8029  if

(start > ulen || end > ulen)

8034

fprintf(

outfile

,

"<unchanged>\n"

);

8036

fprintf(

outfile

,

"ERROR: bad value(s) for offset(s): 0x%lx 0x%lx\n"

,

8037

(

unsigned long int

)start, (

unsigned long int

)end);

8058

showallused =

i

== 0 && (leftchar < start || rightchar > end);

8060  else

showallused =

FALSE

;

8064

PCHARS(lleft, pp, leftchar, start - leftchar,

utf

,

outfile

);

8065

PCHARS(lmiddle, pp, start, end - start,

utf

,

outfile

);

8066

PCHARS(lright, pp, end, rightchar - end,

utf

,

outfile

);

8068

fprintf(

outfile

,

" (JIT)"

);

8070  for

(j = 0; j < lleft; j++) fprintf(

outfile

,

"<"

);

8071  for

(j = 0; j < lmiddle; j++) fprintf(

outfile

,

" "

);

8072  for

(j = 0; j < lright; j++) fprintf(

outfile

,

">"

);

8083

PCHARS(lleft, pp, startchar, start - startchar,

utf

,

outfile

);

8084

PCHARSV(pp, start, end - start,

utf

,

outfile

);

8086

fprintf(

outfile

,

" (JIT)"

);

8087  if

(startchar != start)

8090  for

(j = 0; j < lleft; j++) fprintf(

outfile

,

"^"

);

8098

PCHARSV(pp, start, end - start,

utf

,

outfile

);

8100

fprintf(

outfile

,

" (JIT)"

);

8108

PCHARSV(pp, start, end - start,

utf

,

outfile

);

8119

fprintf(

outfile

,

"%2d+ "

,

i

/2);

8120

PCHARSV(pp, ovector[

i

+1], ulen - ovector[

i

+1],

utf

,

outfile

);

8150  int

rubriclength = 0;

8156  else

leftchar = ovector[0];

8158

fprintf(

outfile

,

"Partial match"

);

8162

fprintf(

outfile

,

", mark="

);

8163

PCHARS(rubriclength, CASTFLD(

void

*,

match_data

, mark), -1, -1,

utf

,

8170

PCHARS(backlength, pp, leftchar, ovector[0] - leftchar,

utf

,

outfile

);

8171

PCHARSV(pp, ovector[0], ovector[1] - ovector[0],

utf

,

outfile

);

8174

fprintf(

outfile

,

" (JIT)"

);

8177  if

(backlength != 0)

8180  for

(

i

= 0;

i

< rubriclength;

i

++) fprintf(

outfile

,

" "

);

8181  for

(

i

= 0;

i

< backlength;

i

++) fprintf(

outfile

,

"<"

);

8185  if

(ulen != ovector[1])

8186

fprintf(

outfile

,

"** ovector[1] is not equal to the subject length: " 8187  "%ld != %ld\n"

, (

unsigned long int

)ovector[1], (

unsigned long int

)ulen);

8216  else if

(g_notempty != 0)

8218  uint16_t

nl =

FLD

(compiled_code, newline_convention);

8224

start_offset < ulen - 1 &&

8225

CODE_UNIT(pp, start_offset) ==

'\r'

&&

8226

CODE_UNIT(pp, end_offset) ==

'\n'

)

8233  for

(; end_offset < ulen; end_offset++)

8234  if

((((

PCRE2_SPTR8

)pp)[end_offset] & 0xc0) != 0x80)

break

;

8238  for

(; end_offset < ulen; end_offset++)

8239  if

((((

PCRE2_SPTR16

)pp)[end_offset] & 0xfc00) != 0xdc00)

break

;

8243

SETFLDVEC(

match_data

, ovector, 0, start_offset);

8244

SETFLDVEC(

match_data

, ovector, 1, end_offset);

8257

fprintf(

outfile

,

"No match"

);

8261

fprintf(

outfile

,

", mark = "

);

8265

fprintf(

outfile

,

" (JIT)"

);

8276

fprintf(

outfile

,

"Error %d (bad UTF-%d offset)\n"

, capcount,

test_mode

);

8280

fprintf(

outfile

,

"Failed: error %d: "

, capcount);

8321  if

(match_offset == end_offset)

8323  if

(end_offset == ulen)

break

;

8342  if

(end_offset <= startchar)

8344  if

(startchar >= ulen)

break

;

8345

end_offset = startchar + 1;

8350  for

(; end_offset < ulen; end_offset++)

8351  if

((((

PCRE2_SPTR8

)pp)[end_offset] & 0xc0) != 0x80)

break

;

8355  for

(; end_offset < ulen; end_offset++)

8356  if

((((

PCRE2_SPTR16

)pp)[end_offset] & 0xfc00) != 0xdc00)

break

;

8371

ovecsave[0] = ovector[0];

8372

ovecsave[1] = ovector[1];

8411

fprintf(

f

,

"PCRE2 version "

);

8412 for

(vp =

version

; *vp != 0; vp++) fprintf(

f

,

"%c"

, *vp);

8416

fprintf(

f

,

" (%s)"

,

buf

);

8418

fprintf(

f

,

"\n"

);

8431

fprintf(

f

,

"Unicode version "

);

8432 for

(vp =

uversion

; *vp != 0; vp++) fprintf(

f

,

"%c"

, *vp);

8445 for

(vp =

jittarget

; *vp != 0; vp++) fprintf(

f

,

"%c"

, *vp);

8465 if

(!isc) printf(

" Default newline sequence is "

);

8466 if

(optval <

sizeof

(

newlines

)/

sizeof

(

char

*))

8467

printf(

"%s\n"

,

newlines

[optval]);

8469

printf(

"a non-standard value: %d\n"

, optval);

8481

printf(

"Usage: pcre2test [options] [<input file> [<output file>]]\n\n"

);

8482

printf(

"Input and output default to stdin and stdout.\n"

);

8483 #if defined(SUPPORT_LIBREADLINE) || defined(SUPPORT_LIBEDIT) 8484

printf(

"If input is a terminal, readline() is used to read from it.\n"

);

8486

printf(

"This version of pcre2test is not linked with readline().\n"

);

8488

printf(

"\nOptions:\n"

);

8489 #ifdef SUPPORT_PCRE2_8 8490

printf(

" -8 use the 8-bit library\n"

);

8492 #ifdef SUPPORT_PCRE2_16 8493

printf(

" -16 use the 16-bit library\n"

);

8495 #ifdef SUPPORT_PCRE2_32 8496

printf(

" -32 use the 32-bit library\n"

);

8498

printf(

" -ac set default pattern modifier PCRE2_AUTO_CALLOUT\n"

);

8499

printf(

" -AC as -ac, but also set subject 'callout_extra' modifier\n"

);

8500

printf(

" -b set default pattern modifier 'fullbincode'\n"

);

8501

printf(

" -C show PCRE2 compile-time options and exit\n"

);

8502

printf(

" -C arg show a specific compile-time option and exit with its\n"

);

8503

printf(

" value if numeric (else 0). The arg can be:\n"

);

8504

printf(

" backslash-C use of \\C is enabled [0, 1]\n"

);

8505

printf(

" bsr \\R type [ANYCRLF, ANY]\n"

);

8506

printf(

" ebcdic compiled for EBCDIC character code [0,1]\n"

);

8507

printf(

" ebcdic-nl NL code if compiled for EBCDIC\n"

);

8508

printf(

" jit just-in-time compiler supported [0, 1]\n"

);

8509

printf(

" linksize internal link size [2, 3, 4]\n"

);

8510

printf(

" newline newline type [CR, LF, CRLF, ANYCRLF, ANY, NUL]\n"

);

8511

printf(

" pcre2-8 8 bit library support enabled [0, 1]\n"

);

8512

printf(

" pcre2-16 16 bit library support enabled [0, 1]\n"

);

8513

printf(

" pcre2-32 32 bit library support enabled [0, 1]\n"

);

8514

printf(

" unicode Unicode and UTF support enabled [0, 1]\n"

);

8515

printf(

" -d set default pattern modifier 'debug'\n"

);

8516

printf(

" -dfa set default subject modifier 'dfa'\n"

);

8517

printf(

" -error <n,m,..> show messages for error numbers, then exit\n"

);

8518

printf(

" -help show usage information\n"

);

8519

printf(

" -i set default pattern modifier 'info'\n"

);

8520

printf(

" -jit set default pattern modifier 'jit'\n"

);

8521

printf(

" -jitfast set default pattern modifier 'jitfast'\n"

);

8522

printf(

" -jitverify set default pattern modifier 'jitverify'\n"

);

8523

printf(

" -LM list pattern and subject modifiers, then exit\n"

);

8524

printf(

" -LP list non-script properties, then exit\n"

);

8525

printf(

" -LS list supported scripts, then exit\n"

);

8526

printf(

" -q quiet: do not output PCRE2 version number at start\n"

);

8527

printf(

" -pattern <s> set default pattern modifier fields\n"

);

8528

printf(

" -subject <s> set default subject modifier fields\n"

);

8529

printf(

" -S <n> set stack size to <n> mebibytes\n"

);

8530

printf(

" -t [<n>] time compilation and execution, repeating <n> times\n"

);

8531

printf(

" -tm [<n>] time execution (matching) only, repeating <n> times\n"

);

8532

printf(

" -T same as -t, but show total times at the end\n"

);

8533

printf(

" -TM same as -tm, but show total time at the end\n"

);

8534

printf(

" -v|--version show PCRE2 version and exit\n"

);

8566

fprintf(stderr,

"** Unknown -C option '%s'\n"

, arg);

8579

printf(

"%d\n"

, yield);

8584

printf(

"%d\n"

, optval);

8589

printf(

"%d\n"

, yield);

8609  for

(

i

= 0; ucname[

i

] != 0;

i

++) ucname[

i

] =

toupper

[ucname[

i

]];

8610

vms_setsymbol(ucname, 0, optval);

8618  char

nam_buf[22], val_buf[4];

8619

$DESCRIPTOR(nam, nam_buf);

8620

$DESCRIPTOR(

val

, val_buf);

8623

nam.dsc$w_length = strlen(nam_buf);

8624

sprintf(val_buf,

"%d"

, yield);

8625  val

.dsc$w_length = strlen(val_buf);

8626

lib$set_symbol(&nam, &

val

);

8636

printf(

"Compiled with\n"

);

8639

printf(

" EBCDIC code support: LF is 0x%02x\n"

,

CHAR_LF

);

8640 #if defined NATIVE_ZOS 8641

printf(

" EBCDIC code page %s or similar\n"

, pcrz_cpversion());

8646 if

(optval & 1) printf(

" 8-bit support\n"

);

8647 if

(optval & 2) printf(

" 16-bit support\n"

);

8648 if

(optval & 4) printf(

" 32-bit support\n"

);

8650 #ifdef SUPPORT_VALGRIND 8651

printf(

" Valgrind support\n"

);

8657

printf(

" UTF and UCP support ("

);

8661 else

printf(

" No Unicode support\n"

);

8666

printf(

" Just-in-time compiler support: "

);

8672

printf(

" No just-in-time compiler support\n"

);

8678

printf(

" \\R matches %s\n"

,

8680  "all Unicode newlines"

);

8682

printf(

" \\C is %ssupported\n"

, optval?

"not "

:

""

);

8684

printf(

" Internal link size = %d\n"

, optval);

8686

printf(

" Parentheses nest limit = %d\n"

, optval);

8688

printf(

" Default heap limit = %d kibibytes\n"

, optval);

8690

printf(

" Default match limit = %d\n"

, optval);

8692

printf(

" Default depth limit = %d\n"

, optval);

8694 #if defined SUPPORT_LIBREADLINE 8695

printf(

" pcre2test has libreadline support\n"

);

8696 #elif defined SUPPORT_LIBEDIT 8697

printf(

" pcre2test has libedit support\n"

);

8699

printf(

" pcre2test has neither libreadline nor libedit support\n"

);

8710 #ifdef SUPPORT_UNICODE 8712

format_list_item(

int16_t

*ff,

char

*buff,

BOOL

isscript)

8716 const char

*maxs =

""

;

8724 for

(

int i

= 0; ff[

i

] >= 0;

i

++)

8726  const char

*s =

PRIV

(utt_names) + ff[

i

];

8727  size_t len

= strlen(s);

8728  if

(isscript &&

len

== 3)

8748  const char

*sep =

" ("

;

8751  if

(

i

== maxi)

continue

;

8752

buff += sprintf(buff,

"%s%s"

, sep,

PRIV

(utt_names) + ff[

i

]);

8755

(void)sprintf(buff,

")"

);

8766 #define MAX_SYNONYMS 5 8771 #ifndef SUPPORT_UNICODE 8773

printf(

"** This version of PCRE2 was compiled without Unicode support.\n"

);

8784 for

(

size_t i

= 0;

i

<

PRIV

(utt_size);

i

++)

8790  unsigned int value

=

t

->value;

8798  if

(

t

->type !=

PT_BOOL

)

continue

;

8801  for

(k = 0; k < seencount; k++)

8803  if

(

t

->type == seentypes[k] &&

t

->value == seenvalues[k])

break

;

8805  if

(k < seencount)

continue

;

8807

seentypes[seencount] =

t

->type;

8808

seenvalues[seencount++] =

t

->value;

8811

fv[m++] =

t

->name_offset;

8813  for

(

size_t

j =

i

+ 1; j <

PRIV

(utt_size); j++)

8818

printf(

"** Too many synonyms: %s ignored\n"

,

8826

printf(

"-------------------------- SUPPORTED %s --------------------------\n\n"

,

8827

wantscripts?

"SCRIPTS"

:

"PROPERTIES"

);

8829 if

(!wantscripts) printf(

8830 "This release of PCRE2 supports Unicode's general category properties such\n" 8831 "as Lu (upper case letter), bi-directional properties such as Bidi_Class,\n" 8832 "and the following binary (yes/no) properties:\n\n"

);

8835 for

(

int

k = 0; k < (

n

+1)/2; k++)

8841

format_list_item(found[k], buff1, wantscripts);

8843  if

(x <

n

) format_list_item(found[x], buff2, wantscripts);

8846

x = printf(

"%s"

, buff1);

8847  while

(x++ <

colwidth

) printf(

" "

);

8848

printf(

"%s\n"

, buff2);

8865

printf(

"%c%s"

, c, m->

name

);

8918

is_pattern =

FALSE

;

8921  default

: printf(

"** Unknown type for modifier '%s'\n"

, m->

name

);

8925

is_pattern = for_pattern;

8929  if

(for_pattern == is_pattern)

8946

printf(

"-------------- %s MODIFIERS --------------\n"

, title);

8948 for

(

i

= 0, j = (

n

+1)/2;

i

< (

n

+1)/2;

i

++, j++)

8955  while

(k-- > 0) printf(

" "

);

8972  "An asterisk on a subject modifier means that it may be given on a pattern\n" 8973  "line, in order to apply to all subjects matched by that pattern. Modifiers\n" 8974  "that are listed for both patterns and subjects have different effects in\n" 8997 char

*arg_subject =

NULL

;

8998 char

*arg_pattern =

NULL

;

8999 char

*arg_error =

NULL

;

9007 if

(

PO

(options) !=

DO

(options) ||

PO

(control) !=

DO

(control) ||

9008  PO

(control2) !=

DO

(control2))

9010

fprintf(stderr,

"** Coding error: " 9011  "options and control offsets for pattern and data must be the same.\n"

);

9031

fprintf(stderr,

"** Error in pcre2_config(): bad length\n"

);

9040

fprintf(stderr,

"** Error in pcre2_config(): bad option not diagnosed\n"

);

9061 #if defined(_WIN32) || defined(WIN32) 9062

_setmode( _fileno( stdout ), _O_BINARY );

9082 while

(argc > 1 && argv[op][0] ==

'-'

&& argv[op][1] != 0)

9085  char

*arg = argv[op];

9090  if

(

strcmp

(arg,

"-LM"

) == 0)

9098  if

(

strcmp

(arg,

"-LP"

) == 0)

9106  if

(

strcmp

(arg,

"-LS"

) == 0)

9114  if

(

strcmp

(arg,

"-C"

) == 0)

9125  if

(

strcmp

(arg,

"-8"

) == 0)

9127 #ifdef SUPPORT_PCRE2_8 9133  "** This version of PCRE2 was built without 8-bit support\n"

);

9138  else if

(

strcmp

(arg,

"-16"

) == 0)

9140 #ifdef SUPPORT_PCRE2_16 9147  "** This version of PCRE2 was built without 16-bit support\n"

);

9152  else if

(

strcmp

(arg,

"-32"

) == 0)

9154 #ifdef SUPPORT_PCRE2_32 9161  "** This version of PCRE2 was built without 32-bit support\n"

);

9172  else if

(

strcmp

(arg,

"-S"

) == 0 && argc > 2 &&

9173

((uli = strtoul(argv[op+1], &endptr, 10)), *endptr == 0))

9175 #if defined(_WIN32) || defined(WIN32) || defined(__HAIKU__) || defined(NATIVE_ZOS) || defined(__VMS) 9176

fprintf(stderr,

"pcre2test: -S is not supported on this OS\n"

);

9184

fprintf(stderr,

"** Argument for -S is too big\n"

);

9188

getrlimit(RLIMIT_STACK, &rlim);

9189

rlim.rlim_cur = stack_size * 1024 * 1024;

9190  if

(rlim.rlim_cur > rlim.rlim_max)

9193  "pcre2test: requested stack size %luMiB is greater than hard limit "

,

9194

(

unsigned long int

)stack_size);

9195  if

(rlim.rlim_max % (1024*1024) == 0) fprintf(stderr,

"%luMiB\n"

,

9196

(

unsigned long int

)(rlim.rlim_max/(1024 * 1024)));

9197  else if

(rlim.rlim_max % 1024 == 0) fprintf(stderr,

"%luKiB\n"

,

9198

(

unsigned long int

)(rlim.rlim_max/1024));

9199  else

fprintf(stderr,

"%lu bytes\n"

, (

unsigned long int

)(rlim.rlim_max));

9202

rc = setrlimit(RLIMIT_STACK, &rlim);

9205

fprintf(stderr,

"pcre2test: setting stack size %luMiB failed: %s\n"

,

9206

(

unsigned long int

)stack_size,

strerror

(errno));

9216  else if

(

strcmp

(arg,

"-AC"

) == 0)

9226  else if

(

strcmp

(arg,

"-jit"

) == 0 ||

strcmp

(arg,

"-jitverify"

) == 0 ||

9227  strcmp

(arg,

"-jitfast"

) == 0)

9233

fprintf(stderr,

"** Warning: JIT support is not available: " 9234  "-jit[fast|verify] calls functions that do nothing.\n"

);

9240  else if

(

strcmp

(arg,

"-t"

) == 0 ||

strcmp

(arg,

"-tm"

) == 0 ||

9243  int

both = arg[2] == 0;

9244

showtotaltimes = arg[1] ==

'T'

;

9245  if

(argc > 2 && (uli = strtoul(argv[op+1], &endptr, 10), *endptr == 0))

9249

fprintf(stderr,

"** Argument for %s must not be zero\n"

, arg);

9254

fprintf(stderr,

"** Argument for %s is too big\n"

, arg);

9267  else if

(

strcmp

(arg,

"-help"

) == 0 ||

9268  strcmp

(arg,

"--help"

) == 0)

9276  else if

(memcmp(arg,

"-v"

, 2) == 0 ||

9277  strcmp

(arg,

"--version"

) == 0)

9286  else if

(

strcmp

(arg,

"-error"

) == 0)

9288

arg_error = argv[op+1];

9289  goto

CHECK_VALUE_EXISTS;

9292  else if

(

strcmp

(arg,

"-subject"

) == 0)

9294

arg_subject = argv[op+1];

9295  goto

CHECK_VALUE_EXISTS;

9298  else if

(

strcmp

(arg,

"-pattern"

) == 0)

9300

arg_pattern = argv[op+1];

9304

fprintf(stderr,

"** Missing value for %s\n"

, arg);

9316

fprintf(stderr,

"** Unknown or malformed option '%s'\n"

, arg);

9328 if

(arg_error !=

NULL

)

9337 #ifdef SUPPORT_PCRE2_16 9340

pbuffer16_size = 256;

9342  if

(pbuffer16 ==

NULL

)

9344

fprintf(stderr,

"pcre2test: malloc(%" SIZ_FORM ") failed for pbuffer16\n"

,

9352 #ifdef SUPPORT_PCRE2_32 9355

pbuffer32_size = 512;

9357  if

(pbuffer32 ==

NULL

)

9359

fprintf(stderr,

"pcre2test: malloc(%" SIZ_FORM ") failed for pbuffer32\n"

,

9371

errcode = strtol(arg_error, &endptr, 10);

9374

fprintf(stderr,

"** '%s' is not a valid error number list\n"

, arg_error);

9378

printf(

"Error %d: "

, errcode);

9379

PCRE2_GET_ERROR_MESSAGE(

len

, errcode, pbuffer);

9385

printf(

"PCRE2_ERROR_BADDATA (unknown error number)"

);

9389

printf(

"PCRE2_ERROR_NOMEMORY (buffer too small)"

);

9393

printf(

"Unexpected return (%d) from pcre2_get_error_message()"

,

len

);

9399

PCHARSV(CASTVAR(

void

*, pbuffer), 0,

len

,

FALSE

, stdout);

9402  if

(*endptr == 0)

goto

EXIT;

9403

arg_error = endptr + 1;

9417 #define CREATECONTEXTS \ 9418  G(general_context,BITS) = G(pcre2_general_context_create_,BITS)(&my_malloc, &my_free, NULL); \ 9419  G(general_context_copy,BITS) = G(pcre2_general_context_copy_,BITS)(G(general_context,BITS)); \ 9420  G(default_pat_context,BITS) = G(pcre2_compile_context_create_,BITS)(G(general_context,BITS)); \ 9421  G(pat_context,BITS) = G(pcre2_compile_context_copy_,BITS)(G(default_pat_context,BITS)); \ 9422  G(default_dat_context,BITS) = G(pcre2_match_context_create_,BITS)(G(general_context,BITS)); \ 9423  G(dat_context,BITS) = G(pcre2_match_context_copy_,BITS)(G(default_dat_context,BITS)); \ 9424  G(default_con_context,BITS) = G(pcre2_convert_context_create_,BITS)(G(general_context,BITS)); \ 9425  G(con_context,BITS) = G(pcre2_convert_context_copy_,BITS)(G(default_con_context,BITS)); \ 9426  G(match_data,BITS) = G(pcre2_match_data_create_,BITS)(max_oveccount, G(general_context,BITS)) 9428 #define CONTEXTTESTS \ 9429  (void)G(pcre2_set_compile_extra_options_,BITS)(G(pat_context,BITS), 0); \ 9430  (void)G(pcre2_set_max_pattern_length_,BITS)(G(pat_context,BITS), 0); \ 9431  (void)G(pcre2_set_max_pattern_compiled_length_,BITS)(G(pat_context,BITS), 0); \ 9432  (void)G(pcre2_set_max_varlookbehind_,BITS)(G(pat_context,BITS), 0); \ 9433  (void)G(pcre2_set_offset_limit_,BITS)(G(dat_context,BITS), 0); \ 9434  (void)G(pcre2_get_match_data_size_,BITS)(G(match_data,BITS)) 9439 #ifdef SUPPORT_PCRE2_8 9449 #ifdef SUPPORT_PCRE2_16 9459 #ifdef SUPPORT_PCRE2_32 9479 if

((arg_pattern !=

NULL

&&

9481

(arg_subject !=

NULL

&&

9493 if

(argc > 1 &&

strcmp

(argv[op],

"-"

) != 0)

9498

printf(

"** Failed to open '%s': %s\n"

, argv[op],

strerror

(errno));

9504 #if defined(SUPPORT_LIBREADLINE) || defined(SUPPORT_LIBEDIT) 9513

printf(

"** Failed to open '%s': %s\n"

, argv[op+1],

strerror

(errno));

9525 #ifdef SUPPORT_PCRE2_8 9535 #ifdef SUPPORT_PCRE2_8 9548  if

(expectdata || skipping)

9553 #ifdef SUPPORT_PCRE2_8 9561  if

(

TEST

(compiled_code, !=,

NULL

))

9567

setlocale(LC_CTYPE,

"C"

);

9573  else if

(!skipping && !(p[0] ==

'\\'

&& p[1] ==

'='

&&

isspace

(p[2])))

9585  else if

(*p ==

'#'

)

9587  if

(

isspace

(p[1]) || p[1] ==

'!'

|| p[1] == 0)

continue

;

9591  else if

(strchr(

"/!\"'`%&-=_:;,@~"

, *p) !=

NULL

)

9602

fprintf(

outfile

,

"** Invalid pattern delimiter '%c' (x%x).\n"

, *

buffer

,

9611

fprintf(

outfile

,

"** pcre2test run abandoned\n"

);

9623  const char

*

pad

=

""

;

9624

fprintf(

outfile

,

"--------------------------------------\n"

);

9627

fprintf(

outfile

,

"Total compile time %8.2f microseconds\n"

,

9630

fprintf(

outfile

,

"Total JIT compile %8.2f microseconds\n"

,

9635

fprintf(

outfile

,

"Total match time %s%8.2f microseconds\n"

,

pad

,

9642 #if defined(SUPPORT_LIBREADLINE) || defined(SUPPORT_LIBEDIT) 9654

PCRE2_MAKETABLES_FREE(general_context, (

void

*)

locale_tables

);

9664

PCRE2_JIT_FREE_UNUSED_MEMORY(general_context);

9670 #define FREECONTEXTS \ 9671  G(pcre2_general_context_free_,BITS)(G(general_context,BITS)); \ 9672  G(pcre2_general_context_free_,BITS)(G(general_context_copy,BITS)); \ 9673  G(pcre2_compile_context_free_,BITS)(G(pat_context,BITS)); \ 9674  G(pcre2_compile_context_free_,BITS)(G(default_pat_context,BITS)); \ 9675  G(pcre2_match_context_free_,BITS)(G(dat_context,BITS)); \ 9676  G(pcre2_match_context_free_,BITS)(G(default_dat_context,BITS)); \ 9677  G(pcre2_convert_context_free_,BITS)(G(default_con_context,BITS)); \ 9678  G(pcre2_convert_context_free_,BITS)(G(con_context,BITS)); 9680 #ifdef SUPPORT_PCRE2_8 9687 #ifdef SUPPORT_PCRE2_16 9694 #ifdef SUPPORT_PCRE2_32

static unsigned char depth[2 *(256+1+29)+1]

static int colwidth(DBPROCESS *dbproc, int icol)

static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)

unsigned int

A callback function used to compare two keys in a database.

for(len=0;yy_str[len];++len)

if(yy_accept[yy_current_state])

static int readline(MDB_val *out, MDB_val *buf)

const struct ncbi::grid::netcache::search::fields::SIZE size

const GenericPointer< typename T::ValueType > T2 value

int strncmp(const char *str1, const char *str2, size_t count)

int strcmp(const char *str1, const char *str2)

#define TRUE

bool replacment for C indicating true.

#define FALSE

bool replacment for C indicating false.

double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)

#define PCRE2_ALLOW_EMPTY_CLASS

#define PCRE2_INFO_CAPTURECOUNT

#define PCRE2_DOLLAR_ENDONLY

struct pcre2_real_code_16 pcre2_code_16

#define PCRE2_INFO_LASTCODETYPE

#define PCRE2_ZERO_TERMINATED

struct pcre2_real_match_context_8 pcre2_match_context_8

#define PCRE2_NOTEMPTY_ATSTART

#define PCRE2_CONFIG_TABLES_LENGTH

const PCRE2_UCHAR8 * PCRE2_SPTR8

int pcre2_set_newline_32(pcre2_compile_context_32 *, uint32_t)

#define PCRE2_ENDANCHORED

#define PCRE2_SUBSTITUTE_REPLACEMENT_ONLY

#define PCRE2_ERROR_BADMODE

#define PCRE2_EXTRA_ALT_BSUX

#define PCRE2_CONFIG_NEWLINE

#define PCRE2_BSR_ANYCRLF

int pcre2_config_16(uint32_t, void *)

#define PCRE2_EXTRA_ALLOW_SURROGATE_ESCAPES

#define PCRE2_ALT_VERBNAMES

#define PCRE2_ERROR_HEAPLIMIT

#define PCRE2_ERROR_BADOPTION

#define PCRE2_EXTRA_ESCAPED_CR_IS_LF

#define PCRE2_EXTRA_ASCII_POSIX

int pcre2_set_newline_16(pcre2_compile_context_16 *, uint32_t)

#define PCRE2_CONFIG_DEPTHLIMIT

struct pcre2_real_convert_context_16 pcre2_convert_context_16

#define PCRE2_INFO_NAMETABLE

struct pcre2_real_match_data_16 pcre2_match_data_16

#define PCRE2_ERROR_NOMATCH

#define PCRE2_AUTO_CALLOUT

#define PCRE2_CONFIG_UNICODE

int pcre2_set_bsr_8(pcre2_compile_context_8 *, uint32_t)

#define PCRE2_NO_AUTO_POSSESS

#define PCRE2_CONVERT_POSIX_BASIC

#define PCRE2_SUBSTITUTE_GLOBAL

#define PCRE2_INFO_JCHANGED

#define PCRE2_ERROR_UNSET

struct pcre2_real_convert_context_32 pcre2_convert_context_32

struct pcre2_real_match_context_32 pcre2_match_context_32

#define PCRE2_MATCH_INVALID_UTF

#define PCRE2_NEWLINE_ANYCRLF

#define PCRE2_CONFIG_HEAPLIMIT

#define PCRE2_INFO_HASBACKSLASHC

#define PCRE2_COPY_MATCHED_SUBJECT

#define PCRE2_EXTENDED_MORE

#define PCRE2_EXTRA_ASCII_BSS

#define PCRE2_ERROR_UTF32_ERR2

#define PCRE2_INFO_FIRSTBITMAP

#define PCRE2_CONFIG_STACKRECURSE

#define PCRE2_ERROR_UTF8_ERR1

#define PCRE2_SUBSTITUTE_EXTENDED

#define PCRE2_CONVERT_POSIX_EXTENDED

#define PCRE2_INFO_ALLOPTIONS

#define PCRE2_SUBSTITUTE_MATCHED

#define PCRE2_INFO_HEAPLIMIT

#define PCRE2_INFO_FIRSTCODETYPE

#define PCRE2_SUBSTITUTE_LITERAL

#define PCRE2_INFO_JITSIZE

#define PCRE2_EXTRA_ASCII_BSD

#define PCRE2_INFO_DEPTHLIMIT

#define PCRE2_INFO_ARGOPTIONS

#define PCRE2_MATCH_UNSET_BACKREF

#define PCRE2_PARTIAL_SOFT

#define PCRE2_NO_DOTSTAR_ANCHOR

#define PCRE2_SUBSTITUTE_UNSET_EMPTY

#define PCRE2_CONFIG_NEVER_BACKSLASH_C

#define PCRE2_INFO_BACKREFMAX

#define PCRE2_SUBSTITUTE_UNKNOWN_UNSET

#define PCRE2_INFO_LASTCODEUNIT

#define PCRE2_CALLOUT_STARTMATCH

#define PCRE2_INFO_HASCRORLF

#define PCRE2_PARTIAL_HARD

#define PCRE2_CONFIG_MATCHLIMIT

struct pcre2_real_code_32 pcre2_code_32

#define PCRE2_ERROR_NOUNIQUESUBSTRING

struct pcre2_real_compile_context_16 pcre2_compile_context_16

#define PCRE2_ERROR_DEPTHLIMIT

#define PCRE2_CONVERT_GLOB_NO_STARSTAR

#define PCRE2_CALLOUT_BACKTRACK

#define PCRE2_EXTRA_MATCH_WORD

#define PCRE2_INFO_MATCHEMPTY

struct pcre2_real_general_context_32 pcre2_general_context_32

#define PCRE2_INFO_FRAMESIZE

#define PCRE2_CONFIG_UNICODE_VERSION

#define PCRE2_CONVERT_NO_UTF_CHECK

#define PCRE2_DFA_RESTART

#define PCRE2_CONFIG_LINKSIZE

#define PCRE2_SUBSTITUTE_OVERFLOW_LENGTH

#define PCRE2_EXTRA_CASELESS_RESTRICT

#define PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL

int pcre2_set_bsr_32(pcre2_compile_context_32 *, uint32_t)

#define PCRE2_USE_OFFSET_LIMIT

int pcre2_set_bsr_16(pcre2_compile_context_16 *, uint32_t)

#define PCRE2_ERROR_MATCHLIMIT

struct pcre2_real_match_data_32 pcre2_match_data_32

#define PCRE2_EXTRA_MATCH_LINE

#define PCRE2_INFO_MAXLOOKBEHIND

const PCRE2_UCHAR16 * PCRE2_SPTR16

int pcre2_set_newline_8(pcre2_compile_context_8 *, uint32_t)

#define PCRE2_INFO_NEWLINE

#define PCRE2_ERROR_CALLOUT

struct pcre2_real_match_data_8 pcre2_match_data_8

struct pcre2_real_general_context_16 pcre2_general_context_16

#define PCRE2_INFO_MATCHLIMIT

#define PCRE2_ALT_CIRCUMFLEX

struct pcre2_real_code_8 pcre2_code_8

const PCRE2_UCHAR32 * PCRE2_SPTR32

#define PCRE2_INFO_NAMECOUNT

#define PCRE2_ERROR_BADDATA

#define PCRE2_NEWLINE_CRLF

#define PCRE2_CONFIG_PARENSLIMIT

#define PCRE2_NO_AUTO_CAPTURE

#define PCRE2_EXTRA_ASCII_DIGIT

#define PCRE2_NEVER_BACKSLASH_C

struct pcre2_real_convert_context_8 pcre2_convert_context_8

#define PCRE2_INFO_EXTRAOPTIONS

struct pcre2_real_general_context_8 pcre2_general_context_8

#define PCRE2_NEWLINE_NUL

int pcre2_config_32(uint32_t, void *)

#define PCRE2_EXTRA_ASCII_BSW

#define PCRE2_NO_UTF_CHECK

#define PCRE2_CONVERT_UTF

#define PCRE2_BSR_UNICODE

#define PCRE2_NO_START_OPTIMIZE

struct pcre2_real_compile_context_8 pcre2_compile_context_8

#define PCRE2_CONFIG_COMPILED_WIDTHS

#define PCRE2_ERROR_PARTIAL

#define PCRE2_DFA_SHORTEST

struct pcre2_real_compile_context_32 pcre2_compile_context_32

#define PCRE2_NEWLINE_ANY

#define PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK

#define PCRE2_INFO_FIRSTCODEUNIT

#define PCRE2_DISABLE_RECURSELOOP_CHECK

struct pcre2_real_match_context_16 pcre2_match_context_16

#define PCRE2_CONVERT_GLOB

#define PCRE2_CONVERT_GLOB_NO_WILD_SEPARATOR

#define PCRE2_INFO_NAMEENTRYSIZE

#define PCRE2_CONFIG_VERSION

#define PCRE2_INFO_MINLENGTH

#define PCRE2_CONFIG_JITTARGET

#define PCRE2_ERROR_BADUTFOFFSET

#define PCRE2_ERROR_NOMEMORY

PCRE2_EXPORT void PCRE2_CALL_CONVENTION pcre2_code_free(pcre2_code *code)

#define HASUTF8EXTRALEN(c)

#define GETUTF8INC(c, eptr)

#define PCRE2_FIRSTCASELESS

#define PCRE2_LASTCASELESS

#define PCRE2_MD_COPIED_SUBJECT

#define DFA_START_RWS_SIZE

const int utf8_table1_size

static uint32_t depth_limit

static const char * locale

static uint32_t match_limit

static PCRE2_SIZE heap_limit

static uint32_t extra_options

static pcre2_match_data * match_data

static int show_pattern_info(void)

#define PUSH_SUPPORTED_COMPILE_CONTROLS2

static void show_heapframes_size(void)

static int check_match_limit(uint8_t *pp, PCRE2_SIZE ulen, int errnumber, const char *msg)

#define CTL2_SUBSTITUTE_UNKNOWN_UNSET

clock_t total_jit_compile_time

static size_t dbuffer_size

static uint32_t exclusive_dat_controls[]

static void show_controls(uint32_t controls, uint32_t controls2, const char *before)

static int scan_modifiers(const uint8_t *p, unsigned int len)

static BOOL first_callout

#define PCRE2_EXTRA_ASCII_ALL

#define CTL2_NULL_REPLACEMENT

static void my_free(void *block, void *data)

static size_t pbuffer8_size

#define POSIX_SUPPORTED_COMPILE_CONTROLS

static void * my_malloc(size_t size, void *data)

#define POSIX_SUPPORTED_MATCH_CONTROLS

static uint32_t maxcapcount

#define CTL2_CALLOUT_EXTRA

static int open_file(uint8_t *buffptr, const char *mode, FILE **fptr, const char *name)

static int substitute_callout_function(pcre2_substitute_callout_block_8 *scb, void *data_ptr)

static uint32_t loadtables_length

static int callout_callback(pcre2_callout_enumerate_block_8 *cb, void *callout_data)

static int process_data(void)

int main(int argc, char **argv)

#define PARENS_NEST_DEFAULT

#define CTL2_SUBSTITUTE_REPLACEMENT_ONLY

static PCRE2_JIT_STACK * jit_stack

static int pattern_info(int what, void *where, BOOL unsetok)

static uint32_t maxlookbehind

static BOOL serial_error(int rc, const char *msg)

#define CTL2_NULL_SUBJECT

#define CTL2_SUBSTITUTE_UNSET_EMPTY

#define POSIX_SUPPORTED_COMPILE_OPTIONS

static uint32_t forbid_utf

static uint32_t dfa_matched

static int ord2utf8(uint32_t cvalue, uint8_t *utf8bytes)

#define PUSH_COMPILE_ONLY_CONTROLS

static void expand_input_buffers(void)

#define POSIX_SUPPORTED_COMPILE_EXTRA_OPTIONS

#define CTL2_NULL_PATTERN

static size_t jit_stack_size

static uint32_t malloclistptr

int valid_utf(PCRE2_SPTR8, PCRE2_SIZE, PCRE2_SIZE *)

#define BINARY_INPUT_MODE

static int process_command(void)

#define CTL_PUSHTABLESCOPY

static uint8_t locale_name[32]

static uint32_t max_oveccount

#define CTL2_HEAPFRAMES_SIZE

static VERSION_TYPE uversion[64]

static uint16_t local_newline_default

static uint32_t callout_count

static void * patstack[20]

static convertstruct convertlist[]

clock_t total_compile_time

static void display_modifiers(void)

static VERSION_TYPE version[64]

static const uint8_t tables1[]

static void * emulated_memmove(void *d, const void *s, size_t n)

static void display_one_modifier(modstruct *m, BOOL for_pattern)

#define CTL2_SUBSTITUTE_MATCHED

static void show_framesize(void)

#define PUSH_SUPPORTED_COMPILE_CONTROLS

#define CTL2_CALLOUT_NO_WHERE

static int * dfa_workspace

static cmdstruct cmdlist[]

static int c_option(const char *arg)

static uint8_t * pbuffer8

struct coptstruct coptstruct

#define POSIX_SUPPORTED_COMPILE_CONTROLS2

static int strncmpic(const uint8_t *s, const uint8_t *t, int n)

static void print_jit_target(FILE *f)

static uint32_t exclusive_pat_controls[]

static modstruct modlist[]

static int stack_guard(uint32_t depth, void *user_data)

static uint32_t code_unit_size

static int utf82ord(PCRE2_SPTR8 utf8bytes, PCRE2_SPTR8 end, uint32_t *vptr)

static void show_memory_info(void)

#define CTL_CALLOUT_CAPTURE

#define CTL2_SUBSTITUTE_OVERFLOW_LENGTH

static coptstruct coptlist[]

#define PUSH_COMPILE_ONLY_CONTROLS2

#define CTL2_SUBSTITUTE_LITERAL

#define CTL2_SUBSTITUTE_EXTENDED

static void show_ovector(PCRE2_SIZE *ovector, uint32_t oveccount)

static const char * newlines[]

struct convertstruct convertstruct

#define POSIX_SUPPORTED_MATCH_OPTIONS

static void * check_modifier(modstruct *m, int ctx, patctl *pctl, datctl *dctl, uint32_t c)

static int process_pattern(void)

#define POSIX_SUPPORTED_MATCH_CONTROLS2

static PCRE2_JIT_STACK * jit_callback(void *arg)

static int callout_function(pcre2_callout_block_8 *cb, void *callout_data_ptr)

struct c1modstruct c1modstruct

static uint8_t * extend_inputline(FILE *f, uint8_t *start, const char *prompt)

static const void * last_callout_mark

static void print_newline_config(uint32_t optval, BOOL isc)

static void display_selected_modifiers(BOOL for_pattern, const char *title)

static int pchar(uint32_t c, BOOL utf, FILE *f)

static void show_compile_options(uint32_t options, const char *before, const char *after)

static const uint8_t tables2[]

static BOOL decode_modifiers(uint8_t *p, int ctx, patctl *pctl, datctl *dctl)

#define DEFAULT_OVECCOUNT

static BOOL copy_and_get(BOOL utf, int capcount)

static BOOL print_error_message(int errorcode, const char *before, const char *after)

struct cmdstruct cmdstruct

static void print_unicode_version(FILE *f)

#define CTL2_SUBJECT_LITERAL

static VERSION_TYPE jittarget[64]

static c1modstruct c1modlist[]

static void display_properties(BOOL wantscripts)

#define CTL_FINDLIMITS_NOHEAP

static PCRE2_SIZE malloclistlength[20]

static const uint8_t * locale_tables

static BOOL restrict_for_perl_test

struct modstruct modstruct

static void show_compile_extra_options(uint32_t options, const char *before, const char *after)

static const uint8_t * use_tables

#define CTL2_SUBSTITUTE_CALLOUT

#define BINARY_OUTPUT_MODE

static void * malloclist[20]

#define CTL_ZERO_TERMINATE

static void print_version(FILE *f, BOOL include_mode)

static const char delimiter[]

static const sljit_gpr r8

static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

uint32_t convert_glob_separator

uint32_t regerror_buffsize

uint32_t convert_glob_escape

PCRE2_SPTR8 callout_string

size_t callout_string_offset

size_t callout_string_length

size_t callout_string_length

PCRE2_SPTR8 callout_string


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