/[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 390 by ph10, Sun Mar 15 18:24:05 2009 UTC revision 391 by ph10, Tue Mar 17 21:16:01 2009 UTC
# Line 936  while (argc > 1 && argv[op][0] == '-') Line 936  while (argc > 1 && argv[op][0] == '-')
936      (void)pcre_config(PCRE_CONFIG_UNICODE_PROPERTIES, &rc);      (void)pcre_config(PCRE_CONFIG_UNICODE_PROPERTIES, &rc);
937      printf("  %sUnicode properties support\n", rc? "" : "No ");      printf("  %sUnicode properties support\n", rc? "" : "No ");
938      (void)pcre_config(PCRE_CONFIG_NEWLINE, &rc);      (void)pcre_config(PCRE_CONFIG_NEWLINE, &rc);
939      printf("  Newline sequence is %s\n", (rc == '\r')? "CR" :      /* Note that these values are always the ASCII values, even
940        (rc == '\n')? "LF" : (rc == ('\r'<<8 | '\n'))? "CRLF" :      in EBCDIC environments. CR is 13 and NL is 10. */
941        printf("  Newline sequence is %s\n", (rc == 13)? "CR" :
942          (rc == 10)? "LF" : (rc == (13<<8 | 10))? "CRLF" :
943        (rc == -2)? "ANYCRLF" :        (rc == -2)? "ANYCRLF" :
944        (rc == -1)? "ANY" : "???");        (rc == -1)? "ANY" : "???");
945      (void)pcre_config(PCRE_CONFIG_BSR, &rc);      (void)pcre_config(PCRE_CONFIG_BSR, &rc);
# Line 2380  while (!done) Line 2382  while (!done)
2382              {              {
2383              int d;              int d;
2384              (void)pcre_config(PCRE_CONFIG_NEWLINE, &d);              (void)pcre_config(PCRE_CONFIG_NEWLINE, &d);
2385              obits = (d == '\r')? PCRE_NEWLINE_CR :              /* Note that these values are always the ASCII ones, even in
2386                      (d == '\n')? PCRE_NEWLINE_LF :              EBCDIC environments. CR = 13, NL = 10. */
2387                      (d == ('\r'<<8 | '\n'))? PCRE_NEWLINE_CRLF :              obits = (d == 13)? PCRE_NEWLINE_CR :
2388                        (d == 10)? PCRE_NEWLINE_LF :
2389                        (d == (13<<8 | 10))? PCRE_NEWLINE_CRLF :
2390                      (d == -2)? PCRE_NEWLINE_ANYCRLF :                      (d == -2)? PCRE_NEWLINE_ANYCRLF :
2391                      (d == -1)? PCRE_NEWLINE_ANY : 0;                      (d == -1)? PCRE_NEWLINE_ANY : 0;
2392              }              }

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

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12