NCBI C++ ToolKit
Classes | Macros | Typedefs | Enumerations | Functions | Variables
pcre2test.c File Reference
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <locale.h>
#include <errno.h>
#include <sys/time.h>
#include <sys/resource.h>
#include "pcre2.h"
#include "pcre2posix.h"
#include "pcre2_internal.h"
#include "pcre2_tables.c"
#include "pcre2_ucd.c"
#include "pcre2_chkdint.c"
#include "pcre2_valid_utf.c"
+ Include dependency graph for pcre2test.c:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

struct  cmdstruct
 
struct  convertstruct
 
struct  patctl
 
struct  datctl
 
struct  modstruct
 
struct  c1modstruct
 
struct  coptstruct
 

Macros

#define INTERACTIVE(f)   isatty(fileno(f))
 
#define INPUT_MODE   "rb"
 
#define OUTPUT_MODE   "wb"
 
#define BINARY_INPUT_MODE   "rb"
 
#define BINARY_OUTPUT_MODE   "wb"
 
#define PTR_FORM   "ld"
 
#define SIZ_FORM   "lu"
 
#define glue(a, b)   a##b
 
#define G(a, b)   glue(a,b)
 
#define CLOCKS_PER_SEC   100
 
#define CFORE_UNSET   UINT32_MAX /* Unset value for startend/cfail/cerror fields */
 
#define CONVERT_UNSET   UINT32_MAX /* Unset value for convert_type field */
 
#define DFA_WS_DIMENSION   1000 /* Size of DFA workspace */
 
#define DEFAULT_OVECCOUNT   15 /* Default ovector count */
 
#define JUNK_OFFSET   0xdeadbeef /* For initializing ovector */
 
#define LOCALESIZE   32 /* Size of locale name */
 
#define LOOPREPEAT   500000 /* Default loop count for timing */
 
#define MALLOCLISTSIZE   20 /* For remembering mallocs */
 
#define PARENS_NEST_DEFAULT   220 /* Default parentheses nest limit */
 
#define PATSTACKSIZE   20 /* Pattern stack for save/restore testing */
 
#define REPLACE_MODSIZE   100 /* Field for reading 8-bit replacement */
 
#define VERSION_SIZE   64 /* Size of buffer for the version strings */
 
#define JIT_DEFAULT
 
#define REPLACE_BUFFSIZE   1024 /* This is a byte value */
 
#define PCRE8_MODE   8
 
#define PCRE16_MODE   16
 
#define PCRE32_MODE   32
 
#define PRINTABLE(c)   ((c) >= 32 && (c) < 127)
 
#define PRINTOK(c)   ((use_tables != NULL && c < 256)? isprint(c) : PRINTABLE(c))
 
#define PRIV(name)   name
 
#define PCRE2_CODE_UNIT_WIDTH   0
 
#define PCRE2_BUILDING_PCRE2TEST
 
#define PCRE2_PCRE2TEST
 
#define U32OVERFLOW(x)   (x == UINT32_MAX)
 
#define S32OVERFLOW(x)   (x == INT32_MAX || x == INT32_MIN)
 
#define PCRE2_SUFFIX(a)   a
 
#define PCRE2_CODE_UNIT_WIDTH   8
 
#define PCRE2_SPTR   PCRE2_SPTR8
 
#define cmdlistcount   (sizeof(cmdlist)/sizeof(cmdstruct))
 
#define convertlistcount   (sizeof(convertlist)/sizeof(convertstruct))
 
#define CTL_AFTERTEXT   0x00000001u
 
#define CTL_ALLAFTERTEXT   0x00000002u
 
#define CTL_ALLCAPTURES   0x00000004u
 
#define CTL_ALLUSEDTEXT   0x00000008u
 
#define CTL_ALTGLOBAL   0x00000010u
 
#define CTL_BINCODE   0x00000020u
 
#define CTL_CALLOUT_CAPTURE   0x00000040u
 
#define CTL_CALLOUT_INFO   0x00000080u
 
#define CTL_CALLOUT_NONE   0x00000100u
 
#define CTL_DFA   0x00000200u
 
#define CTL_EXPAND   0x00000400u
 
#define CTL_FINDLIMITS   0x00000800u
 
#define CTL_FINDLIMITS_NOHEAP   0x00001000u
 
#define CTL_FULLBINCODE   0x00002000u
 
#define CTL_GETALL   0x00004000u
 
#define CTL_GLOBAL   0x00008000u
 
#define CTL_HEXPAT   0x00010000u /* Same word as USE_LENGTH */
 
#define CTL_INFO   0x00020000u
 
#define CTL_JITFAST   0x00040000u
 
#define CTL_JITVERIFY   0x00080000u
 
#define CTL_MARK   0x00100000u
 
#define CTL_MEMORY   0x00200000u
 
#define CTL_NULLCONTEXT   0x00400000u
 
#define CTL_POSIX   0x00800000u
 
#define CTL_POSIX_NOSUB   0x01000000u
 
#define CTL_PUSH   0x02000000u /* These three must be */
 
#define CTL_PUSHCOPY   0x04000000u /* all in the same */
 
#define CTL_PUSHTABLESCOPY   0x08000000u /* word. */
 
#define CTL_STARTCHAR   0x10000000u
 
#define CTL_USE_LENGTH   0x20000000u /* Same word as HEXPAT */
 
#define CTL_UTF8_INPUT   0x40000000u
 
#define CTL_ZERO_TERMINATE   0x80000000u
 
#define CTL_DEBUG   (CTL_FULLBINCODE|CTL_INFO) /* For setting */
 
#define CTL_ANYINFO   (CTL_DEBUG|CTL_BINCODE|CTL_CALLOUT_INFO)
 
#define CTL_ANYGLOB   (CTL_ALTGLOBAL|CTL_GLOBAL)
 
#define CTL2_SUBSTITUTE_CALLOUT   0x00000001u
 
#define CTL2_SUBSTITUTE_EXTENDED   0x00000002u
 
#define CTL2_SUBSTITUTE_LITERAL   0x00000004u
 
#define CTL2_SUBSTITUTE_MATCHED   0x00000008u
 
#define CTL2_SUBSTITUTE_OVERFLOW_LENGTH   0x00000010u
 
#define CTL2_SUBSTITUTE_REPLACEMENT_ONLY   0x00000020u
 
#define CTL2_SUBSTITUTE_UNKNOWN_UNSET   0x00000040u
 
#define CTL2_SUBSTITUTE_UNSET_EMPTY   0x00000080u
 
#define CTL2_SUBJECT_LITERAL   0x00000100u
 
#define CTL2_CALLOUT_NO_WHERE   0x00000200u
 
#define CTL2_CALLOUT_EXTRA   0x00000400u
 
#define CTL2_ALLVECTOR   0x00000800u
 
#define CTL2_NULL_PATTERN   0x00001000u
 
#define CTL2_NULL_SUBJECT   0x00002000u
 
#define CTL2_NULL_REPLACEMENT   0x00004000u
 
#define CTL2_FRAMESIZE   0x00008000u
 
#define CTL2_HEAPFRAMES_SIZE   0x20000000u /* Informational */
 
#define CTL2_NL_SET   0x40000000u /* Informational */
 
#define CTL2_BSR_SET   0x80000000u /* Informational */
 
#define CTL_ALLPD
 
#define CTL2_ALLPD
 
#define MAXCPYGET   10
 
#define LENCPYGET   64
 
#define CO(name)   offsetof(PCRE2_REAL_COMPILE_CONTEXT, name)
 
#define MO(name)   offsetof(PCRE2_REAL_MATCH_CONTEXT, name)
 
#define PO(name)   offsetof(patctl, name)
 
#define PD(name)   PO(name)
 
#define DO(name)   offsetof(datctl, name)
 
#define PCRE2_EXTRA_ASCII_ALL
 
#define MODLISTCOUNT   sizeof(modlist)/sizeof(modstruct)
 
#define POSIX_SUPPORTED_COMPILE_OPTIONS
 
#define POSIX_SUPPORTED_COMPILE_EXTRA_OPTIONS   (0)
 
#define POSIX_SUPPORTED_COMPILE_CONTROLS
 
#define POSIX_SUPPORTED_COMPILE_CONTROLS2   (0)
 
#define POSIX_SUPPORTED_MATCH_OPTIONS
 
#define POSIX_SUPPORTED_MATCH_CONTROLS   (CTL_AFTERTEXT|CTL_ALLAFTERTEXT)
 
#define POSIX_SUPPORTED_MATCH_CONTROLS2   (CTL2_NULL_SUBJECT)
 
#define PUSH_SUPPORTED_COMPILE_CONTROLS
 
#define PUSH_SUPPORTED_COMPILE_CONTROLS2
 
#define PUSH_COMPILE_ONLY_CONTROLS   CTL_JITVERIFY
 
#define PUSH_COMPILE_ONLY_CONTROLS2   (0)
 
#define NOTPOP_CONTROLS
 
#define C1MODLISTCOUNT   sizeof(c1modlist)/sizeof(c1modstruct)
 
#define SUPPORT_8   0
 
#define SUPPORT_16   0
 
#define SUPPORT_32   0
 
#define SUPPORT_EBCDIC   0
 
#define EBCDIC_NL   0
 
#define BACKSLASH_C   1
 
#define COPTLISTCOUNT   sizeof(coptlist)/sizeof(coptstruct)
 
#define CAST8VAR(x)   CASTVAR(uint8_t *, x)
 
#define SET(x, y)   SETOP(x,y,=)
 
#define SETPLUS(x, y)   SETOP(x,y,+=)
 
#define strlen8(x)   strlen((char *)x)
 
#define memmove(d, s, n)   emulated_memmove(d,s,n)
 
#define MAX_SYNONYMS   5
 
#define CREATECONTEXTS
 
#define CONTEXTTESTS
 
#define FREECONTEXTS
 

Typedefs

typedef struct cmdstruct cmdstruct
 
typedef struct convertstruct convertstruct
 
typedef struct patctl patctl
 
typedef struct datctl datctl
 
typedef struct modstruct modstruct
 
typedef struct c1modstruct c1modstruct
 
typedef struct coptstruct coptstruct
 

Enumerations

enum  { PR_OK , PR_SKIP , PR_ABEND }
 
enum  {
  CMD_FORBID_UTF , CMD_LOAD , CMD_LOADTABLES , CMD_NEWLINE_DEFAULT ,
  CMD_PATTERN , CMD_PERLTEST , CMD_POP , CMD_POPCOPY ,
  CMD_SAVE , CMD_SUBJECT , CMD_UNKNOWN
}
 
enum  {
  MOD_CTC , MOD_CTM , MOD_PAT , MOD_PATP ,
  MOD_DAT , MOD_DATP , MOD_PD , MOD_PDP ,
  MOD_PND , MOD_PNDP , MOD_CHR , MOD_CON ,
  MOD_CTL , MOD_BSR , MOD_IN2 , MOD_INS ,
  MOD_INT , MOD_IND , MOD_NL , MOD_NN ,
  MOD_OPT , MOD_SIZ , MOD_STR
}
 
enum  {
  CTX_PAT , CTX_POPPAT , CTX_DEFPAT , CTX_DAT ,
  CTX_DEFDAT
}
 
enum  {
  CONF_BSR , CONF_FIX , CONF_FIZ , CONF_INT ,
  CONF_NL
}
 

Functions

int valid_utf (PCRE2_SPTR8, PCRE2_SIZE, PCRE2_SIZE *)
 
static void * emulated_memmove (void *d, const void *s, size_t n)
 
char * strerror (int n)
 
static void * my_malloc (size_t size, void *data)
 
static void my_free (void *block, void *data)
 
static int stack_guard (uint32_t depth, void *user_data)
 
static PCRE2_JIT_STACK * jit_callback (void *arg)
 
static int utf82ord (PCRE2_SPTR8 utf8bytes, PCRE2_SPTR8 end, uint32_t *vptr)
 
static int pchar (uint32_t c, BOOL utf, FILE *f)
 
static int ord2utf8 (uint32_t cvalue, uint8_t *utf8bytes)
 
static void expand_input_buffers (void)
 
