From 086e5b1a63d77bf5a4ebe10396a430d544fbe505 Mon Sep 17 00:00:00 2001 From: naruse Date: Sun, 27 Jan 2008 07:28:26 +0000 Subject: * ext/nkf/nkt-utf8: update nkf. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/nkf/nkf-utf8/config.h | 80 ++++++++++++----------------------------------- 1 file changed, 20 insertions(+), 60 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 1fa74afd40..473be76a8e 100644 --- a/ext/nkf/nkf-utf8/config.h +++ b/ext/nkf/nkf-utf8/config.h @@ -1,91 +1,51 @@ #ifndef _CONFIG_H_ #define _CONFIG_H_ -/* UTF8 入出力 */ +/* UTF8 input and output */ #define UTF8_INPUT_ENABLE #define UTF8_OUTPUT_ENABLE -/* Shift_JIS 範囲外の文字を、CP932 で同値な文字に読み換える */ +/* invert characters invalid in Shift_JIS to CP932 */ #define SHIFTJIS_CP932 -/* オプションで入力を指定した時に、文字コードを固定する */ +/* fix input encoding when given by option */ #define INPUT_CODE_FIX -/* --overwrite オプション */ +/* --overwrite option */ /* by Satoru Takabayashi */ #define OVERWRITE -/* --cap-input, --url-input オプション */ +/* --cap-input, --url-input option */ #define INPUT_OPTION -/* --numchar-input オプション */ +/* --numchar-input option */ #define NUMCHAR_OPTION -/* --debug, --no-output オプション */ +/* --debug, --no-output option */ #define CHECK_OPTION /* JIS X0212 */ #define X0212_ENABLE -/* --exec-in, --exec-out オプション - * pipe, fork, execvp あたりが無いと動きません。 - * MS-DOS, MinGW などでは undef にしてください - * child process 終了時の処理がいいかげんなので、 - * デフォルトで無効にしています。 +/* --exec-in, --exec-out option + * require pipe, fork, execvp and so on. + * please undef this on MS-DOS, MinGW + * this is still buggy arround child process */ /* #define EXEC_IO */ -/* SunOS の cc を使うときは undef にしてください */ -#define ANSI_C_PROTOTYPE - -/* int が 32bit 未満の環境で NUMCHAR_OPTION を使うには、 - * コメントを外してください。 - */ -/* #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 */ -/* #define DEFAULT_CODE_JIS */ -/* #define DEFAULT_CODE_SJIS */ -/* #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 +/* + * Select Default Output Encoding + * + * If not defined, locale encoding is used. + */ -#define MIME_DECODE_DEFAULT 0 -#define X0201_DEFAULT 0 +/* #define DEFAULT_CODE_JIS */ +/* #define DEFAULT_CODE_SJIS */ +/* #define DEFAULT_CODE_EUC */ +/* #define DEFAULT_CODE_UTF8 */ #endif /* _CONFIG_H_ */ -- cgit v1.2.3