summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Tilley <lv@gentoo.org>2004-05-10 22:08:30 +0000
committerTravis Tilley <lv@gentoo.org>2004-05-10 22:08:30 +0000
commitbe13d55eba5d348020e9a63d3d47539628f059e7 (patch)
treeb49cbfd7e94fe4a3a10345d7cfc9846a28e3abf9 /app-i18n/freewnn
parentMore spacing (Manifest recommit) (diff)
downloadgentoo-2-be13d55eba5d348020e9a63d3d47539628f059e7.tar.gz
gentoo-2-be13d55eba5d348020e9a63d3d47539628f059e7.tar.bz2
gentoo-2-be13d55eba5d348020e9a63d3d47539628f059e7.zip
ok, this version of freewnn should work on amd64 and s390... with a big accent on should. i"m marking alpha20 -amd64 since it never worked there, and marked alpha17 amd64 just to have a version in stable that compiles. kinput2 may need further bugfixes on amd64 to work right with this.
Diffstat (limited to 'app-i18n/freewnn')
-rw-r--r--app-i18n/freewnn/ChangeLog14
-rw-r--r--app-i18n/freewnn/Manifest12
-rw-r--r--app-i18n/freewnn/files/a017/FreeWnn-1.1.1-a017.dif547
-rw-r--r--app-i18n/freewnn/files/a017/FreeWnn-ja.patch133
-rw-r--r--app-i18n/freewnn/files/a017/FreeWnn-lib64.patch11
-rw-r--r--app-i18n/freewnn/files/a017/FreeWnn-s390x.patch217
-rw-r--r--app-i18n/freewnn/files/a017/FreeWnn-sighandler.patch39
-rw-r--r--app-i18n/freewnn/files/a017/FreeWnn-uum.patch54
-rw-r--r--app-i18n/freewnn/files/digest-freewnn-1.1.1_alpha171
-rw-r--r--app-i18n/freewnn/freewnn-1.1.1_alpha17.ebuild60
-rw-r--r--app-i18n/freewnn/freewnn-1.1.1_alpha20.ebuild4
11 files changed, 1088 insertions, 4 deletions
diff --git a/app-i18n/freewnn/ChangeLog b/app-i18n/freewnn/ChangeLog
index f479788988b8..108cec25a0d1 100644
--- a/app-i18n/freewnn/ChangeLog
+++ b/app-i18n/freewnn/ChangeLog
@@ -1,6 +1,18 @@
# ChangeLog for app-i18n/freewnn
# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-i18n/freewnn/ChangeLog,v 1.8 2004/03/13 20:44:55 dholm Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-i18n/freewnn/ChangeLog,v 1.9 2004/05/10 22:08:28 lv Exp $
+
+*freewnn-1.1.1_alpha17 (10 May 2004)
+
+ 10 May 2004; Travis Tilley <lv@gentoo.org>
+ +files/a017/FreeWnn-1.1.1-a017.dif, +files/a017/FreeWnn-ja.patch,
+ +files/a017/FreeWnn-lib64.patch, +files/a017/FreeWnn-s390x.patch,
+ +files/a017/FreeWnn-sighandler.patch, +files/a017/FreeWnn-uum.patch,
+ +freewnn-1.1.1_alpha17.ebuild, freewnn-1.1.1_alpha20.ebuild:
+ ok, this version of freewnn should work on amd64 and s390... with a big accent
+ on should. i'm marking alpha20 -amd64 since it never worked there, and marked
+ alpha17 amd64 just to have a version in stable that compiles. kinput2 may need
+ further bugfixes on amd64 to work right with this.
13 Mar 2004; David Holm <dholm@gentoo.org> freewnn-1.1.1_alpha20.ebuild:
Added to ~ppc.
diff --git a/app-i18n/freewnn/Manifest b/app-i18n/freewnn/Manifest
index 18dbe37ff024..e2c2a3f8c2b3 100644
--- a/app-i18n/freewnn/Manifest
+++ b/app-i18n/freewnn/Manifest
@@ -1,5 +1,15 @@
-MD5 78c1d7aa2aef1df2ba5be3cd6b63b303 ChangeLog 1138
+MD5 7153f13a8a5b8ed9846277fb98ee58e2 freewnn-1.1.1_alpha17.ebuild 1641
MD5 a3b737cc195cd1f2bc95d2363e71ebfd freewnn-1.1.1_alpha20.ebuild 1342
+MD5 78c1d7aa2aef1df2ba5be3cd6b63b303 ChangeLog 1138
MD5 e92a48548554c80cf90e18df17ff6a82 metadata.xml 156
+MD5 26f2f4f4d23f76e26254c9d074e3e75a files/digest-freewnn-1.1.1_alpha17 71
MD5 a67e6df6683b65c8912a11446a1c1240 files/digest-freewnn-1.1.1_alpha20 72
MD5 9ef81b34a1fb16dd2b5c6f717913cb9e files/freewnn.initd 296
+MD5 e916afb2e8bc4f9b96443167bc7dd7ea files/a017/FreeWnn-fsstnd.patch 2008
+MD5 a24127af4d21ec364c841cc06b37411a files/a017/FreeWnn-sighandler.patch 876
+MD5 8b54a21960c4499a862294bac020848b files/a017/FreeWnn-1.1.1-a017.dif 19564
+MD5 d7f8705d389f74cb64218fe0ff512be5 files/a017/FreeWnn-lib64.patch 479
+MD5 96c9b5198682f09611b2ec0dbeddbce3 files/a017/FreeWnn-s390x.patch 7099
+MD5 7db8085bf871d6445f549b015b7217a9 files/a017/FreeWnn-uum.patch 1983
+MD5 4efe3f1cf65425510ebeea12cdb2f178 files/a017/FreeWnn-ja.patch 4905
+MD5 dff07767208923c84e34d2a736084ab5 files/a017/FreeWnn-noroot.patch 11238
diff --git a/app-i18n/freewnn/files/a017/FreeWnn-1.1.1-a017.dif b/app-i18n/freewnn/files/a017/FreeWnn-1.1.1-a017.dif
new file mode 100644
index 000000000000..310d002f4183
--- /dev/null
+++ b/app-i18n/freewnn/files/a017/FreeWnn-1.1.1-a017.dif
@@ -0,0 +1,547 @@
+--- Xsi/PubdicPlus/pod.c
++++ Xsi/PubdicPlus/pod.c 2001/09/04 16:59:45
+@@ -26,13 +26,15 @@
+
+ #include <stdio.h>
+
+-#define bzero(a, c) memset(a, 0, c)
+-
+ #if __STDC__
+ #include <stddef.h>
++#include <stdlib.h>
++#include <string.h>
+ #else
+ extern char *malloc ();
+ #endif
++
++#define bzero(a, c) memset(a, 0, c)
+
+ #define POD_WCHAR
+
+--- Xsi/Wnn/include/jllib.h
++++ Xsi/Wnn/include/jllib.h 2001/09/04 18:55:55
+@@ -248,58 +248,58 @@
+ #define jl_set_lang(buf, lang) js_set_lang((buf)->env, lang)
+
+ /* extern function defines */
+-extern struct wnn_buf *jl_open_lang ();
+-extern struct wnn_env *jl_connect_lang ();
+-extern struct wnn_env *jl_env_get ();
+-extern struct wnn_jdata *jl_word_info_e ();
+-extern w_char *jl_hinsi_name_e ();
++extern struct wnn_buf *jl_open_lang (const char *, const char *, const char *, const char *, int (*) (const char *), int (*) (const char *), int);
++extern struct wnn_env *jl_connect_lang (const char *, const char *, const char *, const char *, int (*) (const char *), int (*) (const char *), int);
++extern struct wnn_env *jl_env_get (struct wnn_buf *);
++extern struct wnn_jdata *jl_word_info_e (struct wnn_env *, int, int);
++extern w_char *jl_hinsi_name_e (struct wnn_env *, int);
+
+-extern void jl_close ();
+-extern int jl_dic_add_e ();
+-extern int jl_dic_comment_set_e ();
+-extern int jl_dic_delete_e ();
+-extern int jl_dic_list_e ();
+-extern int jl_dic_save_all_e ();
+-extern int jl_dic_save_e ();
+-extern int jl_dic_use_e ();
+-extern void jl_disconnect ();
+-extern void jl_disconnect_if_server_dead ();
+-extern void jl_env_set ();
+-extern int jl_fuzokugo_get_e ();
+-extern int jl_fuzokugo_set_e ();
+-extern void jl_get_zenkouho_kanji ();
+-extern int jl_hinsi_dicts_e ();
+-extern int jl_hinsi_list_e ();
+-extern int jl_hinsi_number_e ();
+-extern int jl_isconnect_e ();
+-extern int jl_kanji_len ();
+-extern int jl_kill ();
+-extern int jl_nobi_conv ();
+-extern int jl_nobi_conv_e2 ();
+-extern int jl_param_get_e ();
+-extern int jl_param_set_e ();
+-extern int jl_ren_conv ();
+-extern int jl_set_env_wnnrc ();
+-extern int jl_set_env_wnnrc1 ();
+-extern int jl_set_jikouho ();
+-extern int jl_set_jikouho_dai ();
+-extern int jl_tan_conv ();
+-extern int jl_update_hindo ();
+-extern int jl_word_add_e ();
+-extern int jl_word_comment_set_e ();
+-extern int jl_word_delete_e ();
+-extern int jl_word_search_by_env_e ();
+-extern int jl_word_search_e ();
+-extern int jl_word_use_e ();
+-extern int jl_yomi_len ();
+-extern int jl_zenkouho ();
+-extern int jl_zenkouho_dai ();
+-extern int wnn_get_area ();
++extern void jl_close (struct wnn_buf *);
++extern int jl_dic_add_e (struct wnn_env *, char *, char *, int, int, int, int, char *, char *, int (*) (const char *), int (*) (const char *));
++extern int jl_dic_comment_set_e (struct wnn_env *, int, w_char *);
++extern int jl_dic_delete_e (struct wnn_env *, int);
++extern int jl_dic_list_e (struct wnn_env *, WNN_DIC_INFO **);
++extern int jl_dic_save_all_e (struct wnn_env *);
++extern int jl_dic_save_e (struct wnn_env *, int);
++extern int jl_dic_use_e (struct wnn_env *, int, int);
++extern void jl_disconnect (struct wnn_env *);
++extern void jl_disconnect_if_server_dead (struct wnn_env *);
++extern void jl_env_set (struct wnn_buf *, struct wnn_env *);
++extern int jl_fuzokugo_get_e (struct wnn_env *, char *);
++extern int jl_fuzokugo_set_e (struct wnn_env *, char *);
++extern void jl_get_zenkouho_kanji (struct wnn_buf *, int, w_char *);
++extern int jl_hinsi_dicts_e (struct wnn_env *, int, int **);
++extern int jl_hinsi_list_e (struct wnn_env *, int, w_char *, w_char ***);
++extern int jl_hinsi_number_e (struct wnn_env *, w_char *);
++extern int jl_isconnect_e (struct wnn_env *);
++extern int jl_kanji_len (struct wnn_buf *, int, int);
++extern int jl_kill (struct wnn_buf *, int, int);
++extern int jl_nobi_conv (struct wnn_buf *, int, int, int, int, int);
++extern int jl_nobi_conv_e2 (struct wnn_buf *, struct wnn_env *, int, int, int, int, int);
++extern int jl_param_get_e (struct wnn_env *, struct wnn_param *);
++extern int jl_param_set_e (struct wnn_env *, struct wnn_param *);
++extern int jl_ren_conv (struct wnn_buf *, w_char *, int, int, int);
++extern int jl_set_env_wnnrc (struct wnn_env *, const char *, int (*) (const char *), int (*) (const char *));
++extern int jl_set_env_wnnrc1 (struct wnn_env *, const char *, int (*) (const char *), int (*) (const char *), int);
++extern int jl_set_jikouho (struct wnn_buf *, int);
++extern int jl_set_jikouho_dai (struct wnn_buf *, int);
++extern int jl_tan_conv (struct wnn_buf *, w_char *, int, int, int, int);
++extern int jl_update_hindo (struct wnn_buf *, int, int);
++extern int jl_word_add_e (struct wnn_env *, int, w_char *, w_char *, w_char *, int, int);
++extern int jl_word_comment_set_e (struct wnn_env *, int, int, w_char *);
++extern int jl_word_delete_e (struct wnn_env *, int, int);
++extern int jl_word_search_by_env_e (struct wnn_env *, w_char *, struct wnn_jdata **);
++extern int jl_word_search_e (struct wnn_env *, int, w_char *, struct wnn_jdata **);
++extern int jl_word_use_e (struct wnn_env *, int, int);
++extern int jl_yomi_len (struct wnn_buf *, int, int);
++extern int jl_zenkouho (struct wnn_buf *, int, int, int);
++extern int jl_zenkouho_dai (struct wnn_buf *, int, int, int, int);
++extern int wnn_get_area (struct wnn_buf *, int, int, w_char *, int);
+
+-extern char *wnn_perror ();
+-extern char *wnn_perror_lang ();
++extern char *wnn_perror (void);
++extern char *wnn_perror_lang (char *);
+
+ #ifdef CONVERT_by_STROKE
+-extern void jl_get_zenkouho_yomi ();
++extern void jl_get_zenkouho_yomi (struct wnn_buf *, int, w_char *);
+ #endif
+ #endif /* JLLIB */
+--- Xsi/Wnn/jlib/jl.c
++++ Xsi/Wnn/jlib/jl.c 2001/09/04 19:06:21
+@@ -38,6 +38,8 @@
+ #include "commonhd.h"
+ #include "wnn_config.h"
+ #include <stdio.h>
++#include <stdlib.h>
++#include <stdarg.h>
+ #include <sys/types.h>
+ #ifdef SYSVR2
+ # include <string.h>
+@@ -145,7 +147,7 @@
+ static void make_space_for ();
+ static void make_space_for_bun ();
+ static void make_space_for_zenkouho ();
+-static void message_out ();
++static void message_out (int (*) (const char *), const char *, ...);
+ static int ren_conv1 ();
+ static void set_dai ();
+ static void set_sho ();
+@@ -261,7 +263,7 @@
+ static struct wnn_env *
+ find_same_env (js, env_n, lang)
+ register WNN_JSERVER_ID *js;
+- register char *env_n;
++ register const char *env_n;
+ char *lang;
+ {
+ register int k;
+@@ -300,7 +302,7 @@
+ add_new_env (js, env, env_n, server_n, lang)
+ register WNN_JSERVER_ID *js;
+ register struct wnn_env *env;
+- char *env_n, *server_n, *lang;
++ const char *env_n, *server_n, *lang;
+ {
+ register int k;
+
+@@ -421,15 +423,16 @@
+
+ struct wnn_env *
+ jl_connect_lang (env_n, server_n, lang, wnnrc_n, error_handler, message_handler, timeout)
+- register char *env_n, *server_n, *wnnrc_n, *lang;
+- int (*error_handler) (), (*message_handler) ();
++ register const char *env_n, *server_n, *wnnrc_n, *lang;
++ int (*error_handler) (const char *), (*message_handler) (const char *);
+ int timeout;
+ {
+ register WNN_JSERVER_ID *js = NULL;
+ struct wnn_env *env;
+ int env_exist;
+ char p_lang[16];
+- register char *p, *l;
++ register char *p;
++ const char *l;
+ extern char *getenv ();
+ extern char *_wnn_get_machine_of_serv_defs ();
+
+@@ -562,8 +565,8 @@
+
+ struct wnn_buf *
+ jl_open_lang (env_n, server_n, lang, wnnrc_n, error_handler, message_handler, timeout)
+- char *env_n, *server_n, *wnnrc_n, *lang;
+- int (*error_handler) (), (*message_handler) ();
++ const char *env_n, *server_n, *wnnrc_n, *lang;
++ int (*error_handler) (const char *), (*message_handler) (const char *);
+ int timeout;
+ {
+ register int k, dmy;
+@@ -1490,7 +1493,7 @@
+ int prio;
+ int rw, hrw, rev;
+ char *pwd_dic, *pwd_hindo;
+- int (*error_handler) (), (*message_handler) ();
++ int (*error_handler) (const char *), (*message_handler) (const char *);
+ {
+ char tmp[256];
+ char pwd[WNN_PASSWD_LEN], hpwd[WNN_PASSWD_LEN];
+@@ -1505,7 +1508,7 @@
+ jl_disconnect (env);
+ return (-1);
+ }
+- if ((int) error_handler == WNN_NO_CREATE || (rw == WNN_DIC_RDONLY))
++ if (error_handler == (int (*) (const char *)) WNN_NO_CREATE || (rw == WNN_DIC_RDONLY))
+ {
+ sprintf (tmp, "%s \"%s\" %s", msg_get (wnn_msg_cat, 200, NULL, env->lang), dic_name, msg_get (wnn_msg_cat, 201, NULL, env->lang));
+ /*
+@@ -1519,7 +1522,7 @@
+ /*
+ "辞書ファイル \"%s\" が無いよ。作る?(Y/N)",
+ */
+- if ((int) error_handler == WNN_CREATE || call_error_handler (error_handler, tmp))
++ if (error_handler == (int (*) (const char *)) WNN_CREATE || call_error_handler (error_handler, tmp))
+ {
+ if (create_file (env, dic_name, JISHO, -1, /* -1 is dummy */
+ pwd_dic, (hindo_name && *hindo_name) ? "" : pwd_hindo, error_handler, message_handler) == -1)
+@@ -1544,7 +1547,7 @@
+ jl_disconnect (env);
+ return (-1);
+ }
+- if ((int) error_handler == WNN_NO_CREATE || (hrw == WNN_DIC_RDONLY))
++ if (error_handler == (int (*) (const char *)) WNN_NO_CREATE || (hrw == WNN_DIC_RDONLY))
+ {
+ sprintf (tmp, "%s \"%s\" %s", msg_get (wnn_msg_cat, 203, NULL, env->lang), hindo_name, msg_get (wnn_msg_cat, 201, NULL, env->lang));
+ /*
+@@ -1558,7 +1561,7 @@
+ /*
+ "頻度ファイル \"%s\" が無いよ。作る?(Y/N)",
+ */
+- if ((int) error_handler == WNN_CREATE || call_error_handler (error_handler, tmp))
++ if (error_handler == (int (*) (const char *)) WNN_CREATE || call_error_handler (error_handler, tmp))
+ {
+ if (create_file (env, hindo_name, HINDO, fid, "", pwd_hindo, error_handler, message_handler) == -1)
+ return (-1);
+@@ -1587,7 +1590,7 @@
+ }
+ else if (wnn_errorno == WNN_HINDO_NO_MATCH)
+ {
+- if ((int) error_handler == WNN_NO_CREATE)
++ if (error_handler == (int (*) (const char *)) WNN_NO_CREATE)
+ {
+ return (-1);
+ }
+@@ -1595,7 +1598,7 @@
+ /*
+ "辞書と頻度 \"%s\" の整合性が無いよ。作り直す?(Y/N)",
+ */
+- if (!((int) error_handler == WNN_CREATE || call_error_handler (error_handler, tmp)))
++ if (!(error_handler == (int (*) (const char *)) WNN_CREATE || call_error_handler (error_handler, tmp)))
+ {
+ return (-1);
+ }
+@@ -1671,7 +1674,7 @@
+ create_pwd_file (env, pwd_file, error_handler, message_handler)
+ register struct wnn_env *env;
+ char *pwd_file;
+- int (*error_handler) (), (*message_handler) ();
++ int (*error_handler) (const char *), (*message_handler) (const char *);
+ {
+ FILE *fp;
+ char gomi[256];
+@@ -2731,17 +2734,17 @@
+ int
+ jl_set_env_wnnrc (env, wnnrc_n, error_handler, message_handler)
+ register struct wnn_env *env;
+- char *wnnrc_n;
+- int (*error_handler) (), (*message_handler) ();
++ const char *wnnrc_n;
++ int (*error_handler) (const char *), (*message_handler) (const char *);
+ {
+ int level = 0;
+ int x;
+ wnn_errorno = 0;
+- if ((int) error_handler == WNN_CREATE)
++ if (error_handler == (int (*) (const char *)) WNN_CREATE)
+ {
+ confirm_state = CREATE_WITHOUT_CONFIRM;
+ }
+- else if ((int) error_handler == WNN_NO_CREATE)
++ else if (error_handler == (int (*) (const char *)) WNN_NO_CREATE)
+ {
+ confirm_state = NO_CREATE;
+ }
+@@ -2757,8 +2760,8 @@
+ int
+ jl_set_env_wnnrc1 (env, wnnrc_n, error_handler, message_handler, level)
+ register struct wnn_env *env;
+- char *wnnrc_n;
+- int (*error_handler) (), (*message_handler) ();
++ const char *wnnrc_n;
++ int (*error_handler) (const char *), (*message_handler) (const char *);
+ int level;
+ {
+ register int num;
+@@ -2811,7 +2814,7 @@
+ {
+ /* dic_add */
+ int prio, rdonly, hrdonly, rev;
+- int (*error_handler1) () = (int (*)()) 0;
++ int (*error_handler1) (const char *) = (int (*) (const char *)) 0;
+ expand_expr_all (s[0], env);
+ if (num < 3 || !REAL_PARAM (s[1]))
+ {
+@@ -2837,11 +2840,11 @@
+ else if (confirm_state == CREATE_WITHOUT_CONFIRM)
+ {
+
+- error_handler1 = (int (*)()) WNN_CREATE;
++ error_handler1 = (int (*) (const char *)) WNN_CREATE;
+ }
+ else if (confirm_state == NO_CREATE)
+ {
+- error_handler1 = (int (*)()) WNN_NO_CREATE;
++ error_handler1 = (int (*) (const char *)) WNN_NO_CREATE;
+ }
+ if (jl_dic_add_e (env, s[0], s[1], rev, prio, rdonly, hrdonly, s[5], s[6], error_handler1, message_handler) == -1 && wnn_errorno != 0)
+ {
+@@ -2972,7 +2975,7 @@
+
+ if (*s != '~' && *s != '@')
+ return (0);
+- if ((int) strlen (s) >= EXPAND_PATH_LENGTH)
++ if (strlen (s) >= EXPAND_PATH_LENGTH)
+ return (-1);
+
+ s1 = s;
+@@ -2995,12 +2998,12 @@
+ {
+ if (*s1)
+ {
+- noerr = expandsuc = (NULL != (u = getpwnam (s1)) && (int) strlen (p = u->pw_dir) + (int) strlen (tmp) < EXPAND_PATH_LENGTH);
++ noerr = expandsuc = (NULL != (u = getpwnam (s1)) && strlen (p = u->pw_dir) + strlen (tmp) < EXPAND_PATH_LENGTH);
+
+ }
+ else
+ {
+- noerr = expandsuc = (NULL != (p = getenv ("HOME")) && (int) strlen (p) + (int) strlen (tmp) < EXPAND_PATH_LENGTH);
++ noerr = expandsuc = (NULL != (p = getenv ("HOME")) && strlen (p) + strlen (tmp) < EXPAND_PATH_LENGTH);
+ }
+
+ }
+@@ -3008,13 +3011,13 @@
+ { /* then, *s must be '@' */
+ if (!strcmp (s1, "HOME"))
+ {
+- noerr = expandsuc = (NULL != (p = getenv ("HOME")) && (int) strlen (p) + (int) strlen (tmp) < EXPAND_PATH_LENGTH);
++ noerr = expandsuc = (NULL != (p = getenv ("HOME")) && strlen (p) + strlen (tmp) < EXPAND_PATH_LENGTH);
+ }
+ else if (!strcmp (s1, "WNN_DIC_DIR"))
+ {
+ char buf[EXPAND_PATH_LENGTH];
+ expandsuc = 1;
+- noerr = (NULL != (p = getenv ("HOME")) && (int) strlen (p) + (int) strlen (tmp) < EXPAND_PATH_LENGTH);
++ noerr = (NULL != (p = getenv ("HOME")) && strlen (p) + strlen (tmp) < EXPAND_PATH_LENGTH);
+ strcpy (buf, p);
+ strcat (buf, "/");
+
+@@ -3031,15 +3034,15 @@
+ }
+ else if (!strcmp (s1, "LIBDIR"))
+ {
+- noerr = expandsuc = ((int) strlen (p = LIBDIR) + (int) strlen (tmp) < EXPAND_PATH_LENGTH);
++ noerr = expandsuc = (strlen (p = LIBDIR) + strlen (tmp) < EXPAND_PATH_LENGTH);
+ }
+ else if (!strcmp (s1, "ENV"))
+ { /* Added */
+- noerr = expandsuc = (NULL != (p = env_name (env)) && (int) strlen (p) + (int) strlen (tmp) < EXPAND_PATH_LENGTH);
++ noerr = expandsuc = (NULL != (p = env_name (env)) && strlen (p) + strlen (tmp) < EXPAND_PATH_LENGTH);
+ }
+ else if (!strcmp (s1, "USR"))
+ {
+- noerr = expandsuc = (NULL != (p = getlogname ()) && (int) strlen (p) + (int) strlen (tmp) < EXPAND_PATH_LENGTH);
++ noerr = expandsuc = (NULL != (p = getlogname ()) && strlen (p) + strlen (tmp) < EXPAND_PATH_LENGTH);
+ }
+ else
+ { /* @HOME, @LIBDIR @ENV igai ha kaenai */
+@@ -3063,7 +3066,7 @@
+
+ total = 0;
+ flag = 0;
+- while (*st != NULL)
++ while (*st != 0)
+ {
+ if (isdigit (*st))
+ {
+@@ -3122,7 +3125,7 @@
+ int d;
+ int fid;
+ char *pwd_dic, *pwd_hindo;
+- int (*error_handler) (), (*message_handler) ();
++ int (*error_handler) (const char *), (*message_handler) (const char *);
+ {
+ char pwd[WNN_PASSWD_LEN], hpwd[WNN_PASSWD_LEN];
+ int rev_dict_type;
+@@ -3230,7 +3233,7 @@
+ make_dir_rec1 (env, path, error_handler, message_handler)
+ struct wnn_env *env;
+ register char *path;
+- int (*error_handler) (), (*message_handler) ();
++ int (*error_handler) (const char *), (*message_handler) (const char *);
+ {
+ char gomi[128];
+ register char *c;
+@@ -3253,7 +3256,7 @@
+ make_dir1 (env, dirname, error_handler, message_handler)
+ register struct wnn_env *env;
+ register char *dirname;
+- int (*error_handler) (), (*message_handler) ();
++ int (*error_handler) (const char *), (*message_handler) (const char *);
+ {
+ char gomi[128];
+ if (dirname[0] == C_LOCAL)
+@@ -3274,7 +3277,7 @@
+ return (0); /* dir already exists */
+ }
+ }
+- if ((int) error_handler != WNN_CREATE)
++ if (error_handler != (int (*) (const char *)) WNN_CREATE)
+ {
+ sprintf (gomi, "%s \"%s\" %s%s", msg_get (wnn_msg_cat, 210, NULL, env->lang), dirname, msg_get (wnn_msg_cat, 201, NULL, env->lang), msg_get (wnn_msg_cat, 202, NULL, env->lang));
+ /*
+@@ -3311,8 +3314,8 @@
+
+ static int
+ call_error_handler (error_handler, c)
+- int (*error_handler) ();
+- char *c;
++ int (*error_handler) (const char *);
++ const char *c;
+ {
+ register int x;
+ x = error_handler (c);
+@@ -3327,16 +3330,16 @@
+ }
+
+ static void
+-message_out (message_handler, format, s1, s2, s3, s4, s5, s6, s7, s8)
+- int (*message_handler) ();
+- char *format;
+- int s1, s2, s3, s4, s5, s6, s7, s8;
++message_out (int (*message_handler) (const char *), const char *format, ...)
+ {
+ char buf[256];
++ va_list args;
+
+ if (message_handler)
+ {
+- sprintf (buf, format, s1, s2, s3, s4, s5, s6, s7, s8);
++ va_start (args, format);
++ vsprintf (buf, format, args);
++ va_end (args);
+ (*message_handler) (buf);
+ }
+ }
+--- Xsi/Wnn/jlib/js.c
++++ Xsi/Wnn/jlib/js.c 2001/09/04 17:34:48
+@@ -900,7 +900,7 @@
+ free((char *)env);
+ */
+ set_current_js (env->js_id);
+- handler_of_jserver_dead (NULL);
++ handler_of_jserver_dead (-1);
+ snd_env_head (&tmp_env, JS_DISCONNECT);
+ snd_flush ();
+ x = get4com ();
+--- Xsi/Wnn/jutil/atod.c
++++ Xsi/Wnn/jutil/atod.c 2001/09/04 16:59:45
+@@ -39,6 +39,8 @@
+
+ #include <stdio.h>
+ #include <ctype.h>
++#include <string.h>
++#include <stdlib.h>
+ #include "commonhd.h"
+ #include "wnn_config.h"
+ #include "jslib.h"
+--- Xsi/Wnn/jutil/atorev.c
++++ Xsi/Wnn/jutil/atorev.c 2001/09/04 16:59:45
+@@ -35,6 +35,7 @@
+
+ #include <stdio.h>
+ #include <ctype.h>
++#include <stdlib.h>
+ #include "commonhd.h"
+ #include "jslib.h"
+ #include "jh.h"
+--- Xsi/Wnn/jutil/dtoa.c
++++ Xsi/Wnn/jutil/dtoa.c 2001/09/04 16:59:45
+@@ -38,6 +38,8 @@
+ #endif /* lint */
+
+ #include <stdio.h>
++#include <string.h>
++#include <stdlib.h>
+ #include "commonhd.h"
+ #include "wnn_config.h"
+ #include "jslib.h"
+--- Xsi/Wnn/jutil/wddel.c
++++ Xsi/Wnn/jutil/wddel.c 2001/09/04 16:59:45
+@@ -38,6 +38,7 @@
+ #endif /* lint */
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include "commonhd.h"
+ #include "wnn_config.h"
+ #include "jllib.h"
+--- Xsi/Wnn/jutil/wdreg.c
++++ Xsi/Wnn/jutil/wdreg.c 2001/09/04 16:59:45
+@@ -38,6 +38,7 @@
+ #endif /* lint */
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <sys/types.h>
+ #include <sys/file.h>
+ #include "commonhd.h"
+--- Xsi/Wnn/uum/history.c
++++ Xsi/Wnn/uum/history.c 2001/09/04 16:59:45
+@@ -30,6 +30,7 @@
+ */
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include "commonhd.h"
+ #include "sdefine.h"
+ #include "sheader.h"
+--- Xsi/Wnn/uum/sheader.h
++++ Xsi/Wnn/uum/sheader.h 2001/09/04 16:59:45
+@@ -320,6 +320,7 @@
+ extern void set_keypad_on ();
+ extern void set_keypad_off ();
+ extern void set_scroll_region ();
++#define setenv fwnn_setenv
+ extern void setenv ();
+ extern int setutmp ();
+ extern int st_colum ();
diff --git a/app-i18n/freewnn/files/a017/FreeWnn-ja.patch b/app-i18n/freewnn/files/a017/FreeWnn-ja.patch
new file mode 100644
index 000000000000..c2e7b9661a1c
--- /dev/null
+++ b/app-i18n/freewnn/files/a017/FreeWnn-ja.patch
@@ -0,0 +1,133 @@
+--- FreeWnn-1.1.1-a017.orig/Xsi/Wnn/etc/msg.c Mon Mar 20 17:31:33 2000
++++ FreeWnn-1.1.1-a017/Xsi/Wnn/etc/msg.c Fri Aug 18 15:20:20 2000
+@@ -457,12 +457,12 @@
+ {
+ struct msg_cat *cd;
+
+- cd = msg_open ("msg", "%L", "ja_JP");
++ cd = msg_open ("msg", "%L", "ja");
+
+- printf (msg_get (cd, 5, "message not found\n", "ja_JP"), 555);
++ printf (msg_get (cd, 5, "message not found\n", "ja"), 555);
+ printf (msg_get (cd, 6, "message not found\n", "zh_CN"));
+ printf (msg_get (cd, -1, "", "ja_JP"), 555);
+- printf (msg_get (cd, 2, "message not found\n", "ja_JP"), "abc");
++ printf (msg_get (cd, 2, "message not found\n", "ja"), "abc");
+ printf (msg_get (cd, 100, "message not found\n", "zh_CN"), "abc");
+ }
+ #endif /* not_use */
+--- FreeWnn-1.1.1-a017.orig/Xsi/Wnn/include/jd_sock.h Wed Feb 23 16:31:29 2000
++++ FreeWnn-1.1.1-a017/Xsi/Wnn/include/jd_sock.h Fri Aug 18 15:41:45 2000
+@@ -67,7 +67,7 @@
+ #ifdef JAPANESE /* Japanese */
+ # define WNN_PORT_IN (0x5701)
+ static char *sockname = "/tmp/jd_sockV4"; /* for jserver */
+-# define LANG_NAME "ja_JP"
++# define LANG_NAME "ja"
+ # define SERVERNAME "wnn4"
+ # define MESSAGE_FILE "jserver.msg"
+ #else /* JAPANESE */
+@@ -98,7 +98,7 @@
+
+ # define WNN_PORT_IN (0x5701)
+ static char *sockname = "/tmp/jd_sockV4"; /* for jserver */
+-# define LANG_NAME "ja_JP"
++# define LANG_NAME "ja"
+ # define SERVERNAME "wnn4"
+ # define MESSAGE_FILE "jserver.msg"
+ #endif /* KOREAN */
+--- FreeWnn-1.1.1-a017.orig/Xsi/Wnn/include/jslib.h Wed Feb 23 16:31:30 2000
++++ FreeWnn-1.1.1-a017/Xsi/Wnn/include/jslib.h Fri Aug 18 15:42:49 2000
+@@ -394,8 +394,8 @@
+ /*
+ JSLIB function declaration
+ */
+-#define js_open(server, timeout) js_open_lang(server, "ja_JP", timeout)
+-#define js_connect(server,env_name) js_connect_lang(server, env_name, "ja_JP")
++#define js_open(server, timeout) js_open_lang(server, "ja", timeout)
++#define js_connect(server,env_name) js_connect_lang(server, env_name, "ja")
+
+ extern WNN_JSERVER_ID *js_open_lang ();
+ extern int js_close ();
+--- FreeWnn-1.1.1-a017.orig/Xsi/Wnn/include/msg.h Wed Feb 23 16:31:30 2000
++++ FreeWnn-1.1.1-a017/Xsi/Wnn/include/msg.h Fri Aug 18 15:43:29 2000
+@@ -50,7 +50,7 @@
+ /*
+ #define DEF_LANG "C"
+ */
+-#define DEF_LANG "ja_JP"
++#define DEF_LANG "ja"
+
+ extern struct msg_cat *msg_open ();
+ extern char *msg_get ();
+--- FreeWnn-1.1.1-a017.orig/Xsi/Wnn/include/wnn_config.h Wed Feb 23 16:31:30 2000
++++ FreeWnn-1.1.1-a017/Xsi/Wnn/include/wnn_config.h Fri Aug 18 15:46:02 2000
+@@ -44,7 +44,7 @@
+ #define WNN_CSERVER_ENV "CSERVER"
+ #define WNN_KSERVER_ENV "KSERVER"
+ #define WNN_TSERVER_ENV "TSERVER"
+-#define WNN_J_LANG "ja_JP"
++#define WNN_J_LANG "ja"
+ #define WNN_C_LANG "zh_CN"
+ #define WNN_K_LANG "ko_KR"
+ #define WNN_T_LANG "zh_TW"
+@@ -79,7 +79,7 @@
+ /* for jserver */
+ #ifndef SERVER_INIT_FILE
+ # ifdef JAPANESE
+-# define SERVER_INIT_FILE "/ja_JP/jserverrc"
++# define SERVER_INIT_FILE "/ja/jserverrc"
+ # else /* JAPANESE */
+ # ifdef CHINESE
+ # ifdef TAIWANESE
+@@ -91,7 +91,7 @@
+ # ifdef KOREAN
+ # define SERVER_INIT_FILE "/ko_KR/kserverrc"
+ # else /* KOREAN */
+-# define SERVER_INIT_FILE "/ja_JP/jserverrc" /* Default */
++# define SERVER_INIT_FILE "/ja/jserverrc" /* Default */
+ # endif /* KOREAN */
+ # endif /* CHINESE */
+ # endif /* JAPANESE */
+@@ -109,7 +109,7 @@
+
+ #define ENVRCFILE "/wnnenvrc"
+ #ifndef HINSIDATA_FILE
+-# define HINSIDATA_FILE "/ja_JP/hinsi.data"
++# define HINSIDATA_FILE "/ja/hinsi.data"
+ #endif /* HINSIDATA_FILE */
+
+ #define USR_DIC_DIR_VAR "@USR"
+--- FreeWnn-1.1.1-a017.orig/Xsi/Wnn/jd/serverdefs Sun Jan 30 04:40:48 2000
++++ FreeWnn-1.1.1-a017/Xsi/Wnn/jd/serverdefs Fri Aug 18 15:46:43 2000
+@@ -30,7 +30,7 @@
+ ;
+
+ ;lang_name machine_name unix_domain_socket_name service_name port_num
+-ja_JP jserver /tmp/jd_sockV4 wnn4 22273
++ja jserver /tmp/jd_sockV4 wnn4 22273
+ japanese jserver /tmp/jd_sockV4 wnn4 22273
+ nihongo jserver /tmp/jd_sockV4 wnn4 22273
+ zh_CN cserver /tmp/cd_sockV4 wnn4_Cn 22289
+--- FreeWnn-1.1.1-a017.orig/Xsi/Wnn/jlib/jl.c Mon Mar 20 17:21:12 2000
++++ FreeWnn-1.1.1-a017/Xsi/Wnn/jlib/jl.c Fri Aug 18 15:47:44 2000
+@@ -442,7 +442,7 @@
+ if (!lang || !*lang)
+ {
+ /* Sorry! Default is Japanese. :-) */
+- strcpy (p_lang, "ja_JP");
++ strcpy (p_lang, "ja");
+ }
+ else
+ {
+--- FreeWnn-1.1.1-a017.orig/Xsi/Wnn/uum/header.c Wed Feb 23 16:31:42 2000
++++ FreeWnn-1.1.1-a017/Xsi/Wnn/uum/header.c Fri Aug 18 15:48:36 2000
+@@ -131,7 +131,7 @@
+
+ FuncDataBase function_db[] = {
+ #ifdef JAPANESE
+- {"ja_JP",
++ {"ja",
+ {NULL, NULL, call_t_redraw_move_normal,
+ call_t_redraw_move_1_normal, call_t_redraw_move_2_normal,
+ call_t_print_l_normal, NULL, char_len_normal, char_q_len_normal,
diff --git a/app-i18n/freewnn/files/a017/FreeWnn-lib64.patch b/app-i18n/freewnn/files/a017/FreeWnn-lib64.patch
new file mode 100644
index 000000000000..8f70a02de4eb
--- /dev/null
+++ b/app-i18n/freewnn/files/a017/FreeWnn-lib64.patch
@@ -0,0 +1,11 @@
+--- FreeWnn-1.1.1-a017/Xsi/makerule.mk.in 2002/03/15 11:10:47 1.1
++++ FreeWnn-1.1.1-a017/Xsi/makerule.mk.in 2002/03/15 11:11:14
+@@ -90,7 +90,7 @@
+ ALLDEFINES = $(INCLUDES) -DFUNCPROTO=15 -DNARROWPROTO $(DEFINES)
+ CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
+ LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES)
+-LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) -L/usr/lib/termcap
++LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) -L@libdir@/termcap
+
+ CCLINK = $(CC)
+
diff --git a/app-i18n/freewnn/files/a017/FreeWnn-s390x.patch b/app-i18n/freewnn/files/a017/FreeWnn-s390x.patch
new file mode 100644
index 000000000000..a66e27ab4804
--- /dev/null
+++ b/app-i18n/freewnn/files/a017/FreeWnn-s390x.patch
@@ -0,0 +1,217 @@
+diff -ru FreeWnn-1.1.1-a017.orig/Xsi/Wnn/jserver/de.c FreeWnn-1.1.1-a017/Xsi/Wnn/jserver/de.c
+--- FreeWnn-1.1.1-a017.orig/Xsi/Wnn/jserver/de.c 2000-03-20 17:31:43.000000000 +0100
++++ FreeWnn-1.1.1-a017/Xsi/Wnn/jserver/de.c 2002-11-03 20:25:27.000000000 +0100
+@@ -158,11 +158,11 @@
+
+ int cur_clp; /** 現在のクライアントの番号 **/
+
+-static int *all_socks; /** ビットパターン
++static fd_set *all_socks; /** ビットパターン
+ which jserver to select を保持 **/
+-static int *ready_socks; /** データのきているソケットの
++static fd_set *ready_socks; /** データのきているソケットの
+ ビットパターンを保持 **/
+-static int *dummy1_socks, *dummy2_socks;
++static fd_set *dummy1_socks, *dummy2_socks;
+
+ static int no_of_ready_socks;
+ static int sel_bwidth, /** bit width of all_socks **/
+@@ -171,9 +171,14 @@
+ static int nofile; /** No. of files **/
+
+ #define BINTSIZE (sizeof(int)*8)
++/*
+ #define sock_set(array,pos) (array[pos/BINTSIZE] |= (1<<(pos%BINTSIZE)))
+ #define sock_clr(array,pos) (array[pos/BINTSIZE] &= ~(1<<(pos%BINTSIZE)))
+ #define sock_tst(array,pos) (array[pos/BINTSIZE] & (1<<(pos%BINTSIZE)))
++*/
++#define sock_set(array,pos) FD_SET(pos,array)
++#define sock_clr(array,pos) FD_CLR(pos,array)
++#define sock_tst(array,pos) FD_ISSET(pos,array)
+
+ struct msg_cat *wnn_msg_cat;
+ struct msg_cat *js_msg_cat;
+@@ -312,7 +317,7 @@
+ for (;;)
+ {
+ #ifdef DEBUG
+- error1 ("main loop: ready_socks = %02X\n", ready_socks);
++ error1 ("main loop: ready_socks = %02lX\n", ready_socks[0]);
+ #endif
+ if (get_client () == -1)
+ break;
+@@ -341,11 +346,11 @@
+
+ nofile = NOFILE;
+ sel_w = (nofile - 1) / BINTSIZE + 1;
+- all_socks = (int *) calloc (sel_w, (sizeof (int)));
+- ready_socks = (int *) malloc (sel_w * (sizeof (int)));
+- dummy1_socks = (int *) malloc (sel_w * (sizeof (int)));
+- dummy2_socks = (int *) malloc (sel_w * (sizeof (int)));
+- sel_width = sel_w * sizeof (int); /* byte width */
++ all_socks = (fd_set *) calloc (sel_w, (sizeof (fd_set)));
++ ready_socks = (fd_set *) malloc (sel_w * (sizeof (fd_set)));
++ dummy1_socks = (fd_set *) malloc (sel_w * (sizeof (fd_set)));
++ dummy2_socks = (fd_set *) malloc (sel_w * (sizeof (fd_set)));
++ sel_width = sel_w * sizeof (fd_set); /* byte width */
+ sel_bwidth = sel_width * 8; /* bit width */
+ }
+
+@@ -366,7 +371,7 @@
+ xerror ("select error");
+ }
+ #ifdef DEBUG
+- error1 ("select OK, ready_socks[0]=%02X, n-r-s=%x\n", ready_socks[0], no_of_ready_socks);
++ error1 ("select OK, ready_socks[0]=%02lX, n-r-s=%x\n", ready_socks[0], no_of_ready_socks);
+ #endif
+ }
+
+diff -ru FreeWnn-1.1.1-a017.orig/Xsi/Wnn/uum/jhlp.c FreeWnn-1.1.1-a017/Xsi/Wnn/uum/jhlp.c
+--- FreeWnn-1.1.1-a017.orig/Xsi/Wnn/uum/jhlp.c 2000-02-23 17:08:49.000000000 +0100
++++ FreeWnn-1.1.1-a017/Xsi/Wnn/uum/jhlp.c 2002-11-03 22:25:09.000000000 +0100
+@@ -134,7 +134,7 @@
+ static void do_end (), open_pty (), open_ttyp (), do_main (), exec_cmd (), parse_options (), setsize (), get_rubout (), usage (), change_size (), default_usage ();
+
+ /** メイン */
+-void
++int
+ main (argc, argv)
+ int argc;
+ char **argv;
+@@ -923,7 +923,7 @@
+
+ /** メインループ */
+
+-int sel_ptn;
++fd_set sel_ptn;
+ int pty_bit;
+ int tty_bit;
+ int ptyfd;
+@@ -947,7 +947,8 @@
+
+ pty_bit = 1 << ptyfd;
+ tty_bit = 1 << ttyfd;
+- sel_ptn = pty_bit | tty_bit;
++ FD_SET (ptyfd, &sel_ptn);
++ FD_SET (ttyfd, &sel_ptn);
+
+ if (henkan_off_flag == 0)
+ {
+@@ -1020,8 +1021,9 @@
+ static unsigned char *bufend = outbuf;
+ static unsigned char *bufstart = outbuf;
+ int n;
+- int rfds;
+- int i, j, mask;
++ fd_set rfds;
++ int i, j;
++ fd_set mask;
+ unsigned char *p;
+ extern int henkan_off_flag;
+ struct timeval time_out; /* If your OS's select was implemented as
+@@ -1063,9 +1065,9 @@
+ time_out.tv_usec = 200 * 1000; /* 200 msec 間待つのだゾ! */
+ for (rfds = sel_ptn;
+ #ifdef linux
+- (sel_ret = select (20, &rfds, 0, 0, NULL)) < 0 && errno == EINTR;
++ (sel_ret = select (20, &rfds, NULL, NULL, NULL)) < 0 && errno == EINTR;
+ #else
+- (sel_ret = select (20, &rfds, 0, 0, &time_out)) < 0 && errno == EINTR;
++ (sel_ret = select (20, &rfds, NULL, NULL, &time_out)) < 0 && errno == EINTR;
+ #endif
+ rfds = sel_ptn)
+ ;
+@@ -1084,7 +1086,7 @@
+ */
+ }
+
+- if (rfds & pty_bit)
++ if (FD_ISSET(ptyfd, &rfds))
+ {
+ if ((n = read (ptyfd, buf, BUFSIZ)) <= 0)
+ {
+@@ -1116,13 +1118,13 @@
+ p += j;
+ i -= j;
+ }
+- mask = 1 << ttyfd;
++ FD_SET(ttyfd, &mask);
+ select (32, 0, &mask, 0, 0);
+ }
+ pop_cursor ();
+ }
+ }
+- if (rfds & tty_bit)
++ if (FD_ISSET(ttyfd, &rfds))
+ {
+ if ((n = read (ttyfd, buf, BUFSIZ)) > 0)
+ {
+@@ -1778,7 +1780,7 @@
+ {
+ static unsigned char buf[BUFSIZ];
+ int n;
+- int rfds;
++ fd_set rfds;
+
+ kk_restore_cursor ();
+ clr_line_all ();
+@@ -1791,7 +1793,7 @@
+ write (ptyfd, buf, n);
+ }
+ rfds = sel_ptn;
+- select (20, &rfds, 0, 0, NULL);
++ select (20, &rfds, NULL, NULL, NULL);
+ if (rfds & pty_bit)
+ {
+ if ((n = read (ptyfd, buf, BUFSIZ)) <= 0)
+diff -ru FreeWnn-1.1.1-a017.orig/Xsi/Xwnmo/xwnmo/do_socket.c FreeWnn-1.1.1-a017/Xsi/Xwnmo/xwnmo/do_socket.c
+--- FreeWnn-1.1.1-a017.orig/Xsi/Xwnmo/xwnmo/do_socket.c 2000-02-23 18:03:22.000000000 +0100
++++ FreeWnn-1.1.1-a017/Xsi/Xwnmo/xwnmo/do_socket.c 2002-11-03 20:25:17.000000000 +0100
+@@ -90,9 +90,9 @@
+ XIMCmblk *cblk;
+ XIMCmblk *cur_cblk = NULL;
+
+-int *all_socks;
+-int *ready_socks;
+-static int *dummy1_socks, *dummy2_socks;
++fd_set *all_socks;
++fd_set *ready_socks;
++static fd_set *dummy1_socks, *dummy2_socks;
+ static int sel_width;
+
+ static int nofile;
+@@ -114,9 +114,14 @@
+ static int rc = 0;
+
+ #define BINTSIZE (sizeof(int)*8)
++/*
+ #define sock_set(array,pos) (array[pos/BINTSIZE] |= (1<<(pos%BINTSIZE)))
+ #define sock_clr(array,pos) (array[pos/BINTSIZE] &= ~(1<<(pos%BINTSIZE)))
+-#define sock_tst(array,pos) (array[pos/BINTSIZE] & (1<<(pos%BINTSIZE)))
++#define sock_tst(array,pos) (array[pos/BINTSIZE] & (1<<(pos%BINTSIZE)))
++*/
++#define sock_set(array,pos) FD_SET(pos,array)
++#define sock_clr(array,pos) FD_CLR(pos,array)
++#define sock_tst(array,pos) FD_ISSET(pos,array)
+
+ extern int read (), write ();
+
+--- FreeWnn-1.1.1-a017/Xsi/Wnn/jserver/error.c 2002/11/05 14:57:21 1.1
++++ FreeWnn-1.1.1-a017/Xsi/Wnn/jserver/error.c 2002/11/05 14:58:12
+@@ -47,7 +47,7 @@
+ void
+ error_exit1 (x, y1, y2, y3, y4, y5)
+ char *x;
+- int y1, y2, y3, y4, y5;
++ long y1, y2, y3, y4, y5;
+ {
+ char buf[512];
+
+@@ -112,7 +112,7 @@
+ void
+ error1 (x, y1, y2, y3, y4, y5)
+ register char *x;
+- int y1, y2, y3, y4, y5;
++ long y1, y2, y3, y4, y5;
+ {
+ char buf[512];
diff --git a/app-i18n/freewnn/files/a017/FreeWnn-sighandler.patch b/app-i18n/freewnn/files/a017/FreeWnn-sighandler.patch
new file mode 100644
index 000000000000..768cac2abcbc
--- /dev/null
+++ b/app-i18n/freewnn/files/a017/FreeWnn-sighandler.patch
@@ -0,0 +1,39 @@
+--- FreeWnn-1.1.1-a017.orig/Xsi/Wnn/jserver/de.c Mon Mar 20 17:31:43 2000
++++ FreeWnn-1.1.1-a017/Xsi/Wnn/jserver/de.c Tue Aug 29 12:06:47 2000
+@@ -185,6 +185,19 @@
+
+ char cmd_name[80];
+
++#ifndef NOTFORK
++static void father_sighandler (const int sig)
++{
++ if (signal(sig, SIG_DFL) == SIG_ERR)
++ _exit (2);
++
++ if (sig == SIGTERM)
++ _exit(0);
++ else
++ _exit(-1);
++}
++#endif
++
+ /* No arguments are used. Only options. */
+ int
+ main (argc, argv)
+@@ -228,14 +241,14 @@
+ #ifndef NOTFORK
+ if (fork ())
+ {
+- signal (SIGCHLD, _exit);
++ signal (SIGCHLD, father_sighandler);
+ signal (SIGHUP, SIG_IGN);
+ signal (SIGINT, SIG_IGN);
+ signal (SIGQUIT, SIG_IGN);
+ #ifdef SIGTSTP
+ signal (SIGTSTP, SIG_IGN);
+ #endif
+- signal (SIGTERM, _exit);
++ signal (SIGTERM, father_sighandler);
+ pause ();
+ }
+ #endif /* !NOTFORK */
diff --git a/app-i18n/freewnn/files/a017/FreeWnn-uum.patch b/app-i18n/freewnn/files/a017/FreeWnn-uum.patch
new file mode 100644
index 000000000000..75a5e38e8c22
--- /dev/null
+++ b/app-i18n/freewnn/files/a017/FreeWnn-uum.patch
@@ -0,0 +1,54 @@
+diff -ur FreeWnn-1.1.1-a017.orig/Xsi/Wnn/uum/jhlp.c FreeWnn-1.1.1-a017/Xsi/Wnn/uum/jhlp.c
+--- FreeWnn-1.1.1-a017.orig/Xsi/Wnn/uum/jhlp.c Wed Feb 23 17:08:49 2000
++++ FreeWnn-1.1.1-a017/Xsi/Wnn/uum/jhlp.c Wed Nov 1 19:33:54 2000
+@@ -638,7 +638,7 @@
+ #ifdef SYSVR2
+ #define index strchr
+ #endif /* SYSVR2 */
+- extern char *index ();
++/* extern char *index ();*/
+
+ strcpy (ostr, default_getoptstr);
+ strcat (ostr, lang_db->getoptstr);
+@@ -1720,7 +1720,7 @@
+ }
+ #endif /* defined(uniosu) */
+
+-#ifndef sgi
++#if !defined(sgi) && !defined(linux)
+ ptyname (nmbuf, ptynm, ptyno);
+ if (chown (nmbuf, 0, 0) == ERROR)
+ {
+diff -ur FreeWnn-1.1.1-a017.orig/Xsi/Wnn/uum/wnnrc_op.c FreeWnn-1.1.1-a017/Xsi/Wnn/uum/wnnrc_op.c
+--- FreeWnn-1.1.1-a017.orig/Xsi/Wnn/uum/wnnrc_op.c Wed Feb 23 16:31:45 2000
++++ FreeWnn-1.1.1-a017/Xsi/Wnn/uum/wnnrc_op.c Mon Oct 30 23:42:17 2000
+@@ -133,7 +133,7 @@
+ struct passwd *u;
+ extern struct passwd *getpwnam ();
+ #if defined(SYSVR2) && !defined(AIXV3)
+- extern char *strchr ();
++/* extern char *strchr (); */
+ #endif /* defined(SYSVR2) && !defined(AIXV3) */
+
+ if (*s != '~' && *s != '@')
+diff -u FreeWnn-1.1.1-a017.orig/Xsi/makerule.mk.in.~1~ FreeWnn-1.1.1-a017.orig/Xsi/makerule.mk.in
+--- FreeWnn-1.1.1-a017.orig/Xsi/makerule.mk.in.~1~ Sun Feb 13 10:15:54 2000
++++ FreeWnn-1.1.1-a017.orig/Xsi/makerule.mk.in Wed Nov 1 19:49:39 2000
+@@ -90,7 +90,7 @@
+ ALLDEFINES = $(INCLUDES) -DFUNCPROTO=15 -DNARROWPROTO $(DEFINES)
+ CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
+ LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES)
+-LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS)
++LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) -L/usr/lib/termcap
+
+ CCLINK = $(CC)
+
+@@ -114,7 +114,7 @@
+ WNNBINDIR = ${PREFIX}/bin
+ WNNINCDIR = @includedir@
+ WNNLIBDIR = @libdir@
+- WNNTERM_LIB = -ltermcap
++ WNNTERM_LIB = -ltermcap -lcrypt
+
+ PUBDICPLUSSRC = $(IMTOP)/PubdicPlus
+ WNNCONSDICSRC = $(IMTOP)/Wnn-consortium/dic
diff --git a/app-i18n/freewnn/files/digest-freewnn-1.1.1_alpha17 b/app-i18n/freewnn/files/digest-freewnn-1.1.1_alpha17
new file mode 100644
index 000000000000..1bb27067cd4c
--- /dev/null
+++ b/app-i18n/freewnn/files/digest-freewnn-1.1.1_alpha17
@@ -0,0 +1 @@
+MD5 cf7cb1fa5ac5b624c559469de17282f9 FreeWnn-1.1.1-a017.tar.gz 3357397
diff --git a/app-i18n/freewnn/freewnn-1.1.1_alpha17.ebuild b/app-i18n/freewnn/freewnn-1.1.1_alpha17.ebuild
new file mode 100644
index 000000000000..ed0bf9c17bf3
--- /dev/null
+++ b/app-i18n/freewnn/freewnn-1.1.1_alpha17.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-i18n/freewnn/freewnn-1.1.1_alpha17.ebuild,v 1.1 2004/05/10 22:08:28 lv Exp $
+
+inherit eutils
+
+MY_P="FreeWnn-${PV/_alpha/-a0}"
+
+DESCRIPTION="Network-Extensible Kana-to-Kanji Conversion System"
+HOMEPAGE="http://www.freewnn.org/"
+SRC_URI="ftp://ftp.freewnn.org/pub/FreeWnn/alpha/${MY_P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~ia64 amd64 s390"
+IUSE="X ipv6"
+
+DEPEND="virtual/glibc
+ X? ( virtual/x11 )"
+
+S="${WORKDIR}/${MY_P}/Xsi"
+
+src_unpack() {
+ unpack ${A}
+
+ #Change WNNOWNER to root so we don't need to add wnn user
+ sed -i -e "s/WNNOWNER = wnn/WNNOWNER = root/" ${S}/makerule.mk.in
+
+ cd ${S}
+ epatch ${FILESDIR}/a017/FreeWnn-fsstnd.patch
+ epatch ${FILESDIR}/a017/FreeWnn-ja.patch
+ epatch ${FILESDIR}/a017/FreeWnn-sighandler.patch
+ epatch ${FILESDIR}/a017/FreeWnn-uum.patch
+ epatch ${FILESDIR}/a017/FreeWnn-1.1.1-a017.dif
+ epatch ${FILESDIR}/a017/FreeWnn-lib64.patch
+ epatch ${FILESDIR}/a017/FreeWnn-s390x.patch
+}
+
+src_compile() {
+ econf \
+ --disable-cWnn \
+ --disable-kWnn \
+ --without-termcap \
+ `use_with X x` \
+ `use_with ipv6` || die "./configure failed"
+
+ emake || die
+ #make || die
+}
+
+src_install () {
+ # install executables, libs ,dictionaries
+ make DESTDIR=${D} install || die "installation failed"
+ # install man pages
+ make DESTDIR=${D} install.man || die "installation of manpages failed"
+ # install docs
+ dodoc ChangeLog* INSTALL* CONTRIBUTORS
+ # install rc script
+ exeinto /etc/init.d ; newexe ${FILESDIR}/freewnn.initd freewnn
+}
diff --git a/app-i18n/freewnn/freewnn-1.1.1_alpha20.ebuild b/app-i18n/freewnn/freewnn-1.1.1_alpha20.ebuild
index 40f37645a374..086172bc9f15 100644
--- a/app-i18n/freewnn/freewnn-1.1.1_alpha20.ebuild
+++ b/app-i18n/freewnn/freewnn-1.1.1_alpha20.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-i18n/freewnn/freewnn-1.1.1_alpha20.ebuild,v 1.6 2004/03/13 20:44:55 dholm Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-i18n/freewnn/freewnn-1.1.1_alpha20.ebuild,v 1.7 2004/05/10 22:08:28 lv Exp $
MY_P="FreeWnn-${PV/_alpha/-a0}"
@@ -10,7 +10,7 @@ SRC_URI="ftp://ftp.freewnn.org/pub/FreeWnn/alpha/${MY_P}.tar.bz2"
SLOT="0"
LICENSE="GPL-2"
-KEYWORDS="x86 sparc alpha ia64 amd64 ~ppc"
+KEYWORDS="x86 sparc alpha ia64 -amd64 ~ppc"
IUSE="X ipv6"
DEPEND="virtual/glibc