/[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 895 by ph10, Fri Jan 20 12:12:03 2012 UTC revision 914 by zherczeg, Mon Feb 13 06:04:50 2012 UTC
# Line 105  input mode under Windows. */ Line 105  input mode under Windows. */
105  #define OUTPUT_MODE  "wb"  #define OUTPUT_MODE  "wb"
106  #endif  #endif
107    
108    #define PRIV(name) name
109    
110  /* We have to include pcre_internal.h because we need the internal info for  /* We have to include pcre_internal.h because we need the internal info for
111  displaying the results of pcre_study() and we also need to know about the  displaying the results of pcre_study() and we also need to know about the
# Line 141  to keep two copies, we include the sourc Line 142  to keep two copies, we include the sourc
142  external symbols to prevent clashes. */  external symbols to prevent clashes. */
143    
144  #define PCRE_INCLUDED  #define PCRE_INCLUDED
 #undef PRIV  
 #define PRIV(name) name  
145    
146  #include "pcre_tables.c"  #include "pcre_tables.c"
147    
# Line 1271  pcre_uint8 *here = start; Line 1270  pcre_uint8 *here = start;
1270    
1271  for (;;)  for (;;)
1272    {    {
1273    int rlen = (int)(buffer_size - (here - buffer));    size_t rlen = (size_t)(buffer_size - (here - buffer));
1274    
1275    if (rlen > 1000)    if (rlen > 1000)
1276      {      {
# Line 2240  while (argc > 1 && argv[op][0] == '-') Line 2239  while (argc > 1 && argv[op][0] == '-')
2239    else if (strcmp(argv[op], "-s+") == 0)    else if (strcmp(argv[op], "-s+") == 0)
2240      {      {
2241      force_study = 1;      force_study = 1;
2242      force_study_options = PCRE_STUDY_JIT_COMPILE;      force_study_options = PCRE_STUDY_JIT_COMPILE
2243                            | PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE
2244                            | PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE;
2245      }      }
2246    else if (strcmp(argv[op], "-16") == 0)    else if (strcmp(argv[op], "-16") == 0)
2247      {      {
# Line 2412  are set, either both UTFs are supported Line 2413  are set, either both UTFs are supported
2413      if (rc)      if (rc)
2414        {        {
2415        const char *arch;        const char *arch;
2416        (void)PCRE_CONFIG(PCRE_CONFIG_JITTARGET, &arch);        (void)PCRE_CONFIG(PCRE_CONFIG_JITTARGET, (void *)(&arch));
2417        printf("  Just-in-time compiler support: %s\n", arch);        printf("  Just-in-time compiler support: %s\n", arch);
2418        }        }
2419      else      else
2420        printf("  No just-in-time compiler support\n");        printf("  No just-in-time compiler support\n");
2421      (void)PCRE_CONFIG(PCRE_CONFIG_NEWLINE, &rc);      (void)PCRE_CONFIG(PCRE_CONFIG_NEWLINE, &rc);
# Line 2438  are set, either both UTFs are supported Line 2439  are set, either both UTFs are supported
2439      (void)PCRE_CONFIG(PCRE_CONFIG_STACKRECURSE, &rc);      (void)PCRE_CONFIG(PCRE_CONFIG_STACKRECURSE, &rc);
2440      printf("  Match recursion uses %s", rc? "stack" : "heap");      printf("  Match recursion uses %s", rc? "stack" : "heap");
2441      if (showstore)      if (showstore)
2442        {        {
2443        PCRE_EXEC(stack_size, NULL, NULL, NULL, -1, -1, 0, NULL, 0);        PCRE_EXEC(stack_size, NULL, NULL, NULL, -999, -999, 0, NULL, 0);
2444        printf(": %sframe size = %d bytes", rc? "approximate " : "", -stack_size);        printf(": %sframe size = %d bytes", rc? "approximate " : "", -stack_size);
2445        }        }
2446      printf("\n");      printf("\n");
2447      goto EXIT;      goto EXIT;
2448      }      }
2449    else if (strcmp(argv[op], "-help") == 0 ||    else if (strcmp(argv[op], "-help") == 0 ||
# Line 2769  while (!done) Line 2770  while (!done)
2770          do_study = 1;          do_study = 1;
2771          if (*pp == '+')          if (*pp == '+')
2772            {            {
2773            study_options |= PCRE_STUDY_JIT_COMPILE;            study_options |= PCRE_STUDY_JIT_COMPILE
2774                            | PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE
2775                            | PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE;
2776            pp++;            pp++;
2777            }            }
2778          }          }
# Line 3385  while (!done) Line 3388  while (!done)
3388      cn16ptr = copynames;      cn16ptr = copynames;
3389      gn16ptr = getnames;      gn16ptr = getnames;
3390  #endif  #endif
3391  #ifdef SUPPORT_PCRE8  #ifdef SUPPORT_PCRE8
3392      cn8ptr = copynames8;      cn8ptr = copynames8;
3393      gn8ptr = getnames8;      gn8ptr = getnames8;
3394  #endif  #endif
3395    
3396      SET_PCRE_CALLOUT(callout);      SET_PCRE_CALLOUT(callout);
3397      first_callout = 1;      first_callout = 1;
# Line 3483  while (!done) Line 3486  while (!done)
3486              {              {
3487              if (++i == 9)              if (++i == 9)
3488                fprintf(outfile, "** Too many hex digits in \\x{...} item; "                fprintf(outfile, "** Too many hex digits in \\x{...} item; "
3489                                 "using only the first eight.\n");                                 "using only the first eight.\n");
3490              else c = c * 16 + tolower(*pt) - ((isdigit(*pt))? '0' : 'a' - 10);              else c = c * 16 + tolower(*pt) - ((isdigit(*pt))? '0' : 'a' - 10);
3491              }              }
3492            if (*pt == '}')            if (*pt == '}')
3493              {              {
3494              p = pt + 1;              p = pt + 1;
# Line 4293  while (!done) Line 4296  while (!done)
4296              break;              break;
4297    
4298              default:              default:
4299              if (count < 0 && (-count) < sizeof(errtexts)/sizeof(const char *))              if (count < 0 &&
4300                    (-count) < (int)(sizeof(errtexts)/sizeof(const char *)))
4301                fprintf(outfile, "Error %d (%s)\n", count, errtexts[-count]);                fprintf(outfile, "Error %d (%s)\n", count, errtexts[-count]);
4302              else              else
4303                fprintf(outfile, "Error %d (Unexpected value)\n", count);                fprintf(outfile, "Error %d (Unexpected value)\n", count);

Legend:
Removed from v.895  
changed lines
  Added in v.914

  ViewVC Help
Powered by ViewVC 1.1.5