Tidy up EXE_EXT patches to MM_Unix.pm
[p5sagit/p5-mst-13.2.git] / utf8.h
diff --git a/utf8.h b/utf8.h
index b35cfeb..2ac5f91 100644 (file)
--- a/utf8.h
+++ b/utf8.h
@@ -188,3 +188,21 @@ END_EXTERN_C
 #endif
 
 #define UTF8_IS_ASCII(c) UTF8_IS_INVARIANT(c)
+
+#define UNICODE_LATIN_SMALL_LETTER_SHARP_S     0x00DF
+#define UNICODE_GREEK_CAPITAL_LETTER_SIGMA     0x03A3
+#define UNICODE_GREEK_SMALL_LETTER_FINAL_SIGMA 0x03C2
+#define UNICODE_GREEK_SMALL_LETTER_SIGMA       0x03C3
+
+#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(n, s, e)    \
+       (ANYOF_BITMAP_TEST(n, UNICODE_LATIN_SMALL_LETTER_SHARP_S) && \
+        ANYOF_FLAGS(n) & ANYOF_UNICODE && \
+        ANYOF_FLAGS(n) & ANYOF_FOLD && \
+        ((e) > (s) + 1) && \
+        toLOWER((s)[0]) == 's' && \
+        toLOWER((s)[1]) == 's')