[uim-commit] r144 - trunk/uim
omote@freedesktop.org
omote@freedesktop.org
Thu Jan 6 07:43:25 PST 2005
Author: omote
Date: 2005-01-06 07:43:22 -0800 (Thu, 06 Jan 2005)
New Revision: 144
Modified:
trunk/uim/plugin.c
Log:
* uim/plugin.c
- Use path_car for the exit condition from loops instead of path_cdr.
- (plugin_load): Fix a misimplementation of plugin_scm_filename.
Modified: trunk/uim/plugin.c
===================================================================
--- trunk/uim/plugin.c 2005-01-06 13:56:05 UTC (rev 143)
+++ trunk/uim/plugin.c 2005-01-06 15:43:22 UTC (rev 144)
@@ -129,11 +129,11 @@
return uim_scm_f();
}
#else
- fprintf(stderr, "uim-plugin-lib-load-path\n");
-
+/* fprintf(stderr, "uim-plugin-lib-load-path\n"); */
for(path_car = uim_scm_car(lib_path), path_cdr = uim_scm_cdr(lib_path);
- path_cdr != uim_scm_f();
- path_car = uim_scm_car(path_cdr), path_cdr = uim_scm_cdr(path_cdr)) {
+ path_car != uim_scm_f();
+ path_car = uim_scm_car(path_cdr), path_cdr = uim_scm_cdr(path_cdr))
+ {
int fd;
char *path = uim_scm_c_str(path_car);
len = strlen(path) + 1 + strlen(PLUGIN_PREFIX) + strlen(tmp)+ strlen(PLUGIN_SUFFIX) + 1;
@@ -149,15 +149,16 @@
plugin_lib_filename = NULL;
}
+/* fprintf(stderr, "uim-plugin-scm-load-path\n"); */
for(path_car = uim_scm_car(scm_path), path_cdr = uim_scm_cdr(scm_path);
- path_cdr != uim_scm_f();
- path_car = uim_scm_car(path_cdr), path_cdr = uim_scm_cdr(path_cdr)) {
+ path_car != uim_scm_f();
+ path_car = uim_scm_car(path_cdr), path_cdr = uim_scm_cdr(path_cdr))
+ {
int fd;
char *path = uim_scm_c_str(path_car);
- len = strlen(path) + 1 + strlen(PLUGIN_PREFIX) + strlen(tmp)+ strlen(PLUGIN_SUFFIX) + 1;
+ len = strlen(path) + 1 + strlen(tmp)+ strlen(".scm") + 1;
plugin_scm_filename = malloc(sizeof(char) * len);
- snprintf(plugin_scm_filename, len, "%s/%s%s%s",
- path, PLUGIN_PREFIX, tmp, PLUGIN_SUFFIX);
+ snprintf(plugin_scm_filename, len, "%s/%s.scm", path, tmp);
fd = open(plugin_scm_filename, O_RDONLY);
if(fd >= 0) {
close(fd);
@@ -225,6 +226,7 @@
free(module_scm_filename);
#else
+ fprintf(stderr, "plugin scm init\n");
uim_scm_require_file(plugin_scm_filename);
free(plugin_scm_filename);
#endif
More information about the Uim-commit
mailing list