[uim-commit] r309 - in trunk: scm uim
ekato@freedesktop.org
ekato@freedesktop.org
Sun Jan 16 22:40:50 PST 2005
Author: ekato
Date: 2005-01-16 22:40:47 -0800 (Sun, 16 Jan 2005)
New Revision: 309
Modified:
trunk/scm/skk.scm
trunk/uim/uim-ipc.c
Log:
* uim/uim-ipc.c (uim_ipc_open_command_with_option) : Don't modify
option string in this function as the variable is declared
const.
* scm/skk.scm (skk-proc-state-okuri) : Fix to reset okuri-head
character when it is changed in proc-state-okuri.
(skk-reset-handler) : Cosmetic change.
Modified: trunk/scm/skk.scm
===================================================================
--- trunk/scm/skk.scm 2005-01-17 02:52:21 UTC (rev 308)
+++ trunk/scm/skk.scm 2005-01-17 06:40:47 UTC (rev 309)
@@ -1452,7 +1452,10 @@
(begin
(skk-append-okuri-string sc res)
(if (string=? (rk-pending rkc) "")
- (skk-begin-conversion sc))))))
+ (skk-begin-conversion sc)))
+ (begin
+ (if (= (length (rk-context-seq rkc)) 1)
+ (skk-context-set-okuri-head! sc (charcode->string key)))))))
#f)))
(define skk-proc-state-latin
@@ -1541,11 +1544,10 @@
(define skk-reset-handler
(lambda (sc)
(let ((st (skk-context-state sc)))
- (if (or
- (= st 'skk-state-latin)
- (= st 'skk-state-wide-latin))
- ()
- (skk-flush sc)))))
+ (if (not (or
+ (= st 'skk-state-latin)
+ (= st 'skk-state-wide-latin))
+ (skk-flush sc))))))
(define skk-get-candidate-handler
(lambda (sc idx)
Modified: trunk/uim/uim-ipc.c
===================================================================
--- trunk/uim/uim-ipc.c 2005-01-17 02:52:21 UTC (rev 308)
+++ trunk/uim/uim-ipc.c 2005-01-17 06:40:47 UTC (rev 309)
@@ -151,7 +151,7 @@
{
int new_pid, result;
char **ap, *argv[10];
- char *p;
+ char *str, *p;
if (*read_fp != NULL) {
fclose(*read_fp);
@@ -188,13 +188,14 @@
argv[1] = NULL;
} else {
argv[0] = (char *)command;
- p = (char *)option;
+ str = p = strdup(option);
for (ap = &argv[1]; (*ap = strsep(&p, " ")) != NULL;) {
if (**ap != '\0')
if (++ap >= &argv[9])
break;
}
*ap = NULL;
+ free(str);
}
result = execvp(command, argv);
More information about the Uim-commit
mailing list