[uim-commit] r329 - in trunk: . uim

yamaken@freedesktop.org yamaken@freedesktop.org
Tue Jan 18 11:33:53 PST 2005


Author: yamaken
Date: 2005-01-18 11:33:50 -0800 (Tue, 18 Jan 2005)
New Revision: 329

Removed:
   trunk/uim/uim-compat-custom.c
   trunk/uim/uim-compat-custom.h
Modified:
   trunk/configure.ac
   trunk/uim/Makefile.am
   trunk/uim/uim.c
Log:
* This commit removes --enable-compat-custom option of configure
  script and all related codes. This has also resolved bug #2306

* configure.ac
  - Remove --enable-compat-custom option and related definitions
* uim/Makefile.am
  - Remove "if COMPAT_CUSTOM" section
* uim/uim.c
  - Remove #ifndef UIM_COMPAT_CUSTOM enclosure

* uim/uim-compat-custom.h
* uim/uim-compat-custom.c
  - Remove


Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2005-01-18 19:08:58 UTC (rev 328)
+++ trunk/configure.ac	2005-01-18 19:33:50 UTC (rev 329)
@@ -266,15 +266,7 @@
     enable_compat_table="no"
   ])
 
-AC_ARG_ENABLE(compat-custom,
-  AC_HELP_STRING([--enable-compat-custom],
-                 [enable obsolete version of 'custom API' required by sumika. This exclusively disables new custom API]),
-  [],
-  [
-    enable_compat_custom="no"
-  ])
 
-
 AC_ARG_ENABLE(scm-nested-eval,
   AC_HELP_STRING([--disable-scm-nested-eval],
                  [disable nested Scheme evaluation from C (i.e. C -> Scheme -> C -> Scheme) (for developer, will be obsolete)]),
@@ -341,7 +333,6 @@
 AM_CONDITIONAL(DEBUG, test x$enable_debug = xyes)
 AM_CONDITIONAL(COMPAT_SCM, test x$enable_compat_scm = xyes)
 AM_CONDITIONAL(COMPAT_TABLE, test x$enable_compat_table = xyes)
-AM_CONDITIONAL(COMPAT_CUSTOM, test x$enable_compat_custom = xyes)
 AM_CONDITIONAL(SCM_NESTED_EVAL, test x$enable_scm_nested_eval = xyes)
 AM_CONDITIONAL(CALLBACK_QUEUE, test x$enable_callback_queue = xyes)
 AM_CONDITIONAL(NEED_SETENV_C, test $ac_cv_func_setenv = no -o $ac_cv_func_unsetenv = no)
@@ -383,11 +374,6 @@
             [Enable obsolete table API for hk.scm (broken)])
 fi
 
-if test x$enable_compat_custom = xyes; then
-  AC_DEFINE(UIM_COMPAT_CUSTOM, 1,
-            [Enable obsolete version of 'custom API' required by sumika])
-fi
-
 if test x$enable_scm_nested_eval = xyes; then
   AC_DEFINE(UIM_SCM_NESTED_EVAL, 1,
             [Enable nested Scheme evaluation from C])
@@ -463,7 +449,6 @@
    DEBUG           : ${enable_debug}
    COMPAT_SCM      : ${enable_compat_scm}
    COMPAT_TABLE    : ${enable_compat_table}
-   COMPAT_CUSTOM   : ${enable_compat_custom}
    SCM_NESTED_EVAL : ${enable_scm_nested_eval}
    CALLBACK_QUEUE  : ${enable_callback_queue}
 ])

Modified: trunk/uim/Makefile.am
===================================================================
--- trunk/uim/Makefile.am	2005-01-18 19:08:58 UTC (rev 328)
+++ trunk/uim/Makefile.am	2005-01-18 19:33:50 UTC (rev 329)
@@ -9,11 +9,13 @@
 uim_plugin_LTLIBRARIES = 
 uim_plugindir = $(pkglibdir)/plugin
 
-pkginclude_HEADERS = uim.h uim-util.h uim-helper.h uim-im-switcher.h uim-scm.h plugin.h
+pkginclude_HEADERS = uim.h uim-util.h uim-helper.h uim-im-switcher.h \
+		uim-scm.h uim-custom.h plugin.h
 
 libuim_la_SOURCES = uim.c uim-scm.c uim-util.c uim-func.c uim-key.c \
 		siod.h context.h gettext.h \
 		uim-helper.c uim-helper-client.c \
+		uim-custom.c \
 		intl.c \
 		uim-ipc.c \
 		getpeereid.c \
@@ -34,14 +36,6 @@
   pkginclude_HEADERS += uim-compat-scm.h
 endif
 
