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

Diff of /code/trunk/pcre_dfa_exec.c

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

revision 390 by ph10, Sun Mar 15 18:24:05 2009 UTC revision 391 by ph10, Tue Mar 17 21:16:01 2009 UTC
# Line 2615  switch ((((options & PCRE_NEWLINE_BITS) Line 2615  switch ((((options & PCRE_NEWLINE_BITS)
2615           PCRE_NEWLINE_BITS)           PCRE_NEWLINE_BITS)
2616    {    {
2617    case 0: newline = NEWLINE; break;   /* Compile-time default */    case 0: newline = NEWLINE; break;   /* Compile-time default */
2618    case PCRE_NEWLINE_CR: newline = '\r'; break;    case PCRE_NEWLINE_CR: newline = CHAR_CR; break;
2619    case PCRE_NEWLINE_LF: newline = '\n'; break;    case PCRE_NEWLINE_LF: newline = CHAR_NL; break;
2620    case PCRE_NEWLINE_CR+    case PCRE_NEWLINE_CR+
2621         PCRE_NEWLINE_LF: newline = ('\r' << 8) | '\n'; break;         PCRE_NEWLINE_LF: newline = (CHAR_CR << 8) | CHAR_NL; break;
2622    case PCRE_NEWLINE_ANY: newline = -1; break;    case PCRE_NEWLINE_ANY: newline = -1; break;
2623    case PCRE_NEWLINE_ANYCRLF: newline = -2; break;    case PCRE_NEWLINE_ANYCRLF: newline = -2; break;
2624    default: return PCRE_ERROR_BADNEWLINE;    default: return PCRE_ERROR_BADNEWLINE;
# Line 2797  for (;;) Line 2797  for (;;)
2797            ANYCRLF, and we are now at a LF, advance the match position by one            ANYCRLF, and we are now at a LF, advance the match position by one
2798            more character. */            more character. */
2799    
2800            if (current_subject[-1] == '\r' &&            if (current_subject[-1] == CHAR_CR &&
2801                 (md->nltype == NLTYPE_ANY || md->nltype == NLTYPE_ANYCRLF) &&                 (md->nltype == NLTYPE_ANY || md->nltype == NLTYPE_ANYCRLF) &&
2802                 current_subject < end_subject &&                 current_subject < end_subject &&
2803                 *current_subject == '\n')                 *current_subject == CHAR_NL)
2804              current_subject++;              current_subject++;
2805            }            }
2806          }          }
# Line 2916  for (;;) Line 2916  for (;;)
2916    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
2917    or ANY or ANYCRLF, advance the match position by one more character. */    or ANY or ANYCRLF, advance the match position by one more character. */
2918    
2919    if (current_subject[-1] == '\r' &&    if (current_subject[-1] == CHAR_CR &&
2920        current_subject < end_subject &&        current_subject < end_subject &&
2921        *current_subject == '\n' &&        *current_subject == CHAR_NL &&
2922        (re->flags & PCRE_HASCRORLF) == 0 &&        (re->flags & PCRE_HASCRORLF) == 0 &&
2923          (md->nltype == NLTYPE_ANY ||          (md->nltype == NLTYPE_ANY ||
2924           md->nltype == NLTYPE_ANYCRLF ||           md->nltype == NLTYPE_ANYCRLF ||

Legend:
Removed from v.390  
changed lines
  Added in v.391

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12