[uim-commit] r1073 - branches/r5rs/uim

yamaken at freedesktop.org yamaken at freedesktop.org
Sat Jul 30 01:47:10 EST 2005


Author: yamaken
Date: 2005-07-29 08:47:08 -0700 (Fri, 29 Jul 2005)
New Revision: 1073

Modified:
   branches/r5rs/uim/context.h
   branches/r5rs/uim/uim.c
Log:
* uim/context.h
  - (UIM_EVAL_SEXP_AS_STRING): New macro. See the comment nearby the
    definition
  - Add a comment about file separation
    /*
      Most of following definitions should be separated into another
      file such as private.h since they are not relevant to input
      contexts. I'm not having enough time to do and validate
      it. Anyone?  -- YamaKen 2005-07-30
    */
* uim/uim.c
  - (uim_create_context): Resurrect create-context by
    UIM_EVAL_FSTRING3() as alternative way. See the comment about
    UIM_EVAL_SEXP_AS_STRING to understand the motivation


Modified: branches/r5rs/uim/context.h
===================================================================
--- branches/r5rs/uim/context.h	2005-07-29 15:12:41 UTC (rev 1072)
+++ branches/r5rs/uim/context.h	2005-07-29 15:47:08 UTC (rev 1073)
@@ -120,6 +120,23 @@
 };
 
 
+/*
+  Most of following definitions should be separated into another file such as
+  private.h since they are not relevant to input contexts. I'm not having
+  enough time to do and validate it. Anyone?  -- YamaKen 2005-07-30
+*/
+
+#if 0
+/*
+  Evaluating a S-expression in C involves the two problems, performance and
+  sourcecode-simpleness. Traditional UIM_EVAL_FSTRINGn() satisfies the latter,
+  but loses former. Manual sexp construction and evaluation by a sequence of
+  function calling is an opponent. The two should co-exist until better
+  solution has been implemented as a uim-scm API.  -- YamaKen 2005-07-30
+ */
+#define UIM_EVAL_SEXP_AS_STRING
+#endif
+
 #ifdef ENABLE_NLS
 #define UIM_PREPARE_SAVING_TEXTDOMAIN_CODESET() \
     char *enc, *orig_encoding = NULL; \

Modified: branches/r5rs/uim/uim.c
===================================================================
--- branches/r5rs/uim/uim.c	2005-07-29 15:12:41 UTC (rev 1072)
+++ branches/r5rs/uim/uim.c	2005-07-29 15:47:08 UTC (rev 1073)
@@ -189,6 +189,9 @@
     uim_last_client_encoding = strdup(enc);
   }
 
+#ifdef UIM_EVAL_SEXP_AS_STRING
+  UIM_EVAL_FSTRING3(uc, "(create-context %d '%s '%s)", uc->id, lang, engine);
+#else
   {
     uim_lisp id_     = uim_scm_make_int(uc->id);
     uim_lisp lang_   = uim_scm_make_str(lang);
@@ -199,6 +202,7 @@
     uim_scm_apply(proc, args);
       
   }
+#ifdef  /* UIM_EVAL_SEXP_AS_STRING */
   return uc;
 }
 



More information about the uim-commit mailing list