*/
/* #define INT_IS_SHORT */
+
+#if defined(INT_IS_SHORT)
+typedef long nkf_char;
+typedef unsigned char nkf_nfchar;
+#else
+typedef int nkf_char;
+typedef int nkf_nfchar;
+#endif
+
/* Unicode Normalization */
#define UNICODE_NORMALIZATION
#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 nkf_nfchar nfc[NORMALIZATION_TABLE_NFC_LENGTH];
+ const nkf_nfchar nfd[NORMALIZATION_TABLE_NFD_LENGTH];
};
-#else
-#undef UNICODE_NORMALIZATION
#endif
#endif /* _CONFIG_H_ */