static uint8_textend_inputline (FILE *f, uint8_t *start, const char *prompt)
 
static int strncmpic (const uint8_t *s, const uint8_t *t, int n)
 
static int scan_modifiers (const uint8_t *p, unsigned int len)
 
static void * check_modifier (modstruct *m, int ctx, patctl *pctl, datctl *dctl, uint32_t c)
 
static BOOL decode_modifiers (uint8_t *p, int ctx, patctl *pctl, datctl *dctl)
 
static int pattern_info (int what, void *where, BOOL unsetok)
 
static void show_controls (uint32_t controls, uint32_t controls2, const char *before)
 
static void show_compile_options (uint32_t options, const char *before, const char *after)
 
static void show_compile_extra_options (uint32_t options, const char *before, const char *after)
 
static void show_memory_info (void)
 
static void show_framesize (void)
 
static void show_heapframes_size (void)
 
static BOOL print_error_message (int errorcode, const char *before, const char *after)
 
static int callout_callback (pcre2_callout_enumerate_block_8 *cb, void *callout_data)
 
static int show_pattern_info (void)
 
static BOOL serial_error (int rc, const char *msg)
 
static int open_file (uint8_t *buffptr, const char *mode, FILE **fptr, const char *name)
 
static int process_command (void)
 
static int process_pattern (void)
 
static int check_match_limit (uint8_t *pp, PCRE2_SIZE ulen, int errnumber, const char *msg)
 
static int substitute_callout_function (pcre2_substitute_callout_block_8 *scb, void *data_ptr)
 
static int callout_function (pcre2_callout_block_8 *cb, void *callout_data_ptr)
 
static BOOL copy_and_get (BOOL utf, int capcount)
 
static void show_ovector (PCRE2_SIZE *ovector, uint32_t oveccount)
 
static int process_data (void)
 
static void print_version (FILE *f, BOOL include_mode)
 
static void print_unicode_version (FILE *f)
 
static void print_jit_target (FILE *f)
 
static void print_newline_config (uint32_t optval, BOOL isc)
 
static void usage (void)
 
static int c_option (const char *arg)
 
static void display_properties (BOOL wantscripts)
 
static void display_one_modifier (modstruct *m, BOOL for_pattern)
 
static void display_selected_modifiers (BOOL for_pattern, const char *title)
 
static void display_modifiers (void)
 
int main (int argc, char **argv)
 

Variables

static cmdstruct cmdlist []
 
static const char * newlines []
 
static convertstruct convertlist []
 
static modstruct modlist []
 
static uint32_t exclusive_pat_controls []
 
static uint32_t exclusive_dat_controls []
 
static c1modstruct c1modlist []
 
static coptstruct coptlist []
 
static FILE * infile
 
static FILE * outfile
 
static const void * last_callout_mark
 
static PCRE2_JIT_STACK * jit_stack = NULL
 
static size_t jit_stack_size = 0
 
static BOOL first_callout
 
static BOOL jit_was_used
 
static BOOL restrict_for_perl_test = 0
 
static BOOL show_memory = 0
 
static int jitrc
 
static int test_mode = DEFAULT_TEST_MODE
 
static int timeit = 0
 
static int timeitm = 0
 
clock_t total_compile_time = 0
 
clock_t total_jit_compile_time = 0
 
clock_t total_match_time = 0
 
static uint32_t code_unit_size
 
static uint32_t dfa_matched
 
static uint32_t forbid_utf = 0
 
static uint32_t maxlookbehind
 
static uint32_t max_oveccount
 
static uint32_t callout_count
 
static uint32_t maxcapcount
 
static uint16_t local_newline_default = 0
 
static VERSION_TYPE jittarget [64]
 
static VERSION_TYPE version [64]
 
static VERSION_TYPE uversion [64]
 
static patctl def_patctl
 
static patctl pat_patctl
 
static datctl def_datctl
 
static datctl dat_datctl
 
static void * patstack [20]
 
static int patstacknext = 0
 
static void * malloclist [20]
 
static PCRE2_SIZE malloclistlength [20]
 
static uint32_t malloclistptr = 0
 
static intdfa_workspace = NULL
 
static const uint8_tlocale_tables = NULL
 
static const uint8_tuse_tables = NULL
 
static uint8_t locale_name [32]
 
static uint8_ttables3 = NULL
 
static uint32_t loadtables_length = 0
 
static size_t pbuffer8_size = 50000
 
static uint8_tpbuffer8 = NULL
 
static uint8_tbuffer = NULL
 
static size_t dbuffer_size = 1u << 14
 
static uint8_tdbuffer = NULL
 
static const uint8_t tables1 []
 
static const uint8_t tables2 []
 
int sys_nerr
 
char * sys_errlist []
 

Macro Definition Documentation

◆ BACKSLASH_C

#define BACKSLASH_C   1

Definition at line 910 of file pcre2test.c.

◆ BINARY_INPUT_MODE

#define BINARY_INPUT_MODE   "rb"

Definition at line 158 of file pcre2test.c.

◆ BINARY_OUTPUT_MODE

#define BINARY_OUTPUT_MODE   "wb"

Definition at line 159 of file pcre2test.c.

◆ C1MODLISTCOUNT

#define C1MODLISTCOUNT   sizeof(c1modlist)/sizeof(c1modstruct)

Definition at line 874 of file pcre2test.c.

◆ CAST8VAR

#define CAST8VAR (   x)    CASTVAR(uint8_t *, x)

Definition at line 1061 of file pcre2test.c.

◆ CFORE_UNSET

#define CFORE_UNSET   UINT32_MAX /* Unset value for startend/cfail/cerror fields */

Definition at line 209 of file pcre2test.c.

◆ CLOCKS_PER_SEC

#define CLOCKS_PER_SEC   100

Definition at line 205 of file pcre2test.c.

◆ cmdlistcount

#define cmdlistcount   (sizeof(cmdlist)/sizeof(cmdstruct))

Definition at line 421 of file pcre2test.c.

◆ CO

#define CO (   name)    offsetof(PCRE2_REAL_COMPILE_CONTEXT, name)

Definition at line 623 of file pcre2test.c.

◆ CONTEXTTESTS

#define CONTEXTTESTS
Value:
(void)G(pcre2_set_compile_extra_options_,BITS)(G(pat_context,BITS), 0); \
(void)G(pcre2_set_max_pattern_length_,BITS)(G(pat_context,BITS), 0); \
(void)G(pcre2_set_max_pattern_compiled_length_,BITS)(G(pat_context,BITS), 0); \
(void)G(pcre2_set_max_varlookbehind_,BITS)(G(pat_context,BITS), 0); \
(void)G(pcre2_set_offset_limit_,BITS)(G(dat_context,BITS), 0); \
(void)G(pcre2_get_match_data_size_,BITS)(G(match_data,BITS))
#define BITS
Definition: ct_nlmzip_i.h:135
static pcre2_match_data * match_data
Definition: pcre2grep.c:265
#define G(a, b)
Definition: pcre2test.c:197

◆ CONVERT_UNSET

#define CONVERT_UNSET   UINT32_MAX /* Unset value for convert_type field */

Definition at line 210 of file pcre2test.c.

◆ convertlistcount

#define convertlistcount   (sizeof(convertlist)/sizeof(convertstruct))

Definition at line 446 of file pcre2test.c.

◆ COPTLISTCOUNT

#define COPTLISTCOUNT   sizeof(coptlist)/sizeof(coptstruct)

Definition at line 940 of file pcre2test.c.

◆ CREATECONTEXTS

#define CREATECONTEXTS
Value:
G(general_context,BITS) = G(pcre2_general_context_create_,BITS)(&my_malloc, &my_free, NULL); \
G(general_context_copy,BITS) = G(pcre2_general_context_copy_,BITS)(G(general_context,BITS)); \
G(default_pat_context,BITS) = G(pcre2_compile_context_create_,BITS)(G(general_context,BITS)); \
G(pat_context,BITS) = G(pcre2_compile_context_copy_,BITS)(G(default_pat_context,BITS)); \
G(default_dat_context,BITS) = G(pcre2_match_context_create_,BITS)(G(general_context,BITS)); \
G(dat_context,BITS) = G(pcre2_match_context_copy_,BITS)(G(default_dat_context,BITS)); \
G(default_con_context,BITS) = G(pcre2_convert_context_create_,BITS)(G(general_context,BITS)); \
G(con_context,BITS) = G(pcre2_convert_context_copy_,BITS)(G(default_con_context,BITS)); \
G(match_data,BITS) = G(pcre2_match_data_create_,BITS)(max_oveccount, G(general_context,BITS))
#define NULL
Definition: ncbistd.hpp:225
static void my_free(void *block, void *data)
Definition: pcre2test.c:2873
static void * my_malloc(size_t size, void *data)
Definition: pcre2test.c:2844
static uint32_t max_oveccount
Definition: pcre2test.c:975

◆ CTL2_ALLPD

#define CTL2_ALLPD
Value:
CTL2_SUBSTITUTE_EXTENDED|\
CTL2_SUBSTITUTE_LITERAL|\
CTL2_SUBSTITUTE_MATCHED|\
CTL2_SUBSTITUTE_OVERFLOW_LENGTH|\
CTL2_SUBSTITUTE_REPLACEMENT_ONLY|\
CTL2_SUBSTITUTE_UNKNOWN_UNSET|\
CTL2_SUBSTITUTE_UNSET_EMPTY|\
CTL2_ALLVECTOR|\
CTL2_HEAPFRAMES_SIZE)
#define CTL2_SUBSTITUTE_CALLOUT
Definition: pcre2test.c:519

Definition at line 555 of file pcre2test.c.

◆ CTL2_ALLVECTOR

#define CTL2_ALLVECTOR   0x00000800u

Definition at line 530 of file pcre2test.c.

◆ CTL2_BSR_SET

#define CTL2_BSR_SET   0x80000000u /* Informational */

Definition at line 538 of file pcre2test.c.

◆ CTL2_CALLOUT_EXTRA

#define CTL2_CALLOUT_EXTRA   0x00000400u

Definition at line 529 of file pcre2test.c.

◆ CTL2_CALLOUT_NO_WHERE

#define CTL2_CALLOUT_NO_WHERE   0x00000200u

Definition at line 528 of file pcre2test.c.

◆ CTL2_FRAMESIZE

#define CTL2_FRAMESIZE   0x00008000u

Definition at line 534 of file pcre2test.c.

◆ CTL2_HEAPFRAMES_SIZE

#define CTL2_HEAPFRAMES_SIZE   0x20000000u /* Informational */

Definition at line 536 of file pcre2test.c.

◆ CTL2_NL_SET

#define CTL2_NL_SET   0x40000000u /* Informational */

Definition at line 537 of file pcre2test.c.

◆ CTL2_NULL_PATTERN

#define CTL2_NULL_PATTERN   0x00001000u

Definition at line 531 of file pcre2test.c.

◆ CTL2_NULL_REPLACEMENT

#define CTL2_NULL_REPLACEMENT   0x00004000u

Definition at line 533 of file pcre2test.c.

◆ CTL2_NULL_SUBJECT

#define CTL2_NULL_SUBJECT   0x00002000u

Definition at line 532 of file pcre2test.c.

◆ CTL2_SUBJECT_LITERAL

#define CTL2_SUBJECT_LITERAL   0x00000100u

Definition at line 527 of file pcre2test.c.

◆ CTL2_SUBSTITUTE_CALLOUT

#define CTL2_SUBSTITUTE_CALLOUT   0x00000001u

Definition at line 519 of file pcre2test.c.

◆ CTL2_SUBSTITUTE_EXTENDED

#define CTL2_SUBSTITUTE_EXTENDED   0x00000002u

Definition at line 520 of file pcre2test.c.

◆ CTL2_SUBSTITUTE_LITERAL

#define CTL2_SUBSTITUTE_LITERAL   0x00000004u

Definition at line 521 of file pcre2test.c.

◆ CTL2_SUBSTITUTE_MATCHED

#define CTL2_SUBSTITUTE_MATCHED   0x00000008u

Definition at line 522 of file pcre2test.c.

