[Groonga-commit] groonga/groonga [master] Remove "no" condition variable name

Back to archive index

null+****@clear***** null+****@clear*****
2012年 4月 13日 (金) 13:10:23 JST


Kouhei Sutou	2012-04-13 13:10:23 +0900 (Fri, 13 Apr 2012)

  New Revision: 8a7d4e3cd1a1af51415949f3f2bef5ce73d839e2

  Log:
    Remove "no" condition variable name
    
    NO_NKFC -> WITH_NFKC

  Modified files:
    configure.ac
    lib/nfkc.c
    lib/nfkc.rb
    lib/str.c

  Modified: configure.ac (+2 -2)
===================================================================
--- configure.ac    2012-04-13 13:09:06 +0900 (731254a)
+++ configure.ac    2012-04-13 13:10:23 +0900 (5ef6e0d)
@@ -420,8 +420,8 @@ AC_ARG_ENABLE(nfkc,
   [AS_HELP_STRING([--enable-nfkc],
     [use nfkc based utf8 normalization. [default=yes]])],,
   [enable_nfkc="yes"])
-if test "x$enable_nfkc" != "xyes"; then
-  AC_DEFINE(NO_NFKC, [1], [compile without nfkc.c])
+if test "x$enable_nfkc" = "xyes"; then
+  AC_DEFINE(WITH_NFKC, [1], [compile with nfkc.c])
 fi
 
 # coverage

  Modified: lib/nfkc.c (+6 -2)
===================================================================
--- lib/nfkc.c    2012-04-13 13:09:06 +0900 (fac5654)
+++ lib/nfkc.c    2012-04-13 13:10:23 +0900 (d460158)
@@ -17,9 +17,13 @@
 don't edit this file by hand. it generated automatically by nfkc.rb
 */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif /* HAVE_CONFIG_H */
+
 #include "nfkc.h"
 
-#ifndef NO_NFKC
+#ifdef WITH_NFKC
 
 unsigned char
 grn_nfkc_ctype(const unsigned char *str)
@@ -80241,5 +80245,5 @@ case 0xE3 :
   return 0;
 }
 
-#endif /* NO_NFKC */
+#endif /* WITH_NFKC */
 

  Modified: lib/nfkc.rb (+2 -2)
===================================================================
--- lib/nfkc.rb    2012-04-13 13:09:06 +0900 (3d83991)
+++ lib/nfkc.rb    2012-04-13 13:10:23 +0900 (e1f7f59)
@@ -349,7 +349,7 @@ don't edit this file by hand. it generated automatically by nfkc.rb
 
 #include "nfkc.h"
 
-#ifndef NO_NFKC
+#ifdef WITH_NFKC
 
 unsigned char
 grn_nfkc_ctype(const unsigned char *str)
@@ -369,7 +369,7 @@ grn_nfkc_map2(const unsigned char *prefix, const unsigned char *suffix)
 %  return 0;
 }
 
-#endif /* NO_NFKC */
+#endif /* WITH_NFKC */
 
 END
 

  Modified: lib/str.c (+6 -6)
===================================================================
--- lib/str.c    2012-04-13 13:09:06 +0900 (7bb449d)
+++ lib/str.c    2012-04-13 13:10:23 +0900 (6a2bfa9)
@@ -417,7 +417,7 @@ normalize_euc(grn_ctx *ctx, grn_str *nstr)
   return GRN_SUCCESS;
 }
 
-#ifndef NO_NFKC
+#ifdef WITH_NFKC
 uint_least8_t grn_nfkc_ctype(const unsigned char *str);
 const char *grn_nfkc_map1(const unsigned char *str);
 const char *grn_nfkc_map2(const unsigned char *prefix, const unsigned char *suffix);
@@ -541,7 +541,7 @@ normalize_utf8(grn_ctx *ctx, grn_str *nstr)
   nstr->norm_blen = (size_t)(d - (unsigned char *)nstr->norm);
   return GRN_SUCCESS;
 }
-#endif /* NO_NFKC */
+#endif /* WITH_NFKC */
 
 inline static grn_rc
 normalize_sjis(grn_ctx *ctx, grn_str *nstr)
@@ -1227,11 +1227,11 @@ grn_str_open_(grn_ctx *ctx, const char *str, unsigned int str_len, int flags, gr
     rc = normalize_euc(ctx, nstr);
     break;
   case GRN_ENC_UTF8 :
-#ifdef NO_NFKC
-    rc = normalize_none(ctx, nstr);
-#else /* NO_NFKC */
+#ifdef WITH_NFKC
     rc = normalize_utf8(ctx, nstr);
-#endif /* NO_NFKC */
+#else /* WITH_NFKC */
+    rc = normalize_none(ctx, nstr);
+#endif /* WITH_NFKC */
     break;
   case GRN_ENC_SJIS :
     rc = normalize_sjis(ctx, nstr);




Groonga-commit メーリングリストの案内
Back to archive index