OSDN Git Service

* make read only variables const [ruby-dev:26592] by nobu
[nkf/nkf.git] / config.h
index 7779be9..9b751fb 100644 (file)
--- a/config.h
+++ b/config.h
 /* --debug, --no-output \e$B%*%W%7%g%s\e(B */
 #define CHECK_OPTION
 
+/* JIS X0212 */
+#define X0212_ENABLE
+
 /* --exec-in, --exec-out \e$B%*%W%7%g%s\e(B
- * pipe, fork, execvp \e$B$"$?$j$,L5$$$HF0$-$^$;$s\e(B
+ * pipe, fork, execvp \e$B$"$?$j$,L5$$$HF0$-$^$;$s!#\e(B
+ * MS-DOS, MinGW \e$B$J$I$G$O\e(B undef \e$B$K$7$F$/$@$5$$\e(B
+ * child process \e$B=*N;;~$N=hM}$,$$$$$+$2$s$J$N$G!"\e(B
+ * \e$B%G%U%)%k%H$GL58z$K$7$F$$$^$9!#\e(B
  */
-#define EXEC_IO
+/* #define EXEC_IO */
 
 /* SunOS \e$B$N\e(B cc \e$B$r;H$&$H$-$O\e(B undef \e$B$K$7$F$/$@$5$$\e(B */
 #define ANSI_C_PROTOTYPE
 
-/* int \e$B$,\e(B 16bit \e$B0J2<$N4D6-$G\e(B NUMCHAR_OPTION \e$B$r;H$&$K$O!"\e(B
+/* int \e$B$,\e(B 32bit \e$BL$K~$N4D6-$G\e(B NUMCHAR_OPTION \e$B$r;H$&$K$O!"\e(B
  * \e$B%3%a%s%H$r30$7$F$/$@$5$$!#\e(B
  */
 /* #define INT_IS_SHORT */
 
+/* Unicode Normalization */
+#define UNICODE_NORMALIZATION
+
+#ifndef WIN32DLL
 /******************************/
 /* \e$B%G%U%)%k%H$N=PNO%3!<%IA*Br\e(B */
 /* Select DEFAULT_CODE */
 /* #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 int nfc[NORMALIZATION_TABLE_NFC_LENGTH];
+    const int nfd[NORMALIZATION_TABLE_NFD_LENGTH];
+};
+#endif
 
 #endif /* _CONFIG_H_ */