[uim-commit] r780 - in trunk: . uim
yamaken at freedesktop.org
yamaken at freedesktop.org
Wed Mar 9 06:52:07 PST 2005
Author: yamaken
Date: 2005-03-09 06:52:03 -0800 (Wed, 09 Mar 2005)
New Revision: 780
Modified:
trunk/configure.ac
trunk/uim/context.h
trunk/uim/plugin.c
trunk/uim/prime.c
trunk/uim/siod.h
trunk/uim/uim-func.c
trunk/uim/uim-scm.c
trunk/uim/uim.c
Log:
* This commit removes obsolete callback queue and enables nested
eveluation of the Scheme interpreter as default
* configure.ac
- Remove obsolete configure options --disable-scm-nested-eval and
--enable-callback-queue
* uim/siod.h
- Set NESTED_REPL_C_STRING as 1 by default
* uim/prime.c
- (prime_lib_init):
* Remove all codes enabled in !UIM_SCM_NESTED_EVAL case
* Fix inappropriate indent
* uim/plugin.c
- Include uim-compat-scm.h as default
- (plugin_load, plugin_unload, uim_init_plugin, uim_quit_plugin):
Remove all codes enabled in !UIM_SCM_NESTED_EVAL case
* uim/uim-scm.c
- (uim_scm_gc_protect_stack, uim_scm_gc_unprotect_stack,
uim_scm_require_file): Remove all codes enabled in
!UIM_SCM_NESTED_EVAL case
* uim/uim-func.c
- (uim_flush_cb, uim_schedule_cb): Removed
- (uim_eval_string, im_clear_preedit, im_pushback_preedit,
im_update_preedit, im_commit, im_update_mode_list,
im_update_prop_list, im_update_prop_label, im_update_mode,
im_activate_candidate_selector, im_select_candidate,
im_shift_page_candidate, im_deactivate_candidate_selector,
im_request_surrounding, im_delete_surrounding): Remove obsolete
callback queue handlings
* uim/context.h
- (struct cb_q, struct cb, uim_schedule_cb): Removed
- (struct uim_context_): Remove the member cb_q
- Removed an anonymous enum for callback operation definition
* uim/uim.c
- (uim_create_context): Remove callback queue initialization
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2005-03-09 12:44:56 UTC (rev 779)
+++ trunk/configure.ac 2005-03-09 14:52:03 UTC (rev 780)
@@ -357,27 +357,6 @@
enable_compat_table="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)]),
- [
- if test "$enable_scm_nested_eval" != "no" ;then
- enable_scm_nested_eval="yes"
- fi
- ],
- [
- enable_scm_nested_eval="yes"
- ])
-
-AC_ARG_ENABLE(callback-queue,
- AC_HELP_STRING([--enable-callback-queue],
- [enable callback queue (for developer, will be obsolete)]),
- [],
- [
- enable_callback_queue="no"
- ])
-
AC_ARG_ENABLE(fep,
AC_HELP_STRING([--disable-fep],
[disable uim-fep]),
@@ -492,8 +471,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(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)
AM_CONDITIONAL(NEED_STRSEP_C, test $ac_cv_func_strsep = no)
@@ -689,18 +666,6 @@
[Enable obsolete table API for hk.scm (broken)])
fi
-if test x$enable_scm_nested_eval = xyes; then
- AC_DEFINE(UIM_SCM_NESTED_EVAL, 1,
- [Enable nested Scheme evaluation from C])
- AC_DEFINE(NESTED_REPL_C_STRING, 1,
- [Enable nested Scheme evaluation from C])
-fi
-
-if test x$enable_callback_queue = xyes; then
- AC_DEFINE(UIM_CALLBACK_QUEUE, 1,
- [Enable callback queue])
-fi
-
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
@@ -769,7 +734,5 @@
DEBUG : ${enable_debug}
COMPAT_SCM : ${enable_compat_scm}
COMPAT_TABLE : ${enable_compat_table}
- SCM_NESTED_EVAL : ${enable_scm_nested_eval}
- CALLBACK_QUEUE : ${enable_callback_queue}
])
fi
Modified: trunk/uim/context.h
===================================================================
--- trunk/uim/context.h 2005-03-09 12:44:56 UTC (rev 779)
+++ trunk/uim/context.h 2005-03-09 14:52:03 UTC (rev 780)
@@ -46,14 +46,6 @@
char *short_desc;
};
-#ifdef UIM_CALLBACK_QUEUE
-struct cb_q {
- struct cb *first_cb;
- struct cb *tail_cb;
- int flushing;
-};
-#endif
-
struct uim_candidate_ {
char *str; /* candidate */
char *heading_label;
@@ -118,42 +110,12 @@
/* surrounding text */
void (*request_surrounding_text_cb)(void *ptr);
int (*delete_surrounding_text_cb)(void *ptr, int offset, int len);
-#ifdef UIM_CALLBACK_QUEUE
- /* callback queue */
- struct cb_q cb_q;
-#endif
/* preedit segments array */
struct preedit_segment *psegs;
int nr_psegs;
};
-#ifdef UIM_CALLBACK_QUEUE
-enum {
- CAND_ACTIVATE_CB,
- CAND_SELECT_CB,
- CAND_DEACTIVATE_CB,
- COMMIT_CB,
- PREEDIT_CLEAR_CB,
- PREEDIT_PUSHBACK_CB,
- PREEDIT_UPDATE_CB,
- MODE_UPDATE_CB,
- MODE_LIST_UPDATE_CB,
- PROP_LABEL_UPDATE_CB,
- PROP_LIST_UPDATE_CB,
- CAND_SHIFT_PAGE_CB,
- REQUEST_SURROUNDING_CB,
- DELETE_SURROUNDING_CB
-};
-struct cb {
- int type;
- char *str;
- int n1, n2;
- struct cb *next;
-};
-#endif
-
-
#ifdef ENABLE_NLS
#define UIM_PREPARE_SAVING_TEXTDOMAIN_CODESET() \
const char *orig_encoding, *client_encoding;
@@ -294,9 +256,6 @@
int uim_sizeof_sexp_str(const char *tmpl, ...);
void uim_eval_string(uim_context, char *str);
-#ifdef UIM_CALLBACK_QUEUE
-void uim_schedule_cb(uim_context, int type, char *str, int n1, int n2);
-#endif
void uim_release_preedit_segments(uim_context uc);
void uim_update_preedit_segments(uim_context uc);
Modified: trunk/uim/plugin.c
===================================================================
--- trunk/uim/plugin.c 2005-03-09 12:44:56 UTC (rev 779)
+++ trunk/uim/plugin.c 2005-03-09 14:52:03 UTC (rev 780)
@@ -49,9 +49,7 @@
#include "uim.h"
#include "uim-scm.h"
#include "uim-compat-scm.h"
-#ifndef UIM_SCM_NESTED_EVAL
#include "uim-compat-scm.h"
-#endif
#include "plugin.h"
#include "context.h"
@@ -67,13 +65,8 @@
{
const char *plugin_name;
char *plugin_lib_filename, *plugin_scm_filename;
-#ifdef UIM_SCM_NESTED_EVAL
uim_lisp lib_path = uim_scm_eval_c_string("uim-plugin-lib-load-path");
uim_lisp scm_path = uim_scm_eval_c_string("uim-plugin-scm-load-path");
-#else
- uim_lisp lib_path = uim_scm_symbol_value("uim-plugin-lib-load-path");
- uim_lisp scm_path = uim_scm_symbol_value("uim-plugin-scm-load-path");
-#endif
uim_lisp path_car, path_cdr;
void *library;
void (*plugin_instance_init)(void);
@@ -182,7 +175,6 @@
static uim_lisp
plugin_unload(uim_lisp _name)
{
-#ifdef UIM_SCM_NESTED_EVAL
uim_lisp stack_start;
void *library;
void (*plugin_instance_quit)(void);
@@ -207,7 +199,6 @@
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();
}
@@ -223,7 +214,6 @@
/* Called from uim_quit */
void uim_quit_plugin(void)
{
-#ifdef UIM_SCM_NESTED_EVAL
uim_lisp stack_start;
uim_lisp alist, rest, entry, name;
@@ -236,5 +226,4 @@
plugin_unload(name);
}
uim_scm_gc_unprotect_stack(&stack_start);
-#endif
}
Modified: trunk/uim/prime.c
===================================================================
--- trunk/uim/prime.c 2005-03-09 12:44:56 UTC (rev 779)
+++ trunk/uim/prime.c 2005-03-09 14:52:03 UTC (rev 780)
@@ -196,50 +196,47 @@
prime_lib_init(uim_lisp use_udp_)
{
char *option;
-#ifdef UIM_SCM_NESTED_EVAL
uim_bool use_udp = uim_scm_c_bool(use_udp_);
if(use_udp == UIM_TRUE)
use_unix_domain_socket = UIM_TRUE;
else
use_unix_domain_socket = UIM_FALSE;
-#else
- use_unix_domain_socket = UIM_FALSE;
-#endif
- if(use_unix_domain_socket == UIM_TRUE) {
- prime_ud_path = prime_get_ud_path();
- if(!prime_ud_path)
- return uim_scm_f();
+
+ if(use_unix_domain_socket == UIM_TRUE) {
+ prime_ud_path = prime_get_ud_path();
+ if(!prime_ud_path)
+ return uim_scm_f();
- prime_fd = prime_init_ud(prime_ud_path);
- if(prime_fd == -1) {
- unlink(prime_ud_path);
- option = malloc(strlen("-u ") + strlen(prime_ud_path) + 1);
- sprintf(option, "-u %s", prime_ud_path);
- prime_pid = uim_ipc_open_command_with_option(prime_pid, &primer, &primew, prime_command, option);
- free(option);
- if(prime_pid == 0) {
- return uim_scm_f();
- } else {
+ prime_fd = prime_init_ud(prime_ud_path);
+ if(prime_fd == -1) {
+ unlink(prime_ud_path);
+ option = malloc(strlen("-u ") + strlen(prime_ud_path) + 1);
+ sprintf(option, "-u %s", prime_ud_path);
+ prime_pid = uim_ipc_open_command_with_option(prime_pid, &primer, &primew, prime_command, option);
+ free(option);
+ if(prime_pid == 0) {
+ return uim_scm_f();
+ } else {
+ prime_fd = prime_init_ud(prime_ud_path);
+ while(prime_fd == -1) {
prime_fd = prime_init_ud(prime_ud_path);
- while(prime_fd == -1) {
- prime_fd = prime_init_ud(prime_ud_path);
- }
}
}
+ }
- if(prime_fd == -1)
- return uim_scm_f();
- else
- return uim_scm_t();
- } else {
- if (prime_pid == 0) {
- prime_pid = uim_ipc_open_command( prime_pid, &primer, &primew, prime_command );
- }
- if(prime_pid == 0) {
- return uim_scm_f();
- }
+ if(prime_fd == -1)
+ return uim_scm_f();
+ else
return uim_scm_t();
+ } else {
+ if (prime_pid == 0) {
+ prime_pid = uim_ipc_open_command( prime_pid, &primer, &primew, prime_command );
}
+ if(prime_pid == 0) {
+ return uim_scm_f();
+ }
+ return uim_scm_t();
+ }
}
void
Modified: trunk/uim/siod.h
===================================================================
--- trunk/uim/siod.h 2005-03-09 12:44:56 UTC (rev 779)
+++ trunk/uim/siod.h 2005-03-09 14:52:03 UTC (rev 780)
@@ -30,7 +30,7 @@
#include <stdio.h>
#ifndef NESTED_REPL_C_STRING
-#define NESTED_REPL_C_STRING 0
+#define NESTED_REPL_C_STRING 1
#endif
struct obj
Modified: trunk/uim/uim-func.c
===================================================================
--- trunk/uim/uim-func.c 2005-03-09 12:44:56 UTC (rev 779)
+++ trunk/uim/uim-func.c 2005-03-09 14:52:03 UTC (rev 780)
@@ -88,124 +88,6 @@
}
}
-#ifdef UIM_CALLBACK_QUEUE
-static void
-uim_flush_cb(uim_context uc)
-{
- struct cb *cb = uc->cb_q.first_cb;
- while (cb) {
- struct cb *tmp = cb;
- cb = cb->next;
- switch (tmp->type) {
- case COMMIT_CB:
- {
- char *s;
- s = uc->conv_if->convert(uc->conv, tmp->str);
- if (uc->commit_cb) {
- uc->commit_cb(uc->ptr, s);
- }
- free(s);
- }
- break;
- case CAND_ACTIVATE_CB:
- {
- if (uc->candidate_selector_activate_cb) {
- uc->candidate_selector_activate_cb(uc->ptr, tmp->n1, tmp->n2);
- }
- }
- break;
- case CAND_SELECT_CB:
- {
- if (uc->candidate_selector_select_cb) {
- uc->candidate_selector_select_cb(uc->ptr, tmp->n1);
- }
- }
- break;
- case CAND_SHIFT_PAGE_CB:
- {
- if (uc->candidate_selector_shift_page_cb) {
- uc->candidate_selector_shift_page_cb(uc->ptr, tmp->n1);
- }
- }
- break;
- case CAND_DEACTIVATE_CB:
- {
- if (uc->candidate_selector_deactivate_cb) {
- uc->candidate_selector_deactivate_cb(uc->ptr);
- }
- }
- break;
- case PREEDIT_CLEAR_CB:
- {
- uim_release_preedit_segments(uc);
- }
- break;
- case PREEDIT_PUSHBACK_CB:
- {
- char *s;
- s = uc->conv_if->convert(uc->conv, tmp->str);
- pushback_preedit_segment(uc, tmp->n1, s);
- }
- break;
- case PREEDIT_UPDATE_CB:
- {
- uim_update_preedit_segments(uc);
- }
- break;
- case MODE_UPDATE_CB:
- {
- if (uc->mode_update_cb) {
- uc->mode_update_cb(uc->ptr, tmp->n1);
- }
- }
- break;
- case MODE_LIST_UPDATE_CB:
- {
- if (uc->mode_list_update_cb) {
- uc->mode_list_update_cb(uc->ptr);
- }
- }
- break;
- case PROP_LABEL_UPDATE_CB:
- {
- if (uc->prop_label_update_cb) {
- uc->prop_label_update_cb(uc->ptr, uc->proplabelstr);
- }
- }
- break;
- case PROP_LIST_UPDATE_CB:
- {
- if (uc->prop_list_update_cb) {
- uc->prop_list_update_cb(uc->ptr, uc->propstr);
- }
- }
- break;
- case REQUEST_SURROUNDING_CB:
- {
- if (uc->request_surrounding_text_cb) {
- uc->request_surrounding_text_cb(uc->ptr);
- }
- }
- break;
- case DELETE_SURROUNDING_CB:
- {
- if (uc->delete_surrounding_text_cb) {
- uc->delete_surrounding_text_cb(uc->ptr, tmp->n1, tmp->n2);
- }
- }
- break;
- default:;
- }
- if (tmp->str) {
- free(tmp->str);
- }
- free(tmp);
- }
- uc->cb_q.first_cb = NULL;
- uc->cb_q.tail_cb = NULL;
-}
-#endif
-
/* release preedit segment in a context */
void
uim_release_preedit_segments(uim_context uc)
@@ -395,32 +277,6 @@
err = iconv_close((iconv_t)obj);
}
-#ifdef UIM_CALLBACK_QUEUE
-void
-uim_schedule_cb(uim_context uc, int type, char *str, int n1, int n2)
-{
- struct cb *cb;
-
- if(!uc)
- return;
-
- cb = malloc(sizeof(struct cb));
- cb->type = type;
- cb->str = str;
- cb->n1 = n1;
- cb->n2 = n2;
- cb->next = NULL;
-
- if (!uc->cb_q.first_cb) {
- uc->cb_q.first_cb = cb;
- }
- if (uc->cb_q.tail_cb) {
- uc->cb_q.tail_cb->next = cb;
- }
- uc->cb_q.tail_cb = cb;
-}
-#endif
-
/** Calculate actual sexp string size from printf-style args.
* This function calculates actual sexp string size from printf-style
* args. Format string \a sexp_tmpl only accepts %d and %s.
@@ -473,17 +329,6 @@
{
/* Evaluate */
uim_scm_eval_c_string(buf);
-
-#ifdef UIM_CALLBACK_QUEUE
- /* Flush callback requests queued during scheme evaluation
- * (To avoid C -> scheme -> C call, actual call is delayed to here)
- */
- if (!uc->cb_q.flushing) {
- uc->cb_q.flushing ++;
- uim_flush_cb(uc);
- uc->cb_q.flushing --;
- }
-#endif
}
/* this is not a uim API, so did not name as uim_retrieve_context() */
@@ -502,11 +347,7 @@
im_clear_preedit(uim_lisp id)
{
uim_context uc = retrieve_uim_context(id);
-#ifdef UIM_CALLBACK_QUEUE
- uim_schedule_cb(uc, PREEDIT_CLEAR_CB, NULL, 0, 0);
-#else
uim_release_preedit_segments(uc);
-#endif
return uim_scm_f();
}
@@ -519,15 +360,11 @@
if (str_) {
str = uim_scm_refer_c_str(str_);
}
-#ifdef UIM_CALLBACK_QUEUE
- uim_schedule_cb(uc, PREEDIT_PUSHBACK_CB, str, attr, 0);
-#else
{
char *s;
s = uc->conv_if->convert(uc->conv, str);
pushback_preedit_segment(uc, attr, s);
}
-#endif
return uim_scm_f();
}
@@ -535,11 +372,7 @@
im_update_preedit(uim_lisp id)
{
uim_context uc = retrieve_uim_context(id);
-#ifdef UIM_CALLBACK_QUEUE
- uim_schedule_cb(uc, PREEDIT_UPDATE_CB, NULL, 0, 0);
-#else
uim_update_preedit_segments(uc);
-#endif
return uim_scm_f();
}
@@ -551,9 +384,6 @@
const char *str = NULL;
if (uim_scm_stringp(str_)) {
str = uim_scm_refer_c_str(str_);
-#ifdef UIM_CALLBACK_QUEUE
- uim_schedule_cb(uc, COMMIT_CB, str, 0, 0);
-#else
{
char *s;
s = uc->conv_if->convert(uc->conv, str);
@@ -562,7 +392,6 @@
}
free(s);
}
-#endif
}
return uim_scm_f();
}
@@ -672,13 +501,9 @@
if(!uc)
return uim_scm_f();
-#ifdef UIM_CALLBACK_QUEUE
- uim_schedule_cb(uc, MODE_LIST_UPDATE_CB, NULL, 0, 0);
-#else
if (uc->mode_list_update_cb) {
uc->mode_list_update_cb(uc->ptr);
}
-#endif
return uim_scm_f();
}
@@ -688,25 +513,13 @@
uim_context uc = retrieve_uim_context(id);
const char *prop = uim_scm_refer_c_str(prop_);
- if(uc) {
-#ifdef UIM_CALLBACK_QUEUE
- uim_schedule_cb(uc, PROP_LIST_UPDATE_CB, NULL, 0, 0);
-#endif
- } else {
+ if (!uc)
return uim_scm_f();
- }
if(uc && uc->propstr)
free(uc->propstr);
uc->propstr = uc->conv_if->convert(uc->conv, prop);
-
-#ifndef UIM_CALLBACK_QUEUE
- if (uc->prop_list_update_cb) {
- uc->prop_list_update_cb(uc->ptr, uc->propstr);
- }
-#endif
-
return uim_scm_f();
}
@@ -717,25 +530,13 @@
uim_context uc = retrieve_uim_context(id);
const char *prop = uim_scm_refer_c_str(prop_);
- if(uc) {
-#ifdef UIM_CALLBACK_QUEUE
- uim_schedule_cb(uc, PROP_LABEL_UPDATE_CB, NULL, 0, 0);
-#endif
- } else {
+ if (!uc)
return uim_scm_f();
- }
if(uc && uc->proplabelstr)
free(uc->proplabelstr);
uc->proplabelstr = uc->conv_if->convert(uc->conv, prop);
-
-#ifndef UIM_CALLBACK_QUEUE
- if (uc->prop_label_update_cb) {
- uc->prop_label_update_cb(uc->ptr, uc->proplabelstr);
- }
-#endif
-
return uim_scm_f();
}
@@ -749,13 +550,9 @@
return uim_scm_f();
uc->mode = mode;
-#ifdef UIM_CALLBACK_QUEUE
- uim_schedule_cb(uc, MODE_UPDATE_CB, NULL, mode, 0);
-#else
if (uc->mode_update_cb) {
uc->mode_update_cb(uc->ptr, mode);
}
-#endif
return uim_scm_f();
}
@@ -797,13 +594,9 @@
uim_context uc = retrieve_uim_context(id_);
int display_limit = uim_scm_c_int(display_limit_);
int nr = uim_scm_c_int(nr_);
-#ifdef UIM_CALLBACK_QUEUE
- uim_schedule_cb(uc, CAND_ACTIVATE_CB, NULL, nr, display_limit);
-#else
if (uc->candidate_selector_activate_cb) {
uc->candidate_selector_activate_cb(uc->ptr, nr, display_limit);
}
-#endif
return uim_scm_f();
}
@@ -812,13 +605,9 @@
{
uim_context uc = retrieve_uim_context(id_);
int idx = uim_scm_c_int(idx_);
-#ifdef UIM_CALLBACK_QUEUE
- uim_schedule_cb(uc, CAND_SELECT_CB, NULL, idx, 0);
-#else
if (uc->candidate_selector_select_cb) {
uc->candidate_selector_select_cb(uc->ptr, idx);
}
-#endif
return uim_scm_f();
}
@@ -835,13 +624,9 @@
else
dir = 1;
-#ifdef UIM_CALLBACK_QUEUE
- uim_schedule_cb(uc, CAND_SHIFT_PAGE_CB, NULL, dir, 0);
-#else
if (uc->candidate_selector_shift_page_cb) {
uc->candidate_selector_shift_page_cb(uc->ptr, dir);
}
-#endif
return uim_scm_f();
}
@@ -849,13 +634,9 @@
im_deactivate_candidate_selector(uim_lisp id_)
{
uim_context uc = retrieve_uim_context(id_);
-#ifdef UIM_CALLBACK_QUEUE
- uim_schedule_cb(uc, CAND_DEACTIVATE_CB, NULL, 0, 0);
-#else
if (uc->candidate_selector_deactivate_cb) {
uc->candidate_selector_deactivate_cb(uc->ptr);
}
-#endif
return uim_scm_f();
}
@@ -911,13 +692,9 @@
if (!uc->request_surrounding_text_cb) {
return uim_scm_f();
}
-#ifdef UIM_CALLBACK_QUEUE
- uim_schedule_cb(uc, REQUEST_SURROUNDING_CB, NULL, 0, 0);
-#else
if (uc->request_surrounding_text_cb) {
uc->request_surrounding_text_cb(uc->ptr);
}
-#endif
return uim_scm_t();
}
@@ -930,13 +707,9 @@
if (!uc->delete_surrounding_text_cb) {
return uim_scm_f();
}
-#ifdef UIM_CALLBACK_QUEUE
- uim_schedule_cb(uc, DELETE_SURROUNDING_CB, NULL, offset, len);
-#else
if (uc->delete_surrounding_text_cb) {
uc->delete_surrounding_text_cb(uc->ptr, offset, len);
}
-#endif
return uim_scm_t();
}
Modified: trunk/uim/uim-scm.c
===================================================================
--- trunk/uim/uim-scm.c 2005-03-09 12:44:56 UTC (rev 779)
+++ trunk/uim/uim-scm.c 2005-03-09 14:52:03 UTC (rev 780)
@@ -188,17 +188,13 @@
void
uim_scm_gc_protect_stack(uim_lisp *stack_start)
{
-#ifdef UIM_SCM_NESTED_EVAL
siod_gc_protect_stack((LISP *)stack_start);
-#endif
}
void
uim_scm_gc_unprotect_stack(uim_lisp *stack_start)
{
-#ifdef UIM_SCM_NESTED_EVAL
siod_gc_unprotect_stack((LISP *)stack_start);
-#endif
}
uim_bool
@@ -381,26 +377,12 @@
uim_scm_require_file(const char *fn)
{
uim_bool succeeded;
-#ifndef UIM_SCM_NESTED_EVAL
- uim_lisp _fn;
-#endif
if (!fn)
return UIM_FALSE;
-#ifdef UIM_SCM_NESTED_EVAL
UIM_EVAL_FSTRING2(NULL, "(eq? '*%s-loaded* (*catch 'errobj (require \"%s\")))", fn, fn);
succeeded = uim_scm_c_bool(uim_scm_return_value());
-#else
- if (siod_repl_c_string_entered()) {
- _fn = uim_scm_make_str(fn);
- require((LISP)_fn);
- succeeded = UIM_TRUE; /* bogus result */
- } else {
- UIM_EVAL_FSTRING2(NULL, "(eq? '*%s-loaded* (*catch 'errobj (require \"%s\")))", fn, fn);
- succeeded = uim_scm_c_bool(uim_scm_return_value());
- }
-#endif
return succeeded;
}
Modified: trunk/uim/uim.c
===================================================================
--- trunk/uim/uim.c 2005-03-09 12:44:56 UTC (rev 779)
+++ trunk/uim/uim.c 2005-03-09 14:52:03 UTC (rev 780)
@@ -162,13 +162,7 @@
/**/
uc->nr_candidates = 0;
uc->candidate_index = 0;
-#ifdef UIM_CALLBACK_QUEUE
/**/
- uc->cb_q.first_cb = NULL;
- uc->cb_q.tail_cb = NULL;
- uc->cb_q.flushing = 0;
-#endif
- /**/
uc->psegs = NULL;
uc->nr_psegs = 0;
More information about the Uim-commit
mailing list