/[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 751 by ph10, Fri Nov 18 11:13:30 2011 UTC revision 754 by ph10, Sat Nov 19 18:32:18 2011 UTC
# Line 1528  Arguments: Line 1528  Arguments:
1528    
1529  Returns:   the fixed length,  Returns:   the fixed length,
1530               or -1 if there is no fixed length,               or -1 if there is no fixed length,
1531               or -2 if \C was encountered               or -2 if \C was encountered (in UTF-8 mode only)
1532               or -3 if an OP_RECURSE item was encountered and atend is FALSE               or -3 if an OP_RECURSE item was encountered and atend is FALSE
1533               or -4 if an unknown opcode was encountered (internal error)               or -4 if an unknown opcode was encountered (internal error)
1534  */  */
# Line 1702  for (;;) Line 1702  for (;;)
1702      cc++;      cc++;
1703      break;      break;
1704    
1705      /* The single-byte matcher isn't allowed */      /* The single-byte matcher isn't allowed. This only happens in UTF-8 mode;
1706        otherwise \C is coded as OP_ALLANY. */
1707    
1708      case OP_ANYBYTE:      case OP_ANYBYTE:
1709      return -2;      return -2;
# Line 5600  for (;; ptr++) Line 5601  for (;; ptr++)
5601    
5602          /* ------------------------------------------------------------ */          /* ------------------------------------------------------------ */
5603          case CHAR_C:                 /* Callout - may be followed by digits; */          case CHAR_C:                 /* Callout - may be followed by digits; */
5604          previous_callout = code;  /* Save for later completion */          previous_callout = code;     /* Save for later completion */
5605          after_manual_callout = 1; /* Skip one item before completing */          after_manual_callout = 1;    /* Skip one item before completing */
5606          *code++ = OP_CALLOUT;          *code++ = OP_CALLOUT;
5607            {            {
5608            int n = 0;            int n = 0;
# Line 6478  for (;; ptr++) Line 6479  for (;; ptr++)
6479            }            }
6480          else          else
6481  #endif  #endif
6482            {          /* In non-UTF-8 mode, we turn \C into OP_ALLANY instead of OP_ANYBYTE
6483            so that it works in DFA mode and in lookbehinds. */
6484    
6485              {
6486            previous = (-c > ESC_b && -c < ESC_Z)? code : NULL;            previous = (-c > ESC_b && -c < ESC_Z)? code : NULL;
6487            *code++ = -c;            *code++ = (!utf8 && c == -ESC_C)? OP_ALLANY : -c;
6488            }            }
6489          }          }
6490        continue;        continue;

Legend:
Removed from v.751  
changed lines
  Added in v.754

  ViewVC Help
Powered by ViewVC 1.1.5