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

Diff of /code/trunk/pcre_compile.c

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

revision 723 by ph10, Sat Oct 8 15:55:23 2011 UTC revision 733 by ph10, Tue Oct 11 10:29:36 2011 UTC
# Line 1506  for (;;) Line 1506  for (;;)
1506      case OP_CBRA:      case OP_CBRA:
1507      case OP_BRA:      case OP_BRA:
1508      case OP_ONCE:      case OP_ONCE:
1509      case OP_ONCE_NC:      case OP_ONCE_NC:
1510      case OP_COND:      case OP_COND:
1511      d = find_fixedlength(cc + ((op == OP_CBRA)? 2:0), utf8, atend, cd);      d = find_fixedlength(cc + ((op == OP_CBRA)? 2:0), utf8, atend, cd);
1512      if (d < 0) return d;      if (d < 0) return d;
# Line 3144  for (;; ptr++) Line 3144  for (;; ptr++)
3144    int subfirstbyte;    int subfirstbyte;
3145    int terminator;    int terminator;
3146    int mclength;    int mclength;
3147    int tempbracount;    int tempbracount;
3148    uschar mcbuffer[8];    uschar mcbuffer[8];
3149    
3150    /* Get next byte in the pattern */    /* Get next byte in the pattern */
# Line 4843  for (;; ptr++) Line 4843  for (;; ptr++)
4843          uschar *ketcode = code - 1 - LINK_SIZE;          uschar *ketcode = code - 1 - LINK_SIZE;
4844          uschar *bracode = ketcode - GET(ketcode, 1);          uschar *bracode = ketcode - GET(ketcode, 1);
4845    
4846          if ((*bracode == OP_ONCE || *bracode == OP_ONCE_NC) &&          if ((*bracode == OP_ONCE || *bracode == OP_ONCE_NC) &&
4847              possessive_quantifier) *bracode = OP_BRA;              possessive_quantifier) *bracode = OP_BRA;
4848    
4849          if (*bracode == OP_ONCE || *bracode == OP_ONCE_NC)          if (*bracode == OP_ONCE || *bracode == OP_ONCE_NC)
4850            *ketcode = OP_KETRMAX + repeat_type;            *ketcode = OP_KETRMAX + repeat_type;
4851          else          else
# Line 5933  for (;; ptr++) Line 5933  for (;; ptr++)
5933             &length_prevgroup              /* Pre-compile phase */             &length_prevgroup              /* Pre-compile phase */
5934           ))           ))
5935        goto FAILED;        goto FAILED;
5936    
5937      /* If this was an atomic group and there are no capturing groups within it,      /* If this was an atomic group and there are no capturing groups within it,
5938      generate OP_ONCE_NC instead of OP_ONCE. */      generate OP_ONCE_NC instead of OP_ONCE. */
5939    
5940      if (bravalue == OP_ONCE && cd->bracount <= tempbracount)      if (bravalue == OP_ONCE && cd->bracount <= tempbracount)
5941        *code = OP_ONCE_NC;        *code = OP_ONCE_NC;
5942    
5943      if (bravalue >= OP_ASSERT && bravalue <= OP_ASSERTBACK_NOT)      if (bravalue >= OP_ASSERT && bravalue <= OP_ASSERTBACK_NOT)
# Line 6913  do { Line 6913  do {
6913       case OP_SCBRAPOS:       case OP_SCBRAPOS:
6914       case OP_ASSERT:       case OP_ASSERT:
6915       case OP_ONCE:       case OP_ONCE:
6916       case OP_ONCE_NC:       case OP_ONCE_NC:
6917       case OP_COND:       case OP_COND:
6918       if ((d = find_firstassertedchar(scode, op == OP_ASSERT)) < 0)       if ((d = find_firstassertedchar(scode, op == OP_ASSERT)) < 0)
6919         return -1;         return -1;

Legend:
Removed from v.723  
changed lines
  Added in v.733

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12