30 |
/* Debugging function to print the internal form of the regex. This is the same |
/* Debugging function to print the internal form of the regex. This is the same |
31 |
code as contained in pcre.c under the DEBUG macro. */ |
code as contained in pcre.c under the DEBUG macro. */ |
32 |
|
|
33 |
static char *OP_names[] = { "End", "\\A", "\\B", "\\b", "\\D", "\\d", |
static const char *OP_names[] = { |
34 |
|
"End", "\\A", "\\B", "\\b", "\\D", "\\d", |
35 |
"\\S", "\\s", "\\W", "\\w", "Cut", "\\Z", "^", "$", "Any", "chars", |
"\\S", "\\s", "\\W", "\\w", "Cut", "\\Z", "^", "$", "Any", "chars", |
36 |
"not", |
"not", |
37 |
"*", "*?", "+", "+?", "?", "??", "{", "{", "{", |
"*", "*?", "+", "+?", "?", "??", "{", "{", "{", |
328 |
pcre *re = NULL; |
pcre *re = NULL; |
329 |
pcre_extra *extra = NULL; |
pcre_extra *extra = NULL; |
330 |
regex_t preg; |
regex_t preg; |
331 |
char *error; |
const char *error; |
332 |
unsigned char *p, *pp; |
unsigned char *p, *pp; |
333 |
int do_study = 0; |
int do_study = 0; |
334 |
int do_debug = 0; |
int do_debug = 0; |
662 |
|
|
663 |
case 'O': |
case 'O': |
664 |
while(isdigit(*p)) n = n * 10 + *p++ - '0'; |
while(isdigit(*p)) n = n * 10 + *p++ - '0'; |
665 |
if (n <= sizeof(offsets)/sizeof(int)) size_offsets = n; |
if (n <= (int)sizeof(offsets)/sizeof(int)) size_offsets = n; |
666 |
continue; |
continue; |
667 |
|
|
668 |
case 'Z': |
case 'Z': |
695 |
} |
} |
696 |
else |
else |
697 |
{ |
{ |
698 |
int i; |
size_t i; |
699 |
for (i = 0; i < sizeof(pmatch)/sizeof(regmatch_t); i++) |
for (i = 0; i < sizeof(pmatch)/sizeof(regmatch_t); i++) |
700 |
{ |
{ |
701 |
if (pmatch[i].rm_so >= 0) |
if (pmatch[i].rm_so >= 0) |