Author: yamakenz
Date: Mon Aug 27 21:38:37 2007
New Revision: 4916

Modified:
   trunk/uim/anthy-utf8.c
   trunk/uim/anthy.c
   trunk/uim/canna.c
   trunk/uim/look.c
   trunk/uim/m17nlib.c
   trunk/uim/mana.c
   trunk/uim/prime.c
   trunk/uim/skk.c

Log:
* uim/canna.c
  - Replace all canonical uim-scm forms with abbreviated ones by
    tools/abbrev-uim-scm.pl. No other changes are applied

* uim/anthy-utf8.c
* uim/anthy.c
* uim/look.c
* uim/m17nlib.c
* uim/mana.c
* uim/prime.c
* uim/skk.c
  - Include uim-scm-abbrev.h
  - Replace all canonical uim-scm forms with abbreviated ones by
    tools/abbrev-uim-scm.pl. No other changes are applied


Modified: trunk/uim/anthy-utf8.c
==============================================================================
--- trunk/uim/anthy-utf8.c      (original)
+++ trunk/uim/anthy-utf8.c      Mon Aug 27 21:38:37 2007
@@ -40,6 +40,7 @@
 
 #include "uim.h"
 #include "uim-scm.h"
+#include "uim-scm-abbrev.h"
 #include "uim-util.h"
 #include "plugin.h"
 
@@ -65,7 +66,7 @@
   if (err)
     uim_fatal_error("anthy_get_stat() failed");
   if (!(0 <= i && i < cs.nr_segment))
-    uim_scm_error_obj("invalid segment index", uim_scm_make_int(i));
+    ERROR_OBJ("invalid segment index", MAKE_INT(i));
 }
 
 static anthy_context_t
@@ -73,7 +74,7 @@
 {
   anthy_context_t ac;
 
-  ac = uim_scm_c_ptr(ac_);
+  ac = C_PTR(ac_);
   if (!ac)
     uim_fatal_error("NULL anthy_context_t");
 
@@ -83,7 +84,7 @@
 static uim_lisp
 anthy_version()
 {
-  return uim_scm_make_str(anthy_get_version_string());
+  return MAKE_STR(anthy_get_version_string());
 }
 
 static uim_lisp
@@ -107,7 +108,7 @@
   int encoding;
 
   /* 0: compiled, 1: EUC-JP, 2: UTF-8 */
-  encoding = uim_scm_c_int(encoding_);
+  encoding = C_INT(encoding_);
 
   if (!iconv_cd_e2u)
     iconv_cd_e2u = uim_iconv->create("UTF-8", "EUC-JP");
@@ -120,7 +121,7 @@
     uim_fatal_error("anthy_create_context() failed");
 
   anthy_context_set_encoding(ac, encoding);
-  ac_ = uim_scm_make_ptr(ac);
+  ac_ = MAKE_PTR(ac);
   context_list = uim_scm_callf("cons", "oo", ac_, context_list);
 
   return ac_;
@@ -148,7 +149,7 @@
   const char *str;
 
   ac = get_anthy_context(ac_);
-  str = uim_scm_refer_c_str(str_);
+  str = REFER_C_STR(str_);
   anthy_set_string(ac, str);
 
   return uim_scm_f();
@@ -166,7 +167,7 @@
   if (err)
     uim_fatal_error("anthy_get_stat() failed");
 
-  return uim_scm_make_int(cs.nr_segment);
+  return MAKE_INT(cs.nr_segment);
 }
 
 static uim_lisp
@@ -177,7 +178,7 @@
   struct anthy_segment_stat ss;
 
   ac = get_anthy_context(ac_);
-  seg = uim_scm_c_int(seg_);
+  seg = C_INT(seg_);
 
   validate_segment_index(ac, seg);
 
@@ -185,7 +186,7 @@
   if (err)
     uim_fatal_error("anthy_get_segment_stat() failed");
 
-  return uim_scm_make_int(ss.nr_candidate);
+  return MAKE_INT(ss.nr_candidate);
 }
 
 static uim_lisp
@@ -197,8 +198,8 @@
   uim_lisp buf_;
   
   ac = get_anthy_context(ac_);
-  seg = uim_scm_c_int(seg_);
-  nth  = uim_scm_c_int(nth_);
+  seg = C_INT(seg_);
+  nth  = C_INT(nth_);
 
   buflen = anthy_get_segment(ac, seg, nth, NULL, 0);
   if (buflen == -1)
@@ -210,7 +211,7 @@
     free(buf);
     uim_fatal_error("anthy_get_segment() failed");
   }
-  buf_ = uim_scm_make_str_directly(buf);
+  buf_ = MAKE_STR_DIRECTLY(buf);
 
   return buf_;
 }
@@ -220,7 +221,7 @@
 {
   uim_lisp nth_;
 
-  nth_ = uim_scm_make_int(NTH_UNCONVERTED_CANDIDATE);
+  nth_ = MAKE_INT(NTH_UNCONVERTED_CANDIDATE);
   return get_nth_candidate(ac_, seg_, nth_);
 }
 
@@ -232,7 +233,7 @@
   struct anthy_segment_stat ss;
 
   ac = get_anthy_context(ac_);
-  seg = uim_scm_c_int(seg_);
+  seg = C_INT(seg_);
 
   validate_segment_index(ac, seg);
 
@@ -240,7 +241,7 @@
   if (err)
     uim_fatal_error("anthy_get_segment_stat() failed");
 
-  return uim_scm_make_int(ss.seg_len);
+  return MAKE_INT(ss.seg_len);
 }
 
 static uim_lisp
@@ -250,8 +251,8 @@
   int seg, delta;
 
   ac = get_anthy_context(ac_);
-  seg = uim_scm_c_int(seg_);
-  delta = uim_scm_c_int(delta_);
+  seg = C_INT(seg_);
+  delta = C_INT(delta_);
 
   anthy_resize_segment(ac, seg, delta);
   return uim_scm_f();
@@ -264,8 +265,8 @@
   int seg, nth;
 
   ac = get_anthy_context(ac_);
-  seg = uim_scm_c_int(seg_);
-  nth = uim_scm_c_int(nth_);
+  seg = C_INT(seg_);
+  nth = C_INT(nth_);
 
   anthy_commit_segment(ac, seg, nth);
   return uim_scm_f();
@@ -279,7 +280,7 @@
   const char *str;
 
   ac = get_anthy_context(ac_);
-  str = uim_scm_refer_c_str(str_);
+  str = REFER_C_STR(str_);
 
   anthy_set_prediction_string(ac, str);
 #endif
@@ -299,7 +300,7 @@
   err = anthy_get_prediction_stat(ac, &ps);
   if (err)
     uim_fatal_error("anthy_get_prediction_stat() failed");
-  return uim_scm_make_int(ps.nr_prediction);
+  return MAKE_INT(ps.nr_prediction);
 #else
   return uim_scm_f();
 #endif
@@ -315,7 +316,7 @@
   uim_lisp buf_;
 
   ac = get_anthy_context(ac_);
-  nth = uim_scm_c_int(nth_); 
+  nth = C_INT(nth_); 
 
   buflen = anthy_get_prediction(ac, nth, NULL, 0);
   if (buflen == -1)
@@ -327,7 +328,7 @@
     free(buf);
     uim_fatal_error("anthy_get_prediction() failed");
   }
-  buf_ = uim_scm_make_str_directly(buf);
+  buf_ = MAKE_STR_DIRECTLY(buf);
 
   return buf_;
 #else
