/[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 148 by ph10, Wed Apr 4 14:06:52 2007 UTC revision 149 by ph10, Mon Apr 16 15:28:08 2007 UTC
# Line 5138  cd->cbits = tables + cbits_offset; Line 5138  cd->cbits = tables + cbits_offset;
5138  cd->ctypes = tables + ctypes_offset;  cd->ctypes = tables + ctypes_offset;
5139    
5140  /* Handle different types of newline. The three bits give seven cases. The  /* Handle different types of newline. The three bits give seven cases. The
5141  current code allows for fixed one- or two-byte sequences, plus "any". */  current code allows for fixed one- or two-byte sequences, plus "any" and
5142    "anycrlf". */
5143    
5144  switch (options & (PCRE_NEWLINE_CRLF | PCRE_NEWLINE_ANY))  switch (options & (PCRE_NEWLINE_CRLF | PCRE_NEWLINE_ANY))
5145    {    {
# Line 5148  switch (options & (PCRE_NEWLINE_CRLF | P Line 5149  switch (options & (PCRE_NEWLINE_CRLF | P
5149    case PCRE_NEWLINE_CR+    case PCRE_NEWLINE_CR+
5150         PCRE_NEWLINE_LF: newline = ('\r' << 8) | '\n'; break;         PCRE_NEWLINE_LF: newline = ('\r' << 8) | '\n'; break;
5151    case PCRE_NEWLINE_ANY: newline = -1; break;    case PCRE_NEWLINE_ANY: newline = -1; break;
5152      case PCRE_NEWLINE_ANYCRLF: newline = -2; break;
5153    default: errorcode = ERR56; goto PCRE_EARLY_ERROR_RETURN;    default: errorcode = ERR56; goto PCRE_EARLY_ERROR_RETURN;
5154    }    }
5155    
5156  if (newline < 0)  if (newline == -2)
5157      {
5158      cd->nltype = NLTYPE_ANYCRLF;
5159      }
5160    else if (newline < 0)
5161    {    {
5162    cd->nltype = NLTYPE_ANY;    cd->nltype = NLTYPE_ANY;
5163    }    }

Legend:
Removed from v.148  
changed lines
  Added in v.149

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12