/[pcre]/code/trunk/pcrecpp.cc
ViewVC logotype

Diff of /code/trunk/pcrecpp.cc

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

revision 257 by ph10, Wed Sep 19 09:11:19 2007 UTC revision 259 by ph10, Wed Sep 19 09:52:44 2007 UTC
# Line 354  static int NewlineMode(int pcre_options) Line 354  static int NewlineMode(int pcre_options)
354      else if (newline == -1)      else if (newline == -1)
355        newline_mode = PCRE_NEWLINE_ANY;        newline_mode = PCRE_NEWLINE_ANY;
356      else if (newline == -2)      else if (newline == -2)
357        newline_mode = PCRE_NEWLINE_ANYCRLF;        newline_mode = PCRE_NEWLINE_ANYCRLF;
358      else      else
359        assert("" == "Unexpected return value from pcre_config(NEWLINE)");        assert("" == "Unexpected return value from pcre_config(NEWLINE)");
360    }    }
# Line 384  int RE::GlobalReplace(const StringPiece& Line 384  int RE::GlobalReplace(const StringPiece&
384        // Note it's better to call pcre_fullinfo() than to examine        // Note it's better to call pcre_fullinfo() than to examine
385        // all_options(), since options_ could have changed bewteen        // all_options(), since options_ could have changed bewteen
386        // compile-time and now, but this is simpler and safe enough.        // compile-time and now, but this is simpler and safe enough.
387        // Modified by PH to add ANY and ANYCRLF.        // Modified by PH to add ANY and ANYCRLF.
388        if (start+1 < static_cast<int>(str->length()) &&        if (start+1 < static_cast<int>(str->length()) &&
389            (*str)[start] == '\r' && (*str)[start+1] == '\n' &&            (*str)[start] == '\r' && (*str)[start+1] == '\n' &&
390            (NewlineMode(options_.all_options()) == PCRE_NEWLINE_CRLF ||            (NewlineMode(options_.all_options()) == PCRE_NEWLINE_CRLF ||

Legend:
Removed from v.257  
changed lines
  Added in v.259

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12