◆ CTL2_SUBSTITUTE_OVERFLOW_LENGTH

#define CTL2_SUBSTITUTE_OVERFLOW_LENGTH   0x00000010u

Definition at line 523 of file pcre2test.c.

◆ CTL2_SUBSTITUTE_REPLACEMENT_ONLY

#define CTL2_SUBSTITUTE_REPLACEMENT_ONLY   0x00000020u

Definition at line 524 of file pcre2test.c.

◆ CTL2_SUBSTITUTE_UNKNOWN_UNSET

#define CTL2_SUBSTITUTE_UNKNOWN_UNSET   0x00000040u

Definition at line 525 of file pcre2test.c.

◆ CTL2_SUBSTITUTE_UNSET_EMPTY

#define CTL2_SUBSTITUTE_UNSET_EMPTY   0x00000080u

Definition at line 526 of file pcre2test.c.

◆ CTL_AFTERTEXT

#define CTL_AFTERTEXT   0x00000001u

Definition at line 478 of file pcre2test.c.

◆ CTL_ALLAFTERTEXT

#define CTL_ALLAFTERTEXT   0x00000002u

Definition at line 479 of file pcre2test.c.

◆ CTL_ALLCAPTURES

#define CTL_ALLCAPTURES   0x00000004u

Definition at line 480 of file pcre2test.c.

◆ CTL_ALLPD

#define CTL_ALLPD
Value:
CTL_ALLAFTERTEXT|\
CTL_ALLCAPTURES|\
CTL_ALLUSEDTEXT|\
CTL_ALTGLOBAL|\
CTL_GLOBAL|\
CTL_MARK|\
CTL_STARTCHAR|\
CTL_UTF8_INPUT)
#define CTL_AFTERTEXT
Definition: pcre2test.c:478

Definition at line 545 of file pcre2test.c.

◆ CTL_ALLUSEDTEXT

#define CTL_ALLUSEDTEXT   0x00000008u

Definition at line 481 of file pcre2test.c.

◆ CTL_ALTGLOBAL

#define CTL_ALTGLOBAL   0x00000010u

Definition at line 482 of file pcre2test.c.

◆ CTL_ANYGLOB

#define CTL_ANYGLOB   (CTL_ALTGLOBAL|CTL_GLOBAL)

Definition at line 515 of file pcre2test.c.

◆ CTL_ANYINFO

#define CTL_ANYINFO   (CTL_DEBUG|CTL_BINCODE|CTL_CALLOUT_INFO)

Definition at line 514 of file pcre2test.c.

◆ CTL_BINCODE

#define CTL_BINCODE   0x00000020u

Definition at line 483 of file pcre2test.c.

◆ CTL_CALLOUT_CAPTURE

#define CTL_CALLOUT_CAPTURE   0x00000040u

Definition at line 484 of file pcre2test.c.

◆ CTL_CALLOUT_INFO

#define CTL_CALLOUT_INFO   0x00000080u

Definition at line 485 of file pcre2test.c.

◆ CTL_CALLOUT_NONE

#define CTL_CALLOUT_NONE   0x00000100u

Definition at line 486 of file pcre2test.c.

◆ CTL_DEBUG

#define CTL_DEBUG   (CTL_FULLBINCODE|CTL_INFO) /* For setting */

Definition at line 513 of file pcre2test.c.

◆ CTL_DFA

#define CTL_DFA   0x00000200u

Definition at line 487 of file pcre2test.c.

◆ CTL_EXPAND

#define CTL_EXPAND   0x00000400u

Definition at line 488 of file pcre2test.c.

◆ CTL_FINDLIMITS

#define CTL_FINDLIMITS   0x00000800u

Definition at line 489 of file pcre2test.c.

◆ CTL_FINDLIMITS_NOHEAP

#define CTL_FINDLIMITS_NOHEAP   0x00001000u

Definition at line 490 of file pcre2test.c.

◆ CTL_FULLBINCODE

#define CTL_FULLBINCODE   0x00002000u

Definition at line 491 of file pcre2test.c.

◆ CTL_GETALL

#define CTL_GETALL   0x00004000u

Definition at line 492 of file pcre2test.c.

◆ CTL_GLOBAL

#define CTL_GLOBAL   0x00008000u

Definition at line 493 of file pcre2test.c.

◆ CTL_HEXPAT

#define CTL_HEXPAT   0x00010000u /* Same word as USE_LENGTH */

Definition at line 494 of file pcre2test.c.

◆ CTL_INFO

#define CTL_INFO   0x00020000u

Definition at line 495 of file pcre2test.c.

◆ CTL_JITFAST

#define CTL_JITFAST   0x00040000u

Definition at line 496 of file pcre2test.c.

◆ CTL_JITVERIFY

#define CTL_JITVERIFY   0x00080000u

Definition at line 497 of file pcre2test.c.

◆ CTL_MARK

#define CTL_MARK   0x00100000u

Definition at line 498 of file pcre2test.c.

◆ CTL_MEMORY

#define CTL_MEMORY   0x00200000u

Definition at line 499 of file pcre2test.c.

◆ CTL_NULLCONTEXT

#define CTL_NULLCONTEXT   0x00400000u

Definition at line 500 of file pcre2test.c.

◆ CTL_POSIX

#define CTL_POSIX   0x00800000u

Definition at line 501 of file pcre2test.c.

◆ CTL_POSIX_NOSUB

#define CTL_POSIX_NOSUB   0x01000000u

Definition at line 502 of file pcre2test.c.

◆ CTL_PUSH

#define CTL_PUSH   0x02000000u /* These three must be */

Definition at line 503 of file pcre2test.c.

◆ CTL_PUSHCOPY

#define CTL_PUSHCOPY   0x04000000u /* all in the same */

Definition at line 504 of file pcre2test.c.

◆ CTL_PUSHTABLESCOPY

#define CTL_PUSHTABLESCOPY   0x08000000u /* word. */

Definition at line 505 of file pcre2test.c.

◆ CTL_STARTCHAR

#define CTL_STARTCHAR   0x10000000u

Definition at line 506 of file pcre2test.c.

◆ CTL_USE_LENGTH

#define CTL_USE_LENGTH   0x20000000u /* Same word as HEXPAT */

Definition at line 507 of file pcre2test.c.

◆ CTL_UTF8_INPUT

#define CTL_UTF8_INPUT   0x40000000u

Definition at line 508 of file pcre2test.c.

◆ CTL_ZERO_TERMINATE

#define CTL_ZERO_TERMINATE   0x80000000u

Definition at line 509 of file pcre2test.c.

◆ DEFAULT_OVECCOUNT

#define DEFAULT_OVECCOUNT   15 /* Default ovector count */

Definition at line 212 of file pcre2test.c.

◆ DFA_WS_DIMENSION

#define DFA_WS_DIMENSION   1000 /* Size of DFA workspace */

Definition at line 211 of file pcre2test.c.

◆ DO

#define DO (   name)    offsetof(datctl, name)

Definition at line 627 of file pcre2test.c.

◆ EBCDIC_NL

#define EBCDIC_NL   0

Definition at line 904 of file pcre2test.c.

◆ FREECONTEXTS

#define FREECONTEXTS
Value:
G(pcre2_general_context_free_,BITS)(G(general_context,BITS)); \
G(pcre2_general_context_free_,BITS)(G(general_context_copy,BITS)); \
G(pcre2_compile_context_free_,BITS)(G(pat_context,BITS)); \
G(pcre2_compile_context_free_,BITS)(G(default_pat_context,BITS)); \
G(pcre2_match_context_free_,BITS)(G(dat_context,BITS)); \
G(pcre2_match_context_free_,BITS)(G(default_dat_context,BITS)); \
G(pcre2_convert_context_free_,BITS)(G(default_con_context,BITS)); \
G(pcre2_convert_context_free_,BITS)(G(con_context,BITS));

◆ G

#define G (   a,
  b 
)    glue(a,b)

Definition at line 197 of file pcre2test.c.

◆ glue

#define glue (   a,
  b 
)    a##b

Definition at line 196 of file pcre2test.c.

◆ INPUT_MODE

#define INPUT_MODE   "rb"

Definition at line 156 of file pcre2test.c.

◆ INTERACTIVE

#define INTERACTIVE (   f)    isatty(fileno(f))

Definition at line 109 of file pcre2test.c.

◆ JIT_DEFAULT

#define JIT_DEFAULT
Value:
PCRE2_JIT_PARTIAL_SOFT|\
PCRE2_JIT_PARTIAL_HARD)
#define PCRE2_JIT_COMPLETE
Definition: pcre2.h:171

Definition at line 224 of file pcre2test.c.

◆ JUNK_OFFSET

#define JUNK_OFFSET   0xdeadbeef /* For initializing ovector */

Definition at line 213 of file pcre2test.c.

◆ LENCPYGET

#define LENCPYGET   64

Definition at line 591 of file pcre2test.c.

◆ LOCALESIZE

#define LOCALESIZE   32 /* Size of locale name */

Definition at line 214 of file pcre2test.c.

◆ LOOPREPEAT

#define LOOPREPEAT   500000 /* Default loop count for timing */

Definition at line 215 of file pcre2test.c.

◆ MALLOCLISTSIZE

#define MALLOCLISTSIZE   20 /* For remembering mallocs */

Definition at line 216 of file pcre2test.c.

◆ MAX_SYNONYMS

#define MAX_SYNONYMS   5

Definition at line 8766 of file pcre2test.c.

◆ MAXCPYGET

#define MAXCPYGET   10

Definition at line 590 of file pcre2test.c.

◆ memmove

#define memmove (   d,
  s,
  n 
)    emulated_memmove(d,s,n)

Definition at line 2811 of file pcre2test.c.

◆ MO

#define MO (   name)    offsetof(PCRE2_REAL_MATCH_CONTEXT, name)

Definition at line 624 of file pcre2test.c.

◆ MODLISTCOUNT

#define MODLISTCOUNT   sizeof(modlist)/sizeof(modstruct)

Definition at line 786 of file pcre2test.c.

◆ NOTPOP_CONTROLS

#define NOTPOP_CONTROLS
Value:
#define CTL_POSIX_NOSUB
Definition: pcre2test.c:502
#define CTL_HEXPAT
Definition: pcre2test.c:494
#define CTL_POSIX
Definition: pcre2test.c:501
#define CTL_PUSHTABLESCOPY
Definition: pcre2test.c:505
#define CTL_PUSH
Definition: pcre2test.c:503
#define CTL_USE_LENGTH
Definition: pcre2test.c:507

Definition at line 825 of file pcre2test.c.

◆ OUTPUT_MODE

#define OUTPUT_MODE   "wb"

Definition at line 157 of file pcre2test.c.

◆ PARENS_NEST_DEFAULT

#define PARENS_NEST_DEFAULT   220 /* Default parentheses nest limit */

Definition at line 217 of file pcre2test.c.

◆ PATSTACKSIZE

#define PATSTACKSIZE   20 /* Pattern stack for save/restore testing */

Definition at line 218 of file pcre2test.c.

◆ PCRE16_MODE

#define PCRE16_MODE   16

Definition at line 236 of file pcre2test.c.

◆ PCRE2_BUILDING_PCRE2TEST

#define PCRE2_BUILDING_PCRE2TEST

Definition at line 275 of file pcre2test.c.

◆ PCRE2_CODE_UNIT_WIDTH [1/2]

#define PCRE2_CODE_UNIT_WIDTH   0

Definition at line 354 of file pcre2test.c.

◆ PCRE2_CODE_UNIT_WIDTH [2/2]

#define PCRE2_CODE_UNIT_WIDTH   8

Definition at line 354 of file pcre2test.c.

◆ PCRE2_EXTRA_ASCII_ALL

#define PCRE2_EXTRA_ASCII_ALL
Value:
PCRE2_EXTRA_ASCII_BSW|PCRE2_EXTRA_ASCII_POSIX)
#define PCRE2_EXTRA_ASCII_POSIX
Definition: pcre2.h:166
#define PCRE2_EXTRA_ASCII_BSS
Definition: pcre2.h:164
#define PCRE2_EXTRA_ASCII_BSD
Definition: pcre2.h:163

