pkgsrc/inputmethod/kinput2/patches/patch-lib_wnnlib.c
mef e19af85962 * PKGREVISION = 2
* To compile with ja-freewnn-lib-1.11alpha22, small patches
  added for mainly with adding include directive:
  ---
  +#include <unistd.h>
  +#include <stdlib.h>
  +#include <stdio.h>
  +#include <string.h>
  ----
  the patches are listed below.
    patch-cmd_kinput2.c
    patch-lib_Canna.c
    patch-lib_ConvCtrl.c
    patch-lib_KIProto.c
    patch-lib_XimpProto.c
    patch-lib_ctext.c
    patch-lib_wnnlib.c
2011-09-13 07:28:48 +00:00

54 lines
1.6 KiB
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

$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;