/[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 836 by ph10, Wed Dec 28 17:16:11 2011 UTC revision 842 by ph10, Sat Dec 31 15:19:04 2011 UTC
# Line 468  Returns:       MATCH_MATCH if matched Line 468  Returns:       MATCH_MATCH if matched
468    
469  static int  static int
470  match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode,  match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode,
471    PCRE_PUCHAR mstart, int offset_top, match_data *md, eptrblock *eptrb,    PCRE_PUCHAR mstart, int offset_top, match_data *md, eptrblock *eptrb,
472    unsigned int rdepth)    unsigned int rdepth)
473  {  {
474  /* These variables do not need to be preserved over recursion in this function,  /* These variables do not need to be preserved over recursion in this function,
# Line 2631  for (;;) Line 2631  for (;;)
2631    
2632      /* Handle repeated back references. If the length of the reference is      /* Handle repeated back references. If the length of the reference is
2633      zero, just continue with the main loop. If the length is negative, it      zero, just continue with the main loop. If the length is negative, it
2634      means the reference is unset in non-Java-compatible mode. If the minimum is      means the reference is unset in non-Java-compatible mode. If the minimum is
2635      zero, we can continue at the same level without recursion. For any other      zero, we can continue at the same level without recursion. For any other
2636      minimum, carrying on will result in NOMATCH. */      minimum, carrying on will result in NOMATCH. */
2637    
2638      if (length == 0) continue;      if (length == 0) continue;
# Line 6030  switch (frame->Xwhere) Line 6030  switch (frame->Xwhere)
6030    LBL(53) LBL(54) LBL(55) LBL(56) LBL(57) LBL(58) LBL(63) LBL(64)    LBL(53) LBL(54) LBL(55) LBL(56) LBL(57) LBL(58) LBL(63) LBL(64)
6031    LBL(65) LBL(66)    LBL(65) LBL(66)
6032  #if defined SUPPORT_UTF || !defined COMPILE_PCRE8  #if defined SUPPORT_UTF || !defined COMPILE_PCRE8
6033    LBL(21)    LBL(21)
6034  #endif  #endif
6035  #ifdef SUPPORT_UTF  #ifdef SUPPORT_UTF
6036    LBL(16) LBL(18) LBL(20)    LBL(16) LBL(18) LBL(20)
6037    LBL(22) LBL(23) LBL(28) LBL(30)    LBL(22) LBL(23) LBL(28) LBL(30)
6038    LBL(32) LBL(34) LBL(42) LBL(46)    LBL(32) LBL(34) LBL(42) LBL(46)
6039  #ifdef SUPPORT_UCP  #ifdef SUPPORT_UCP
# Line 6043  switch (frame->Xwhere) Line 6043  switch (frame->Xwhere)
6043  #endif  /* SUPPORT_UTF */  #endif  /* SUPPORT_UTF */
6044    default:    default:
6045    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));
6046    
6047  printf("+++jump error in pcre match: label %d non-existent\n", frame->Xwhere);  printf("+++jump error in pcre match: label %d non-existent\n", frame->Xwhere);
6048    
6049    return PCRE_ERROR_INTERNAL;    return PCRE_ERROR_INTERNAL;
# Line 6209  if (utf && (options & PCRE_NO_UTF8_CHECK Line 6209  if (utf && (options & PCRE_NO_UTF8_CHECK
6209  #else  #else
6210      return (errorcode <= PCRE_UTF8_ERR5 && md->partial > 1)?      return (errorcode <= PCRE_UTF8_ERR5 && md->partial > 1)?
6211        PCRE_ERROR_SHORTUTF8 : PCRE_ERROR_BADUTF8;        PCRE_ERROR_SHORTUTF8 : PCRE_ERROR_BADUTF8;
6212  #endif  #endif
6213      }      }
6214    
6215    /* Check that a start_offset points to the start of a UTF character. */    /* Check that a start_offset points to the start of a UTF character. */
# Line 6765  for(;;) Line 6765  for(;;)
6765    
6766    /* If we have just passed a CR and we are now at a LF, and the pattern does    /* If we have just passed a CR and we are now at a LF, and the pattern does
6767    not contain any explicit matches for \r or \n, and the newline option is CRLF    not contain any explicit matches for \r or \n, and the newline option is CRLF
6768    or ANY or ANYCRLF, advance the match position by one more character. In    or ANY or ANYCRLF, advance the match position by one more character. In
6769    normal matching start_match will aways be greater than the first position at    normal matching start_match will aways be greater than the first position at
6770    this stage, but a failed *SKIP can cause a return at the same point, which is    this stage, but a failed *SKIP can cause a return at the same point, which is
6771    why the first test exists. */    why the first test exists. */
6772    
6773    if (start_match > (PCRE_PUCHAR)subject + start_offset &&    if (start_match > (PCRE_PUCHAR)subject + start_offset &&

Legend:
Removed from v.836  
changed lines
  Added in v.842

  ViewVC Help
Powered by ViewVC 1.1.5