summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--perl.h10
-rw-r--r--utf8.h18
-rw-r--r--utfebcdic.h19
-rw-r--r--x2p/a2py.c8
4 files changed, 14 insertions, 41 deletions
diff --git a/perl.h b/perl.h
index b299432ec4..6e18dbf3ce 100644
--- a/perl.h
+++ b/perl.h
@@ -5653,15 +5653,7 @@ extern void moncontrol(int);
/* ISO 6429 NEL - C1 control NExt Line */
/* See http://www.unicode.org/unicode/reports/tr13/ */
-#ifdef EBCDIC /* In EBCDIC NEL is just an alias for LF */
-# if '^' == 95 /* CP 1047: MVS OpenEdition - OS/390 - z/OS */
-# define NEXT_LINE_CHAR 0x15
-# else /* CDRA */
-# define NEXT_LINE_CHAR 0x25
-# endif
-#else
-# define NEXT_LINE_CHAR 0x85
-#endif
+#define NEXT_LINE_CHAR NEXT_LINE_NATIVE
/* The UTF-8 bytes of the Unicode LS and PS, U+2028 and U+2029 */
#define UNICODE_LINE_SEPA_0 0xE2
diff --git a/utf8.h b/utf8.h
index 11b5acac1b..709bc088be 100644
--- a/utf8.h
+++ b/utf8.h
@@ -93,6 +93,8 @@ EXTCONST unsigned char PL_utf8skip[];
END_EXTERN_C
+#include "unicode_constants.h"
+
/* Native character to iso-8859-1 */
#define NATIVE_TO_ASCII(ch) (ch)
#define ASCII_TO_NATIVE(ch) (ch)
@@ -481,6 +483,14 @@ Perl's extended UTF-8 means we can have start bytes up to FF.
# define UTF8_QUAD_MAX UINT64_C(0x1000000000)
#endif
+#define LATIN_SMALL_LETTER_SHARP_S LATIN_SMALL_LETTER_SHARP_S_NATIVE
+#define LATIN_SMALL_LETTER_Y_WITH_DIAERESIS \
+ LATIN_SMALL_LETTER_Y_WITH_DIAERESIS_NATIVE
+#define MICRO_SIGN MICRO_SIGN_NATIVE
+#define LATIN_CAPITAL_LETTER_A_WITH_RING_ABOVE \
+ LATIN_CAPITAL_LETTER_A_WITH_RING_ABOVE_NATIVE
+#define LATIN_SMALL_LETTER_A_WITH_RING_ABOVE \
+ LATIN_SMALL_LETTER_A_WITH_RING_ABOVE_NATIVE
#define UNICODE_GREEK_CAPITAL_LETTER_SIGMA 0x03A3
#define UNICODE_GREEK_SMALL_LETTER_FINAL_SIGMA 0x03C2
#define UNICODE_GREEK_SMALL_LETTER_SIGMA 0x03C3
@@ -497,14 +507,6 @@ Perl's extended UTF-8 means we can have start bytes up to FF.
#define UNI_DISPLAY_QQ (UNI_DISPLAY_ISPRINT|UNI_DISPLAY_BACKSLASH)
#define UNI_DISPLAY_REGEX (UNI_DISPLAY_ISPRINT|UNI_DISPLAY_BACKSLASH)
-#ifndef EBCDIC
-# define LATIN_SMALL_LETTER_SHARP_S 0x00DF
-# define LATIN_SMALL_LETTER_Y_WITH_DIAERESIS 0x00FF
-# define MICRO_SIGN 0x00B5
-# define LATIN_CAPITAL_LETTER_A_WITH_RING_ABOVE 0x00C5
-# define LATIN_SMALL_LETTER_A_WITH_RING_ABOVE 0x00E5
-#endif
-
#define ANYOF_FOLD_SHARP_S(node, input, end) \
(ANYOF_BITMAP_TEST(node, LATIN_SMALL_LETTER_SHARP_S) && \
(ANYOF_NONBITMAP(node)) && \
diff --git a/utfebcdic.h b/utfebcdic.h
index ec7a376550..3eba83da99 100644
--- a/utfebcdic.h
+++ b/utfebcdic.h
@@ -295,12 +295,6 @@ EXTCONST unsigned char PL_a2e[] = { /* ASCII (iso-8859-1) to EBCDIC (IBM-1047) *
0x8C, 0x49, 0xCD, 0xCE, 0xCB, 0xCF, 0xCC, 0xE1, 0x70, 0xDD, 0xDE, 0xDB, 0xDC, 0x8D, 0x8E, 0xDF
};
-#define LATIN_SMALL_LETTER_Y_WITH_DIAERESIS 0xDF
-#define LATIN_SMALL_LETTER_SHARP_S 0x59
-#define MICRO_SIGN 0xA0
-#define LATIN_CAPITAL_LETTER_A_WITH_RING_ABOVE 0x0067
-#define LATIN_SMALL_LETTER_A_WITH_RING_ABOVE 0x0047
-
EXTCONST unsigned char PL_e2a[] = { /* EBCDIC (IBM-1047) to ASCII (iso-8859-1) */
0x00, 0x01, 0x02, 0x03, 0x9C, 0x09, 0x86, 0x7F, 0x97, 0x8D, 0x8E, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
0x10, 0x11, 0x12, 0x13, 0x9D, 0x0A, 0x08, 0x87, 0x18, 0x19, 0x92, 0x8F, 0x1C, 0x1D, 0x1E, 0x1F,
@@ -377,12 +371,6 @@ EXTCONST unsigned char PL_a2e[] = { /* ASCII (ISO8859-1) to EBCDIC (POSIX-BC) */
0x8C, 0x49, 0xCD, 0xCE, 0xCB, 0xCF, 0xCC, 0xE1, 0x70, 0xC0, 0xDE, 0xDB, 0xDC, 0x8D, 0x8E, 0xDF
};
-#define LATIN_SMALL_LETTER_Y_WITH_DIAERESIS 0xDF
-#define LATIN_SMALL_LETTER_SHARP_S 0x59
-#define MICRO_SIGN 0xA0
-#define LATIN_CAPITAL_LETTER_A_WITH_RING_ABOVE 0x0067
-#define LATIN_SMALL_LETTER_A_WITH_RING_ABOVE 0x0047
-
EXTCONST unsigned char PL_e2a[] = { /* EBCDIC (POSIX-BC) to ASCII (ISO8859-1) */
0x00, 0x01, 0x02, 0x03, 0x9C, 0x09, 0x86, 0x7F, 0x97, 0x8D, 0x8E, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
0x10, 0x11, 0x12, 0x13, 0x9D, 0x0A, 0x08, 0x87, 0x18, 0x19, 0x92, 0x8F, 0x1C, 0x1D, 0x1E, 0x1F,
@@ -459,13 +447,6 @@ EXTCONST unsigned char PL_a2e[] = { /* ASCII (ISO8859-1) to EBCDIC (IBM-037) */
0x8C, 0x49, 0xCD, 0xCE, 0xCB, 0xCF, 0xCC, 0xE1, 0x70, 0xDD, 0xDE, 0xDB, 0xDC, 0x8D, 0x8E, 0xDF
};
-
-#define LATIN_SMALL_LETTER_Y_WITH_DIAERESIS 0xDF
-#define LATIN_SMALL_LETTER_SHARP_S 0x59
-#define MICRO_SIGN 0xA0
-#define LATIN_CAPITAL_LETTER_A_WITH_RING_ABOVE 0x0067
-#define LATIN_SMALL_LETTER_A_WITH_RING_ABOVE 0x0047
-
EXTCONST unsigned char PL_e2a[] = { /* EBCDIC (IBM-037) to ASCII (ISO8859-1) */
0x00, 0x01, 0x02, 0x03, 0x9C, 0x09, 0x86, 0x7F, 0x97, 0x8D, 0x8E, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
0x10, 0x11, 0x12, 0x13, 0x9D, 0x85, 0x08, 0x87, 0x18, 0x19, 0x92, 0x8F, 0x1C, 0x1D, 0x1E, 0x1F,
diff --git a/x2p/a2py.c b/x2p/a2py.c
index 2f41ca86ec..aa48daa60c 100644
--- a/x2p/a2py.c
+++ b/x2p/a2py.c
@@ -17,6 +17,8 @@
#include "../patchlevel.h"
#endif
#include "util.h"
+#include "../unicode_constants.h"
+#define DELETE_CHAR DELETE_NATIVE
const char *filename;
const char *myname;
@@ -289,11 +291,7 @@ yylex(void)
case ':':
tmp = *s++;
XOP(tmp);
-#ifdef EBCDIC
- case 7:
-#else
- case 127:
-#endif
+ case DELETE_CHAR:
s++;
XTERM('}');
case '}':