@@ -343,11 +344,11 @@
   int nth, err;
 
   ac = get_anthy_context(ac_);
-  nth = uim_scm_c_int(nth_); 
+  nth = C_INT(nth_); 
 
   err = anthy_commit_prediction(ac, nth);
 
-  return uim_scm_make_bool(!err);
+  return MAKE_BOOL(!err);
 #else
   return uim_scm_f();
 #endif
@@ -361,11 +362,11 @@
   uim_lisp utf8_;
 
   if (!iconv_cd_e2u)
-    return uim_scm_make_str(" ");
+    return MAKE_STR(" ");
 
-  str = uim_scm_refer_c_str(str_);
+  str = REFER_C_STR(str_);
   convstr = uim_iconv->convert(iconv_cd_e2u, str);
-  utf8_ = uim_scm_make_str(convstr);
+  utf8_ = MAKE_STR(convstr);
   free(convstr);
 
   return utf8_;
@@ -379,11 +380,11 @@
   uim_lisp eucjp_;
 
   if (!iconv_cd_u2e)
-    return uim_scm_make_str("");
+    return MAKE_STR("");
 
-  str = uim_scm_refer_c_str(str_);
+  str = REFER_C_STR(str_);
   convstr = uim_iconv->convert(iconv_cd_u2e, str);
-  eucjp_ = uim_scm_make_str(convstr);
+  eucjp_ = MAKE_STR(convstr);
   free(convstr);
 
   return eucjp_;

Modified: trunk/uim/anthy.c
==============================================================================
--- trunk/uim/anthy.c   (original)
+++ trunk/uim/anthy.c   Mon Aug 27 21:38:37 2007
@@ -39,6 +39,7 @@
 
 #include "uim.h"
 #include "uim-scm.h"
+#include "uim-scm-abbrev.h"
 #include "plugin.h"
 
 
@@ -60,7 +61,7 @@
   if (err)
     uim_fatal_error("anthy_get_stat() failed");
   if (!(0 <= i && i < cs.nr_segment))
-    uim_scm_error_obj("invalid segment index", uim_scm_make_int(i));
+    ERROR_OBJ("invalid segment index", MAKE_INT(i));
 }
 
 static anthy_context_t
@@ -68,7 +69,7 @@
 {
   anthy_context_t ac;
 
-  ac = uim_scm_c_ptr(ac_);
+  ac = C_PTR(ac_);
   if (!ac)
     uim_fatal_error("NULL anthy_context_t");
 
@@ -78,7 +79,7 @@
 static uim_lisp
 anthy_version()
 {
-  return uim_scm_make_str(anthy_get_version_string());
+  return MAKE_STR(anthy_get_version_string());
 }
 
 static uim_lisp
@@ -104,7 +105,7 @@
   if (!ac)
     uim_fatal_error("anthy_create_context() failed");
 
-  ac_ = uim_scm_make_ptr(ac);
+  ac_ = MAKE_PTR(ac);
   context_list = uim_scm_callf("cons", "oo", ac_, context_list);
 
   return ac_;
@@ -132,7 +133,7 @@
   const char *str;
 
   ac = get_anthy_context(ac_);
-  str = uim_scm_refer_c_str(str_);
+  str = REFER_C_STR(str_);
   anthy_set_string(ac, str);
 
   return uim_scm_f();
@@ -150,7 +151,7 @@
   if (err)
     uim_fatal_error("anthy_get_stat() failed");
 
-  return uim_scm_make_int(cs.nr_segment);
+  return MAKE_INT(cs.nr_segment);
 }
 
 static uim_lisp
@@ -161,7 +162,7 @@
   struct anthy_segment_stat ss;
 
   ac = get_anthy_context(ac_);
-  seg = uim_scm_c_int(seg_);
+  seg = C_INT(seg_);
 
   validate_segment_index(ac, seg);
 
@@ -169,7 +170,7 @@
   if (err)
     uim_fatal_error("anthy_get_segment_stat() failed");
 
-  return uim_scm_make_int(ss.nr_candidate);
+  return MAKE_INT(ss.nr_candidate);
 }
 
 static uim_lisp
@@ -181,8 +182,8 @@
   uim_lisp buf_;
   
   ac = get_anthy_context(ac_);
-  seg = uim_scm_c_int(seg_);
-  nth  = uim_scm_c_int(nth_);
+  seg = C_INT(seg_);
+  nth  = C_INT(nth_);
 
   buflen = anthy_get_segment(ac, seg, nth, NULL, 0);
   if (buflen == -1)
@@ -194,7 +195,7 @@
     free(buf);
     uim_fatal_error("anthy_get_segment() failed");
   }
-  buf_ = uim_scm_make_str_directly(buf);
+  buf_ = MAKE_STR_DIRECTLY(buf);
 
   return buf_;
 }
@@ -204,7 +205,7 @@
 {
   uim_lisp nth_;
 
-  nth_ = uim_scm_make_int(NTH_UNCONVERTED_CANDIDATE);
+  nth_ = MAKE_INT(NTH_UNCONVERTED_CANDIDATE);
   return get_nth_candidate(ac_, seg_, nth_);
 }
 
@@ -216,7 +217,7 @@
   struct anthy_segment_stat ss;
 
   ac = get_anthy_context(ac_);
-  seg = uim_scm_c_int(seg_);
+  seg = C_INT(seg_);
 
   validate_segment_index(ac, seg);
 
@@ -224,7 +225,7 @@
   if (err)
     uim_fatal_error("anthy_get_segment_stat() failed");
 
-  return uim_scm_make_int(ss.seg_len);
+  return MAKE_INT(ss.seg_len);
 }
 
 static uim_lisp
@@ -234,8 +235,8 @@
   int seg, delta;
 
   ac = get_anthy_context(ac_);
-  seg = uim_scm_c_int(seg_);
-  delta = uim_scm_c_int(delta_);
+  seg = C_INT(seg_);
+  delta = C_INT(delta_);
 
   anthy_resize_segment(ac, seg, delta);
   return uim_scm_f();
@@ -248,8 +249,8 @@
   int seg, nth;
 
   ac = get_anthy_context(ac_);
-  seg = uim_scm_c_int(seg_);
-  nth = uim_scm_c_int(nth_);
+  seg = C_INT(seg_);
+  nth = C_INT(nth_);
 
   anthy_commit_segment(ac, seg, nth);
   return uim_scm_f();
@@ -263,7 +264,7 @@
   const char *str;
 
   ac = get_anthy_context(ac_);
-  str = uim_scm_refer_c_str(str_);
+  str = REFER_C_STR(str_);
 
   anthy_set_prediction_string(ac, str);
 #endif
@@ -283,7 +284,7 @@
   err = anthy_get_prediction_stat(ac, &ps);
   if (err)
     uim_fatal_error("anthy_get_prediction_stat() failed");
-  return uim_scm_make_int(ps.nr_prediction);
+  return MAKE_INT(ps.nr_prediction);
 #else
   return uim_scm_f();
 #endif
@@ -299,7 +300,7 @@
   uim_lisp buf_;
 
   ac = get_anthy_context(ac_);
-  nth = uim_scm_c_int(nth_); 
+  nth = C_INT(nth_); 
 
   buflen = anthy_get_prediction(ac, nth, NULL, 0);
   if (buflen == -1)
@@ -311,7 +312,7 @@
     free(buf);
     uim_fatal_error("anthy_get_prediction() failed");
   }
