summaryrefslogtreecommitdiff
path: root/ext/nkf/nkf-utf8/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/nkf/nkf-utf8/config.h')
-rw-r--r--ext/nkf/nkf-utf8/config.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/ext/nkf/nkf-utf8/config.h b/ext/nkf/nkf-utf8/config.h
index e46fe95a44..9b751fbecb 100644
--- a/ext/nkf/nkf-utf8/config.h
+++ b/ext/nkf/nkf-utf8/config.h
@@ -59,16 +59,21 @@
#define DEFAULT_CODE_SJIS
#endif
-#if defined(UTF8_INPUT_ENABLE) && defined(UNICODE_NORMALIZATION)
+#if defined(NUMCHAR_OPTION) && !defined(UTF8_INPUT_ENABLE)
+#define UTF8_INPUT_ENABLE
+#endif
+
+#ifdef UNICODE_NORMALIZATION
+#ifndef UTF8_INPUT_ENABLE
+#define UTF8_INPUT_ENABLE
+#endif
#define NORMALIZATION_TABLE_LENGTH 942
#define NORMALIZATION_TABLE_NFC_LENGTH 3
#define NORMALIZATION_TABLE_NFD_LENGTH 9
struct normalization_pair{
- int nfc[NORMALIZATION_TABLE_NFC_LENGTH];
- int nfd[NORMALIZATION_TABLE_NFD_LENGTH];
+ const int nfc[NORMALIZATION_TABLE_NFC_LENGTH];
+ const int nfd[NORMALIZATION_TABLE_NFD_LENGTH];
};
-#else
-#undef UNICODE_NORMALIZATION
#endif
#endif /* _CONFIG_H_ */