-if COMPAT_CUSTOM
-  pkginclude_HEADERS += uim-compat-custom.h
-  libuim_la_SOURCES += uim-compat-custom.c
-else
-  pkginclude_HEADERS += uim-custom.h
-  libuim_la_SOURCES += uim-custom.c
-endif
-
 if M17NLIB
   uim_plugin_LTLIBRARIES += libuim-m17nlib.la
   libuim_m17nlib_la_SOURCES = m17nlib.c

Deleted: trunk/uim/uim-compat-custom.c
===================================================================
--- trunk/uim/uim-compat-custom.c	2005-01-18 19:08:58 UTC (rev 328)
+++ trunk/uim/uim-compat-custom.c	2005-01-18 19:33:50 UTC (rev 329)
@@ -1,332 +0,0 @@
-/*
-
-  Copyright (c) 2003,2004 uim Project http://uim.freedesktop.org/
-
-  All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions
-  are met:
-
-  1. Redistributions of source code must retain the above copyright
-     notice, this list of conditions and the following disclaimer.
-  2. Redistributions in binary form must reproduce the above copyright
-     notice, this list of conditions and the following disclaimer in the
-     documentation and/or other materials provided with the distribution.
-  3. Neither the name of authors nor the names of its contributors
-     may be used to endorse or promote products derived from this software
-     without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-  ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-  OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-  SUCH DAMAGE.
-
-*/
-
-#include "config.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include "uim-compat-scm.h"
-#include "uim-compat-custom.h"
-
-
-uim_lisp
-uim_custom_value(uim_lisp custom_sym) {
-  uim_lisp form;
-
-  form = uim_scm_list2(uim_scm_intern_c_str("custom-value"),
-		       uim_scm_quote(custom_sym));
-
-  return uim_scm_eval(form);
-}
-
-int
-uim_custom_value_as_bool(uim_lisp custom_sym) {
-  uim_lisp val;
-  int result = 0;
-
-  if (uim_scm_eq(uim_custom_type(custom_sym),
-		 uim_scm_intern_c_str("boolean")))
-  {
-    val = uim_custom_value(custom_sym);
-    result = uim_scm_eq(val, uim_scm_f()) ? 0 : 1;
-  }
-
-  return result;
-}
-
-int
-uim_custom_value_as_int(uim_lisp custom_sym) {
-  uim_lisp val;
-  int result = 0;
-
-  if (uim_scm_eq(uim_custom_type(custom_sym),
-		 uim_scm_intern_c_str("integer")))
-  {
-    val = uim_custom_value(custom_sym);
-    result = uim_scm_c_int(val);
-  }
-
-  return result;
-}
-
-char *
-uim_custom_value_as_str(uim_lisp custom_sym) {
-  uim_lisp val;
-  char *result = NULL;
-
-  if (uim_scm_eq(uim_custom_type(custom_sym),
-		 uim_scm_intern_c_str("string")))
-  {
-    val = uim_custom_value(custom_sym);
-    result = uim_scm_c_str(val);
-  }
-
-  return result;
-}
-
-char *
-uim_custom_value_as_path(uim_lisp custom_sym) {
-  uim_lisp val;
-  char *result = NULL;
-
-  if (uim_scm_eq(uim_custom_type(custom_sym),
-		 uim_scm_intern_c_str("pathname")))
-  {
-    val = uim_custom_value(custom_sym);
-    result = uim_scm_c_str(val);
-  }
-
-  return result;
-}
-
-uim_lisp
-uim_custom_value_as_symbol(uim_lisp custom_sym) {
-  uim_lisp val;
-
-  if (uim_scm_eq(uim_custom_type(custom_sym),
-		 uim_scm_intern_c_str("symbol")))
-  {
-    val = uim_custom_value(custom_sym);
-  } else {
-    val = uim_scm_f();
-  }
-
-  return val;
-}
-
-void
-uim_custom_set(uim_lisp custom_sym, uim_lisp custom_val) {
-  uim_lisp form;
-
-  form = uim_scm_list3(uim_scm_intern_c_str("custom-set!"),
-		       uim_scm_quote(custom_sym),
-		       custom_val);
-  uim_scm_eval(form);
-}
-
-char *
-uim_custom_symbol_label(uim_lisp custom_sym, uim_lisp val_sym) {
-  uim_lisp form, label;
-
-  form = uim_scm_list3(uim_scm_intern_c_str("custom-symbol-label"),
-		       uim_scm_quote(custom_sym),
-		       uim_scm_quote(val_sym));
-  label = uim_scm_eval(form);
-
-  return uim_scm_c_str(label);
-}
-
-char *
-uim_custom_symbol_desc(uim_lisp custom_sym, uim_lisp val_sym) {
-  uim_lisp form, desc;
-
-  form = uim_scm_list3(uim_scm_intern_c_str("custom-symbol-desc"),
-		       uim_scm_quote(custom_sym),
-		       uim_scm_quote(val_sym));
-  desc = uim_scm_eval(form);
-
-  return uim_scm_c_str(desc);
-}
-
-uim_lisp
-uim_custom_label(uim_lisp custom_sym) {
-  uim_lisp form;
-
-  form = uim_scm_list2(uim_scm_intern_c_str("custom-label"),
-		       uim_scm_quote(custom_sym));
-
-  return uim_scm_eval(form);
-}
-
-uim_lisp
-uim_custom_desc(uim_lisp custom_sym) {
-  uim_lisp form;
-
-  form = uim_scm_list2(uim_scm_intern_c_str("custom-desc"),
-		       uim_scm_quote(custom_sym));
-
-  return uim_scm_eval(form);
-}
-
-uim_lisp
-uim_custom_type(uim_lisp custom_sym) {
-  uim_lisp form;
-
-  form = uim_scm_list2(uim_scm_intern_c_str("custom-type"),
-		       uim_scm_quote(custom_sym));
-
-  return uim_scm_eval(form);
-}
-
-uim_lisp
-uim_custom_default_value(uim_lisp custom_sym) {
-  uim_lisp form;
-
-  form = uim_scm_list2(uim_scm_intern_c_str("custom-default-value"),
-		       uim_scm_quote(custom_sym));
-
-  return uim_scm_eval(form);
-}
-
-int
-uim_custom_ctype(uim_lisp custom_sym) {
-  uim_lisp type;
-  int result;
-
-  type = uim_custom_type(custom_sym);
-  if (uim_scm_eq(type,
-		 uim_scm_intern_c_str("boolean")))
-  {
-    result = UCustom_Bool;
-  } else if (uim_scm_eq(type,
-			uim_scm_intern_c_str("integer")))
-  {
-    result = UCustom_Int;
-  } else if (uim_scm_eq(type,
-			uim_scm_intern_c_str("string")))
-  {
-    result = UCustom_Str;
-  } else if (uim_scm_eq(type,
-			uim_scm_intern_c_str("pathname")))
-  {
-    result = UCustom_Path;
-  } else if (uim_scm_eq(type,
-			uim_scm_intern_c_str("symbol")))
-  {
-    result = UCustom_Symbol;
-  } else if (uim_scm_eq(type,
-			uim_scm_intern_c_str("key")))
-  {
-    result = UCustom_Key;
-  } else {
-    result = UCustom_Bool;
-  }
-
-  return result;
-}
-
-uim_lisp
-uim_custom_range(uim_lisp custom_sym) {
-  uim_lisp form;
-
-  form = uim_scm_list2(uim_scm_intern_c_str("custom-range"),
-		       uim_scm_quote(custom_sym));
-
-  return uim_scm_eval(form);
-}
-
-char *
-uim_custom_group_label(uim_lisp group_sym) {
-  uim_lisp form, label;
-
-  form = uim_scm_list2(uim_scm_intern_c_str("custom-group-label"),
-		       uim_scm_quote(group_sym));
-  label = uim_scm_eval(form);
-
-  return uim_scm_c_str(label);
-}
-
-char *
-uim_custom_group_desc(uim_lisp group_sym) {
-  uim_lisp form, desc;
-
-  form = uim_scm_list2(uim_scm_intern_c_str("custom-group-desc"),
-		       uim_scm_quote(group_sym));
-  desc = uim_scm_eval(form);
-
-  return uim_scm_c_str(desc);
-}
-
-uim_lisp
-uim_custom_group_subgroups(uim_lisp group_sym) {
-  uim_lisp form, subgrps;
-
-  form = uim_scm_list2(uim_scm_intern_c_str("custom-group-subgroups"),
-		       uim_scm_quote(group_sym));
-  subgrps = uim_scm_eval(form);
-
-  return subgrps;
-}
-
-uim_lisp
-uim_custom_list_groups(void) {
-  uim_lisp form, groups;
-
-  form = uim_scm_list1(uim_scm_intern_c_str("custom-list-groups"));
-  groups = uim_scm_eval(form);
-
-  return groups;
-}
-
-uim_lisp
-uim_custom_list_primary_groups(void) {
-  uim_lisp form, groups;
-
-  form = uim_scm_list1(uim_scm_intern_c_str("custom-list-primary-groups"));
-  groups = uim_scm_eval(form);
-
-  return groups;
-}
-
-uim_lisp
-uim_custom_collect_by_group(uim_lisp group_sym) {
-  uim_lisp form, customs;
-
-  form = uim_scm_list2(uim_scm_intern_c_str("custom-collect-by-group"),
-		       uim_scm_quote(group_sym));
-  customs = uim_scm_eval(form);
-
-  return customs;
-}
-
-char *
-uim_custom_value_as_string(uim_lisp sym) {
-  uim_lisp form, value;
-
-  form = uim_scm_list2(uim_scm_intern_c_str("custom-canonical-value-as-string"),
-		       uim_scm_quote(sym));
-  value = uim_scm_eval(form);
-
-  return uim_scm_c_str(value);
-}
-
-char *
-uim_custom_definition_as_string(uim_lisp sym) {
-  uim_lisp form, definition;
-
-  form = uim_scm_list2(uim_scm_intern_c_str("custom-as-string"),
-		       uim_scm_quote(sym));
-  definition = uim_scm_eval(form);
-
-  return uim_scm_c_str(definition);
-}