Definition at line 640 of file pcre2test.c.

◆ PCRE2_PCRE2TEST

#define PCRE2_PCRE2TEST

Definition at line 284 of file pcre2test.c.

◆ PCRE2_SPTR

#define PCRE2_SPTR   PCRE2_SPTR8

Definition at line 356 of file pcre2test.c.

◆ PCRE2_SUFFIX

#define PCRE2_SUFFIX (   a)    a

Definition at line 343 of file pcre2test.c.

◆ PCRE32_MODE

#define PCRE32_MODE   32

Definition at line 237 of file pcre2test.c.

◆ PCRE8_MODE

#define PCRE8_MODE   8

Definition at line 235 of file pcre2test.c.

◆ PD

#define PD (   name)    PO(name)

Definition at line 626 of file pcre2test.c.

◆ PO

#define PO (   name)    offsetof(patctl, name)

Definition at line 625 of file pcre2test.c.

◆ POSIX_SUPPORTED_COMPILE_CONTROLS

#define POSIX_SUPPORTED_COMPILE_CONTROLS
Value:
( \
CTL_POSIX_NOSUB|CTL_USE_LENGTH)
#define CTL_EXPAND
Definition: pcre2test.c:488
#define CTL_ALLAFTERTEXT
Definition: pcre2test.c:479

Definition at line 796 of file pcre2test.c.

◆ POSIX_SUPPORTED_COMPILE_CONTROLS2

#define POSIX_SUPPORTED_COMPILE_CONTROLS2   (0)

Definition at line 800 of file pcre2test.c.

◆ POSIX_SUPPORTED_COMPILE_EXTRA_OPTIONS

#define POSIX_SUPPORTED_COMPILE_EXTRA_OPTIONS   (0)

Definition at line 794 of file pcre2test.c.

◆ POSIX_SUPPORTED_COMPILE_OPTIONS

#define POSIX_SUPPORTED_COMPILE_OPTIONS
Value:
( \
PCRE2_UTF|PCRE2_UNGREEDY)
#define PCRE2_LITERAL
Definition: pcre2.h:150
#define PCRE2_UCP
Definition: pcre2.h:142
#define PCRE2_DOTALL
Definition: pcre2.h:130
#define PCRE2_UNGREEDY
Definition: pcre2.h:143
#define PCRE2_MULTILINE
Definition: pcre2.h:135

Definition at line 790 of file pcre2test.c.

◆ POSIX_SUPPORTED_MATCH_CONTROLS

#define POSIX_SUPPORTED_MATCH_CONTROLS   (CTL_AFTERTEXT|CTL_ALLAFTERTEXT)

Definition at line 805 of file pcre2test.c.

◆ POSIX_SUPPORTED_MATCH_CONTROLS2

#define POSIX_SUPPORTED_MATCH_CONTROLS2   (CTL2_NULL_SUBJECT)

Definition at line 806 of file pcre2test.c.

◆ POSIX_SUPPORTED_MATCH_OPTIONS

#define POSIX_SUPPORTED_MATCH_OPTIONS
Value:
( \
#define PCRE2_NOTEMPTY
Definition: pcre2.h:184
#define PCRE2_NOTEOL
Definition: pcre2.h:183

Definition at line 802 of file pcre2test.c.

◆ PRINTABLE

#define PRINTABLE (   c)    ((c) >= 32 && (c) < 127)

Definition at line 251 of file pcre2test.c.

◆ PRINTOK

#define PRINTOK (   c)    ((use_tables != NULL && c < 256)? isprint(c) : PRINTABLE(c))

Definition at line 254 of file pcre2test.c.

◆ PRIV

#define PRIV (   name)    name

Definition at line 273 of file pcre2test.c.

◆ PTR_FORM

#define PTR_FORM   "ld"

Definition at line 184 of file pcre2test.c.

◆ PUSH_COMPILE_ONLY_CONTROLS

#define PUSH_COMPILE_ONLY_CONTROLS   CTL_JITVERIFY

Definition at line 820 of file pcre2test.c.

◆ PUSH_COMPILE_ONLY_CONTROLS2

#define PUSH_COMPILE_ONLY_CONTROLS2   (0)

Definition at line 821 of file pcre2test.c.

◆ PUSH_SUPPORTED_COMPILE_CONTROLS

#define PUSH_SUPPORTED_COMPILE_CONTROLS
Value:
( \
CTL_JITVERIFY|CTL_MEMORY|CTL_PUSH|CTL_PUSHCOPY| \
CTL_PUSHTABLESCOPY|CTL_USE_LENGTH)
#define CTL_CALLOUT_INFO
Definition: pcre2test.c:485
#define CTL_MEMORY
Definition: pcre2test.c:499
#define CTL_FULLBINCODE
Definition: pcre2test.c:491
#define CTL_PUSHCOPY
Definition: pcre2test.c:504
#define CTL_INFO
Definition: pcre2test.c:495

Definition at line 810 of file pcre2test.c.

◆ PUSH_SUPPORTED_COMPILE_CONTROLS2

#define PUSH_SUPPORTED_COMPILE_CONTROLS2
Value:
CTL2_HEAPFRAMES_SIZE|CTL2_FRAMESIZE|CTL2_NL_SET)
#define CTL2_BSR_SET
Definition: pcre2test.c:538
#define CTL2_NL_SET
Definition: pcre2test.c:537
#define CTL2_FRAMESIZE
Definition: pcre2test.c:534

Definition at line 815 of file pcre2test.c.

◆ REPLACE_BUFFSIZE

#define REPLACE_BUFFSIZE   1024 /* This is a byte value */

Definition at line 231 of file pcre2test.c.

◆ REPLACE_MODSIZE

#define REPLACE_MODSIZE   100 /* Field for reading 8-bit replacement */

Definition at line 219 of file pcre2test.c.

◆ S32OVERFLOW

#define S32OVERFLOW (   x)    (x == INT32_MAX || x == INT32_MIN)

Definition at line 301 of file pcre2test.c.

◆ SET

#define SET (   x,
 
)    SETOP(x,y,=)

Definition at line 1062 of file pcre2test.c.

◆ SETPLUS

#define SETPLUS (   x,
 
)    SETOP(x,y,+=)

Definition at line 1063 of file pcre2test.c.

◆ SIZ_FORM

#define SIZ_FORM   "lu"

Definition at line 185 of file pcre2test.c.

◆ strlen8

#define strlen8 (   x)    strlen((char *)x)

Definition at line 1064 of file pcre2test.c.

◆ SUPPORT_16

#define SUPPORT_16   0

Definition at line 893 of file pcre2test.c.

◆ SUPPORT_32

#define SUPPORT_32   0

Definition at line 896 of file pcre2test.c.

◆ SUPPORT_8

#define SUPPORT_8   0

Definition at line 890 of file pcre2test.c.

◆ SUPPORT_EBCDIC

#define SUPPORT_EBCDIC   0

Definition at line 903 of file pcre2test.c.

◆ U32OVERFLOW

#define U32OVERFLOW (   x)    (x == UINT32_MAX)

Definition at line 295 of file pcre2test.c.

◆ VERSION_SIZE

#define VERSION_SIZE   64 /* Size of buffer for the version strings */

Definition at line 220 of file pcre2test.c.

Typedef Documentation

◆ c1modstruct

typedef struct c1modstruct c1modstruct

◆ cmdstruct

typedef struct cmdstruct cmdstruct

◆ convertstruct

typedef struct convertstruct convertstruct

◆ coptstruct

typedef struct coptstruct coptstruct

◆ datctl

typedef struct datctl datctl

◆ modstruct

typedef struct modstruct modstruct

◆ patctl

typedef struct patctl patctl

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PR_OK 
PR_SKIP 
PR_ABEND 

Definition at line 241 of file pcre2test.c.

◆ anonymous enum

anonymous enum
Enumerator
CMD_FORBID_UTF 
CMD_LOAD 
CMD_LOADTABLES 
CMD_NEWLINE_DEFAULT 
CMD_PATTERN 
CMD_PERLTEST 
CMD_POP 
CMD_POPCOPY 
CMD_SAVE 
CMD_SUBJECT 
CMD_UNKNOWN 

Definition at line 405 of file pcre2test.c.

◆ anonymous enum

anonymous enum
Enumerator
MOD_CTC 
MOD_CTM 
MOD_PAT 
MOD_PATP 
MOD_DAT 
MOD_DATP 
MOD_PD 
MOD_PDP 
MOD_PND 
MOD_PNDP 
MOD_CHR 
MOD_CON 
MOD_CTL 
MOD_BSR 
MOD_IN2 
MOD_INS 
MOD_INT 
MOD_IND 
MOD_NL 
MOD_NN 
MOD_OPT 
MOD_SIZ 
MOD_STR 

Definition at line 450 of file pcre2test.c.

◆ anonymous enum

anonymous enum
Enumerator
CTX_PAT 
CTX_POPPAT 
CTX_DEFPAT 
CTX_DAT 
CTX_DEFDAT 

Definition at line 615 of file pcre2test.c.

◆ anonymous enum

anonymous enum
Enumerator
CONF_BSR 
CONF_FIX 
CONF_FIZ 
CONF_INT 
CONF_NL 

Definition at line 919 of file pcre2test.c.

Function Documentation

◆ c_option()

static int c_option ( const char *  arg)
static

◆ callout_callback()

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

◆ callout_function()

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

◆ check_match_limit()

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

◆ check_modifier()

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

◆ copy_and_get()

static BOOL copy_and_get ( BOOL  utf,
int  capcount 
)
static

◆ decode_modifiers()

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

◆ display_modifiers()

static void display_modifiers ( void  )
static

Definition at line 8969 of file pcre2test.c.

References display_selected_modifiers(), FALSE, and TRUE.

Referenced by main().

◆ display_one_modifier()

static void display_one_modifier ( modstruct m,
BOOL  for_pattern 
)
static

◆ display_properties()

static void display_properties ( BOOL  wantscripts)
static

◆ display_selected_modifiers()

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

◆ emulated_memmove()

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

Definition at line 2787 of file pcre2test.c.

References i, and n.

◆ expand_input_buffers()

static void expand_input_buffers ( void  )
static

Definition at line 3465 of file pcre2test.c.

References buffer, exit(), free(), malloc(), NULL, pbuffer8, and pbuffer8_size.

Referenced by extend_inputline(), and process_pattern().

◆ extend_inputline()

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

Definition at line 3516 of file pcre2test.c.

References buffer, exit(), expand_input_buffers(), f, free(), INTERACTIVE, len, NULL, outfile, pbuffer8_size, and readline().

Referenced by main(), and process_pattern().

◆ jit_callback()

static PCRE2_JIT_STACK* jit_callback ( void *  arg)
static

Definition at line 2933 of file pcre2test.c.

References jit_was_used, and TRUE.

Referenced by process_data().

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 8988 of file pcre2test.c.

