/[pcre]/code/branches/pcre16/pcretest.c
ViewVC logotype

Diff of /code/branches/pcre16/pcretest.c

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

revision 145 by ph10, Wed Apr 4 14:06:52 2007 UTC revision 147 by ph10, Mon Apr 16 13:24:37 2007 UTC
# Line 1594  while (!done) Line 1594  while (!done)
1594    for (;;)    for (;;)
1595      {      {
1596      uschar *q;      uschar *q;
1597      uschar *bptr = dbuffer;      uschar *bptr;
1598      int *use_offsets = offsets;      int *use_offsets = offsets;
1599      int use_size_offsets = size_offsets;      int use_size_offsets = size_offsets;
1600      int callout_data = 0;      int callout_data = 0;
# Line 1650  while (!done) Line 1650  while (!done)
1650      p = buffer;      p = buffer;
1651      while (isspace(*p)) p++;      while (isspace(*p)) p++;
1652    
1653      q = dbuffer;      bptr = q = dbuffer;
1654      while ((c = *p++) != 0)      while ((c = *p++) != 0)
1655        {        {
1656        int i = 0;        int i = 0;
# Line 2232  while (!done) Line 2232  while (!done)
2232          if (g_notempty != 0)          if (g_notempty != 0)
2233            {            {
2234            int onechar = 1;            int onechar = 1;
2235              unsigned int obits = ((real_pcre *)re)->options;
2236            use_offsets[0] = start_offset;            use_offsets[0] = start_offset;
2237            if ((((real_pcre *)re)->options & PCRE_NEWLINE_BITS) ==            if ((obits & PCRE_NEWLINE_BITS) == 0)
2238                    PCRE_NEWLINE_ANY &&              {
2239                int d;
2240                (void)pcre_config(PCRE_CONFIG_NEWLINE, &d);
2241                obits = (d == '\r')? PCRE_NEWLINE_CR :
2242                        (d == '\n')? PCRE_NEWLINE_LF :
2243                        (d == ('\r'<<8 | '\n'))? PCRE_NEWLINE_CRLF :
2244                        (d == -1)? PCRE_NEWLINE_ANY : 0;
2245                }
2246              if ((obits & PCRE_NEWLINE_BITS) == PCRE_NEWLINE_ANY &&
2247                start_offset < len - 1 &&                start_offset < len - 1 &&
2248                bptr[start_offset] == '\r' &&                bptr[start_offset] == '\r' &&
2249                bptr[start_offset+1] == '\n')                bptr[start_offset+1] == '\n')

Legend:
Removed from v.145  
changed lines
  Added in v.147

  ViewVC Help
Powered by ViewVC 1.1.5