[uim-commit] r328 - in trunk: scm uim

yamaken@freedesktop.org yamaken@freedesktop.org
Tue Jan 18 11:09:02 PST 2005


Author: yamaken
Date: 2005-01-18 11:08:58 -0800 (Tue, 18 Jan 2005)
New Revision: 328

Modified:
   trunk/scm/plugin.scm
   trunk/uim/plugin.c
Log:
* uim/plugin.c
  - (plugin_unload):
    * Add error checks
    * Remove Scheme-side construct
* scm/plugin.scm
  - (plugin-list-delete): New procedure


Modified: trunk/scm/plugin.scm
===================================================================
--- trunk/scm/plugin.scm	2005-01-18 18:46:31 UTC (rev 327)
+++ trunk/scm/plugin.scm	2005-01-18 19:08:58 UTC (rev 328)
@@ -69,6 +69,11 @@
      (set! plugin-alist
 	   (append plugin-alist (list entry))))))
 
+(define plugin-list-delete
+  (lambda (plugin-name)
+    (set! plugin-alist
+	  (alist-delete plugin-name plugin-alist string=?))))
+
 (define plugin-list-query
   (lambda (plugin-name)
     (assoc plugin-name plugin-alist)))

Modified: trunk/uim/plugin.c
===================================================================
--- trunk/uim/plugin.c	2005-01-18 18:46:31 UTC (rev 327)
+++ trunk/uim/plugin.c	2005-01-18 19:08:58 UTC (rev 328)
@@ -180,18 +180,21 @@
 
   UIM_EVAL_FSTRING1(NULL, "(plugin-list-query-library \"%s\")",
 		    uim_scm_refer_c_str(_name));
+  if (FALSEP(uim_scm_return_value()))
+    return uim_scm_f();
   library = uim_scm_c_ptr(uim_scm_return_value());
 
   UIM_EVAL_FSTRING1(NULL, "(plugin-list-query-instance-quit \"%s\")",
 		    uim_scm_refer_c_str(_name));
+  if (FALSEP(uim_scm_return_value()))
+    return uim_scm_f();
   plugin_instance_quit = uim_scm_c_func_ptr(uim_scm_return_value());
 
   (plugin_instance_quit)();
   dlclose(library);
 
-  /* XXX: plugin-list-delete is not implemented 
-    form = uim_scm_list2(uim_scm_make_symbol("plugin-list-delete"), _name);
-   */
+  UIM_EVAL_FSTRING1(NULL, "(plugin-list-delete \"%s\")",
+		    uim_scm_refer_c_str(_name));
   uim_scm_gc_unprotect_stack(&stack_start);
 #endif
   return uim_scm_t();



More information about the Uim-commit mailing list