Author: yamakenz
Date: Sat Aug 11 11:09:32 2007
New Revision: 4830

Removed:
   trunk/uim/uim-compat-scm.c
   trunk/uim/uim-compat-scm.h
Modified:
   trunk/configure.ac
   trunk/doc/COMPATIBILITY
   trunk/qt/toolbar-common-quimhelpertoolbar.cpp
   trunk/uim/Makefile.am
   trunk/uim/rk.c
   trunk/uim/uim-scm.c
   trunk/uim/uim-util.c
   trunk/xim/canddisp.cpp
   trunk/xim/convdisp.cpp
   trunk/xim/main.cpp
   trunk/xim/ximic.cpp
   trunk/xim/ximserver.cpp

Log:
* uim/uim-compat-scm.h
  - Removed file
  - (uim_scm_string_equal): Removed
* uim/uim-compat-scm.c
  - Removed file
  - (struct cmp_args, uim_scm_string_equal,
    uim_scm_string_equal_internal): Removed
* uim/uim-scm.c
  - Exclude uim-compat-scm.c
* uim/rk.c
  - Exclude uim-compat-scm.h
  - (string_equalp): New static function
  - (str_seq_equal, str_seq_partial): Replace uim_scm_string_equal()
    with string_equalp()
* uim/uim-util.c
  - Exclude uim-compat-scm.h
* uim/Makefile.am
  - (EXTRA_DIST): Remove uim-compat-scm.c
  - (pkginclude_HEADERS): Remove uim-compat-scm.h
* qt/toolbar-common-quimhelpertoolbar.cpp
* xim/ximic.cpp
* xim/ximserver.cpp
* xim/main.cpp
* xim/convdisp.cpp
  - Replace uim-compat-scm.h for uim_scm_symbol_value_*() with uim-scm.h
* xim/canddisp.cpp
  - Ditto
  - (candwin_command):
    * Modify comment about uim-compat-scm API
    * Remove #ifdef UIM_COMPAT_SCM
* configure.ac
  - Remove the option --disable-compat-scm
* doc/COMPATIBILITY
  - Update


Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac  (original)
+++ trunk/configure.ac  Sat Aug 11 11:09:32 2007
@@ -765,18 +765,6 @@
     enable_debug="no"
   ])
 
-AC_ARG_ENABLE(compat-scm,
-  AC_HELP_STRING([--disable-compat-scm],
-                 [disable obsolete part of uim-scm API (experimental)]),
-  [
-    if test "$enable_compat_scm" != "no" ;then
-      enable_compat_scm="yes"
-    fi
-  ],
-  [
-    enable_compat_scm="yes"
-  ])
-
 AC_ARG_ENABLE(fep,
   AC_HELP_STRING([--disable-fep],
                  [disable uim-fep]),
@@ -964,7 +952,6 @@
 AM_CONDITIONAL(EB, test x$use_eb = xyes)
 AM_CONDITIONAL(LIBEDIT, test x$use_libedit = xyes)
 AM_CONDITIONAL(DEBUG, test x$enable_debug = xyes)
-AM_CONDITIONAL(COMPAT_SCM, test x$enable_compat_scm = xyes)
 AM_CONDITIONAL(NEED_SETENV_C, test $ac_cv_func_setenv = no -o 
$ac_cv_func_unsetenv = no)
 AM_CONDITIONAL(NEED_STRSEP_C, test $ac_cv_func_strsep = no)
 AM_CONDITIONAL(GCC, test x$ac_cv_c_compiler_gnu = xyes)
@@ -1330,11 +1317,6 @@
 AC_SUBST(UIM_SCM_CFLAGS)
 
 
-if test x$enable_compat_scm = xyes; then
-  AC_DEFINE(UIM_COMPAT_SCM, 1,
-            [Enable obsolete part of uim-scm API])
-fi
-
 # Checks for system services
 
 
@@ -1421,6 +1403,5 @@
 Configure Result for developers:
 
    DEBUG           : ${enable_debug}
-   COMPAT_SCM      : ${enable_compat_scm}
 ])
 fi

Modified: trunk/doc/COMPATIBILITY
==============================================================================
--- trunk/doc/COMPATIBILITY     (original)
+++ trunk/doc/COMPATIBILITY     Sat Aug 11 11:09:32 2007
@@ -384,7 +384,7 @@
 Affects: uim developers, IM developers
 Updates: C API, libuim ABI
 Version: 1.5.0
