X-Git-Url: http://git.sourceforge.jp/view?p=nkf%2Fnkf.git;a=blobdiff_plain;f=config.h;h=752ed38d590d8a042ab68b91fd52a3e7c7f867ac;hp=9da82c6aeefe6cf8975f4b00801c35410c1b7669;hb=790a8fa7af84fa8e2fc34ea95fa6816ec5498e13;hpb=80a3a08cff229c5941859d6c12d84e4dda55e91b diff --git a/config.h b/config.h index 9da82c6..752ed38 100644 --- a/config.h +++ b/config.h @@ -1,88 +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 +/* + * Select Default Output Encoding + * + */ -#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 +/* #define DEFAULT_CODE_JIS */ +/* #define DEFAULT_CODE_SJIS */ +/* #define DEFAULT_CODE_WINDOWS_31J */ +/* #define DEFAULT_CODE_EUC */ +/* #define DEFAULT_CODE_UTF8 */ #endif /* _CONFIG_H_ */