References buffer, c_option(), datctl::cerror, datctl::cfail, CFORE_UNSET, CHAR_COMMA, CLOCKS_PER_SEC, code_unit_size, CONTEXTTESTS, patctl::control, datctl::control, datctl::control2, patctl::convert_type, CONVERT_UNSET, datctl::copy_numbers, CREATECONTEXTS, CTL2_CALLOUT_EXTRA, CTL_DEBUG, CTL_DFA, CTL_FULLBINCODE, CTL_INFO, CTL_JITFAST, CTL_JITVERIFY, CTX_DEFDAT, CTX_DEFPAT, dbuffer, decode_modifiers(), def_datctl, def_patctl, DEFAULT_OVECCOUNT, dfa_matched, dfa_workspace, display_modifiers(), display_properties(), DO, exit(), extend_inputline(), FALSE, free(), FREECONTEXTS, datctl::get_numbers, infile, INPUT_MODE, int, INTERACTIVE, isspace(), patctl::jit, JIT_DEFAULT, jit_stack, jittarget, len, locale_name, locale_tables, LOOPREPEAT, malloc(), match_data, max_oveccount, NULL, patctl::options, outfile, OUTPUT_MODE, datctl::oveccount, pad(), PARENS_NEST_DEFAULT, patstack, patstacknext, pbuffer8, pbuffer8_size, PCRE16_MODE, PCRE2_AUTO_CALLOUT, pcre2_code_free(), pcre2_config_16(), pcre2_config_32(), PCRE2_CONFIG_JITTARGET, PCRE2_CONFIG_MATCHLIMIT, PCRE2_CONFIG_STACKRECURSE, PCRE2_CONFIG_UNICODE, PCRE2_CONFIG_UNICODE_VERSION, PCRE2_CONFIG_VERSION, PCRE2_ERROR_BADDATA, PCRE2_ERROR_BADOPTION, PCRE2_ERROR_NOMEMORY, pcre2_set_bsr_16(), pcre2_set_bsr_32(), pcre2_set_bsr_8(), pcre2_set_newline_16(), pcre2_set_newline_32(), pcre2_set_newline_8(), PCRE32_MODE, PCRE8_MODE, PO, PR_ABEND, PR_OK, PR_SKIP, print_version(), process_command(), process_data(), process_pattern(), quiet, regex_t::re_match_data, regex_t::re_pcre2_code, regfree, SET, SIZ_FORM, datctl::startend, util::strcmp(), strerror(), tables3, TEST, test_mode, timeit, timeitm, total_compile_time, total_jit_compile_time, total_match_time, TRUE, U32OVERFLOW, uint32_t, usage(), uversion, and version.

◆ my_free()

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

Definition at line 2873 of file pcre2test.c.

References data, FALSE, free(), i, malloclist, malloclistlength, malloclistptr, NULL, outfile, show_memory, SIZ_FORM, and TRUE.

◆ my_malloc()

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

◆ open_file()

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

Definition at line 4955 of file pcre2test.c.

References isspace(), NULL, outfile, PR_ABEND, PR_OK, strerror(), and strlen8.

Referenced by process_command().

◆ ord2utf8()

static int ord2utf8 ( uint32_t  cvalue,
uint8_t utf8bytes 
)
static

Definition at line 3202 of file pcre2test.c.

References i, utf8_table1, utf8_table1_size, and utf8_table2.

Referenced by process_data(), and show_pattern_info().

◆ pattern_info()

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

◆ pchar()

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

Definition at line 3022 of file pcre2test.c.

References f, n, NULL, PRINTOK, and utf.

Referenced by show_pattern_info().

◆ print_error_message()

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

Definition at line 4471 of file pcre2test.c.

References FALSE, len, and outfile.

Referenced by copy_and_get(), process_data(), process_pattern(), serial_error(), and show_pattern_info().

◆ print_jit_target()

static void print_jit_target ( FILE *  f)
static

Definition at line 8442 of file pcre2test.c.

References f, and jittarget.

Referenced by c_option().

◆ print_newline_config()

static void print_newline_config ( uint32_t  optval,
BOOL  isc 
)
static

Definition at line 8463 of file pcre2test.c.

References newlines.

Referenced by c_option().

◆ print_unicode_version()

static void print_unicode_version ( FILE *  f)
static

Definition at line 8428 of file pcre2test.c.

References f, and uversion.

Referenced by c_option().

◆ print_version()

static void print_version ( FILE *  f,
BOOL  include_mode 
)
static

Definition at line 8407 of file pcre2test.c.

References buf, f, test_mode, and version.

Referenced by c_option(), and main().

◆ process_command()

static int process_command ( void  )
static

◆ process_data()

static int process_data ( void  )
static

Definition at line 6861 of file pcre2test.c.

References buffer, callout_count, datctl::callout_data, callout_function(), CAST8VAR, datctl::cerror, datctl::cfail, CFORE_UNSET, CHAR_0, CHAR_9, CHAR_BEL, CHAR_ESC, check_match_limit(), CLOCKS_PER_SEC, code_unit_size, patctl::control, datctl::control, patctl::control2, datctl::control2, copy_and_get(), datctl::copy_names, datctl::copy_numbers, CTL2_ALLPD, CTL2_ALLVECTOR, CTL2_HEAPFRAMES_SIZE, CTL2_NULL_REPLACEMENT, CTL2_NULL_SUBJECT, CTL2_SUBJECT_LITERAL, CTL2_SUBSTITUTE_CALLOUT, CTL2_SUBSTITUTE_EXTENDED, CTL2_SUBSTITUTE_LITERAL, CTL2_SUBSTITUTE_MATCHED, CTL2_SUBSTITUTE_OVERFLOW_LENGTH, CTL2_SUBSTITUTE_REPLACEMENT_ONLY, CTL2_SUBSTITUTE_UNKNOWN_UNSET, CTL2_SUBSTITUTE_UNSET_EMPTY, CTL_AFTERTEXT, CTL_ALLAFTERTEXT, CTL_ALLCAPTURES, CTL_ALLPD, CTL_ALLUSEDTEXT, CTL_ALTGLOBAL, CTL_ANYGLOB, CTL_CALLOUT_NONE, CTL_DFA, CTL_FINDLIMITS, CTL_FINDLIMITS_NOHEAP, CTL_GLOBAL, CTL_JITFAST, CTL_JITVERIFY, CTL_MARK, CTL_MEMORY, CTL_NULLCONTEXT, CTL_POSIX, CTL_POSIX_NOSUB, CTL_STARTCHAR, CTL_UTF8_INPUT, CTL_ZERO_TERMINATE, CTX_DAT, dat_datctl, dbuffer, dbuffer_size, decode_modifiers(), def_datctl, dfa_matched, dfa_workspace, DFA_WS_DIMENSION, exclusive_dat_controls, exit(), FALSE, first_callout, flags, FLD, for(), free(), datctl::get_names, datctl::get_numbers, GETUTF8INC, HASUTF8EXTRALEN, i, isalnum(), isdigit(), isspace(), isxdigit(), jit_callback(), jit_stack, jit_stack_size, jit_was_used, patctl::jitstack, datctl::jitstack, JUNK_OFFSET, last_callout_mark, len, malloc(), match_data, max_oveccount, maxcapcount, memmove, msg(), n, NULL, datctl::offset, datctl::options, ord2utf8(), outfile, datctl::oveccount, pat_patctl, pbuffer8, pbuffer8_size, PCRE16_MODE, PCRE2_ANCHORED, PCRE2_COPY_MATCHED_SUBJECT, PCRE2_DFA_RESTART, PCRE2_ERROR_BADUTFOFFSET, PCRE2_ERROR_DEPTHLIMIT, PCRE2_ERROR_HEAPLIMIT, PCRE2_ERROR_MATCHLIMIT, PCRE2_ERROR_NOMATCH, PCRE2_ERROR_NOMEMORY, PCRE2_ERROR_PARTIAL, PCRE2_ERROR_UTF32_ERR2, PCRE2_ERROR_UTF8_ERR1, PCRE2_MD_COPIED_SUBJECT, PCRE2_NEWLINE_ANY, PCRE2_NEWLINE_ANYCRLF, PCRE2_NEWLINE_CRLF, PCRE2_NO_JIT, PCRE2_NOTBOL, PCRE2_NOTEMPTY, PCRE2_NOTEMPTY_ATSTART, PCRE2_NOTEOL, PCRE2_SIZE, PCRE2_SUBSTITUTE_EXTENDED, PCRE2_SUBSTITUTE_GLOBAL, PCRE2_SUBSTITUTE_LITERAL, PCRE2_SUBSTITUTE_MATCHED, PCRE2_SUBSTITUTE_OVERFLOW_LENGTH, PCRE2_SUBSTITUTE_REPLACEMENT_ONLY, PCRE2_SUBSTITUTE_UNKNOWN_UNSET, PCRE2_SUBSTITUTE_UNSET_EMPTY, PCRE2_UNSET, PCRE2_UTF, PCRE2_ZERO_TERMINATED, PCRE32_MODE, PCRE8_MODE, POSIX_SUPPORTED_MATCH_CONTROLS, POSIX_SUPPORTED_MATCH_CONTROLS2, POSIX_SUPPORTED_MATCH_OPTIONS, PR_ABEND, PR_OK, print_error_message(), PRIV, r(), r8, regex_t::re_pcre2_code, REG_NOTBOL, REG_NOTEMPTY, REG_NOTEOL, REG_STARTEND, regerror, regexec, REPLACE_BUFFSIZE, patctl::replacement, datctl::replacement, regmatch_t::rm_eo, regmatch_t::rm_so, S32OVERFLOW, SET, SETPLUS, show_controls(), show_heapframes_size(), show_memory, show_ovector(), SIZ_FORM, SIZE_MAX, start_time, datctl::startend, subject, substitute_callout_function(), patctl::substitute_skip, datctl::substitute_skip, patctl::substitute_stop, datctl::substitute_stop, test_mode, timeitm, tolower(), total_match_time, TRUE, uint8_t, utf, utf82ord(), and valid_utf().

Referenced by main().

◆ process_pattern()

static int process_pattern ( void  )
static

Definition at line 5272 of file pcre2test.c.

References buffer, cflags, CLOCKS_PER_SEC, code_unit_size, patctl::control, patctl::control2, patctl::convert_glob_escape, patctl::convert_glob_separator, patctl::convert_length, patctl::convert_type, CONVERT_UNSET, count, CTL2_FRAMESIZE, CTL2_NL_SET, CTL2_NULL_PATTERN, CTL_ANYINFO, CTL_EXPAND, CTL_HEXPAT, CTL_INFO, CTL_JITFAST, CTL_JITVERIFY, CTL_MEMORY, CTL_NULLCONTEXT, CTL_POSIX, CTL_POSIX_NOSUB, CTL_PUSH, CTL_PUSHCOPY, CTL_PUSHTABLESCOPY, CTL_USE_LENGTH, CTL_UTF8_INPUT, CTX_PAT, decode_modifiers(), def_patctl, delimiter, exclusive_pat_controls, expand_input_buffers(), extend_inputline(), extra_options, FALSE, flags, FLD, forbid_utf, free(), i, if(), infile, int, INTERACTIVE, isdigit(), isspace(), isxdigit(), patctl::jit, JIT_DEFAULT, jitrc, local_newline_default, patctl::locale, locale_name, locale_tables, MAGIC_NUMBER, malloc(), maxcapcount, maxlookbehind, msg(), NULL, patctl::options, outfile, PARENS_NEST_DEFAULT, pat_patctl, patstack, patstacknext, PATSTACKSIZE, pattern_info(), pbuffer8, pbuffer8_size, PCRE16_MODE, PCRE2_CASELESS, pcre2_code_free(), PCRE2_CONVERT_NO_UTF_CHECK, PCRE2_CONVERT_UTF, PCRE2_DOTALL, PCRE2_HASBKPORX, PCRE2_INFO_CAPTURECOUNT, PCRE2_INFO_MAXLOOKBEHIND, PCRE2_LITERAL, PCRE2_MATCH_INVALID_UTF, PCRE2_MULTILINE, PCRE2_NL_SET, PCRE2_NO_UTF_CHECK, PCRE2_SIZE, PCRE2_UCP, PCRE2_UNGREEDY, PCRE2_UNSET, PCRE2_UTF, PCRE2_ZERO_TERMINATED, PCRE32_MODE, PCRE8_MODE, POSIX_SUPPORTED_COMPILE_CONTROLS, POSIX_SUPPORTED_COMPILE_CONTROLS2, POSIX_SUPPORTED_COMPILE_EXTRA_OPTIONS, POSIX_SUPPORTED_COMPILE_OPTIONS, PR_ABEND, PR_OK, PR_SKIP, print_error_message(), PTR_FORM, PUSH_COMPILE_ONLY_CONTROLS, PUSH_COMPILE_ONLY_CONTROLS2, PUSH_SUPPORTED_COMPILE_CONTROLS, PUSH_SUPPORTED_COMPILE_CONTROLS2, regex_t::re_cflags, regex_t::re_endp, regex_t::re_match_data, regex_t::re_nsub, regex_t::re_pcre2_code, REG_DOTALL, REG_ICASE, REG_NEWLINE, REG_NOSPEC, REG_NOSUB, REG_PEND, REG_UCP, REG_UNGREEDY, REG_UTF, regcomp, regerror, patctl::regerror_buffsize, patctl::replacement, restrict_for_perl_test, SET, show_compile_extra_options(), show_compile_options(), show_controls(), show_framesize(), show_memory_info(), show_pattern_info(), SIZ_FORM, stack_guard(), patctl::stackguard_test, start_time, util::strcmp(), tables1, tables2, tables3, patctl::tables_id, TEST, test_mode, timeit, total_compile_time, total_jit_compile_time, toupper(), U32OVERFLOW, uint32_t, use_tables, and utf.