-  buf_ = uim_scm_make_str_directly(buf);
+  buf_ = MAKE_STR_DIRECTLY(buf);
 
   return buf_;
 #else
@@ -327,11 +328,11 @@
   int nth, err;
 
   ac = get_anthy_context(ac_);
-  nth = uim_scm_c_int(nth_); 
+  nth = C_INT(nth_); 
 
   err = anthy_commit_prediction(ac, nth);
 
-  return uim_scm_make_bool(!err);
+  return MAKE_BOOL(!err);
 #else
   return uim_scm_f();
 #endif

Modified: trunk/uim/canna.c
==============================================================================
--- trunk/uim/canna.c   (original)
+++ trunk/uim/canna.c   Mon Aug 27 21:38:37 2007
@@ -89,7 +89,7 @@
 {
   struct canna_context *cc;
 
-  cc = uim_scm_c_ptr(cc_);
+  cc = C_PTR(cc_);
   if (!cc)
     uim_fatal_error("NULL canna_context");
   assert(cc->rk_context_id != -1);
@@ -106,13 +106,13 @@
 {
   assert(VALID_CANNA_CONTEXTP(cc));
   if (!VALID_SEGMENT_INDEXP(cc, i))
-    uim_scm_error_obj("invalid segment index", uim_scm_make_int(i));
+    ERROR_OBJ("invalid segment index", MAKE_INT(i));
 }
 
 static uim_lisp
 init_canna_lib(uim_lisp str_)
 {
-  cannaserver = (TRUEP(str_)) ? uim_scm_c_str(str_) : NULL;
+  cannaserver = (TRUEP(str_)) ? C_STR(str_) : NULL;
 
   /* Immediate init & quit to test cannaserver connectivity? Real
    * initialization is exist at beginning of create_context(). I don't
@@ -176,7 +176,7 @@
   free(diclist);
 #endif
 
-  cc_ = uim_scm_make_ptr(cc);
+  cc_ = MAKE_PTR(cc);
   context_list = uim_scm_callf("cons", "oo", cc_, context_list);
 
   return cc_;
@@ -251,7 +251,7 @@
   cc = get_canna_context(cc_);
 
   mode = cc->rk_mode;
-  str = uim_scm_refer_c_str(str_);
+  str = REFER_C_STR(str_);
   len = strlen(str);
 
   segment_num = RkBgnBun(cc->rk_context_id, (char *)str, len, mode);
@@ -261,7 +261,7 @@
   cc->segment_num = segment_num;
   _update_status(cc);
 
-  return uim_scm_make_int(cc->segment_num);
+  return MAKE_INT(cc->segment_num);
 }
 
 static uim_lisp
@@ -272,8 +272,8 @@
   char buf[BUFSIZE];
 
   cc = get_canna_context(cc_);
-  seg = uim_scm_c_int(seg_);
-  nth = uim_scm_c_int(nth_);
+  seg = C_INT(seg_);
+  nth = C_INT(nth_);
   validate_segment_index(cc, seg);
 
   RkGoTo(cc->rk_context_id, seg);
@@ -288,7 +288,7 @@
 #ifdef UIM_CANNA_DEBUG
   printf("nth: %d, kanji: %s\n", nth, buf);
 #endif
-  return uim_scm_make_str(buf);
+  return MAKE_STR(buf);
 }
 
 static uim_lisp
@@ -299,7 +299,7 @@
   char buf[BUFSIZE];
 
   cc = get_canna_context(cc_);
-  seg = uim_scm_c_int(seg_);
+  seg = C_INT(seg_);
   validate_segment_index(cc, seg);
 
   RkGoTo(cc->rk_context_id, seg);
@@ -310,7 +310,7 @@
 #ifdef UIM_CANNA_DEBUG
   fprintf(stderr, "yomi: %s\n", buf);
 #endif
-  return uim_scm_make_str(buf);
+  return MAKE_STR(buf);
 }
 
 static uim_lisp
@@ -321,7 +321,7 @@
 
   cc = get_canna_context(cc_);
 
-  return uim_scm_make_int(cc->segment_num);
+  return MAKE_INT(cc->segment_num);
 }
 
 static uim_lisp
@@ -331,13 +331,13 @@
   int seg;
 
   cc = get_canna_context(cc_);
-  seg = uim_scm_c_int(seg_);
+  seg = C_INT(seg_);
   validate_segment_index(cc, seg);
 
   if (cc->max_cand_num_list[seg] == -1)
-    uim_scm_error("invalid candidate index");
+    ERROR("invalid candidate index");
 
-  return uim_scm_make_int(cc->max_cand_num_list[seg]);
+  return MAKE_INT(cc->max_cand_num_list[seg]);
 }
 
 static uim_lisp
@@ -347,8 +347,8 @@
   int seg, delta, id;
 
   cc = get_canna_context(cc_);
-  seg = uim_scm_c_int(seg_);
-  delta = uim_scm_c_int(delta_);
+  seg = C_INT(seg_);
+  delta = C_INT(delta_);
   validate_segment_index(cc, seg);
 
   RkGoTo(cc->rk_context_id, seg);
@@ -372,8 +372,8 @@
 
   cc = get_canna_context(cc_);
 #if 0
-  seg = uim_scm_c_int(seg_);
-  nth = uim_scm_c_int(nth_);
+  seg = C_INT(seg_);
+  nth = C_INT(nth_);
   validate_segment_index(cc, seg);
 #endif
 

Modified: trunk/uim/look.c
==============================================================================
--- trunk/uim/look.c    (original)
+++ trunk/uim/look.c    Mon Aug 27 21:38:37 2007
@@ -35,6 +35,7 @@
 
 #include "uim.h"
 #include "uim-scm.h"
+#include "uim-scm-abbrev.h"
 #include "uim-helper.h"
 #include "plugin.h"
 
@@ -43,8 +44,8 @@
 static uim_lisp
 uim_look_look(uim_lisp dict_, uim_lisp str_)
 {
-  const char *dict = uim_scm_refer_c_str(dict_);
-  const char *str = uim_scm_refer_c_str(str_);
+  const char *dict = REFER_C_STR(dict_);
+  const char *str = REFER_C_STR(str_);
   uim_look_ctx *ctx;
   char buf[1024];
   char *dict_str;
@@ -69,7 +70,7 @@
       if (strcasecmp(buf, dict_str) == 0)
        continue;
       if (len < strlen(buf))
-       ret_ = uim_scm_cons(uim_scm_make_str(buf + len), ret_);
+       ret_ = CONS(MAKE_STR(buf + len), ret_);
     }
   }
 

Modified: trunk/uim/m17nlib.c
==============================================================================
--- trunk/uim/m17nlib.c (original)
+++ trunk/uim/m17nlib.c Mon Aug 27 21:38:37 2007
@@ -41,6 +41,7 @@
 #include "gettext.h"
 #include "uim.h"
 #include "uim-scm.h"
+#include "uim-scm-abbrev.h"
 #include "uim-util.h"
 #include "plugin.h"
 
@@ -251,7 +252,7 @@
   int id;
   MInputContext *ic;
 
-  id = uim_scm_c_int(id_);
+  id = C_INT(id_);
   ic = ic_array[id].mic;
 
   if (!ic)
@@ -270,7 +271,7 @@
   int id;
   MInputContext *ic;
 
-  id = uim_scm_c_int(id_);
+  id = C_INT(id_);
   ic = ic_array[id].mic;
 
   if (!ic)
@@ -290,14 +291,14 @@
   char *buf, *p;
   MInputContext *ic;
 
-  id = uim_scm_c_int(id_);
+  id = C_INT(id_);
   ic = ic_array[id].mic;
 
   if (!ic)
-    return uim_scm_make_str("");
+    return MAKE_STR("");
 
   if (ic->cursor_pos == 0)
-    return uim_scm_make_str("");
+    return MAKE_STR("");
 
   buf = convert_mtext2str(ic->preedit);
   p = buf;
@@ -307,7 +308,7 @@
   *p = '\0';
 
   buflen = strlen(buf);
-  buf_ = uim_scm_make_str(buf);
+  buf_ = MAKE_STR(buf);
   free(buf);
 
   return buf_;
@@ -321,11 +322,11 @@
   char *buf, *p;
   MInputContext *ic;
 
-  id = uim_scm_c_int(id_);
+  id = C_INT(id_);
   ic = ic_array[id].mic;
 
   if (!ic)
-    return uim_scm_make_str("");
+    return MAKE_STR("");
 
   buf = convert_mtext2str(ic->preedit);
   p = buf;
@@ -334,7 +335,7 @@
     p = m17nlib_utf8_find_next_char(p);
 
   buflen = strlen(p);
-  buf_ = uim_scm_make_str(p);
+  buf_ = MAKE_STR(p);
   free(buf);
 
   return buf_;
@@ -348,14 +349,14 @@
   char *buf, *p;
   MInputContext *ic;
 
-  id = uim_scm_c_int(id_);
+  id = C_INT(id_);
   ic = ic_array[id].mic;
 
   if (!ic)
-    return uim_scm_make_str("");
+    return MAKE_STR("");
 
   if (ic->candidate_from == 0)
-    return uim_scm_make_str("");
+    return MAKE_STR("");
 
   buf = convert_mtext2str(ic->preedit);
   p = buf;
@@ -365,7 +366,7 @@
   *p = '\0';
 
   buflen = strlen(buf);
-  buf_ = uim_scm_make_str(buf);
+  buf_ = MAKE_STR(buf);
   free(buf);
 
   return buf_;
@@ -379,17 +380,17 @@
   char *buf, *p, *start;
   MInputContext *ic;
 
-  id = uim_scm_c_int(id_);
+  id = C_INT(id_);
   ic = ic_array[id].mic;
 
   if (!ic)
-    return uim_scm_make_str("");
+    return MAKE_STR("");
 
   buf = convert_mtext2str(ic->preedit);
   p = buf;
 
   if (!p)
-    return uim_scm_make_str("");
+    return MAKE_STR("");
 
   for (i = 0; i < ic->candidate_from ;i++)
     p = m17nlib_utf8_find_next_char(p);
@@ -400,7 +401,7 @@
   *p = '\0';
 
   buflen = strlen(start);
-  buf_ = uim_scm_make_str(start);
+  buf_ = MAKE_STR(start);
   free(buf);
 
   return buf_;
@@ -414,11 +415,11 @@
   char *buf, *p;
   MInputContext *ic;
 
-  id = uim_scm_c_int(id_);
+  id = C_INT(id_);
   ic = ic_array[id].mic;
 
   if (!ic)
-    return uim_scm_make_str("");
+    return MAKE_STR("");
 
   buf = convert_mtext2str(ic->preedit);
   p = buf;
@@ -427,7 +428,7 @@
     p = m17nlib_utf8_find_next_char(p);
 
   buflen = strlen(p);
-  buf_ = uim_scm_make_str(p);
+  buf_ = MAKE_STR(p);
   free(buf);
 
   return buf_;
@@ -436,7 +437,7 @@
 static uim_lisp
 get_nr_input_methods()
 {
-  return uim_scm_make_int(nr_input_methods);
+  return MAKE_INT(nr_input_methods);
 }
 
 static uim_lisp
@@ -445,7 +446,7 @@
   int len, nth;
   char *name;
   
-  nth = uim_scm_c_int(nth_);
+  nth = C_INT(nth_);
 
   if (nth < nr_input_methods) {
     len = strlen(im_array[nth].lang) + strlen(im_array[nth].name) + 7;
@@ -456,7 +457,7 @@
     else
       snprintf(name, len, "m17n-%s-%s", im_array[nth].lang, 
im_array[nth].name);
 
-    return uim_scm_make_str(name);
+    return MAKE_STR(name);
   }
 
   return uim_scm_f();
@@ -465,10 +466,10 @@
 static uim_lisp
 get_input_method_lang(uim_lisp nth_)
 {
-  int nth = uim_scm_c_int(nth_);
+  int nth = C_INT(nth_);
 
   if (nth < nr_input_methods)
-    return uim_scm_make_str(im_array[nth].lang);
+    return MAKE_STR(im_array[nth].lang);
 
   return uim_scm_f();
 }
@@ -480,7 +481,7 @@
   char *str = NULL, *p;
   uim_lisp ret;
 
-  nth = uim_scm_c_int(nth_);
+  nth = C_INT(nth_);
 
   if (nth < nr_input_methods) {
     MInputMethod *im;
@@ -488,7 +489,7 @@
 
     im = im_instance(nth);
     if (!im)
-      return uim_scm_make_str(N_("m17n library IM open error"));
+      return MAKE_STR(N_("m17n library IM open error"));
 
     desc = minput_get_description(im->language, im->name);
     if (desc) {
@@ -524,10 +525,10 @@
     }
 
     if (str) {
-      ret = uim_scm_make_str(str);
+      ret = MAKE_STR(str);
       free(str);
     } else {
-      ret = uim_scm_make_str(N_("An input method provided by the m17n 
library"));
+      ret = MAKE_STR(N_("An input method provided by the m17n library"));
     }
   } else
     ret = uim_scm_f();
@@ -584,7 +585,7 @@
   MInputMethod *im;
 
   id = unused_ic_id();
-  name = uim_scm_refer_c_str(name_);
+  name = REFER_C_STR(name_);
 
   im = find_im_by_name(name);
 
@@ -594,13 +595,13 @@
   ic_array[id].old_candidates = NULL;
   ic_array[id].new_candidates = NULL;
 
-  return uim_scm_make_int(id);
+  return MAKE_INT(id);
 }
 
 static uim_lisp
 free_id(uim_lisp id_)
 {
-  int id = uim_scm_c_int(id_);
+  int id = C_INT(id_);
 
   if (id < nr_input_contexts) {
     struct ic_ *ic = &ic_array[id];
@@ -621,9 +622,9 @@
   MSymbol key;
   MInputContext *ic;
 
-  id = uim_scm_c_int(id_);
+  id = C_INT(id_);
   ic = ic_array[id].mic;
-  key = msymbol(uim_scm_c_str(key_));
+  key = msymbol(C_STR(key_));
 
   if (key == Mnil)
     return uim_scm_f();
@@ -643,7 +644,7 @@
   MInputContext *ic;
   uim_lisp  consumed_, commit_string_;
 
-  id = uim_scm_c_int(id_);
+  id = C_INT(id_);
   ic = ic_array[id].mic;
 
   produced  = mtext();
@@ -656,10 +657,10 @@
 
   commit_string = convert_mtext2str(produced);
   m17n_object_unref(produced);
-  commit_string_ = uim_scm_make_str(commit_string);
+  commit_string_ = MAKE_STR(commit_string);
   free(commit_string);
 
-  return uim_scm_cons(consumed_, commit_string_);
+  return CONS(consumed_, commit_string_);
 }
 
 static uim_lisp
@@ -668,7 +669,7 @@
   int id;
   MInputContext *ic;
 
-  id = uim_scm_c_int(id_);
+  id = C_INT(id_);
   ic = ic_array[id].mic;
 
   /* To avoid a bug of m17n-lib */
@@ -683,7 +684,7 @@
   int id;
   MInputContext *ic;
 
-  id = uim_scm_c_int(id_);
+  id = C_INT(id_);
   ic = ic_array[id].mic;
 
   if (ic->candidate_show == 1)
@@ -740,7 +741,7 @@
   char **new_cands;
   MInputContext *ic;
 
-  id = uim_scm_c_int(id_);
+  id = C_INT(id_);
   ic = ic_array[id].mic;
   cands_num = calc_cands_num(id);
 
@@ -801,7 +802,7 @@
 static uim_lisp
 candidates_changedp(uim_lisp id_)
 {
-  int id = uim_scm_c_int(id_);
+  int id = C_INT(id_);
 
   if (!same_candidatesp(ic_array[id].old_candidates,
                        ic_array[id].new_candidates))
@@ -813,9 +814,9 @@
 static uim_lisp
 get_nr_candidates(uim_lisp id_)
 {
-  int id = uim_scm_c_int(id_);
+  int id = C_INT(id_);
 
-  return uim_scm_make_int(calc_cands_num(id));
+  return MAKE_INT(calc_cands_num(id));
 }
 
 static uim_lisp
@@ -823,14 +824,14 @@
 {
   int id, nth, nr;
   
-  id = uim_scm_c_int(id_);
-  nth = uim_scm_c_int(nth_);
+  id = C_INT(id_);
+  nth = C_INT(nth_);
   nr = ic_array[id].nr_candidates;
 
   if (nr >= nth)
-    return uim_scm_make_str(ic_array[id].new_candidates[nth]);
+    return MAKE_STR(ic_array[id].new_candidates[nth]);
   else
-    return uim_scm_make_str("");
+    return MAKE_STR("");
 }
 
 static uim_lisp
@@ -839,10 +840,10 @@
   int id;
   MInputContext *ic;
 
-  id = uim_scm_c_int(id_);
+  id = C_INT(id_);
   ic = ic_array[id].mic;
 
-  return uim_scm_make_int(ic->candidate_index);
+  return MAKE_INT(ic->candidate_index);
 }
 
 void

Modified: trunk/uim/mana.c
==============================================================================
--- trunk/uim/mana.c    (original)
+++ trunk/uim/mana.c    Mon Aug 27 21:38:37 2007
@@ -48,6 +48,7 @@
 
 #include "uim.h"
 #include "uim-scm.h"
+#include "uim-scm-abbrev.h"
 #include "uim-util.h"
 #include "plugin.h"
 
@@ -187,7 +188,7 @@
 static uim_lisp
 mana_eval(uim_lisp buf_)
 {
-  const char *buf = uim_scm_refer_c_str(buf_);
+  const char *buf = REFER_C_STR(buf_);
   char *ret_buf;
   char *eval_buf;
   uim_lisp ret;
@@ -220,7 +221,7 @@
 static uim_lisp
 eucjp_string_length(uim_lisp str_)
 {
-  const unsigned char *str = (const unsigned char *)uim_scm_refer_c_str(str_);
+  const unsigned char *str = (const unsigned char *)REFER_C_STR(str_);
   int len = strlen((const char *)str);
 
   int ascii = 0;
@@ -235,7 +236,7 @@
       mbyte++;
   }
 
-  return uim_scm_make_int(ascii + (mbyte / 2));
+  return MAKE_INT(ascii + (mbyte / 2));
 }
 
 void

Modified: trunk/uim/prime.c
==============================================================================
--- trunk/uim/prime.c   (original)
+++ trunk/uim/prime.c   Mon Aug 27 21:38:37 2007
@@ -51,6 +51,7 @@
 
 #include "uim.h"
 #include "uim-scm.h"
+#include "uim-scm-abbrev.h"
 #include "plugin.h"
 #include "uim-helper.h"
 #include "uim-util.h"
@@ -224,13 +225,13 @@
   char *result;
   uim_lisp ret;
 
-  str = uim_scm_refer_c_str(str_);
+  str = REFER_C_STR(str_);
 
   if (use_unix_domain_socket) {
     prime_write_msg_to_ud(prime_fd, str);
     result = prime_read_msg_from_ud(prime_fd);
     if (!result)
-      return uim_scm_make_str("error\n\t\n\n");
+      return MAKE_STR("error\n\t\n\n");
   } else {
     int len = strlen(str);
     char *buf = uim_malloc(len + 2);
@@ -239,10 +240,10 @@
                                  buf);
     free(buf);
     if (!result)
-      return uim_scm_make_str("");
+      return MAKE_STR("");
   }
 
-  ret = uim_scm_make_str(result);
+  ret = MAKE_STR(result);
   free(result);
 
   return ret;
@@ -254,7 +255,7 @@
   char *option;
   int len, timeout_count = 0;
 
-  use_unix_domain_socket = uim_scm_c_bool(use_udp_);
+  use_unix_domain_socket = C_BOOL(use_udp_);
 
   if (use_unix_domain_socket) {
     if (prime_fd != -1)

Modified: trunk/uim/skk.c
==============================================================================
--- trunk/uim/skk.c     (original)
+++ trunk/uim/skk.c     Mon Aug 27 21:38:37 2007
@@ -59,6 +59,7 @@
 
 #include "uim.h"
 #include "uim-scm.h"
+#include "uim-scm-abbrev.h"
 #include "uim-helper.h"
 #include "plugin.h"
 
@@ -435,11 +436,11 @@
   uim_bool use_skkserv;
   int skkserv_portnum, skkserv_family;
 
-  fn = uim_scm_refer_c_str(fn_);
-  use_skkserv = uim_scm_c_bool(use_skkserv_);
-  skkserv_hostname = uim_scm_refer_c_str(skkserv_hostname_);
-  skkserv_portnum = uim_scm_c_int(skkserv_portnum_);
-  skkserv_family_str = uim_scm_refer_c_str(skkserv_family_);
+  fn = REFER_C_STR(fn_);
+  use_skkserv = C_BOOL(use_skkserv_);
+  skkserv_hostname = REFER_C_STR(skkserv_hostname_);
+  skkserv_portnum = C_INT(skkserv_portnum_);
+  skkserv_family_str = REFER_C_STR(skkserv_family_);
 
   is_setugid = uim_helper_is_setugid();
   signal(SIGPIPE, SIG_IGN);
@@ -898,18 +899,18 @@
   struct skk_cand_array *ca;
   char *rs = NULL;
 
-  hs = uim_scm_refer_c_str(head_);
+  hs = REFER_C_STR(head_);
 
   if UIM_SCM_NFALSEP(numeric_conv_)
     rs = replace_numeric(hs);
 
   if (okuri_ != uim_scm_null())
-    okuri = uim_scm_refer_c_str(okuri_);
+    okuri = REFER_C_STR(okuri_);
 
   if (okuri_head_ == uim_scm_null()) {
     o = '\0';
   } else {
-    const char *os = uim_scm_refer_c_str(okuri_head_);
+    const char *os = REFER_C_STR(okuri_head_);
     o = os[0];
   }
 
@@ -1150,7 +1151,7 @@
   char *numstr = NULL;
   uim_lisp lst = uim_scm_null();
 
-  str = uim_scm_refer_c_str(head_);
+  str = REFER_C_STR(head_);
   len = strlen(str);
 
   for (i = 0; i < len; i++) {
@@ -1170,7 +1171,7 @@
        else
          numstr = uim_realloc(numstr, numlen + 1);
        strlcpy(numstr, &str[start], numlen + 1);
-       lst = uim_scm_cons(uim_scm_make_str(numstr), lst);
+       lst = CONS(MAKE_STR(numstr), lst);
       }
       prev_is_num = 0;
     }
@@ -1186,7 +1187,7 @@
     else
       numstr = uim_realloc(numstr, numlen + 1);
     strlcpy(numstr, &str[start], numlen + 1);
-    lst = uim_scm_cons(uim_scm_make_str(numstr), lst);
+    lst = CONS(MAKE_STR(numstr), lst);
   }
   free(numstr);
 
