/[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 1525 by ph10, Tue Feb 3 18:07:34 2015 UTC revision 1526 by ph10, Fri Feb 20 10:51:07 2015 UTC
# Line 2257  if (callout_extra) Line 2257  if (callout_extra)
2257    fprintf(f, "Callout %d: last capture = %d\n",    fprintf(f, "Callout %d: last capture = %d\n",
2258      cb->callout_number, cb->capture_last);      cb->callout_number, cb->capture_last);
2259    
2260    for (i = 0; i < cb->capture_top * 2; i += 2)    if (cb->offset_vector != NULL)
2261      {      {
2262      if (cb->offset_vector[i] < 0)      for (i = 0; i < cb->capture_top * 2; i += 2)
       fprintf(f, "%2d: <unset>\n", i/2);  
     else  
2263        {        {
2264        fprintf(f, "%2d: ", i/2);        if (cb->offset_vector[i] < 0)
2265        PCHARSV(cb->subject, cb->offset_vector[i],          fprintf(f, "%2d: <unset>\n", i/2);
2266          cb->offset_vector[i+1] - cb->offset_vector[i], f);        else
2267        fprintf(f, "\n");          {
2268            fprintf(f, "%2d: ", i/2);
2269            PCHARSV(cb->subject, cb->offset_vector[i],
2270              cb->offset_vector[i+1] - cb->offset_vector[i], f);
2271            fprintf(f, "\n");
2272            }
2273        }        }
2274      }      }
2275    }    }
2276    
2277  /* Re-print the subject in canonical form, the first time or if giving full  /* Re-print the subject in canonical form, the first time or if giving full
# Line 2519  re->name_entry_size = swap_uint16(re->na Line 2522  re->name_entry_size = swap_uint16(re->na
2522  re->name_count = swap_uint16(re->name_count);  re->name_count = swap_uint16(re->name_count);
2523  re->ref_count = swap_uint16(re->ref_count);  re->ref_count = swap_uint16(re->ref_count);
2524    
2525  if (extra != NULL)  if (extra != NULL && (extra->flags & PCRE_EXTRA_STUDY_DATA) != 0)
2526    {    {
2527    pcre_study_data *rsd = (pcre_study_data *)(extra->study_data);    pcre_study_data *rsd = (pcre_study_data *)(extra->study_data);
2528    rsd->size = swap_uint32(rsd->size);    rsd->size = swap_uint32(rsd->size);
# Line 2700  re->name_entry_size = swap_uint16(re->na Line 2703  re->name_entry_size = swap_uint16(re->na
2703  re->name_count = swap_uint16(re->name_count);  re->name_count = swap_uint16(re->name_count);
2704  re->ref_count = swap_uint16(re->ref_count);  re->ref_count = swap_uint16(re->ref_count);
2705    
2706  if (extra != NULL)  if (extra != NULL && (extra->flags & PCRE_EXTRA_STUDY_DATA) != 0)
2707    {    {
2708    pcre_study_data *rsd = (pcre_study_data *)(extra->study_data);    pcre_study_data *rsd = (pcre_study_data *)(extra->study_data);
2709    rsd->size = swap_uint32(rsd->size);    rsd->size = swap_uint32(rsd->size);

Legend:
Removed from v.1525  
changed lines
  Added in v.1526

  ViewVC Help
Powered by ViewVC 1.1.5