| 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 */ |