Referenced by main().

◆ scan_modifiers()

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

Definition at line 3635 of file pcre2test.c.

References int, len, modlist, MODLISTCOUNT, and util::strncmp().

Referenced by decode_modifiers().

◆ serial_error()

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

Definition at line 4931 of file pcre2test.c.

References msg(), outfile, and print_error_message().

Referenced by process_command().

◆ show_compile_extra_options()

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

◆ show_compile_options()

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

◆ show_controls()

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

◆ show_framesize()

static void show_framesize ( void  )
static

Definition at line 4442 of file pcre2test.c.

References FALSE, outfile, pattern_info(), PCRE2_INFO_FRAMESIZE, PCRE2_SIZE, and SIZ_FORM.

Referenced by process_command(), and process_pattern().

◆ show_heapframes_size()

static void show_heapframes_size ( void  )
static

Definition at line 4456 of file pcre2test.c.

References match_data, outfile, PCRE2_SIZE, and SIZ_FORM.

Referenced by process_data().

◆ show_memory_info()

static void show_memory_info ( void  )
static

◆ show_ovector()

static void show_ovector ( PCRE2_SIZE ovector,
uint32_t  oveccount 
)
static

Definition at line 6827 of file pcre2test.c.

References i, JUNK_OFFSET, outfile, PCRE2_SIZE, and PCRE2_UNSET.

Referenced by process_data().

◆ show_pattern_info()

static int show_pattern_info ( void  )
static

◆ stack_guard()

static int stack_guard ( uint32_t  depth,
void *  user_data 
)
static

Definition at line 2921 of file pcre2test.c.

References depth, pat_patctl, and patctl::stackguard_test.

Referenced by process_pattern().

◆ strerror()

char* strerror ( int  n)

Definition at line 2829 of file pcre2test.c.

References n, sys_errlist, and sys_nerr.

Referenced by main(), and open_file().

◆ strncmpic()

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

Definition at line 3609 of file pcre2test.c.

References n, t, and tolower().

Referenced by decode_modifiers(), and process_command().

◆ substitute_callout_function()

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

◆ usage()

static void usage ( void  )
static

Definition at line 8479 of file pcre2test.c.

Referenced by main().

◆ utf82ord()

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

Definition at line 2962 of file pcre2test.c.

References i, utf8_table1, utf8_table1_size, and utf8_table3.

Referenced by process_data().

◆ valid_utf()

int valid_utf ( PCRE2_SPTR8  ,
PCRE2_SIZE  ,
PCRE2_SIZE  
)

Variable Documentation

◆ buffer

uint8_t* buffer = NULL
static

Definition at line 1016 of file pcre2test.c.

