/[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 395 by ph10, Fri Mar 20 11:22:42 2009 UTC revision 403 by ph10, Sat Mar 21 17:33:11 2009 UTC
# Line 334  typedef struct heapframe { Line 334  typedef struct heapframe {
334    /* Function local variables */    /* Function local variables */
335    
336    const uschar *Xcallpat;    const uschar *Xcallpat;
337    #ifdef SUPPORT_UTF8
338    const uschar *Xcharptr;    const uschar *Xcharptr;
339    #endif
340    const uschar *Xdata;    const uschar *Xdata;
341    const uschar *Xnext;    const uschar *Xnext;
342    const uschar *Xpp;    const uschar *Xpp;
# Line 360  typedef struct heapframe { Line 362  typedef struct heapframe {
362    uschar Xocchars[8];    uschar Xocchars[8];
363  #endif  #endif
364    
365      int Xcodelink;
366    int Xctype;    int Xctype;
367    unsigned int Xfc;    unsigned int Xfc;
368    int Xfi;    int Xfi;
# Line 439  register unsigned int c;   /* Character Line 442  register unsigned int c;   /* Character
442  register BOOL utf8;        /* Local copy of UTF-8 flag for speed */  register BOOL utf8;        /* Local copy of UTF-8 flag for speed */
443    
444  BOOL minimize, possessive; /* Quantifier options */  BOOL minimize, possessive; /* Quantifier options */
445    int condcode;
446    
447  /* When recursion is not being used, all "local" variables that have to be  /* When recursion is not being used, all "local" variables that have to be
448  preserved over calls to RMATCH() are part of a "frame" which is obtained from  preserved over calls to RMATCH() are part of a "frame" which is obtained from
# Line 481  HEAP_RECURSE: Line 485  HEAP_RECURSE:
485  #define charptr            frame->Xcharptr  #define charptr            frame->Xcharptr
486  #endif  #endif
487  #define callpat            frame->Xcallpat  #define callpat            frame->Xcallpat
488    #define codelink           frame->Xcodelink
489  #define data               frame->Xdata  #define data               frame->Xdata
490  #define next               frame->Xnext  #define next               frame->Xnext
491  #define pp                 frame->Xpp  #define pp                 frame->Xpp
# Line 561  int oclength; Line 566  int oclength;
566  uschar occhars[8];  uschar occhars[8];
567  #endif  #endif
568    
569    int codelink;
570  int ctype;  int ctype;
571  int length;  int length;
572  int max;  int max;
# Line 787  for (;;) Line 793  for (;;)
793    
794      case OP_COND:      case OP_COND:
795      case OP_SCOND:      case OP_SCOND:
796        codelink= GET(ecode, 1);
797    
798      /* Because of the way auto-callout works during compile, a callout item is      /* Because of the way auto-callout works during compile, a callout item is
799      inserted between OP_COND and an assertion condition. */      inserted between OP_COND and an assertion condition. */
800    
# Line 813  for (;;) Line 821  for (;;)
821        ecode += _pcre_OP_lengths[OP_CALLOUT];        ecode += _pcre_OP_lengths[OP_CALLOUT];
822        }        }
823    
824        condcode = ecode[LINK_SIZE+1];
825    
826      /* Now see what the actual condition is */      /* Now see what the actual condition is */
827    
828      if (ecode[LINK_SIZE+1] == OP_RREF)         /* Recursion test */      if (condcode == OP_RREF)         /* Recursion test */
829        {        {
830        offset = GET2(ecode, LINK_SIZE + 2);     /* Recursion group number*/        offset = GET2(ecode, LINK_SIZE + 2);     /* Recursion group number*/
831        condition = md->recursive != NULL &&        condition = md->recursive != NULL &&
# Line 823  for (;;) Line 833  for (;;)
833        ecode += condition? 3 : GET(ecode, 1);        ecode += condition? 3 : GET(ecode, 1);
834        }        }
835    
836      else if (ecode[LINK_SIZE+1] == OP_CREF)    /* Group used test */      else if (condcode == OP_CREF)    /* Group used test */
837        {        {
838        offset = GET2(ecode, LINK_SIZE+2) << 1;  /* Doubled ref number */        offset = GET2(ecode, LINK_SIZE+2) << 1;  /* Doubled ref number */
839        condition = offset < offset_top && md->offset_vector[offset] >= 0;        condition = offset < offset_top && md->offset_vector[offset] >= 0;
840        ecode += condition? 3 : GET(ecode, 1);        ecode += condition? 3 : GET(ecode, 1);
841        }        }
842    
843      else if (ecode[LINK_SIZE+1] == OP_DEF)     /* DEFINE - always false */      else if (condcode == OP_DEF)     /* DEFINE - always false */
844        {        {
845        condition = FALSE;        condition = FALSE;
846        ecode += GET(ecode, 1);        ecode += GET(ecode, 1);
# Line 857  for (;;) Line 867  for (;;)
867        else        else
868          {          {
869          condition = FALSE;          condition = FALSE;
870          ecode += GET(ecode, 1);          ecode += codelink;
871          }          }
872        }        }
873    
# Line 1103  for (;;) Line 1113  for (;;)
1113          else if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN)          else if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN)
1114            {            {
1115            DPRINTF(("Recursion gave error %d\n", rrc));            DPRINTF(("Recursion gave error %d\n", rrc));
1116              if (new_recursive.offset_save != stacksave)
1117                (pcre_free)(new_recursive.offset_save);
1118            RRETURN(rrc);            RRETURN(rrc);
1119            }            }
1120    

Legend:
Removed from v.395  
changed lines
  Added in v.403

  ViewVC Help
Powered by ViewVC 1.1.5