[Pcre-svn] [1043] code/trunk/pcre_internal.h: New "case" mac…

Top Page
Delete this message
Author: Subversion repository
Date:  
To: pcre-svn
Subject: [Pcre-svn] [1043] code/trunk/pcre_internal.h: New "case" macros did not work in EBCDIC mode.
Revision: 1043
          http://vcs.pcre.org/viewvc?view=rev&revision=1043
Author:   ph10
Date:     2012-09-16 17:22:35 +0100 (Sun, 16 Sep 2012)


Log Message:
-----------
New "case" macros did not work in EBCDIC mode.

Modified Paths:
--------------
    code/trunk/pcre_internal.h


Modified: code/trunk/pcre_internal.h
===================================================================
--- code/trunk/pcre_internal.h    2012-09-16 10:26:50 UTC (rev 1042)
+++ code/trunk/pcre_internal.h    2012-09-16 16:22:35 UTC (rev 1043)
@@ -842,6 +842,8 @@
 \h, \H, \v and \V in a character class, so any changes here should be
 duplicated there as well. They also appear in pcre_jit_compile.c. */


+/* ------ ASCII/Unicode environments ------ */
+
 #ifndef EBCDIC
 #define HSPACE_MULTIBYTE_CASES \
       case 0x1680:    /* OGHAM SPACE MARK */ \
@@ -870,15 +872,6 @@
       case 0x2028:    /* LINE SEPARATOR */ \
       case 0x2029     /* PARAGRAPH SEPARATOR */


-#else   /* EBCDIC */
-#define HSPACE_MULTIBYTE_CASES
-#define VSPACE_MULTIBYTE_CASES
-
-#define HSPACE_BYTE_CASES \
-      case CHAR_HT: \
-      case CHAR_SPACE
-#endif  /* EBCDIC */
-
 #define VSPACE_BYTE_CASES \
       case CHAR_LF: \
       case CHAR_VT: \
@@ -894,6 +887,27 @@
         VSPACE_BYTE_CASES: \
         VSPACE_MULTIBYTE_CASES


+/* ------ EBCDIC environments ------ */
+
+#else
+#define HSPACE_BYTE_CASES \
+      case CHAR_HT: \
+      case CHAR_SPACE
+      
+#define VSPACE_BYTE_CASES \
+      case CHAR_LF: \
+      case CHAR_VT: \
+      case CHAR_FF: \
+      case CHAR_CR: \
+      case CHAR_NEL
+      
+#define HSPACE_CASES HSPACE_BYTE_CASES
+#define VSPACE_CASES VSPACE_BYTE_CASES
+#endif  /* EBCDIC */
+
+/* ------ End of whitespace case macros ------ */
+
+
 /* In case there is no definition of offsetof() provided - though any proper
 Standard C system should have one. */