changeset 11:983aff0dcf18

imported patch 14_kinput2-v3.1-beta3-freewnn.diff
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Mon, 08 Mar 2010 20:37:40 +0900
parents 31f1de16683a
children 1f1719e33c62
files include/wnnlib.h lib/CcWnn.c lib/cconv.c lib/ioecall.c lib/wnnlib.c
diffstat 5 files changed, 16 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/include/wnnlib.h	Mon Mar 08 20:07:05 2010 +0900
+++ b/include/wnnlib.h	Mon Mar 08 20:37:40 2010 +0900
@@ -107,11 +107,11 @@
 #ifdef __STDC__
 extern struct wnn_buf *jcOpen(char *server, char *envname,
 				int override, char *rcfile,
-				void (*error)(), int (*confirm)(),
+				int (*error)(), int (*confirm)(),
 				int timeout);
 extern struct wnn_buf *jcOpen2(char *server, char *envname,
 				int override, char *rcfile4, char *rcfile6,
-				void (*error)(), int (*confirm)(),
+				int (*error)(), int (*confirm)(),
 				int timeout);
 extern int jcClose(struct wnn_buf *wnn);
 extern int jcIsConnect(struct wnn_buf *wnn);
--- a/lib/CcWnn.c	Mon Mar 08 20:07:05 2010 +0900
+++ b/lib/CcWnn.c	Mon Mar 08 20:37:40 2010 +0900
@@ -339,8 +339,8 @@
 
 static void ccInitialize();
 static void jcInitialize();
-static void createEnvError();
-static int createConfirm();
+static int createEnvError(char *);
+static int createConfirm(char *);
 
 static int funcDispatch();
 static void defAction();
@@ -899,12 +899,14 @@
     if (obj->ccWnn.pendingdata) restoreData(obj);
 }
 
-static void
+static int
 createEnvError(s)
 char *s;
 {
     if (current_obj != NULL)
 	XtAppWarning(XtWidgetToApplicationContext((Widget)current_obj), s);
+
+    return 0;
 }
 
 static int
--- a/lib/cconv.c	Mon Mar 08 20:07:05 2010 +0900
+++ b/lib/cconv.c	Mon Mar 08 20:37:40 2010 +0900
@@ -604,6 +604,7 @@
 #endif
 
 #include	<stdio.h>
+#include	<stdlib.h>
 #include	<X11/Xlib.h>
 #include	<X11/keysym.h>
 #include	<X11/Xutil.h>
--- a/lib/ioecall.c	Mon Mar 08 20:07:05 2010 +0900
+++ b/lib/ioecall.c	Mon Mar 08 20:37:40 2010 +0900
@@ -23,6 +23,7 @@
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <X11/Xlib.h>
 #include <X11/Xfuncproto.h>
 #include "IOECall.h"
--- a/lib/wnnlib.c	Mon Mar 08 20:07:05 2010 +0900
+++ b/lib/wnnlib.c	Mon Mar 08 20:37:40 2010 +0900
@@ -282,7 +282,7 @@
  *
  * struct wnn_buf jcOpen(char *servername, char *envname,
  *			 char *rcfilename, int override,
- *			 void (*errmsgfunc)(), int (*confirmfunc)(),
+ *			 int (*errmsgfunc)(), int (*confirmfunc)(),
  *			 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)(char *);
+int (*confirm)(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)(char *);
+int (*confirm)(char *);
 int timeout;
 {
     struct wnn_buf *wnnbuf;