summaryrefslogtreecommitdiff
path: root/utf8.h
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-02-05 14:25:36 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-02-05 14:25:36 +0000
commitebc501f0d71ea004ab6861cc2b4fb1f7e49fd2ae (patch)
tree3e150f9929abb5749f396b62d54ebdaf0e417ecf /utf8.h
parent235effa7b5c9fbd981ec8a3ce25cf49408967844 (diff)
downloadperl-ebc501f0d71ea004ab6861cc2b4fb1f7e49fd2ae.tar.gz
EBCDIC: SHARP S is different.
p4raw-id: //depot/perl@14561
Diffstat (limited to 'utf8.h')
-rw-r--r--utf8.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/utf8.h b/utf8.h
index c69cd86bfb..49531a99ef 100644
--- a/utf8.h
+++ b/utf8.h
@@ -194,15 +194,28 @@ END_EXTERN_C
#define UNICODE_GREEK_SMALL_LETTER_FINAL_SIGMA 0x03C2
#define UNICODE_GREEK_SMALL_LETTER_SIGMA 0x03C3
+#define EBCDIC_LATIN_SMALL_LETTER_SHARP_S 0x0059
+
#define UNI_DISPLAY_ISPRINT 0x0001
#define UNI_DISPLAY_BACKSLASH 0x0002
#define UNI_DISPLAY_QQ (UNI_DISPLAY_ISPRINT|UNI_DISPLAY_BACKSLASH)
#define UNI_DISPLAY_REGEX (UNI_DISPLAY_ISPRINT|UNI_DISPLAY_BACKSLASH)
-#define ANYOF_UNICODE_FOLD_SHARP_S(node, input, end) \
+#ifdef EBCDIC
+# define ANYOF_FOLD_SHARP_S(node, input, end) \
+ (ANYOF_BITMAP_TEST(node, EBCDIC_LATIN_SMALL_LETTER_SHARP_S) && \
+ (ANYOF_FLAGS(node) & ANYOF_UNICODE) && \
+ (ANYOF_FLAGS(node) & ANYOF_FOLD) && \
+ ((end) > (input) + 1) && \
+ toLOWER((input)[0]) == 's' && \
+ toLOWER((input)[1]) == 's')
+#else
+# define ANYOF_FOLD_SHARP_S(node, input, end) \
(ANYOF_BITMAP_TEST(node, UNICODE_LATIN_SMALL_LETTER_SHARP_S) && \
(ANYOF_FLAGS(node) & ANYOF_UNICODE) && \
(ANYOF_FLAGS(node) & ANYOF_FOLD) && \
((end) > (input) + 1) && \
toLOWER((input)[0]) == 's' && \
toLOWER((input)[1]) == 's')
+#endif
+#define SHARP_S_SKIP 2