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/pcre2__convert_8c_source.html below:

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

48 #define TYPE_OPTIONS (PCRE2_CONVERT_GLOB| \ 49  PCRE2_CONVERT_POSIX_BASIC|PCRE2_CONVERT_POSIX_EXTENDED) 51 #define ALL_OPTIONS (PCRE2_CONVERT_UTF|PCRE2_CONVERT_NO_UTF_CHECK| \ 52  PCRE2_CONVERT_GLOB_NO_WILD_SEPARATOR| \ 53  PCRE2_CONVERT_GLOB_NO_STARSTAR| \ 56 #define DUMMY_BUFFER_SIZE 100 60 #define STR_BACKSLASH_A STR_BACKSLASH STR_A 61 #define STR_BACKSLASH_z STR_BACKSLASH STR_z 62 #define STR_COLON_RIGHT_SQUARE_BRACKET STR_COLON STR_RIGHT_SQUARE_BRACKET 63 #define STR_DOT_STAR_LOOKBEHIND STR_DOT STR_ASTERISK STR_LEFT_PARENTHESIS STR_QUESTION_MARK STR_LESS_THAN_SIGN STR_EQUALS_SIGN 64 #define STR_LOOKAHEAD_NOT_DOT STR_LEFT_PARENTHESIS STR_QUESTION_MARK STR_EXCLAMATION_MARK STR_BACKSLASH STR_DOT STR_RIGHT_PARENTHESIS 65 #define STR_QUERY_s STR_LEFT_PARENTHESIS STR_QUESTION_MARK STR_s STR_RIGHT_PARENTHESIS 66 #define STR_STAR_NUL STR_LEFT_PARENTHESIS STR_ASTERISK STR_N STR_U STR_L STR_RIGHT_PARENTHESIS 75 #define PUTCHARS(string) \ 77  for (s = (char *)(string); *s != 0; s++) \ 79  if (p >= endp) return PCRE2_ERROR_NOMEMORY; \ 146

*bufflenptr = plength;

160

convlength += p - pp;

161  if

(dummyrun) p = use_buffer;

166 #ifndef SUPPORT_UNICODE 169

GETCHARLENTEST(c, posix, clength);

174

sc = nextisliteral? 0 : c;

175

nextisliteral =

FALSE

;

194  if

(c <= 127 &&

islower

(c))

break

;

218

memcpy(p, posix - clength,

CU2BYTES

(clength));

279  if

(extended) nextisliteral =

TRUE

;

else 285

lastspecial = *p++ = *posix++;

288  else

nextisliteral =

TRUE

;

293  if

(!extended || bracount == 0)

goto

ESCAPE_LITERAL;

306  if

(!extended)

goto

ESCAPE_LITERAL;

329  if

(extended)

goto

COPY_SPECIAL;

346

memcpy(p, posix - clength,

CU2BYTES

(clength));

355

convlength += p - pp;

356

*bufflenptr = convlength;

388 if

(

out

->output <

out

->output_end)

389

*

out

->output++ = chr;

415 while

(--length != 0);

418 out

->output_size = output_size;

478 static const char

*posix_classes =

"alnum:alpha:ascii:blank:cntrl:digit:" 479  "graph:lower:print:punct:space:upper:word:xdigit:"

;

482 const char

*class_ptr;

488  if

(pattern >= pattern_end)

return

0;

492  if

(c < CHAR_a || c >

CHAR_z

)

break

;

495 if