-Revision: ac4333, ac4334, ac4339, ac4347, ac4351-ac4353, ac4355, ac4444, 
ac4446, ac4751, ac4761, ac4764, ac4788, ac4808, ac4812, ac4813, ac4815, ac4817, 
ac4819, ac4821
+Revision: ac4333, ac4334, ac4339, ac4347, ac4351-ac4353, ac4355, ac4444, 
ac4446, ac4751, ac4761, ac4764, ac4788, ac4808, ac4812, ac4813, ac4815, ac4817, 
ac4819, ac4821, ac4830
 Date: 2007-01-09 -
 Modifier: YamaKen
 Related: SigScheme introduction to uim
@@ -465,6 +465,7 @@
   (removed) uim_scm_set_output()
   (removed) uim_scm_is_alive()
   (removed) uim_scm_c_strs_into_list()
+  (removed) uim_scm_string_equal()
   (removed) struct uim_api_tbl
   (removed) im-return-str
   (removed) im-return-str-list

Modified: trunk/qt/toolbar-common-quimhelpertoolbar.cpp
==============================================================================
--- trunk/qt/toolbar-common-quimhelpertoolbar.cpp       (original)
+++ trunk/qt/toolbar-common-quimhelpertoolbar.cpp       Sat Aug 11 11:09:32 2007
@@ -39,7 +39,7 @@
 
 #include <stdlib.h>
 
-#include "uim/uim-compat-scm.h"
+#include "uim/uim-scm.h"
 #include "qtgettext.h"
 
 static const QString ICONDIR = UIM_PIXMAPSDIR;

Modified: trunk/uim/Makefile.am
==============================================================================
--- trunk/uim/Makefile.am       (original)
+++ trunk/uim/Makefile.am       Sat Aug 11 11:09:32 2007
@@ -4,7 +4,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-EXTRA_DIST = uim-compat-scm.c encoding-table.c test-gc.c
+EXTRA_DIST = encoding-table.c test-gc.c
 
 uim_defs = -DSCM_FILES=\"$(datadir)/uim\"
 # FIXME: $(UIM_SCM_CFLAGS) should only affect on uim-scm.c
@@ -41,10 +41,6 @@
                uim-ipc.c uim-helper.c uim-helper-client.c \
                gettext.h intl.c \
                rk.c bsdlook.c
-
-if COMPAT_SCM
-  pkginclude_HEADERS += uim-compat-scm.h
-endif
 
 libuim_custom_la_SOURCES = uim-custom.c
 

Modified: trunk/uim/rk.c
==============================================================================
--- trunk/uim/rk.c      (original)
+++ trunk/uim/rk.c      Sat Aug 11 11:09:32 2007
@@ -33,12 +33,19 @@
 
 #include <config.h>
 
+#include <string.h>
+
 #include "uim-internal.h"
 #include "uim-scm.h"
-#include "uim-compat-scm.h"
 #include "uim-scm-abbrev.h"
 
 
