/[pcre]/code/trunk/pcretest.c
ViewVC logotype

Diff of /code/trunk/pcretest.c

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

revision 510 by ph10, Sat Mar 27 17:45:29 2010 UTC revision 512 by ph10, Tue Mar 30 11:11:52 2010 UTC
# Line 1040  while (!done) Line 1040  while (!done)
1040  #endif  #endif
1041    
1042    const char *error;    const char *error;
1043    unsigned char *markptr;    unsigned char *markptr;
1044    unsigned char *p, *pp, *ppp;    unsigned char *p, *pp, *ppp;
1045    unsigned char *to_file = NULL;    unsigned char *to_file = NULL;
1046    const unsigned char *tables = NULL;    const unsigned char *tables = NULL;
1047    unsigned long int true_size, true_study_size = 0;    unsigned long int true_size, true_study_size = 0;
1048    size_t size, regex_gotten_store;    size_t size, regex_gotten_store;
1049    int do_mark = 0;    int do_mark = 0;
1050    int do_study = 0;    int do_study = 0;
1051    int do_debug = debug;    int do_debug = debug;
1052    int do_G = 0;    int do_G = 0;
# Line 1228  while (!done) Line 1228  while (!done)
1228        case 'G': do_G = 1; break;        case 'G': do_G = 1; break;
1229        case 'I': do_showinfo = 1; break;        case 'I': do_showinfo = 1; break;
1230        case 'J': options |= PCRE_DUPNAMES; break;        case 'J': options |= PCRE_DUPNAMES; break;
1231        case 'K': do_mark = 1; break;        case 'K': do_mark = 1; break;
1232        case 'M': log_store = 1; break;        case 'M': log_store = 1; break;
1233        case 'N': options |= PCRE_NO_AUTO_CAPTURE; break;        case 'N': options |= PCRE_NO_AUTO_CAPTURE; break;
1234    
# Line 1422  while (!done) Line 1422  while (!done)
1422        else if (extra != NULL)        else if (extra != NULL)
1423          true_study_size = ((pcre_study_data *)(extra->study_data))->size;          true_study_size = ((pcre_study_data *)(extra->study_data))->size;
1424        }        }
1425    
1426      /* If /K was present, we set up for handling MARK data. */      /* If /K was present, we set up for handling MARK data. */
1427    
1428      if (do_mark)      if (do_mark)
1429        {        {
1430        if (extra == NULL)        if (extra == NULL)
# Line 1432  while (!done) Line 1432  while (!done)
1432          extra = (pcre_extra *)malloc(sizeof(pcre_extra));          extra = (pcre_extra *)malloc(sizeof(pcre_extra));
1433          extra->flags = 0;          extra->flags = 0;
1434          }          }
1435        extra->mark = &markptr;        extra->mark = &markptr;
1436        extra->flags |= PCRE_EXTRA_MARK;        extra->flags |= PCRE_EXTRA_MARK;
1437        }        }
1438    
1439      /* If the 'F' option was present, we flip the bytes of all the integer      /* If the 'F' option was present, we flip the bytes of all the integer
1440      fields in the regex data block and the study block. This is to make it      fields in the regex data block and the study block. This is to make it
# Line 2161  while (!done) Line 2161  while (!done)
2161    
2162      for (;; gmatched++)    /* Loop for /g or /G */      for (;; gmatched++)    /* Loop for /g or /G */
2163        {        {
2164        markptr = NULL;        markptr = NULL;
2165    
2166        if (timeitm > 0)        if (timeitm > 0)
2167          {          {
2168          register int i;          register int i;
# Line 2307  while (!done) Line 2307  while (!done)
2307                }                }
2308              }              }
2309            }            }
2310    
2311          if (markptr != NULL) fprintf(outfile, "MK: %s\n", markptr);          if (markptr != NULL) fprintf(outfile, "MK: %s\n", markptr);
2312    
2313          for (i = 0; i < 32; i++)          for (i = 0; i < 32; i++)
# Line 2461  while (!done) Line 2461  while (!done)
2461            {            {
2462            if (count == PCRE_ERROR_NOMATCH)            if (count == PCRE_ERROR_NOMATCH)
2463              {              {
2464              if (gmatched == 0)              if (gmatched == 0)
2465                {                {
2466                if (markptr == NULL) fprintf(outfile, "No match\n");                if (markptr == NULL) fprintf(outfile, "No match\n");
2467                  else fprintf(outfile, "No match, mark = %s\n", markptr);                  else fprintf(outfile, "No match, mark = %s\n", markptr);
2468                }                }
2469              }              }
2470            else fprintf(outfile, "Error %d\n", count);            else fprintf(outfile, "Error %d\n", count);
2471            break;  /* Out of the /g loop */            break;  /* Out of the /g loop */

Legend:
Removed from v.510  
changed lines
  Added in v.512

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12