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

Diff of /code/trunk/pcretest.c

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

revision 143 by ph10, Mon Apr 2 10:08:14 2007 UTC revision 144 by ph10, Mon Apr 2 13:32:07 2007 UTC
# Line 2220  while (!done) Line 2220  while (!done)
2220        advance of one character just passes the \r, whereas we should prefer the        advance of one character just passes the \r, whereas we should prefer the
2221        longer newline sequence, as does the code in pcre_exec(). Fudge the        longer newline sequence, as does the code in pcre_exec(). Fudge the
2222        offset value to achieve this.        offset value to achieve this.
2223    
2224        Otherwise, in the case of UTF-8 matching, the advance must be one        Otherwise, in the case of UTF-8 matching, the advance must be one
2225        character, not one byte. */        character, not one byte. */
2226    
# Line 2230  while (!done) Line 2230  while (!done)
2230            {            {
2231            int onechar = 1;            int onechar = 1;
2232            use_offsets[0] = start_offset;            use_offsets[0] = start_offset;
2233            if ((((real_pcre *)re)->options & PCRE_NEWLINE_BITS) ==            if ((((real_pcre *)re)->options & PCRE_NEWLINE_BITS) ==
2234                    PCRE_NEWLINE_ANY &&                    PCRE_NEWLINE_ANY &&
2235                start_offset < len - 1 &&                start_offset < len - 1 &&
2236                bptr[start_offset] == '\r' &&                bptr[start_offset] == '\r' &&
2237                bptr[start_offset+1] == '\n')                bptr[start_offset+1] == '\n')
2238              onechar++;              onechar++;
2239            else if (use_utf8)            else if (use_utf8)
2240              {              {
2241              while (start_offset + onechar < len)              while (start_offset + onechar < len)

Legend:
Removed from v.143  
changed lines
  Added in v.144

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12