Referenced by _bcp_fgets(), _pcre2_ord2utf(), _SQLGetDiagField(), rapidjson::BasicIStreamAsyncWrapper< StreamType >::AcquireData(), CSubSourceCollector::AddChunk(), CMemorySourceCollector::AddChunk(), CWriterSourceCollector::AddChunk(), CFileSourceCollector::AddChunk(), CReadBlastApp::addSimpleTab(), adjustPercentIdentToDisplayValue(), rapidjson::internal::TokenHelper< Stack, Ch >::AppendIndexToken(), rapidjson::internal::TokenHelper< Stack, char >::AppendIndexToken(), rapidjson::BasicIStreamAsyncWrapper< StreamType >::BasicIStreamAsyncWrapper(), rapidjson::BasicIStreamWrapper< StreamType >::BasicIStreamWrapper(), bcp_readfmt(), impl::binary_to_hex_string(), BLAST_CreateMixedFrameDNATranslation(), Blast_GumbelBlkCalc(), Blast_KarlinBlkGappedCalc(), Blast_KarlinBlkNuclGappedCalc(), Blast_MaskTheResidues(), BLAST_PackDNA(), BLAST_PrintAllowedValues(), BLAST_PrintMatrixMessage(), Blast_ScoreBlkKbpUngappedCalc(), Blast_ScoreBlkMatrixInit(), Blast_SetPHIPatternInfo(), BlastFilteringOptionsFromString(), BlastFilteringOptionsToString(), BlastKarlinReportAllowedValues(), BlastScoringOptionsValidate(), BlastSetUp_MaskQuery(), BlastSetUp_SeqBlkNew(), blk_bind(), blk_default(), blk_props(), blk_sendtext(), blk_textxfer(), BOOST_AUTO_TEST_CASE(), BUF_StripToPattern(), CSeqDictionaryBuilder< Alphabet >::Build(), IServer_LineMessageHandler::CheckMessage(), CODBC_RowResult::CheckSIENoD_Binary(), CODBC_RowResult::CheckSIENoD_Text(), CODBC_RowResult::CheckSIENoD_WText(), CAlnVecPrinter::ClustalStyle(), CGridCommandLineInterfaceApp::Cmd_CommitJob(), CGridCommandLineInterfaceApp::Cmd_Download(), CGridCommandLineInterfaceApp::Cmd_GetBlob(), CComponentIDToolApp::Cmd_Make(), CGridCommandLineInterfaceApp::Cmd_PutBlob(), CGridCommandLineInterfaceApp::Cmd_Upload(), CMemoryChunk::CMemoryChunk(), CObjectIStreamAsn::CObjectIStreamAsn(), CObjectIStreamAsnBinary::CObjectIStreamAsnBinary(), xml::node::convert_to_nset(), CObjectStreamCopier::CopyByteBlock(), CObjectOStreamAsnBinary::CopyStringValue(), CORE_SendMailEx(), CObjectIStream::CreateFromBuffer(), CFileIO::CreateTemporary(), cs_config(), cs_diag(), cs_dt_info(), cs_locale(), cs_setnull(), cs_strbuild(), cs_time(), ct_bind(), ct_cmd_props(), ct_command(), ct_compute_info(), ct_con_props(), ct_config(), ct_diag(), ct_dynamic(), ct_get_data(), ct_res_info(), ct_send_data(), ctransition_ErrMessage(), dbperror(), dbpivot(), dbspr1row(), dbsprhead(), dbsprline(), NVcfUtil::DeserializeColumn(), rapidjson::internal::DigitGen(), xml::document::document(), DoTest(), NStr::DoubleToString(), rapidjson::internal::dtoa(), CBDB_FileDumper::Dump(), CGridCommandLineInterfaceApp::DumpJobInputOutput(), CObjectIStream::EndDelayBuffer(), TestUtil::EndianIndependentBufferHash(), CDelayedOfstream::equals(), NAutomation::SNetCacheBlob::ExecRead(), CMMFlusher::ExecuteSlice(), expand_input_buffers(), extend_inputline(), CPhiBlastArgs::ExtractAlgorithmOptions(), bm::file_load_compressed_collection(), bm::file_load_svector(), fill_buffer(), AbstractLexer::FillChar(), CFlatFileViewContext::FindSequence(), CReadBlastApp::fit_blast(), CObjectIStreamAsnBinary::FixVisibleChars(), FormatPreciseTime(), GetAbsolutePath(), CAlnVecRow::GetAlnSeqString(), CConsensusRow::GetAlnSeqString(), CAlnVecRowHandle::GetAlnSeqString(), CSparseRowHandle::GetAlnSeqString(), CAlnVec::GetAlnSeqString(), CAlnVecMultiDataSource::GetAlnSeqString(), CSparseMultiDataSource::GetAlnSeqString(), CAlnVecGraphicDataSource::GetAlnSeqString(), CSparseAlignment::GetAlnSeqString(), CDensegGraphicDataSource::GetAlnSeqString(), CSimpleGraphicDataSource::GetAlnSeqString(), CSparseAlnGraphicDataSource::GetAlnSeqString(), CSparseAln::GetAlnSeqString(), CSeqDBVol::GetAmbigPartialSeq(), CSeqDBImpl::GetAmbigPartialSeq(), CSeqDB::GetAmbigPartialSeq(), CSeqDBVol::GetAmbigSeq(), CSeqDBImpl::GetAmbigSeq(), CSeqDB::GetAmbigSeq(), CSeqDB::GetAmbigSeqAlloc(), CProjectedMappingInfo::GetAnchorSequence(), CNCBlobStorage::GetBList(), CSQLITE_Statement::GetBlob(), CBDB_Cache::GetBlobAccess(), CODBC_RowResult::GetBlobDescriptor(), CBGZFFile::GetBlock(), CIStreamBuffer::GetChars(), CHttpRequest::GetClientIP(), CAlnVec::GetColumnVector(), CReadBlastApp::getCoreDataType(), CKMDataNode::GetData(), CNetCacheAPI::GetData(), CODBC_Connection::GetDriverName(), CBDB_File::GetField(), CFtglFontManager::GetFont(), CTL_CursorResultExpl::GetItem(), CTL_RowResult::GetItemInternal(), CUrlUtils::GetLastModified(), CSmallDNS::GetLocalHost(), CWGSDb_Impl::GetMasterDescrBytes(), CWGSDb_Impl::GetMasterDescrEntry(), CMergeBitsetBlob< BV >::GetMergeBuffer(), CAsnCache::GetMultipleRaw(), CAsnCacheStore::GetMultipleRaw(), CAsnCacheStoreMany::GetMultipleRaw(), DeBruijn::LargeInt< precision >::getName(), CCmdLineArgList::GetNextArg(), CSeqDBImpl::GetNextOIDChunk(), CMMapByteSourceReader::GetNextPart(), CMemoryByteSourceReader::GetNextPart(), CGridClient::GetProgressMessage(), CAsnCache::GetRaw(), CAsnCacheStore::GetRaw(), CAsnCacheStoreMany::GetRaw(), CSeqDBVol::GetRawSeqAndAmbig(), CSeqDBImpl::GetRawSeqAndAmbig(), CBDB_Cache::GetReadStream(), CAlnVec::GetSegSeqString(), CBlastSequenceSource::GetSeq(), CSeqVector::GetSeqData(), CSeqDBVol::GetSeqData(), CSeqTextDataSourceInterval::GetSeqData(), CSeqVector_CI::GetSeqData(), CSeqTextDataSource::GetSeqData(), CAlnVecRowHandle::GetSeqString(), CSparseRowHandle::GetSeqString(), IAlnGraphicDataSource::GetSeqString(), CDensegGraphicDataSource::GetSeqString(), CSimpleGraphicDataSource::GetSeqString(), CAlnVec::GetSeqString(), CSparseMultiDataSource::GetSeqString(), CSparseAlignment::GetSeqString(), CSparseAln::GetSeqString(), CSeqTextDataSourceInterval::GetSeqString(), CSeqTextDataSource::GetSeqString(), CBioseqIndex::GetSequence(), CFeatureIndex::GetSequence(), CSeqDBVol::GetSequence(), CSeqDB::GetSequence(), CSeqDBImpl::GetSequence(), CLocalBlastDbAdapter::GetSequence(), CSGSequenceDS::GetSequence(), CSeqDB::GetSequenceAsString(), GetSequenceSingleNucleotideStrand(), CAlnVecRow::GetStringAtPos(), CConsensusRow::GetStringAtPos(), CSeqDBTaxInfo::GetTaxNames(), CCompressionUtil::GetUI2(), CCompressionUtil::GetUI4(), CVDBMgr::GetURLTimestamp(), CCharVectorTypeInfo< Char >::GetValueOctetString(), CCharVectorTypeInfo< Char >::GetValueString(), CTL_Connection::GetVersionString(), CODBC_Connection::GetVersionString(), CAlnVec::GetWholeAlnSeqString(), CDataValueTmpl< Type >::GetXmlString(), CBitStringDataValue::GetXmlString(), CIdDataValue::GetXmlString(), grep_or_recurse(), rapidjson::internal::Grisu2(), rapidjson::internal::GrisuRound(), GroupByTest(), handle_option(), rapidjson::internal::i32toa(), rapidjson::internal::i64toa(), CVcfHistogram::Init(), CIdMapperConfig::Initialize(), CNetScheduleServer::InitNodeID(), CSeqMap_I::InsertData(), CVPath::IsLocalFile(), LoadBVDump(), bm::LoadBVector(), CCacheReader::LoadChunk(), CGICacheReader::LoadSeq_idAccVer(), CBDB_SplitTest::LoadSplitStore(), LookupTableOptionsValidate(), main(), rapidjson::MemoryPoolAllocator< BaseAllocator >::Malloc(), CReadBlastApp::match_na(), rapidjson::MemoryPoolAllocator< BaseAllocator >::MemoryPoolAllocator(), CMergeBitsetBlob< BV >::Merge(), CFileCode::ModifiedByUser(), bm::compressed_buffer_collection< BV >::move_buffer(), CTL_RowResult::my_ct_get_data(), NCBI_PARAM_DEF_EX(), NcbiStreamCopyHead(), NS_FormatPreciseTime(), NS_FormatPreciseTimeAsSec(), NST_FormatPreciseTime(), NST_FormatPreciseTimeAsSec(), odbc_get_sqlwchar(), odbc_set_string_flag(), CSeqTextPane::OnCopy(), SUv_Write::OnWrite(), CIStreamBuffer::Open(), CObjectIStream::OpenFromBuffer(), SBlobCopier::operator()(), SNetScheduleNotificationReceiver::operator()(), operator<<(), ordin(), CMultiSourceOStreamBuf::overflow(), CReadBlastApp::overlaps(), CReadBlastApp::overlaps_prot_na(), CFlatFileParser::Parse(), xml::event_parser::parse_stream(), XSDParser::ParseTypeDefinition(), pcre2_get_error_message(), pcre2_substitute(), pcre2_substring_copy_byname(), pcre2_substring_copy_bynumber(), CAlnVecPrinter::PopsetStyle(), CPythonDiagHandler::Post(), rapidjson::internal::Prettify(), SNSNotificationAttributes::Print(), CNSNotificationList::Print(), CNSClient::Print(), xml::error_messages::print(), PrintBLOB_Table(), PrintDemoDB(), xml::impl::printf2string(), CAlignFormatUtil::PrintKAParameters(), process_command(), process_data(), process_pattern(), CReadBlastApp::ProcessCDD(), CNetCacheBlobFetchApp::ProcessRequest(), NSnpGui::PValueToString(), rapidjson::BasicIStreamWrapper< StreamType >::Read(), CMMapByteSourceReader::Read(), CStreamByteSourceReader::Read(), CIRByteSourceReader::Read(), CWriterCopyByteSourceReader::Read(), CMemoryByteSourceReader::Read(), CSubFileByteSourceReader::Read(), CNlmZipBtRdr::Read(), CResultZBtSrcX::Read(), AsnMemoryRead::Read(), CBamVDBFile::Read(), SNetStorage_NetCacheBlob::Read(), SNetStorageObjectRPC::Read(), CNlmZipReader::Read(), SNetStorage_NetCacheBlob::SIState::Read(), CNetStorageObject::Read(), CSQLITE_Blob::Read(), read_one_line(), read_pattern_file(), CBamVDBFile::ReadAll(), ReadAsn(), CObjectIStreamAsnBinary::ReadBytes(), CNCBlobStorage::ReadChunkData(), CNetCacheAPI::ReadData(), CVariantInfoFunctions::ReadDelayedVariant(), CObjectIStreamAsn::ReadDouble(), CObjectIStreamAsnBinary::ReadDouble(), CVDBCursor::ReadElements(), CBamVDBFile::ReadExactly(), CTL_RowResult::ReadItem(), CTL_CursorResultExpl::ReadItem(), CODBC_RowResult::ReadItem(), CODBC_CursorResult::ReadItem(), CDB_Result::ReadItem(), CMemberInfoFunctions::ReadLongMember(), COctetStringTypeInfo::ReadOctetString(), ReadOctetString(), CObjectIStreamAsnBinary::ReadPackedString(), CNetCacheAPI::ReadPart(), CReadBlastApp::ReadPreviousAcc(), CBDB_BLobFile::ReadRealloc(), CBDB_BvStore< TBV >::ReadRealloc(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::ReadRealloc(), CObjectIStreamAsnBinary::ReadStringValue(), ReadThroughFile(), SNgHttp2_Session::Recv(), NDirectNetStorageImpl::CObj::Relocate(), RemoteFetchLongNucleotideBioseq(), CAsnElementPrimitive::RenderValue(), rapidjson::BasicIStreamAsyncWrapper< StreamType >::RequestData(), SUv_Write::Reset(), CUTTPWriter::Reset(), CODBC_RPCCmd::Result(), CSeqDB::RetAmbigSeq(), CSeqDBImpl::RetAmbigSeq(), RetrievePartsOfLargeChromosome(), CBlastSequenceSource::RetSequence(), CSeqDB::RetSequence(), CSeqDBImpl::RetSequence(), CSeqDBDemo_GetSequence::Run(), CTest::Run(), CAsnCacheTestApplication::Run(), CDemoApp::Run(), s_AssignBufferToSeqData(), s_CArgs_ReadFromConsole(), s_CArgs_ReadFromStdin(), s_DefaultPrintHandler(), s_DumpStdStream(), s_FetchRawData(), s_FileContents2String(), s_GetFilteringLocationsForOneContext(), s_GetNuclValuesArray(), s_LoadOptionsToBuffer(), s_ParseDustOptions(), s_ParseSegOptions(), s_PHIScoreBlkFill(), s_Read(), s_ReadData(), s_ReadSocket(), s_Reserve(), s_Tee(), rapidjson::internal::Schema< SchemaDocumentType >::Schema(), SNgHttp2_Session::Send(), SeqDB_SplitString(), CDataFrame< MAX_SIZE >::Serialize(), SerializePauseState(), SERV_Print(), Server_CheckLineMessage(), CMemberInfo::SetDelayBuffer(), CVariantInfo::SetDelayBuffer(), CUTTPReader::SetNewBuffer(), CSeqDBImpl::SetNumberOfThreads(), CSeqMap_I::SetSequence(), CCharVectorTypeInfo< Char >::SetValueOctetString(), CCharVectorTypeInfo< Char >::SetValueString(), CDirectCGIExec::SkipHeader(), sljit_deserialize_compiler(), SQLGetDiagField(), CDirEntry::Stat(), CBDB_MergeStore< BStore >::Store(), CBDB_MergeStoreAsync< BStore >::Store(), CCompressionUtil::StoreUI2(), CCompressionUtil::StoreUI4(), tds_ascii_to_ucs2(), tds_getaddrinfo(), tds_getservice(), tds_goodwrite(), tds_quote(), tds_quote_id(), tds_quote_id_rpc(), tds_quote_string(), tds_vstrbuild(), test_chr21(), test_type(), TestStrSparseVector(), CKMDataNode::TryToGetData(), rapidjson::internal::u32toa(), rapidjson::internal::u64toa(), CReadBlastApp::ugly_simple_overlaps_call(), CFastaTextDisplay::Update(), CChecksum::ValidChecksumLineLong(), CParamParser< TDescription, TParam >::ValueToString(), VCF_des_test(), VDBLogWriter(), VDBSRC_FormatErrorMsg(), CAlnVwrApp::View8(), lmdb::error::what(), AsnMemoryWrite::Write(), CNetStorageObject::Write(), COctetStringSequenceWriter::Write(), COSSWriter::Write(), SUv_Write::Write(), WriteAsn(), CWriter::WriteBytes(), CNCBlobStorage::WriteChunkData(), CObjectOStream::WriteClassMember(), CVariantInfoFunctions::WriteDelayedVariant(), rapidjson::Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, kWriteDefaultFlags >::WriteDouble(), CObjectOStreamAsn::WriteDouble2(), CObjectOStreamAsnBinary::WriteDouble2(), CObjectOStreamJson::WriteDouble2(), CObjectOStreamXml::WriteDouble2(), rapidjson::internal::WriteExponent(), rapidjson::Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, kWriteDefaultFlags >::WriteInt(), rapidjson::Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, kWriteDefaultFlags >::WriteInt64(), CMemberInfoFunctions::WriteLongMember(), rapidjson::Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, kWriteDefaultFlags >::WriteUint(), rapidjson::Writer< OutputStream, UTF8<>, UTF8<>, CrtAllocator, kWriteDefaultFlags >::WriteUint64(), CSeqSearch::x_AddNucleotidePattern(), x_Append2To2(), x_Append8To2(), x_AppendAnyTo2(), x_AppendAnyTo4(), x_AppendAnyTo8(), x_AppendRandomTo2(), CHTMLPage::x_ApplyFilters(), CXmlRetrieveJob::x_ClassMembers(), CQueueDataBase::x_CreateSpaceReserveFile(), CCgiEntryReaderContext::x_DelimitedRead(), CDisplaySeqalign::x_DisplayMpvAnchor(), CDownloadJob::x_Download(), CQueue::x_DumpJobs(), CBuildDatabase::x_DupLocal(), CSimpleBufferT< char >::x_Fill(), CAsnRetrieveJob::x_FillClass(), CSeqDBImpl::x_FillSeqBuffer(), CDensegGraphicDataSource::x_GetAlnStringFromCigar(), CSeqDBVol::x_GetAmbChar(), CSeqDBVol::x_GetAmbigSeq(), CGlVboGeom20::x_GetBufferData(), CSeqDBImpl::x_GetSeqBuffer(), CCrossPanelIR::x_GetSequence(), CSeqDBVol::x_GetSequence(), CODBC_RowResult::x_GetVarLenData(), CODBC_RowResult::x_LoadItem(), CODBC_RowResult::x_MakeItem(), CReadIndexSpeedApp::x_PreReadIndex(), CNSGroupsRegistry::x_PrintOne(), CNSScopeRegistry::x_PrintOne(), CNSAffinityRegistry::x_PrintOne(), CNSScopeRegistry::x_PrintSelected(), CNSClientsRegistry::x_PrintSelected(), CNSAffinityRegistry::x_PrintSelected(), CNSGroupsRegistry::x_PrintSelected(), CWNCTConnectionHandler::x_ProcessAuth(), CNetScheduleHandler::x_ProcessMsgAuth(), CNetScheduleHandler::x_ProcessMsgBatchHeader(), CNetScheduleHandler::x_ProcessMsgBatchJob(), CNetScheduleHandler::x_ProcessMsgBatchSubmit(), CNetScheduleHandler::x_ProcessMsgQueue(), CNetScheduleHandler::x_ProcessMsgRequest(), CWNCTConnectionHandler::x_ProcessQueue(), CNetStorageHandler::x_ProcessRead(), CWNCTConnectionHandler::x_ProcessRequest(), CResultZBtSrcX::x_Read(), CNlmZipReader::x_Read(), CBGZFFile::x_ReadBlock(), CSparseGraph::x_ReadData(), CSparseGraph::x_ReadMap(), CWigGraph::x_ReadSummary(), CNlmZipReader::x_ReadZipHeader(), CXmlValueItem::x_RenderXml(), CSeqDBImpl::x_RetSeqBuffer(), CPubseq2Reader::x_SendPacket(), CId2FetchApp::x_SendRequestPacket(), CGlVboGeom20::x_SetBufferData(), CTL_Connection::x_SetExtraMsg(), CPhiblastTestFixture::x_SetupSequenceBlk(), CSeqDBDemo_Thread::x_UseOID(), CXmlValueItem::x_WriteOctetString(), CXmlValueItem::x_WriteString(), and CODBC_RowResult::xGetData().

◆ c1modlist

c1modstruct c1modlist[]
static
Initial value:
= {
{ "bincode", 'B', -1 },
{ "info", 'I', -1 },
{ "ascii_all", 'a', -1 },
{ "global", 'g', -1 },
{ "caseless", 'i', -1 },
{ "multiline", 'm', -1 },
{ "no_auto_capture", 'n', -1 },
{ "caseless_restrict", 'r', -1 },
{ "dotall", 's', -1 },
{ "extended", 'x', -1 }
}

Definition at line 861 of file pcre2test.c.

Referenced by decode_modifiers(), display_one_modifier(), and display_selected_modifiers().

◆ callout_count

uint32_t callout_count
static

Definition at line 976 of file pcre2test.c.

Referenced by callout_function(), LLVMFuzzerTestOneInput(), and process_data().

◆ cmdlist

cmdstruct cmdlist[]
static
Initial value:
= {
{ "forbid_utf", CMD_FORBID_UTF },
{ "load", CMD_LOAD },
{ "loadtables", CMD_LOADTABLES },
{ "newline_default", CMD_NEWLINE_DEFAULT },
{ "pattern", CMD_PATTERN },
{ "perltest", CMD_PERLTEST },
{ "pop", CMD_POP },
{ "popcopy", CMD_POPCOPY },
{ "save", CMD_SAVE },
{ "subject", CMD_SUBJECT }}
@ CMD_SUBJECT
Definition: pcre2test.c:406
@ CMD_POPCOPY
Definition: pcre2test.c:406
@ CMD_LOAD
Definition: pcre2test.c:405
@ CMD_FORBID_UTF
Definition: pcre2test.c:405
@ CMD_SAVE
Definition: pcre2test.c:406
@ CMD_POP
Definition: pcre2test.c:406
@ CMD_PERLTEST
Definition: pcre2test.c:406
@ CMD_PATTERN
Definition: pcre2test.c:406
@ CMD_LOADTABLES
Definition: pcre2test.c:405
@ CMD_NEWLINE_DEFAULT
Definition: pcre2test.c:405

Definition at line 409 of file pcre2test.c.

Referenced by process_command().

◆ code_unit_size

uint32_t code_unit_size
static

◆ convertlist

convertstruct convertlist[]
static
Initial value:
= {
{ "glob", PCRE2_CONVERT_GLOB },
{ "glob_no_starstar", PCRE2_CONVERT_GLOB_NO_STARSTAR },
{ "glob_no_wild_separator", PCRE2_CONVERT_GLOB_NO_WILD_SEPARATOR },
{ "posix_basic", PCRE2_CONVERT_POSIX_BASIC },
{ "posix_extended", PCRE2_CONVERT_POSIX_EXTENDED },
{ "unset", UINT32_MAX }}
#define PCRE2_CONVERT_POSIX_BASIC
Definition: pcre2.h:206
#define PCRE2_CONVERT_POSIX_EXTENDED
Definition: pcre2.h:207
#define PCRE2_CONVERT_GLOB_NO_STARSTAR
Definition: pcre2.h:210
#define PCRE2_CONVERT_GLOB
Definition: pcre2.h:208
#define PCRE2_CONVERT_GLOB_NO_WILD_SEPARATOR
Definition: pcre2.h:209
#define UINT32_MAX
Definition: stdint.h:188

Definition at line 438 of file pcre2test.c.

Referenced by decode_modifiers().

◆ coptlist

coptstruct coptlist[]
static
Initial value:
= {
{ "backslash-C", CONF_FIX, 1 },
{ "ebcdic", CONF_FIX, 0 },
{ "ebcdic-nl", CONF_FIZ, 0 },
{ "linksize", CONF_INT, PCRE2_CONFIG_LINKSIZE },
{ "newline", CONF_NL, PCRE2_CONFIG_NEWLINE },
{ "pcre2-16", CONF_FIX, 0 },
{ "pcre2-32", CONF_FIX, 0 },
{ "pcre2-8", CONF_FIX, 0 },
}
#define PCRE2_CONFIG_NEWLINE
Definition: pcre2.h:456
#define PCRE2_CONFIG_UNICODE
Definition: pcre2.h:461
#define PCRE2_CONFIG_BSR
Definition: pcre2.h:451
#define PCRE2_CONFIG_LINKSIZE
Definition: pcre2.h:454
#define PCRE2_CONFIG_JIT
Definition: pcre2.h:452
@ CONF_FIZ
Definition: pcre2test.c:921
@ CONF_NL
Definition: pcre2test.c:923
@ CONF_BSR
Definition: pcre2test.c:919
@ CONF_FIX
Definition: pcre2test.c:920
@ CONF_INT
Definition: pcre2test.c:922

Definition at line 926 of file pcre2test.c.

Referenced by c_option().

◆ dat_datctl

datctl dat_datctl
static

◆ dbuffer

uint8_t* dbuffer = NULL
static

Definition at line 1022 of file pcre2test.c.

Referenced by main(), and process_data().

◆ dbuffer_size

size_t dbuffer_size = 1u << 14
static

Definition at line 1021 of file pcre2test.c.

Referenced by process_data().

◆ def_datctl

datctl def_datctl
static

Definition at line 987 of file pcre2test.c.

Referenced by main(), process_command(), and process_data().

◆ def_patctl

patctl def_patctl
static

Definition at line 985 of file pcre2test.c.

Referenced by main(), process_command(), and process_pattern().

◆ dfa_matched

uint32_t dfa_matched
static

Definition at line 972 of file pcre2test.c.

Referenced by check_match_limit(), main(), and process_data().

◆ dfa_workspace

int* dfa_workspace = NULL
static

Definition at line 1001 of file pcre2test.c.

Referenced by check_match_limit(), LLVMFuzzerTestOneInput(), main(), and process_data().

◆ exclusive_dat_controls

uint32_t exclusive_dat_controls[]
static
Initial value:
= {
0x00000008u | 0x10000000u ,
0x00000800u | 0x00400000u ,
0x00001000u | 0x00400000u }

Definition at line 844 of file pcre2test.c.

Referenced by process_data().

◆ exclusive_pat_controls

uint32_t exclusive_pat_controls[]
static
Initial value:
= {
0x00800000u | 0x02000000u ,
0x00800000u | 0x04000000u ,
0x00800000u | 0x08000000u ,
0x02000000u | 0x04000000u ,
0x02000000u | 0x08000000u ,
0x04000000u | 0x08000000u ,
0x00000400u | 0x00010000u }

Definition at line 832 of file pcre2test.c.

Referenced by process_pattern().

◆ first_callout

BOOL first_callout
static

Definition at line 957 of file pcre2test.c.

Referenced by callout_function(), and process_data().

◆ forbid_utf

uint32_t forbid_utf = 0
static

Definition at line 973 of file pcre2test.c.

Referenced by process_command(), and process_pattern().

◆ infile

FILE* infile
static

◆ jit_stack

PCRE2_JIT_STACK* jit_stack = NULL
static

◆ jit_stack_size

size_t jit_stack_size = 0
static

Definition at line 955 of file pcre2test.c.

Referenced by process_data().

◆ jit_was_used

BOOL jit_was_used
static

Definition at line 958 of file pcre2test.c.

Referenced by jit_callback(), and process_data().

◆ jitrc

int jitrc
static

Definition at line 962 of file pcre2test.c.

Referenced by process_command(), process_pattern(), and show_pattern_info().

◆ jittarget

VERSION_TYPE jittarget[64]
static

Definition at line 981 of file pcre2test.c.

Referenced by main(), and print_jit_target().

◆ last_callout_mark

const void* last_callout_mark
static

Definition at line 953 of file pcre2test.c.

Referenced by callout_function(), and process_data().

◆ loadtables_length

uint32_t loadtables_length = 0
static

Definition at line 1006 of file pcre2test.c.

Referenced by process_command().

◆ local_newline_default

uint16_t local_newline_default = 0
static

Definition at line 979 of file pcre2test.c.

Referenced by process_command(), and process_pattern().

◆ locale_name

uint8_t locale_name[32]
static

Definition at line 1004 of file pcre2test.c.

Referenced by main(), and process_pattern().

◆ locale_tables

const uint8_t* locale_tables = NULL
static

Definition at line 1002 of file pcre2test.c.

Referenced by main(), and process_pattern().

◆ malloclist

void* malloclist[20]
static

Definition at line 993 of file pcre2test.c.

Referenced by my_free(), and my_malloc().

◆ malloclistlength

PCRE2_SIZE malloclistlength[20]
static

Definition at line 994 of file pcre2test.c.

Referenced by my_free(), and my_malloc().

◆ malloclistptr

uint32_t malloclistptr = 0
static

Definition at line 995 of file pcre2test.c.

Referenced by my_free(), and my_malloc().

◆ max_oveccount

uint32_t max_oveccount
static

Definition at line 975 of file pcre2test.c.

Referenced by main(), pcre2_jit_match(), and process_data().

◆ maxcapcount

uint32_t maxcapcount
static

Definition at line 977 of file pcre2test.c.

Referenced by process_data(), and process_pattern().

◆ maxlookbehind

uint32_t maxlookbehind
static

Definition at line 974 of file pcre2test.c.

Referenced by process_pattern(), and show_pattern_info().

◆ modlist

modstruct modlist[]
static

Definition at line 643 of file pcre2test.c.

Referenced by decode_modifiers(), display_selected_modifiers(), and scan_modifiers().

◆ newlines

const char* newlines[]
static
Initial value:
= {
"DEFAULT", "CR", "LF", "CRLF", "ANY", "ANYCRLF", "NUL" }

Definition at line 428 of file pcre2test.c.

Referenced by decode_modifiers(), print_newline_config(), and process_command().

◆ outfile

FILE* outfile
static

◆ pat_patctl

patctl pat_patctl
static

◆ patstack

void* patstack[20]
static

Definition at line 990 of file pcre2test.c.

Referenced by main(), process_command(), and process_pattern().

◆ patstacknext

int patstacknext = 0
static

Definition at line 991 of file pcre2test.c.

Referenced by main(), process_command(), and process_pattern().

◆ pbuffer8

uint8_t* pbuffer8 = NULL
static

◆ pbuffer8_size

size_t pbuffer8_size = 50000
static

◆ restrict_for_perl_test

BOOL restrict_for_perl_test = 0
static

Definition at line 959 of file pcre2test.c.

Referenced by check_modifier(), process_command(), and process_pattern().

◆ show_memory

BOOL show_memory = 0
static

Definition at line 960 of file pcre2test.c.

Referenced by my_free(), my_malloc(), and process_data().

◆ sys_errlist

char* sys_errlist[]
extern

Referenced by strerror().

◆ sys_nerr

int sys_nerr
extern

Referenced by strerror().

◆ tables1

const uint8_t tables1[]
static

Definition at line 2463 of file pcre2test.c.

Referenced by process_pattern().

◆ tables2

const uint8_t tables2[]
static

Definition at line 2636 of file pcre2test.c.

Referenced by process_pattern().

◆ tables3

uint8_t* tables3 = NULL
static

Definition at line 1005 of file pcre2test.c.

Referenced by main(), process_command(), and process_pattern().

◆ test_mode

int test_mode = DEFAULT_TEST_MODE
static

◆ timeit

int timeit = 0
static

Definition at line 964 of file pcre2test.c.

Referenced by main(), and process_pattern().

◆ timeitm

int timeitm = 0
static

Definition at line 965 of file pcre2test.c.

Referenced by main(), and process_data().

◆ total_compile_time

clock_t total_compile_time = 0

Definition at line 967 of file pcre2test.c.

Referenced by main(), and process_pattern().

◆ total_jit_compile_time

clock_t total_jit_compile_time = 0

Definition at line 968 of file pcre2test.c.

Referenced by main(), and process_pattern().

◆ total_match_time

clock_t total_match_time = 0

Definition at line 969 of file pcre2test.c.

Referenced by main(), and process_data().

◆ use_tables

const uint8_t* use_tables = NULL
static

Definition at line 1003 of file pcre2test.c.

Referenced by process_pattern().

◆ uversion

VERSION_TYPE uversion[64]
static

Definition at line 983 of file pcre2test.c.

Referenced by main(), and print_unicode_version().

◆ version

VERSION_TYPE version[64]
static

Definition at line 982 of file pcre2test.c.

Referenced by main(), and print_version().

Modified on Fri Sep 20 14:58:24 2024 by modify_doxy.py rev. 669887