summaryrefslogtreecommitdiff
path: root/inputmethod/kinput2/patches/patch-lib_wnnlib.c
blob: 31a5b968c06fcba5220f0cb42926e19363135c36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
$NetBSD: patch-lib_wnnlib.c,v 1.1 2011/09/13 07:28:48 mef Exp $

To compile with ja-freewnn-lib-1.11alpah22

--- lib/wnnlib.c.orig	2002-10-03 18:35:28.000000000 +0900
+++ lib/wnnlib.c	2011-05-08 23:37:11.000000000 +0900
@@ -282,7 +282,7 @@
  *
  * struct wnn_buf jcOpen(char *servername, char *envname,
  *			 char *rcfilename, int override,
- *			 void (*errmsgfunc)(), int (*confirmfunc)(),
+ *			 int (*errmsgfunc)(const char *), int (*confirmfunc)(const char *),
  *			 int timeout)
  *	jl_open $B$"$k$$$O(B jl_open_lang $B$KBP1~$7$?(B wnnlib $B$N%$%s%?%U%'!<(B
  *	$B%9$G!"$3$N4X?t$NCf$G<B:]$K(B jl_open $B$"$k$$$O(B jl_open_lang $B$r8F(B
@@ -581,6 +581,7 @@
 #include	"wnnlib.h"
 #include	"WStr.h"
 #include	<string.h>
+#include	<stdlib.h>
 #include	<pwd.h>
 #include	<X11/Xos.h>
 
@@ -1367,7 +1368,7 @@
 
 	/* $BJQ49J8;zNs$ND9$5$N%A%'%C%/(B */
 	clp = buf->clauseInfo + cl;
-	len = jl_kanji_len(buf->wnn, cl);
+	len = jl_kanji_len(buf->wnn, cl, -1);
 	diff = len - ((clp + 1)->dispp - clp->dispp);
 	newlen = (buf->displayEnd - buf->displayBuf) + diff;
 	if (newlen > buf->bufferSize) {
@@ -3449,8 +3450,8 @@
 char *envname;
 int override;
 char *rcfile;
-void (*errmsg)();
-int (*confirm)();
+int (*errmsg)(const char *);
+int (*confirm)(const char *);
 int timeout;
 {
     return jcOpen2(server, envname, override, rcfile, rcfile, errmsg, confirm, timeout);
@@ -3463,8 +3464,8 @@
 int override;
 char *rcfile4;		/* wnnenvrc for Wnn4 */
 char *rcfile6;		/* wnnenvrc for Wnn6 */
-void (*errmsg)();
-int (*confirm)();
+int (*errmsg)(const char *);
+int (*confirm)(const char *);
 int timeout;
 {
     struct wnn_buf *wnnbuf;