/[pcre]/code/branches/pcre16/pcretest.c
ViewVC logotype

Diff of /code/branches/pcre16/pcretest.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 6 by nigel, Sat Feb 24 21:38:01 2007 UTC revision 7 by nigel, Sat Feb 24 21:38:09 2007 UTC
# Line 30  static int log_store = 0; Line 30  static int log_store = 0;
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    "*", "*?", "+", "+?", "?", "??", "{", "{", "{",    "*", "*?", "+", "+?", "?", "??", "{", "{", "{",
# Line 327  for (;;) Line 328  for (;;)
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;
# Line 661  for (;;) Line 662  for (;;)
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':
# Line 694  for (;;) Line 695  for (;;)
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)

Legend:
Removed from v.6  
changed lines
  Added in v.7

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12