From 0580cf2696d440cb29d34501dc4667ec533c508c Mon Sep 17 00:00:00 2001 From: naruse Date: Thu, 21 Jul 2005 16:13:08 +0000 Subject: * ext/nkf/nkf-utf8/{nkf.c,utf8tbl.c,config.h}: import 1.76 [ruby-dev:26592] nkf constification git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/nkf/nkf-utf8/config.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'ext/nkf/nkf-utf8/config.h') 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_ */ -- cgit v1.2.3