/[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 1079 by chpe, Tue Oct 16 15:55:04 2012 UTC revision 1080 by chpe, Tue Oct 16 15:55:07 2012 UTC
# Line 3757  while (!done) Line 3757  while (!done)
3757      if (do_showinfo)      if (do_showinfo)
3758        {        {
3759        unsigned long int all_options;        unsigned long int all_options;
3760        int count, backrefmax, first_char, need_char, okpartial, jchanged,        pcre_uint32 first_char, need_char;
3761          int count, backrefmax, first_char_set, need_char_set, okpartial, jchanged,
3762          hascrorlf, maxlookbehind;          hascrorlf, maxlookbehind;
3763        int nameentrysize, namecount;        int nameentrysize, namecount;
3764        const pcre_uint8 *nametable;        const pcre_uint8 *nametable;
# Line 3765  while (!done) Line 3766  while (!done)
3766        if (new_info(re, NULL, PCRE_INFO_SIZE, &size) +        if (new_info(re, NULL, PCRE_INFO_SIZE, &size) +
3767            new_info(re, NULL, PCRE_INFO_CAPTURECOUNT, &count) +            new_info(re, NULL, PCRE_INFO_CAPTURECOUNT, &count) +
3768            new_info(re, NULL, PCRE_INFO_BACKREFMAX, &backrefmax) +            new_info(re, NULL, PCRE_INFO_BACKREFMAX, &backrefmax) +
3769            new_info(re, NULL, PCRE_INFO_FIRSTBYTE, &first_char) +            new_info(re, NULL, PCRE_INFO_FIRSTLITERAL, &first_char) +
3770            new_info(re, NULL, PCRE_INFO_LASTLITERAL, &need_char) +            new_info(re, NULL, PCRE_INFO_FIRSTLITERALSET, &first_char_set) +
3771              new_info(re, NULL, PCRE_INFO_LASTLITERAL2, &need_char) +
3772              new_info(re, NULL, PCRE_INFO_LASTLITERAL2SET, &need_char_set) +
3773            new_info(re, NULL, PCRE_INFO_NAMEENTRYSIZE, &nameentrysize) +            new_info(re, NULL, PCRE_INFO_NAMEENTRYSIZE, &nameentrysize) +
3774            new_info(re, NULL, PCRE_INFO_NAMECOUNT, &namecount) +            new_info(re, NULL, PCRE_INFO_NAMECOUNT, &namecount) +
3775            new_info(re, NULL, PCRE_INFO_NAMETABLE, (void *)&nametable) +            new_info(re, NULL, PCRE_INFO_NAMETABLE, (void *)&nametable) +
# Line 3865  while (!done) Line 3868  while (!done)
3868          break;          break;
3869          }          }
3870    
3871        if (first_char == -1)        if (first_char_set == 2)
3872          {          {
3873          fprintf(outfile, "First char at start or follows newline\n");          fprintf(outfile, "First char at start or follows newline\n");
3874          }          }
3875        else if (first_char < 0)        else if (first_char_set == 1)
         {  
         fprintf(outfile, "No first char\n");  
         }  
       else  
3876          {          {
3877          const char *caseless =          const char *caseless =
3878            ((REAL_PCRE_FLAGS(re) & PCRE_FCH_CASELESS) == 0)?            ((REAL_PCRE_FLAGS(re) & PCRE_FCH_CASELESS) == 0)?
# Line 3888  while (!done) Line 3887  while (!done)
3887            fprintf(outfile, "%s\n", caseless);            fprintf(outfile, "%s\n", caseless);
3888            }            }
3889          }          }
3890          else
3891            {
3892            fprintf(outfile, "No first char\n");
3893            }
3894    
3895        if (need_char < 0)        if (need_char_set == 0)
3896          {          {
3897          fprintf(outfile, "No need char\n");          fprintf(outfile, "No need char\n");
3898          }          }

Legend:
Removed from v.1079  
changed lines
  Added in v.1080

  ViewVC Help
Powered by ViewVC 1.1.5