@@ -1481,17 +1482,17 @@
   if (str_ == uim_scm_null())
     return uim_scm_null();
 
-  str = uim_scm_c_str(str_);
+  str = C_STR(str_);
   len = strlen(str);
   newlen = len;
 
   for (i = 0, j = 0; j < len; i++, j++) {
     if (str[i] == '#') {
       method = str[i + 1] - '0';
-      if (uim_scm_nullp(numlst_))
+      if (NULLP(numlst_))
         break;
 
-      numstr = uim_scm_refer_c_str(uim_scm_car(numlst_));
+      numstr = REFER_C_STR(CAR(numlst_));
 
       convstr = numeric_convert(numstr, method);
       convlen = strlen(convstr);
@@ -1502,11 +1503,11 @@
       memcpy(&str[i], convstr, convlen);
       i = i - 2 + convlen;
 
-      numlst_ = uim_scm_cdr(numlst_);
+      numlst_ = CDR(numlst_);
     }
   }
 
-  merged_str = uim_scm_make_str(str);
+  merged_str = MAKE_STR(str);
   free(str);
   return merged_str;
 }
@@ -1544,8 +1545,8 @@
   char *str;
   uim_lisp result;
 
-  str = replace_numeric(uim_scm_refer_c_str(head_));
-  result = uim_scm_make_str(str);
+  str = replace_numeric(REFER_C_STR(head_));
+  result = MAKE_STR(str);
   free(str);
   return result;
 }
