/[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 231 by ph10, Tue Sep 11 11:15:33 2007 UTC revision 294 by ph10, Sat Dec 29 16:55:59 2007 UTC
# Line 43  pattern matching using an NFA algorithm, Line 43  pattern matching using an NFA algorithm,
43  possible. There are also some static supporting functions. */  possible. There are also some static supporting functions. */
44    
45  #ifdef HAVE_CONFIG_H  #ifdef HAVE_CONFIG_H
46  #include <config.h>  #include "config.h"
47  #endif  #endif
48    
49  #define NLBLOCK md             /* Block containing newline information */  #define NLBLOCK md             /* Block containing newline information */
# Line 4246  HEAP_RETURN: Line 4246  HEAP_RETURN:
4246  switch (frame->Xwhere)  switch (frame->Xwhere)
4247    {    {
4248    LBL( 1) LBL( 2) LBL( 3) LBL( 4) LBL( 5) LBL( 6) LBL( 7) LBL( 8)    LBL( 1) LBL( 2) LBL( 3) LBL( 4) LBL( 5) LBL( 6) LBL( 7) LBL( 8)
4249    LBL( 9) LBL(10) LBL(11) LBL(12) LBL(13) LBL(14) LBL(15) LBL(16)    LBL( 9) LBL(10) LBL(11) LBL(12) LBL(13) LBL(14) LBL(15) LBL(17)
4250    LBL(17) LBL(18) LBL(19) LBL(20) LBL(21) LBL(22) LBL(23) LBL(24)    LBL(19) LBL(24) LBL(25) LBL(26) LBL(27) LBL(29) LBL(31) LBL(33)
4251    LBL(25) LBL(26) LBL(27) LBL(28) LBL(29) LBL(30) LBL(31) LBL(32)    LBL(35) LBL(43) LBL(47) LBL(48) LBL(49) LBL(50) LBL(51) LBL(52)
4252    LBL(33) LBL(34) LBL(35) LBL(36) LBL(37) LBL(38) LBL(39) LBL(40)    LBL(53) LBL(54)
4253    LBL(41) LBL(42) LBL(43) LBL(44) LBL(45) LBL(46) LBL(47) LBL(48)  #ifdef SUPPORT_UTF8
4254    LBL(49) LBL(50) LBL(51) LBL(52) LBL(53) LBL(54)    LBL(16) LBL(18) LBL(20) LBL(21) LBL(22) LBL(23) LBL(28) LBL(30)
4255      LBL(32) LBL(34) LBL(42) LBL(46)
4256    #ifdef SUPPORT_UCP
4257      LBL(36) LBL(37) LBL(38) LBL(39) LBL(40) LBL(41) LBL(44) LBL(45)
4258    #endif  /* SUPPORT_UCP */
4259    #endif  /* SUPPORT_UTF8 */
4260    default:    default:
4261    DPRINTF(("jump error in pcre match: label %d non-existent\n", frame->Xwhere));    DPRINTF(("jump error in pcre match: label %d non-existent\n", frame->Xwhere));
4262    return PCRE_ERROR_INTERNAL;    return PCRE_ERROR_INTERNAL;
# Line 4469  switch (options & (PCRE_BSR_ANYCRLF|PCRE Line 4474  switch (options & (PCRE_BSR_ANYCRLF|PCRE
4474    md->bsr_anycrlf = TRUE;    md->bsr_anycrlf = TRUE;
4475  #else  #else
4476    md->bsr_anycrlf = FALSE;    md->bsr_anycrlf = FALSE;
4477  #endif  #endif
4478    break;    break;
4479    
4480    case PCRE_BSR_ANYCRLF:    case PCRE_BSR_ANYCRLF:
# Line 4665  for(;;) Line 4670  for(;;)
4670      if (first_byte_caseless)      if (first_byte_caseless)
4671        while (start_match < end_subject &&        while (start_match < end_subject &&
4672               md->lcc[*start_match] != first_byte)               md->lcc[*start_match] != first_byte)
4673          start_match++;          { NEXTCHAR(start_match); }
4674      else      else
4675        while (start_match < end_subject && *start_match != first_byte)        while (start_match < end_subject && *start_match != first_byte)
4676          start_match++;          { NEXTCHAR(start_match); }
4677      }      }
4678    
4679    /* Or to just after a linebreak for a multiline match if possible */    /* Or to just after a linebreak for a multiline match if possible */
# Line 4678  for(;;) Line 4683  for(;;)
4683      if (start_match > md->start_subject + start_offset)      if (start_match > md->start_subject + start_offset)
4684        {        {
4685        while (start_match <= end_subject && !WAS_NEWLINE(start_match))        while (start_match <= end_subject && !WAS_NEWLINE(start_match))
4686          start_match++;          { NEXTCHAR(start_match); }
4687    
4688        /* If we have just passed a CR and the newline option is ANY or ANYCRLF,        /* If we have just passed a CR and the newline option is ANY or ANYCRLF,
4689        and we are now at a LF, advance the match position by one more character.        and we are now at a LF, advance the match position by one more character.
# Line 4699  for(;;) Line 4704  for(;;)
4704      while (start_match < end_subject)      while (start_match < end_subject)
4705        {        {
4706        register unsigned int c = *start_match;        register unsigned int c = *start_match;
4707        if ((start_bits[c/8] & (1 << (c&7))) == 0) start_match++; else break;        if ((start_bits[c/8] & (1 << (c&7))) == 0)
4708            { NEXTCHAR(start_match); }
4709          else break;
4710        }        }
4711      }      }
4712    

Legend:
Removed from v.231  
changed lines
  Added in v.294

  ViewVC Help
Powered by ViewVC 1.1.5