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

Diff of /code/trunk/pcre_exec.c

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

revision 529 by ph10, Mon May 31 17:28:08 2010 UTC revision 530 by ph10, Tue Jun 1 13:42:06 2010 UTC
# Line 794  for (;;) Line 794  for (;;)
794        save_capture_last = md->capture_last;        save_capture_last = md->capture_last;
795    
796        DPRINTF(("saving %d %d %d\n", save_offset1, save_offset2, save_offset3));        DPRINTF(("saving %d %d %d\n", save_offset1, save_offset2, save_offset3));
797        md->offset_vector[md->offset_end - number] = eptr - md->start_subject;        md->offset_vector[md->offset_end - number] =
798            (int)(eptr - md->start_subject);
799    
800        flags = (op == OP_SCBRA)? match_cbegroup : 0;        flags = (op == OP_SCBRA)? match_cbegroup : 0;
801        do        do
# Line 889  for (;;) Line 890  for (;;)
890          cb.callout_number   = ecode[LINK_SIZE+2];          cb.callout_number   = ecode[LINK_SIZE+2];
891          cb.offset_vector    = md->offset_vector;          cb.offset_vector    = md->offset_vector;
892          cb.subject          = (PCRE_SPTR)md->start_subject;          cb.subject          = (PCRE_SPTR)md->start_subject;
893          cb.subject_length   = md->end_subject - md->start_subject;          cb.subject_length   = (int)(md->end_subject - md->start_subject);
894          cb.start_match      = mstart - md->start_subject;          cb.start_match      = (int)(mstart - md->start_subject);
895          cb.current_position = eptr - md->start_subject;          cb.current_position = (int)(eptr - md->start_subject);
896          cb.pattern_position = GET(ecode, LINK_SIZE + 3);          cb.pattern_position = GET(ecode, LINK_SIZE + 3);
897          cb.next_item_length = GET(ecode, 3 + 2*LINK_SIZE);          cb.next_item_length = GET(ecode, 3 + 2*LINK_SIZE);
898          cb.capture_top      = offset_top/2;          cb.capture_top      = offset_top/2;
# Line 1117  for (;;) Line 1118  for (;;)
1118        {        {
1119        md->offset_vector[offset] =        md->offset_vector[offset] =
1120          md->offset_vector[md->offset_end - number];          md->offset_vector[md->offset_end - number];
1121        md->offset_vector[offset+1] = eptr - md->start_subject;        md->offset_vector[offset+1] = (int)(eptr - md->start_subject);
1122        if (offset_top <= offset) offset_top = offset + 2;        if (offset_top <= offset) offset_top = offset + 2;
1123        }        }
1124      ecode += 3;      ecode += 3;
# Line 1280  for (;;) Line 1281  for (;;)
1281        cb.callout_number   = ecode[1];        cb.callout_number   = ecode[1];
1282        cb.offset_vector    = md->offset_vector;        cb.offset_vector    = md->offset_vector;
1283        cb.subject          = (PCRE_SPTR)md->start_subject;        cb.subject          = (PCRE_SPTR)md->start_subject;
1284        cb.subject_length   = md->end_subject - md->start_subject;        cb.subject_length   = (int)(md->end_subject - md->start_subject);
1285        cb.start_match      = mstart - md->start_subject;        cb.start_match      = (int)(mstart - md->start_subject);
1286        cb.current_position = eptr - md->start_subject;        cb.current_position = (int)(eptr - md->start_subject);
1287        cb.pattern_position = GET(ecode, 2);        cb.pattern_position = GET(ecode, 2);
1288        cb.next_item_length = GET(ecode, 2 + LINK_SIZE);        cb.next_item_length = GET(ecode, 2 + LINK_SIZE);
1289        cb.capture_top      = offset_top/2;        cb.capture_top      = offset_top/2;
# Line 1559  for (;;) Line 1560  for (;;)
1560          {          {
1561          md->offset_vector[offset] =          md->offset_vector[offset] =
1562            md->offset_vector[md->offset_end - number];            md->offset_vector[md->offset_end - number];
1563          md->offset_vector[offset+1] = eptr - md->start_subject;          md->offset_vector[offset+1] = (int)(eptr - md->start_subject);
1564          if (offset_top <= offset) offset_top = offset + 2;          if (offset_top <= offset) offset_top = offset + 2;
1565          }          }
1566    
# Line 2233  for (;;) Line 2234  for (;;)
2234        referenced subpattern. */        referenced subpattern. */
2235    
2236        if (offset >= offset_top || md->offset_vector[offset] < 0)        if (offset >= offset_top || md->offset_vector[offset] < 0)
2237          length = (md->jscript_compat)? 0 : md->end_subject - eptr + 1;          length = (md->jscript_compat)? 0 : (int)(md->end_subject - eptr + 1);
2238        else        else
2239          length = md->offset_vector[offset+1] - md->offset_vector[offset];          length = md->offset_vector[offset+1] - md->offset_vector[offset];
2240    
# Line 6176  if (rc == MATCH_MATCH || rc == MATCH_ACC Line 6177  if (rc == MATCH_MATCH || rc == MATCH_ACC
6177    
6178    if (offsetcount < 2) rc = 0; else    if (offsetcount < 2) rc = 0; else
6179      {      {
6180      offsets[0] = md->start_match_ptr - md->start_subject;      offsets[0] = (int)(md->start_match_ptr - md->start_subject);
6181      offsets[1] = md->end_match_ptr - md->start_subject;      offsets[1] = (int)(md->end_match_ptr - md->start_subject);
6182      }      }
6183    
6184    DPRINTF((">>>> returning %d\n", rc));    DPRINTF((">>>> returning %d\n", rc));
# Line 6209  if (start_partial != NULL) Line 6210  if (start_partial != NULL)
6210    md->mark = NULL;    md->mark = NULL;
6211    if (offsetcount > 1)    if (offsetcount > 1)
6212      {      {
6213      offsets[0] = start_partial - (USPTR)subject;      offsets[0] = (int)(start_partial - (USPTR)subject);
6214      offsets[1] = end_subject - (USPTR)subject;      offsets[1] = (int)(end_subject - (USPTR)subject);
6215      }      }
6216    rc = PCRE_ERROR_PARTIAL;    rc = PCRE_ERROR_PARTIAL;
6217    }    }

Legend:
Removed from v.529  
changed lines
  Added in v.530

  ViewVC Help
Powered by ViewVC 1.1.5