(c !=

CHAR_COLON

|| pattern >= pattern_end ||

499

class_ptr = posix_classes;

504  if

(*class_ptr ==

CHAR_NUL

)

return

0;

524  while

(*class_ptr !=

CHAR_COLON

) class_ptr++;

543 #if PCRE2_CODE_UNIT_WIDTH != 8 594 int len

, class_index;

598 if

(pattern >= pattern_end)

609  if

(pattern >= pattern_end)

649 while

(pattern < pattern_end)

651

char_start = pattern;

658  if

(!is_negative && !no_wildsep && separator_seen)

674  if

(pattern >= pattern_end)

break

;

681  if

(class_index != 0)

690

separator_seen =

TRUE

;

699

char_start = pattern;

702  if

(pattern >= pattern_end)

break

;

704  if

(escape != 0 && c == escape)

706

char_start = pattern;

721  if

(prev_c < separator && separator < c) separator_seen =

TRUE

;

728  if

(escape != 0 && c == escape)

730

char_start = pattern;

733  if

(pattern >= pattern_end)

break

;

744  if

(c == separator) separator_seen =

TRUE

;

809 BOOL

with_escape, is_start, after_separator;

814 #ifdef SUPPORT_UNICODE 815 if

(

utf

&& (separator >= 128 || escape >= 128))

826 out

.output = use_buffer;

827 out

.output_end = use_buffer + use_length;

828 out

.output_size = 0;

842  else if

(!no_starstar && pattern + 1 < pattern_end &&

854 while

(pattern < pattern_end)

860

is_start = pattern == pattern_start + 1;

868  if

(!no_starstar && pattern < pattern_end && *pattern ==

CHAR_ASTERISK

)

870

after_separator = is_start || (pattern[-2] == separator);

872  do

pattern++;

while

(pattern < pattern_end &&

875  if

(pattern >= pattern_end)

881

after_starstar =

TRUE

;

883  if

(after_separator && escape != 0 && *pattern == escape &&

884

pattern + 1 < pattern_end && pattern[1] == separator)

889  if

(*pattern != separator)

continue

;

908  if

(!after_separator || *pattern != separator)

939  do

pattern++;

while

(pattern < pattern_end &&

945  if

(pattern >= pattern_end)

952  if

(is_start)

continue

;

976  if

(pattern >= pattern_end)

994

&

out

,

utf

, separator, with_escape, escape, no_wildsep);

999  if

(escape != 0 && c == escape)

1001  if

(pattern >= pattern_end)

1029  if

(!dummyrun &&

out

.output_size != (

PCRE2_SIZE

) (

out

.output - use_buffer))

1035

*bufflenptr = pattern - pattern_start;

1039

*bufflenptr =

out

.output_size - 1;

1078

(pattype & (~pattype+1)) != pattype ||

1086 if

(ccontext ==

NULL

) ccontext =

1091 #ifndef SUPPORT_UNICODE 1104

*bufflenptr = erroroffset;

1113 if

(buffptr !=

NULL

&& *buffptr !=

NULL

)

1115

use_buffer = *buffptr;

1116

use_length = *bufflenptr;

1122 for

(

i

= 0;

i

< 2;

i

++)

1131

use_buffer, use_length, bufflenptr, dummyrun, ccontext);

1136

rc =

convert_posix

(pattype, pattern, plength,

utf

, use_buffer, use_length,

1137

bufflenptr, dummyrun, ccontext);

1158

use_buffer = *buffptr;

1159

use_length = *bufflenptr + 1;

1181 if

(converted !=

NULL

)

std::ofstream out("events_result.xml")

main entry point for tests

static SQLCHAR output[256]

#define TRUE

bool replacment for C indicating true.

#define FALSE

bool replacment for C indicating false.

#define pcre2_convert_context

#define PCRE2_ZERO_TERMINATED

#define PCRE2_ERROR_BADOPTION

#define PCRE2_ERROR_INTERNAL

#define PCRE2_CONVERT_POSIX_BASIC

#define PCRE2_ERROR_UNICODE_NOT_SUPPORTED

#define PCRE2_CONVERT_POSIX_EXTENDED

#define PCRE2_CONVERT_GLOB_NO_STARSTAR

#define PCRE2_CONVERT_NO_UTF_CHECK

#define PCRE2_ERROR_CONVERT_SYNTAX

#define PCRE2_ERROR_END_BACKSLASH

#define PCRE2_CALL_CONVENTION

#define PCRE2_CONVERT_UTF

#define PCRE2_CONVERT_GLOB

#define PCRE2_CONVERT_GLOB_NO_WILD_SEPARATOR

#define PCRE2_ERROR_NOMEMORY

#define PCRE2_ERROR_MISSING_SQUARE_BRACKET

struct pcre2_output_context pcre2_output_context

static int convert_glob(uint32_t options, PCRE2_SPTR pattern, PCRE2_SIZE plength, BOOL utf, PCRE2_UCHAR *use_buffer, PCRE2_SIZE use_length, PCRE2_SIZE *bufflenptr, BOOL dummyrun, pcre2_convert_context *ccontext)

PCRE2_EXPORT void PCRE2_CALL_CONVENTION pcre2_converted_pattern_free(PCRE2_UCHAR *converted)

static int convert_glob_parse_range(PCRE2_SPTR *from, PCRE2_SPTR pattern_end, pcre2_output_context *out, BOOL utf, PCRE2_UCHAR separator, BOOL with_escape, PCRE2_UCHAR escape, BOOL no_wildsep)

static void convert_glob_write(pcre2_output_context *out, PCRE2_UCHAR chr)

@ POSIX_CLASS_NOT_STARTED

static int convert_posix(uint32_t pattype, PCRE2_SPTR pattern, PCRE2_SIZE plength, BOOL utf, PCRE2_UCHAR *use_buffer, PCRE2_SIZE use_length, PCRE2_SIZE *bufflenptr, BOOL dummyrun, pcre2_convert_context *ccontext)

static void convert_glob_print_commit(pcre2_output_context *out)

#define STR_COLON_RIGHT_SQUARE_BRACKET

#define DUMMY_BUFFER_SIZE

static int convert_glob_parse_class(PCRE2_SPTR *from, PCRE2_SPTR pattern_end, pcre2_output_context *out)

static BOOL convert_glob_char_in_class(int class_index, PCRE2_UCHAR c)

static const char * pcre2_escaped_literals

static void convert_glob_write_str(pcre2_output_context *out, PCRE2_SIZE length)

static void convert_glob_print_separator(pcre2_output_context *out, PCRE2_UCHAR separator, BOOL with_escape)

PCRE2_EXPORT int PCRE2_CALL_CONVENTION pcre2_pattern_convert(PCRE2_SPTR pattern, PCRE2_SIZE plength, uint32_t options, PCRE2_UCHAR **buffptr, PCRE2_SIZE *bufflenptr, pcre2_convert_context *ccontext)

static const char * posix_meta_escapes

static void convert_glob_print_wildcard(pcre2_output_context *out, PCRE2_UCHAR separator, BOOL with_escape)

#define PCRE2_CODE_UNIT_WIDTH

#define CHAR_LESS_THAN_SIGN

struct pcre2_memctl pcre2_memctl

#define STR_RIGHT_PARENTHESIS

#define CHAR_VERTICAL_LINE

#define STR_LEFT_CURLY_BRACKET

#define CHAR_LEFT_SQUARE_BRACKET

#define CHAR_QUESTION_MARK

#define STR_QUESTION_MARK

#define STR_LEFT_SQUARE_BRACKET

#define CHAR_EXCLAMATION_MARK

#define STR_RIGHT_CURLY_BRACKET

#define CHAR_RIGHT_PARENTHESIS

#define STR_RIGHT_SQUARE_BRACKET

#define CHAR_RIGHT_SQUARE_BRACKET

#define CHAR_RIGHT_CURLY_BRACKET

#define CHAR_LEFT_PARENTHESIS

#define CHAR_CIRCUMFLEX_ACCENT

#define STR_CIRCUMFLEX_ACCENT

#define CHAR_LEFT_CURLY_BRACKET

#define STR_LEFT_PARENTHESIS

#define CHAR_GREATER_THAN_SIGN

#define STR_VERTICAL_LINE

#define GETCHARINCTEST(c, eptr)

int valid_utf(PCRE2_SPTR8, PCRE2_SIZE, PCRE2_SIZE *)

void(* free)(void *, void *)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4