X-Git-Url: http://git.sourceforge.jp/view?p=nkf%2Fnkf.git;a=blobdiff_plain;f=config.h;h=9da82c6aeefe6cf8975f4b00801c35410c1b7669;hp=2619440bf9fd783837e0712b595dbabd92992df3;hb=31a6ee409f17e7c1c9cf92e033329636b0cb1720;hpb=48371028d89aa619a4f4afa4c7362ba939b23a18 diff --git a/config.h b/config.h index 2619440..9da82c6 100644 --- a/config.h +++ b/config.h @@ -43,6 +43,19 @@ */ /* #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 + +#ifndef WIN32DLL /******************************/ /* デフォルトの出力コード選択 */ /* Select DEFAULT_CODE */ @@ -51,5 +64,25 @@ /* #define DEFAULT_CODE_EUC */ /* #define DEFAULT_CODE_UTF8 */ /******************************/ +#else +#define DEFAULT_CODE_SJIS +#endif + +#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{ + const nkf_nfchar nfc[NORMALIZATION_TABLE_NFC_LENGTH]; + const nkf_nfchar nfd[NORMALIZATION_TABLE_NFD_LENGTH]; +}; +#endif #endif /* _CONFIG_H_ */