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

Diff of /code/trunk/pcregrep.c

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

revision 390 by ph10, Mon Mar 2 20:30:05 2009 UTC revision 391 by ph10, Tue Mar 17 21:16:01 2009 UTC
# Line 1871  const char *error; Line 1871  const char *error;
1871    
1872  /* Set the default line ending value from the default in the PCRE library;  /* Set the default line ending value from the default in the PCRE library;
1873  "lf", "cr", "crlf", and "any" are supported. Anything else is treated as "lf".  "lf", "cr", "crlf", and "any" are supported. Anything else is treated as "lf".
1874  */  Note that the return values from pcre_config(), though derived from the ASCII
1875    codes, are the same in EBCDIC environments, so we must use the actual values
1876    rather than escapes such as as '\r'. */
1877    
1878  (void)pcre_config(PCRE_CONFIG_NEWLINE, &i);  (void)pcre_config(PCRE_CONFIG_NEWLINE, &i);
1879  switch(i)  switch(i)
1880    {    {
1881    default:                 newline = (char *)"lf"; break;    default:               newline = (char *)"lf"; break;
1882    case '\r':               newline = (char *)"cr"; break;    case 13:               newline = (char *)"cr"; break;
1883    case ('\r' << 8) | '\n': newline = (char *)"crlf"; break;    case (13 << 8) | 10:   newline = (char *)"crlf"; break;
1884    case -1:                 newline = (char *)"any"; break;    case -1:               newline = (char *)"any"; break;
1885    case -2:                 newline = (char *)"anycrlf"; break;    case -2:               newline = (char *)"anycrlf"; break;
1886    }    }
1887    
1888  /* Process the options */  /* Process the options */

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

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12