@@ -1577,7 +1578,7 @@
   const char *str;
   int i = 0;
 
-  str = uim_scm_refer_c_str(head_);
+  str = REFER_C_STR(head_);
 
   while (str[i] != '\0') {
     if (isdigit((unsigned char)str[i]))
@@ -1594,12 +1595,12 @@
   int i;
   /* nth start from 1 */
   for (i = 1; i < nth; i++) {
-    if (uim_scm_nullp(lst_)) {
+    if (NULLP(lst_)) {
       return uim_scm_null();
     }
-    lst_ = uim_scm_cdr(lst_);
+    lst_ = CDR(lst_);
   }
-  return uim_scm_car(lst_);
+  return CAR(lst_);
 }
 
 static int
@@ -1671,9 +1672,9 @@
   if UIM_SCM_NFALSEP(numeric_conv_)
     numlst_ = skk_store_replaced_numeric_str(head_);
 
-  n = uim_scm_c_int(nth_);
+  n = C_INT(nth_);
 
-  if (!uim_scm_nullp(numlst_))
+  if (!NULLP(numlst_))
     ca = find_cand_array_lisp(head_, okuri_head_, okuri_, 0, numeric_conv_);
   else
     ca = find_cand_array_lisp(head_, okuri_head_, okuri_, 0, uim_scm_f());
@@ -1682,13 +1683,13 @@
 
   if (ca) {
     /* handle #4 method of numeric conversion */
-    if (!uim_scm_nullp(numlst_)) {
+    if (!NULLP(numlst_)) {
       for (i = 0; i < ca->nr_cands; i++) {
        if (match_to_discarding_index(ignoring_indices, i))
          continue;
 
        if ((p = find_numeric_conv_method4_mark(ca->cands[i], &method_place))) {
-         numstr = uim_scm_refer_c_str(get_nth(method_place, numlst_));
+         numstr = REFER_C_STR(get_nth(method_place, numlst_));
          subca = find_cand_array(skk_dic, numstr, 0, NULL, 0);
          if (subca) {
            for (j = 0; j < subca->nr_cands; j++) {
@@ -1704,7 +1705,7 @@
                        newlen - mark - sublen + 1);
                memcpy(&cands[mark], subca->cands[j], sublen);
 
-               str_ = uim_scm_make_str(cands);
+               str_ = MAKE_STR(cands);
                free(cands);
                return skk_merge_replaced_numeric_str(str_, numlst_);
              }
@@ -1733,14 +1734,14 @@
   }
 
   /* check non-numeric conversion */
-  if (!cands && n >= k && !uim_scm_nullp(numlst_))
-    return skk_get_nth_candidate(uim_scm_make_int(n - k), head_, okuri_head_,
+  if (!cands && n >= k && !NULLP(numlst_))
+    return skk_get_nth_candidate(MAKE_INT(n - k), head_, okuri_head_,
                    okuri_, uim_scm_f());
 
   if (cands)
-    str_ = uim_scm_make_str(cands);
+    str_ = MAKE_STR(cands);
 
-  if (!uim_scm_nullp(numlst_))
+  if (!NULLP(numlst_))
     return skk_merge_replaced_numeric_str(str_, numlst_);
   else
     return str_;
@@ -1760,7 +1761,7 @@
   if UIM_SCM_NFALSEP(numeric_conv_)
     numlst_ = skk_store_replaced_numeric_str(head_);
 
-  if (!uim_scm_nullp(numlst_))
+  if (!NULLP(numlst_))
     ca = find_cand_array_lisp(head_, okuri_head_, okuri_, 0, numeric_conv_);
   else
     ca = find_cand_array_lisp(head_, okuri_head_, okuri_, 0, uim_scm_f());
@@ -1771,13 +1772,13 @@
   nr_cands -= get_ignoring_indices(ca, ignoring_indices);
 
   /* handle #4 method of numeric conversion */
-  if (!uim_scm_nullp(numlst_)) {
+  if (!NULLP(numlst_)) {
     for (i = 0; i < n; i++) {
       if (match_to_discarding_index(ignoring_indices, i))
        continue;
 
       if (find_numeric_conv_method4_mark(ca->cands[i], &method_place)) {
-       numstr = uim_scm_refer_c_str(get_nth(method_place, numlst_));
+       numstr = REFER_C_STR(get_nth(method_place, numlst_));
        nr_cands--;
        subca = find_cand_array(skk_dic, numstr, 0, NULL, 0);
        if (subca)
@@ -1788,12 +1789,12 @@
   }
 
   /* add non-numeric conversion */
-  if (!uim_scm_nullp(numlst_))
-    return uim_scm_make_int(nr_cands +
-                   uim_scm_c_int(skk_get_nr_candidates(head_, okuri_head_,
+  if (!NULLP(numlst_))
+    return MAKE_INT(nr_cands +
+                   C_INT(skk_get_nr_candidates(head_, okuri_head_,
                                    okuri_, uim_scm_f())));
 
-  return uim_scm_make_int(nr_cands);
+  return MAKE_INT(nr_cands);
 }
 
 static struct skk_comp_array *
@@ -1866,7 +1867,7 @@
   struct skk_comp_array *ca;
   char *rs = NULL;
 
-  hs = uim_scm_refer_c_str(head_);
+  hs = REFER_C_STR(head_);
 
   if UIM_SCM_NFALSEP(numeric_conv_)
     rs = replace_numeric(hs);
@@ -1908,32 +1909,32 @@
   if UIM_SCM_NFALSEP(numeric_conv_)
     numlst_ = skk_store_replaced_numeric_str(head_);
 
-  if (!uim_scm_nullp(numlst_))
+  if (!NULLP(numlst_))
     ca = find_comp_array_lisp(head_, numeric_conv_, use_look_);
   else
     ca = find_comp_array_lisp(head_, uim_scm_f(), use_look_);
 
   if (!ca) {
-    if (!uim_scm_nullp(numlst_))
+    if (!NULLP(numlst_))
       return skk_get_nth_completion(nth_, head_, uim_scm_f(), use_look_);
     else
-      return uim_scm_make_str("");
+      return MAKE_STR("");
   }
 
-  n = uim_scm_c_int(nth_);
+  n = C_INT(nth_);
   if (ca->nr_comps > n) {
     str = ca->comps[n];
-    if (!uim_scm_nullp(numlst_))
+    if (!NULLP(numlst_))
       return restore_numeric(str, numlst_);
     else
-      return uim_scm_make_str(str);
+      return MAKE_STR(str);
   }
 
-  if (!uim_scm_nullp(numlst_) && n >= ca->nr_comps)
-    return skk_get_nth_completion(uim_scm_make_int(n - ca->nr_comps),
+  if (!NULLP(numlst_) && n >= ca->nr_comps)
+    return skk_get_nth_completion(MAKE_INT(n - ca->nr_comps),
                    head_, uim_scm_f(), use_look_);
 
-  return uim_scm_make_str("");
+  return MAKE_STR("");
 }
 
 static uim_lisp
@@ -1947,10 +1948,10 @@
     n = ca->nr_comps;
 
   if (UIM_SCM_NFALSEP(numeric_conv_) && has_numeric_in_head(head_))
-    return uim_scm_make_int(n +
-                   uim_scm_c_int(skk_get_nr_completions(head_, uim_scm_f(), 
use_look_))); 
+    return MAKE_INT(n +
+                   C_INT(skk_get_nr_completions(head_, uim_scm_f(), 
use_look_))); 
 
-  return uim_scm_make_int(n);
+  return MAKE_INT(n);
 }
 
 static uim_lisp
@@ -1961,7 +1962,7 @@
   const char *hs;
   char *rs = NULL;
 
-  hs = uim_scm_refer_c_str(head_);
+  hs = REFER_C_STR(head_);
 
   if UIM_SCM_NFALSEP(numeric_conv_)
     rs = replace_numeric(hs);
@@ -2022,10 +2023,10 @@
 
   for (i = 0, j = 0; j < len; i++, j++) {
     if (str[i] == '#') {
-      if (uim_scm_nullp(numlst_))
+      if (NULLP(numlst_))
        break;
 
-      numstr  = uim_scm_refer_c_str(uim_scm_car(numlst_));
+      numstr  = REFER_C_STR(CAR(numlst_));
       numstrlen = strlen(numstr);
       newlen = newlen - 1 + numstrlen;
       str = uim_realloc(str, newlen + 1);
@@ -2033,10 +2034,10 @@
       memcpy(&str[i], numstr, numstrlen);
       i = i  - 1 + numstrlen;
 
-      numlst_ = uim_scm_cdr(numlst_);
+      numlst_ = CDR(numlst_);
     }
   }
-  ret = uim_scm_make_str(str);
+  ret = MAKE_STR(str);
   free(str);
 
   return ret;
@@ -2052,12 +2053,12 @@
   char *rs = NULL;
 
   numlst_ = uim_scm_null();
-  hs = uim_scm_refer_c_str(head_);
+  hs = REFER_C_STR(head_);
 
   if UIM_SCM_NFALSEP(numeric_conv_)
     numlst_ = skk_store_replaced_numeric_str(head_);
 
-  if (!uim_scm_nullp(numlst_)) {
+  if (!NULLP(numlst_)) {
     rs = replace_numeric(hs);
     len = strlen(rs);
   } else
@@ -2070,7 +2071,7 @@
        if (!strncmp(sl->head, hs, len) && strcmp(sl->head, hs) &&
                        sl->okuri_head == '\0' &&
                        sl->state & SKK_LINE_USE_FOR_COMPLETION)
-         return uim_scm_make_str(sl->head);
+         return MAKE_STR(sl->head);
       }
       if UIM_SCM_NFALSEP(use_look_) {
        look_ = look_get_top_word(hs);
@@ -2097,7 +2098,7 @@
       return skk_get_dcomp_word(head_, uim_scm_f(), use_look_);
     }
   }
-  return uim_scm_make_str("");
+  return MAKE_STR("");
 }
 
 static void
@@ -2388,15 +2389,15 @@
   if UIM_SCM_NFALSEP(numeric_conv_)
     numlst_ = skk_store_replaced_numeric_str(head_);
 
-  nth = uim_scm_c_int(nth_);
+  nth = C_INT(nth_);
 
-  if (!uim_scm_nullp(numlst_))
+  if (!NULLP(numlst_))
     ca = find_cand_array_lisp(head_, okuri_head_, okuri_, 0, numeric_conv_);
   else
     ca = find_cand_array_lisp(head_, okuri_head_, okuri_, 0, uim_scm_f());
 
   if (!ca) {
-    if (!uim_scm_nullp(numlst_))
+    if (!NULLP(numlst_))
       return skk_commit_candidate(head_, okuri_head_, okuri_, nth_,
                      uim_scm_f());
     return uim_scm_f();
@@ -2405,21 +2406,21 @@
   get_ignoring_indices(ca, ignoring_indices);
 
   /* handle #4 method of numeric conversion */
-  if (!uim_scm_nullp(numlst_)) {
+  if (!NULLP(numlst_)) {
     for (i = 0; i < ca->nr_cands; i++) {
       if (match_to_discarding_index(ignoring_indices, i))
        continue;
 
       if (find_numeric_conv_method4_mark(ca->cands[i], &method_place)) {
        numstr_ = get_nth(method_place, numlst_);
-       numstr = uim_scm_refer_c_str(numstr_);
+       numstr = REFER_C_STR(numstr_);
        subca = find_cand_array(skk_dic, numstr, 0, NULL, 0);
        if (subca) {
          for (j = 0; j < subca->nr_cands; j++) {
            if (k == nth) {
              str = ca->cands[i];
              /* reorder sub candidate */
-             skk_commit_candidate(numstr_, uim_scm_null(), uim_scm_null(), 
uim_scm_make_int(j), uim_scm_null());
+             skk_commit_candidate(numstr_, uim_scm_null(), uim_scm_null(), 
MAKE_INT(j), uim_scm_null());
              break;
            }
            k++;
@@ -2438,7 +2439,7 @@
     if (!str) {
       if (nth >= k)
        return skk_commit_candidate(head_, okuri_head_, okuri_,
-                       uim_scm_make_int(nth - k), uim_scm_f());
+                       MAKE_INT(nth - k), uim_scm_f());
       return uim_scm_f();
     }
   } else {
@@ -2461,7 +2462,7 @@
     const char *okuri;
     int found = 0;
 
-    okuri = uim_scm_refer_c_str(okuri_);
+    okuri = REFER_C_STR(okuri_);
     sl = ca->line;
     for (i = 1; i < sl->nr_cand_array; i++) {
       if (!strcmp(okuri, sl->cands[i].okuri)) {
@@ -2470,7 +2471,7 @@
       }
     }
     if (!found) {
-      if (!uim_scm_nullp(numlst_))
+      if (!NULLP(numlst_))
        ca = find_cand_array_lisp(head_, okuri_head_, okuri_, 1, numeric_conv_);
       else
        ca = find_cand_array_lisp(head_, okuri_head_, okuri_, 1, uim_scm_f());
@@ -2522,7 +2523,7 @@
 skk_purge_candidate(uim_lisp head_, uim_lisp okuri_head_,
                    uim_lisp okuri_, uim_lisp nth_, uim_lisp numeric_conv_)
 {
-  int nth = uim_scm_c_int(nth_);
+  int nth = C_INT(nth_);
   struct skk_cand_array *ca, *subca;
   char *str = NULL;
   int i, j, k = 0;
@@ -2535,13 +2536,13 @@
   if UIM_SCM_NFALSEP(numeric_conv_)
     numlst_ = skk_store_replaced_numeric_str(head_);
 
-  if (!uim_scm_nullp(numlst_))
+  if (!NULLP(numlst_))
     ca = find_cand_array_lisp(head_, okuri_head_, okuri_, 0, numeric_conv_);
   else
     ca = find_cand_array_lisp(head_, okuri_head_, okuri_, 0, uim_scm_f());
 
   if (!ca) {
-    if (!uim_scm_nullp(numlst_))
+    if (!NULLP(numlst_))
       return skk_purge_candidate(head_, okuri_head_, okuri_, nth_,
                      uim_scm_f());
     return uim_scm_f(); /* shouldn't happen */
@@ -2550,14 +2551,14 @@
   get_ignoring_indices(ca, ignoring_indices);
 
   /* handle #4 method of numeric conversion */
-  if (!uim_scm_nullp(numlst_)) {
+  if (!NULLP(numlst_)) {
     for (i = 0; i < ca->nr_cands; i++) {
       if (match_to_discarding_index(ignoring_indices, i))
        continue;
 
       if (find_numeric_conv_method4_mark(ca->cands[i], &method_place)) {
        numstr_ = get_nth(method_place, numlst_);
-       numstr = uim_scm_refer_c_str(numstr_);
+       numstr = REFER_C_STR(numstr_);
        subca = find_cand_array(skk_dic, numstr, 0, NULL, 0);
        if (subca) {
          for (j = 0; j < subca->nr_cands; j++) {
@@ -2565,7 +2566,7 @@
              str = ca->cands[i];
              /*
               * don't purge word in sub candidate array
-              * skk_purge_candidate(numstr_, uim_scm_null(), uim_scm_null(), 
uim_scm_make_int(j), uim_scm_null());
+              * skk_purge_candidate(numstr_, uim_scm_null(), uim_scm_null(), 
MAKE_INT(j), uim_scm_null());
               */
              break;
            }
@@ -2585,7 +2586,7 @@
     if (!str) {
       if (nth >= k)
        skk_purge_candidate(head_, okuri_head_, okuri_,
-                       uim_scm_make_int(nth - k), uim_scm_f());
+                       MAKE_INT(nth - k), uim_scm_f());
       return uim_scm_f();
     }
   } else {
@@ -2725,7 +2726,7 @@
   char *word;
   const char *tmp;
 
-  tmp = uim_scm_refer_c_str(word_);
+  tmp = REFER_C_STR(word_);
   word = sanitize_word(tmp, "(concat \"");
   if (!word)
     return uim_scm_f();
@@ -2734,7 +2735,7 @@
   if (ca)
     learn_word_to_cand_array(ca, word);
 
-  tmp = uim_scm_refer_c_str(okuri_);
+  tmp = REFER_C_STR(okuri_);
   if (strlen(tmp)) {
     ca = find_cand_array_lisp(head_, okuri_head_, uim_scm_null(), 1, 
numeric_conv_);
     if (ca)
@@ -2931,7 +2932,7 @@
   struct stat st;
   uim_lisp ret;
 
-  fn = uim_scm_refer_c_str(fn_);
+  fn = REFER_C_STR(fn_);
   ret = (stat(fn, &st) != -1) ? uim_scm_t() : uim_scm_f();
 
   update_personal_dictionary_cache_with_file(fn, 1);
@@ -3178,7 +3179,7 @@
 skk_save_personal_dictionary(uim_lisp fn_)
 {
   FILE *fp;
-  const char *fn = uim_scm_refer_c_str(fn_);
+  const char *fn = REFER_C_STR(fn_);
   char *tmp_fn = NULL;
   struct skk_line *sl;
   struct stat st;
@@ -3237,12 +3238,12 @@
   if (str_ == uim_scm_null())
     return uim_scm_null();
 
-  str = uim_scm_refer_c_str(str_);
+  str = REFER_C_STR(str_);
   sep = strrchr(str, ';');
   if (sep && (*(++sep) != '\0')) {
-    res = uim_scm_make_str(sep);
+    res = MAKE_STR(sep);
   } else {
-    res = uim_scm_make_str("");
+    res = MAKE_STR("");
   }
   return res;
 }
@@ -3256,12 +3257,12 @@
   if (str_ == uim_scm_null())
     return uim_scm_null();
 
-  str = uim_scm_c_str(str_);
+  str = C_STR(str_);
   sep = strrchr(str, ';');
   if (sep && (*(sep + 1) != '\0')) {
     *sep = '\0';
   }
-  res = uim_scm_make_str(str);
+  res = MAKE_STR(str);
   free(str);
   return res;
 }
@@ -3322,14 +3323,14 @@
   if (str_ == uim_scm_null())
     return uim_scm_null();
 
-  cand = uim_scm_refer_c_str(str_);
+  cand = REFER_C_STR(str_);
 
   /* eval concat only for now */
   str = eval_candidate_with_concat(cand);
   if (!str)
     return str_;
 
-  cand_ = uim_scm_make_str(str);
+  cand_ = MAKE_STR(str);
   free(str);
 
   return cand_;
@@ -3347,17 +3348,17 @@
   uim_lisp ret;
   int i, j = 0;
 
-  str = uim_scm_refer_c_str(str_);
-  start = uim_scm_c_int(start_);
-  end = uim_scm_c_int(end_);
+  str = REFER_C_STR(str_);
+  start = C_INT(start_);
+  end = C_INT(end_);
 
   if (!str || start < 0 || start > end)
-    return uim_scm_make_str("");
+    return MAKE_STR("");
 
   len = strlen(str);
 
   if (end > len)
-    return uim_scm_make_str("");
+    return MAKE_STR("");
 
   s = uim_malloc(end - start + 1);
 
@@ -3366,7 +3367,7 @@
     j++;
   }
   s[j] = '\0';
-  ret = uim_scm_make_str(s);
+  ret = MAKE_STR(s);
   free(s);
 
   return ret;
@@ -3375,7 +3376,7 @@
 static uim_lisp
 skk_look_open(uim_lisp fn_)
 {
-  const char *fn = uim_scm_refer_c_str(fn_);
+  const char *fn = REFER_C_STR(fn_);
 
   if (use_look == 1 && skk_look_ctx)
     uim_look_finish(skk_look_ctx);
@@ -3425,7 +3426,7 @@
        /* overwrite upper and lower case */
        if (len < strlen(buf))
          memcpy(buf, str, len);
-       ret_ = uim_scm_make_str(buf);
+       ret_ = MAKE_STR(buf);
        break;
       }
     }

Reply via email to