+static uim_bool
+string_equalp(uim_lisp x, uim_lisp y)
+{
+  return (strcmp(uim_scm_refer_c_str(x), uim_scm_refer_c_str(y)) == 0);
+}
+
 static uim_lisp
 str_seq_equal(uim_lisp seq, uim_lisp rule)
 {
@@ -49,7 +56,7 @@
     return uim_scm_f();
   }
   for (i = 0; i < sl; i++) {
-    if (!uim_scm_string_equal(uim_scm_car(seq), uim_scm_car(rule))) {
+    if (!string_equalp(uim_scm_car(seq), uim_scm_car(rule))) {
       return uim_scm_f();
     }
     seq = uim_scm_cdr(seq);
@@ -76,7 +83,7 @@
   }
   /* Obviously. sl < rl */
   for (i = 0; i < sl; i++) {
-    if (!uim_scm_string_equal(uim_scm_car(seq), uim_scm_car(rule))) {
+    if (!string_equalp(uim_scm_car(seq), uim_scm_car(rule))) {
       return uim_scm_f();
     }
     seq = uim_scm_cdr(seq);

Modified: trunk/uim/uim-scm.c
==============================================================================
--- trunk/uim/uim-scm.c (original)
+++ trunk/uim/uim-scm.c Sat Aug 11 11:09:32 2007
@@ -57,10 +57,6 @@
 /* To avoid macro name conflict with SigScheme, uim-scm-abbrev.h should not
  * be included. */
 
-#ifdef UIM_COMPAT_SCM
-#include "uim-compat-scm.c"
-#endif
-
 
 static uim_lisp protected;
 static uim_bool initialized;

Modified: trunk/uim/uim-util.c
==============================================================================
--- trunk/uim/uim-util.c        (original)
+++ trunk/uim/uim-util.c        Sat Aug 11 11:09:32 2007
@@ -42,7 +42,6 @@
 
 #include "uim-internal.h"
 #include "uim-scm.h"
-#include "uim-compat-scm.h"
 #include "uim-scm-abbrev.h"
 #include "uim-util.h"
 

Modified: trunk/xim/canddisp.cpp
==============================================================================
--- trunk/xim/canddisp.cpp      (original)
+++ trunk/xim/canddisp.cpp      Sat Aug 11 11:09:32 2007
@@ -43,9 +43,7 @@
 
 #include "uim/uim.h"
 #include "uim/uim-util.h"
-#ifdef UIM_COMPAT_SCM
-#include "uim/uim-compat-scm.h"
-#endif /* UIM_COMPAT_SCM */
+#include "uim/uim-scm.h"
 
 #include "ximserver.h"
 #include "xim.h"
@@ -75,20 +73,15 @@
     const char *user_config;
 
     /*
-      XXX: We should drop uim-compat-scm API. -- omote 07/12/2005
-
       Search order of candwin_command be summarized as follows
-      if UIM_COMPAT_SCM is defined.
         1. UIM_CANDWIN_PROG -- mainly for debugging purpose
         2. value in 'uim-candwin-prog' symbol
         3. default toolkit's candwin program determined by ./configure
      */
 
     user_config = getenv("UIM_CANDWIN_PROG");
-#ifdef UIM_COMPAT_SCM
     if (!user_config)
        user_config = uim_scm_symbol_value_str("uim-candwin-prog");
-#endif
 
     if (user_config) {
        asprintf(&candwin_prog, UIM_LIBEXECDIR "/%s", user_config);

Modified: trunk/xim/convdisp.cpp
==============================================================================
--- trunk/xim/convdisp.cpp      (original)
+++ trunk/xim/convdisp.cpp      Sat Aug 11 11:09:32 2007
@@ -51,7 +51,7 @@
 #include "xdispatch.h"
 #include "util.h"
 
-#include "uim/uim-compat-scm.h"
+#include "uim/uim-scm.h"
 
 #define UNDERLINE_HEIGHT       2
 #define DEFAULT_FONT_SIZE      16

Modified: trunk/xim/main.cpp
==============================================================================
--- trunk/xim/main.cpp  (original)
+++ trunk/xim/main.cpp  Sat Aug 11 11:09:32 2007
@@ -54,7 +54,7 @@
 
 #include "uim/uim-util.h"
 #include "uim/uim-im-switcher.h"
-#include "uim/uim-compat-scm.h"
+#include "uim/uim-scm.h"
 
 Display *XimServer::gDpy;
 std::map<Window, XimServer *> XimServer::gServerMap;

Modified: trunk/xim/ximic.cpp
==============================================================================
--- trunk/xim/ximic.cpp (original)
+++ trunk/xim/ximic.cpp Sat Aug 11 11:09:32 2007
@@ -48,7 +48,7 @@
 #include "connection.h"
 #include "util.h"
 
-#include "uim/uim-compat-scm.h"
+#include "uim/uim-scm.h"
  
 #ifdef HAVE_ALLOCA_H
 # include <alloca.h>

Modified: trunk/xim/ximserver.cpp
==============================================================================
--- trunk/xim/ximserver.cpp     (original)
+++ trunk/xim/ximserver.cpp     Sat Aug 11 11:09:32 2007
@@ -59,7 +59,7 @@
 
 #include "uim/uim-helper.h"
 #include "uim/uim-im-switcher.h"
-#include "uim/uim-compat-scm.h"
+#include "uim/uim-scm.h"
 
 #ifndef XK_dead_horn
 #define XK_dead_horn   0xfe62
@@ -154,7 +154,7 @@
 
     // Updated global IM of XimServer
     if (!strcmp(custom, "custom-preserved-default-im-name") &&
-                   
uim_scm_symbol_value_bool("custom-activate-default-im-name?"))
+       uim_scm_symbol_value_bool("custom-activate-default-im-name?"))
        set_im(++val);
 
 #if HAVE_XFT_UTF8_STRING
@@ -163,7 +163,7 @@
 #endif
 
     if (!strcmp(custom, "bridge-show-input-state?") &&
-                   !uim_scm_symbol_value_bool("bridge-show-input-state?")) {
+       !uim_scm_symbol_value_bool("bridge-show-input-state?")) {
        Canddisp *disp = canddisp_singleton();
        disp->hide_caret_state();
     }

Reply via email to