Deleted: trunk/uim/uim-compat-custom.h
===================================================================
--- trunk/uim/uim-compat-custom.h	2005-01-18 19:08:58 UTC (rev 328)
+++ trunk/uim/uim-compat-custom.h	2005-01-18 19:33:50 UTC (rev 329)
@@ -1,113 +0,0 @@
-/*
-
-  Copyright (c) 2003,2004 uim Project http://uim.freedesktop.org/
-
-  All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions
-  are met:
-
-  1. Redistributions of source code must retain the above copyright
-     notice, this list of conditions and the following disclaimer.
-  2. Redistributions in binary form must reproduce the above copyright
-     notice, this list of conditions and the following disclaimer in the
-     documentation and/or other materials provided with the distribution.
-  3. Neither the name of authors nor the names of its contributors
-     may be used to endorse or promote products derived from this software
-     without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-  ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-  OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-  SUCH DAMAGE.
-
-*/
-
-/*
-   This is an obsolete API only exist for backward compatibility. New
-   codes should not use this. Use uim-custom.h instead.
-
-                                                2004-12-21 YamaKen
-*/
-
-
-/* API and ABI are unstable */
-#ifndef _uim_compat_custom_h_included_
-#define _uim_compat_custom_h_included_
-
-#include "uim-compat-scm.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-enum UCustomType {
-  UCustom_Bool,
-  UCustom_Int,
-  UCustom_Str,
-  UCustom_Path,
-  UCustom_Symbol,
-  UCustom_Key
-};
-
-uim_lisp
-uim_custom_value(uim_lisp custom_sym);
-int
-uim_custom_value_as_bool(uim_lisp custom_sym);
-int
-uim_custom_value_as_int(uim_lisp custom_sym);
-char *
-uim_custom_value_as_str(uim_lisp custom_sym);
-char *
-uim_custom_value_as_path(uim_lisp custom_sym);
-uim_lisp
-uim_custom_value_as_symbol(uim_lisp custom_sym);
-/* char **uim_custom_value_as_key(uim_lisp custom_sym); */
-void
-uim_custom_set(uim_lisp custom_sym, uim_lisp custom_val);
-char *
-uim_custom_symbol_label(uim_lisp custom_sym, uim_lisp val_sym);
-char *
-uim_custom_symbol_desc(uim_lisp custom_sym, uim_lisp val_sym);
-uim_lisp
-uim_custom_label(uim_lisp custom_sym);
-uim_lisp
-uim_custom_desc(uim_lisp custom_sym);
-uim_lisp
-uim_custom_type(uim_lisp custom_sym);
-uim_lisp
-uim_custom_default_value(uim_lisp custom_sym);
-int
-uim_custom_ctype(uim_lisp custom_sym);
-uim_lisp
-uim_custom_range(uim_lisp custom_sym);
-char *
-uim_custom_group_label(uim_lisp group_sym);
-char *
-uim_custom_group_desc(uim_lisp group_sym);
-uim_lisp
-uim_custom_group_subgroups(uim_lisp group_sym);
-uim_lisp
-uim_custom_list_groups(void);
-uim_lisp
-uim_custom_list_primary_groups(void);
-uim_lisp
-uim_custom_collect_by_group(uim_lisp group_sym);
-char *
-uim_custom_value_as_string(uim_lisp sym);
-char *
-uim_custom_definition_as_string(uim_lisp sym);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

Modified: trunk/uim/uim.c
===================================================================
--- trunk/uim/uim.c	2005-01-18 19:08:58 UTC (rev 328)
+++ trunk/uim/uim.c	2005-01-18 19:33:50 UTC (rev 329)
@@ -41,9 +41,7 @@
 #include "uim.h"
 #include "uim-im-switcher.h"
 #include "uim-scm.h"
-#ifndef UIM_COMPAT_CUSTOM
 #include "uim-custom.h"
-#endif
 #include "context.h"
 #include "gettext.h"
 



More information about the Uim-commit mailing list