/[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 779 by ph10, Thu Dec 1 10:35:30 2011 UTC revision 780 by ph10, Fri Dec 2 11:39:21 2011 UTC
# Line 1854  while (!done) Line 1854  while (!done)
1854      new_info(re, NULL, PCRE_INFO_OPTIONS, &get_options);      new_info(re, NULL, PCRE_INFO_OPTIONS, &get_options);
1855      if ((get_options & PCRE_UTF8) != 0) use_utf8 = 1;      if ((get_options & PCRE_UTF8) != 0) use_utf8 = 1;
1856    
1857      /* Print information if required. There are now two info-returning      /* Extract the size for possible writing before possibly flipping it,
1858      functions. The old one has a limited interface and returns only limited      and remember the store that was got. */
1859      data. Check that it agrees with the newer one. */  
1860        true_size = ((real_pcre *)re)->size;
1861        regex_gotten_store = first_gotten_store;
1862    
1863        /* Output code size information if requested */
1864    
1865      if (log_store)      if (log_store)
1866        fprintf(outfile, "Memory allocation (code space): %d\n",        fprintf(outfile, "Memory allocation (code space): %d\n",
# Line 1864  while (!done) Line 1868  while (!done)
1868                sizeof(real_pcre) -                sizeof(real_pcre) -
1869                ((real_pcre *)re)->name_count * ((real_pcre *)re)->name_entry_size));                ((real_pcre *)re)->name_count * ((real_pcre *)re)->name_entry_size));
1870    
     /* Extract the size for possible writing before possibly flipping it,  
     and remember the store that was got. */  
   
     true_size = ((real_pcre *)re)->size;  
     regex_gotten_store = first_gotten_store;  
   
1871      /* If -s or /S was present, study the regex to generate additional info to      /* If -s or /S was present, study the regex to generate additional info to
1872      help with the matching, unless the pattern has the SS option, which      help with the matching, unless the pattern has the SS option, which
1873      suppresses the effect of /S (used for a few test patterns where studying is      suppresses the effect of /S (used for a few test patterns where studying is
# Line 1894  while (!done) Line 1892  while (!done)
1892        if (error != NULL)        if (error != NULL)
1893          fprintf(outfile, "Failed to study: %s\n", error);          fprintf(outfile, "Failed to study: %s\n", error);
1894        else if (extra != NULL)        else if (extra != NULL)
1895            {
1896          true_study_size = ((pcre_study_data *)(extra->study_data))->size;          true_study_size = ((pcre_study_data *)(extra->study_data))->size;
1897            if (log_store)
1898              {
1899              size_t jitsize;
1900              new_info(re, extra, PCRE_INFO_JITSIZE, &jitsize);
1901              if (jitsize != 0)
1902                fprintf(outfile, "Memory allocation (JIT code): %d\n", jitsize);
1903              }
1904            }
1905        }        }
1906    
1907      /* If /K was present, we set up for handling MARK data. */      /* If /K was present, we set up for handling MARK data. */
1908    
1909      if (do_mark)      if (do_mark)
# Line 1947  while (!done) Line 1954  while (!done)
1954          }          }
1955        }        }
1956    
1957      /* Extract information from the compiled data if required */      /* Extract information from the compiled data if required. There are now
1958        two info-returning functions. The old one has a limited interface and
1959        returns only limited data. Check that it agrees with the newer one. */
1960    
1961      SHOW_INFO:      SHOW_INFO:
1962    

Legend:
Removed from v.779  
changed lines
  Added in v.780

  ViewVC Help
Powered by ViewVC 1.1.5