From 94c4a3d26d81775b4866b3a30006c0870794214716ea0b0b60223bbb760c4c42 Mon Sep 17 00:00:00 2001 From: Fuminobu Takeyama Date: Wed, 21 Aug 2013 14:26:34 +0000 Subject: [PATCH] Accepting request 195772 from home:Mitsutoshi:branches:M17N - Modify FreeWnn-prototypes_3.patch . I found a bug in make_hinsi_list() at Wnn/jserver/hinsi_list.c, then fixed it . - Add FreeWnn-prototypes_3.patch . Prototype declarations for reducing compilation warnings . - Add FreeWnn-prototypes_msg.patch . Bugfix: In openSUSE 13.1 Milestone 3, uum could not get error messages . This issue's cause is that we forgot prototype declaration of msg_get() in Wnn/include/msg.h . Then I added "FreeWnn-prototypes_msg.patch" as %Patch15 . http://lists.opensuse.org/opensuse-ja/2013-08/msg00014.html http://sourceforge.jp/projects/freewnn/lists/archive/users/2013-August/000140.html - I added %configure --with-libwrap option . The [jctk]server s were linked -lwrap . Then we can use /etc/hosts.allow /etc/hosts.deny . - Degrade fix: In "FreeWnn-prototypes.patch", I invalidated the patch of "FreeWnn-sighandler.patch" . Then I deleted a wrong patch to "Wnn/jserver/de.c" from "FreeWnn-prototypes.patch" . http://sourceforge.jp/projects/freewnn/lists/archive/users/2013-August/000141.html - Change: In "FreeWnn-sighandler.patch", I changed from _exit(-1) to _exit(255) . This change effects [jctk]server's exit status . - SLE_11 and openSUSE 12.2 does not provide libwrap0, then I could not build FreeWnn on them . So, I deleted %configure --with-libwrap option OBS-URL: https://build.opensuse.org/request/show/195772 OBS-URL: https://build.opensuse.org/package/show/M17N/fwnn?expand=0&rev=11 --- FreeWnn-1.1.1-a021.tar.bz2 | 3 - ...n-1.1.1-a021.dif => FreeWnn-1.1.1-a022.dif | 160 +- FreeWnn-1.1.1-a022.tar.bz2 | 3 + FreeWnn-fsstnd.patch | 43 +- FreeWnn-include.patch | 58 +- FreeWnn-ja.patch | 59 +- FreeWnn-noroot.patch | 135 +- FreeWnn-prototypes.patch | 504 ++- FreeWnn-prototypes_3.patch | 3825 +++++++++++++++++ FreeWnn-prototypes_msg.patch | 38 + FreeWnn-returnvalue.diff | 11 - FreeWnn-sighandler.patch | 2 +- FreeWnn-trad_cpp.patch | 35 +- FreeWnn-uum.patch | 31 - fwnn.changes | 339 ++ fwnn.spec | 113 +- 16 files changed, 4783 insertions(+), 576 deletions(-) delete mode 100644 FreeWnn-1.1.1-a021.tar.bz2 rename FreeWnn-1.1.1-a021.dif => FreeWnn-1.1.1-a022.dif (65%) create mode 100644 FreeWnn-1.1.1-a022.tar.bz2 create mode 100644 FreeWnn-prototypes_3.patch create mode 100644 FreeWnn-prototypes_msg.patch delete mode 100644 FreeWnn-returnvalue.diff delete mode 100644 FreeWnn-uum.patch diff --git a/FreeWnn-1.1.1-a021.tar.bz2 b/FreeWnn-1.1.1-a021.tar.bz2 deleted file mode 100644 index be62713..0000000 --- a/FreeWnn-1.1.1-a021.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:df9523b2eea7cbc94d9d01c19a01394abe3b648c5ec3f1259adac06fc8ecbb86 -size 3108905 diff --git a/FreeWnn-1.1.1-a021.dif b/FreeWnn-1.1.1-a022.dif similarity index 65% rename from FreeWnn-1.1.1-a021.dif rename to FreeWnn-1.1.1-a022.dif index 6c202c2..6305063 100644 --- a/FreeWnn-1.1.1-a021.dif +++ b/FreeWnn-1.1.1-a022.dif @@ -1,116 +1,5 @@ ---- FreeWnn-1.1.1-a021/Wnn/include/jllib.h -+++ FreeWnn-1.1.1-a021/Wnn/include/jllib.h -@@ -248,59 +248,59 @@ - #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 /* WNN_JLLIB_H */ ---- FreeWnn-1.1.1-a021/Wnn/jlib/jl.c -+++ FreeWnn-1.1.1-a021/Wnn/jlib/jl.c +--- FreeWnn-1.1.1-a022.bak/Wnn/jlib/jl.c 2013-08-06 20:02:27.258462915 +0900 ++++ FreeWnn-1.1.1-a022/Wnn/jlib/jl.c 2013-08-06 18:59:37.294514823 +0900 @@ -52,6 +52,7 @@ # include # endif @@ -200,7 +89,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 (error_handler == 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) @@ -218,7 +107,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 (error_handler == 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); @@ -227,7 +116,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) ++ if (error_handler == (int (*) (const char *)) WNN_NO_CREATE) { return (-1); } @@ -271,27 +160,28 @@ { confirm_state = NO_CREATE; } -@@ -2775,8 +2777,8 @@ +@@ -2775,9 +2777,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) (); +- int level; + const char *wnnrc_n; -+ int (*error_handler) (const char *), (*message_handler) (const char *); - int level; ++ int (*error_handler) (const char *), (*message_handler) (const char *); int level; { register int num; -@@ -2829,7 +2831,7 @@ + char s[20][EXPAND_PATH_LENGTH]; +@@ -2829,7 +2830,7 @@ { /* dic_add */ int prio, rdonly, hrdonly, rev; - int (*error_handler1) () = (int (*)()) 0; -+ int (*error_handler1) (const char *) = (int (*) (const char *)) 0; ++ int (*error_handler1) (const char *) = NULL; expand_expr_all (s[0], env); if (num < 3 || !REAL_PARAM (s[1])) { -@@ -2855,11 +2857,11 @@ +@@ -2855,11 +2856,11 @@ else if (confirm_state == CREATE_WITHOUT_CONFIRM) { @@ -305,7 +195,7 @@ } 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) { -@@ -2990,7 +2992,7 @@ +@@ -2990,7 +2991,7 @@ if (*s != '~' && *s != '@') return (0); @@ -314,7 +204,7 @@ return (-1); s1 = s; -@@ -3008,12 +3010,12 @@ +@@ -3008,12 +3009,12 @@ { if (*s1) { @@ -329,7 +219,7 @@ } } -@@ -3021,13 +3023,13 @@ +@@ -3021,13 +3022,13 @@ { /* then, *s must be '@' */ if (!strcmp (s1, "HOME")) { @@ -345,7 +235,7 @@ strcpy (buf, p); strcat (buf, "/"); -@@ -3044,15 +3046,15 @@ +@@ -3044,15 +3045,15 @@ } else if (!strcmp (s1, "LIBDIR")) { @@ -364,7 +254,7 @@ } else { /* @HOME, @LIBDIR @ENV igai ha kaenai */ -@@ -3076,7 +3078,7 @@ +@@ -3076,7 +3077,7 @@ total = 0; flag = 0; @@ -373,7 +263,7 @@ { if (isdigit (*st)) { -@@ -3135,7 +3137,7 @@ +@@ -3135,7 +3136,7 @@ int d; int fid; char *pwd_dic, *pwd_hindo; @@ -382,7 +272,7 @@ { char pwd[WNN_PASSWD_LEN], hpwd[WNN_PASSWD_LEN]; int rev_dict_type; -@@ -3243,7 +3245,7 @@ +@@ -3243,7 +3244,7 @@ make_dir_rec1 (env, path, error_handler, message_handler) struct wnn_env *env; register char *path; @@ -391,7 +281,7 @@ { char gomi[128]; register char *c; -@@ -3266,7 +3268,7 @@ +@@ -3266,7 +3267,7 @@ make_dir1 (env, dirname, error_handler, message_handler) register struct wnn_env *env; register char *dirname; @@ -400,7 +290,7 @@ { char gomi[128]; if (dirname[0] == C_LOCAL) -@@ -3287,7 +3289,7 @@ +@@ -3287,7 +3288,7 @@ return (0); /* dir already exists */ } } @@ -409,7 +299,7 @@ { 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)); /* -@@ -3324,8 +3326,8 @@ +@@ -3324,8 +3325,8 @@ static int call_error_handler (error_handler, c) @@ -420,7 +310,7 @@ { register int x; x = error_handler (c); -@@ -3340,16 +3342,16 @@ +@@ -3340,16 +3341,16 @@ } static void @@ -442,8 +332,8 @@ (*message_handler) (buf); } } ---- FreeWnn-1.1.1-a021/Wnn/jlib/js.c -+++ FreeWnn-1.1.1-a021/Wnn/jlib/js.c +--- FreeWnn-1.1.1-a022.bak/Wnn/jlib/js.c 2005-04-11 00:26:37.000000000 +0900 ++++ FreeWnn-1.1.1-a022/Wnn/jlib/js.c 2013-08-06 19:12:48.783918101 +0900 @@ -979,7 +979,7 @@ free((char *)env); */ diff --git a/FreeWnn-1.1.1-a022.tar.bz2 b/FreeWnn-1.1.1-a022.tar.bz2 new file mode 100644 index 0000000..9e0e1c9 --- /dev/null +++ b/FreeWnn-1.1.1-a022.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3728352fe9d3352ce16884bd0a517eaf227da0cf7e6f1d09b7a3f38f6bfb6dba +size 3137954 diff --git a/FreeWnn-fsstnd.patch b/FreeWnn-fsstnd.patch index bd685de..1897bc1 100644 --- a/FreeWnn-fsstnd.patch +++ b/FreeWnn-fsstnd.patch @@ -1,51 +1,48 @@ -diff -Naur FreeWnn-1.1.1-a013.orig/Xsi/makerule.mk.in FreeWnn-1.1.1-a013/Xsi/makerule.mk.in ---- FreeWnn-1.1.1-a013.orig/Xsi/makerule.mk.in Wed Sep 29 01:56:24 1999 -+++ FreeWnn-1.1.1-a013/Xsi/makerule.mk.in Mon Jan 31 13:26:50 2000 -@@ -113,7 +113,7 @@ - prefix = @prefix@ +--- FreeWnn-1.1.1-a022.bak/makerule.mk.in 2013-06-07 03:24:38.000000000 +0900 ++++ FreeWnn-1.1.1-a022/makerule.mk.in 2013-08-07 14:15:30.506662233 +0900 +@@ -136,7 +136,7 @@ exec_prefix = @exec_prefix@ - PREFIX = @prefix@ -- WNNWNNDIR = ${PREFIX}/lib/wnn + bindir = @bindir@ + sbindir = @sbindir@ +- WNNWNNDIR = $(exec_prefix)/lib/wnn + WNNWNNDIR = /etc/FreeWnn - WNNBINDIR = ${PREFIX}/bin + WNNBINDIR = $(bindir) + WNNSBINDIR = @WNNSBINDIR@ WNNINCDIR = @includedir@ - WNNLIBDIR = @libdir@ -@@ -125,9 +125,9 @@ +@@ -157,12 +157,12 @@ + WNNCONSDICSRC = $(IMTOP)/Wnn-consortium/dic + WNNTOP = $(IMTOP)/Wnn - JWNNLANG = ja_JP + JWNNLANG = ja JWNNWNNDIR = $(WNNWNNDIR)/$(JWNNLANG) -- JWNNBINDIR = $(WNNBINDIR)/Wnn4 -+ JWNNBINDIR = $(WNNBINDIR) + JWNNBINDIR = $(WNNBINDIR)$(JWNNSUBBINDIR) + JWNNSBINDIR = $(WNNSBINDIR)$(JWNNSUBBINDIR) JWNNINCDIR = $(WNNINCDIR)/wnn - JWNNDICDIR = $(JWNNWNNDIR)/dic + JWNNDICDIR = /var/lib/wnn/$(JWNNLANG)/dic JWNNPUBDICDIR = $(JWNNDICDIR)/pubdic JWNNWNNCONSDICDIR = $(JWNNDICDIR)/wnncons JWNNFZKSRCDIR = $(JWNNDICDIR)/src -@@ -155,8 +155,8 @@ - CWNNLANG = zh_CN - CWNNWNNDIR = $(WNNWNNDIR)/$(CWNNLANG) +@@ -193,7 +193,7 @@ CWNNINCDIR = $(WNNINCDIR)/cwnn -- CWNNBINDIR = $(WNNBINDIR)/cWnn4 + CWNNBINDIR = $(WNNBINDIR)$(CWNNSUBBINDIR) + CWNNSBINDIR = $(WNNSBINDIR)$(CWNNSUBBINDIR) - CWNNDICDIR = $(CWNNWNNDIR)/dic -+ CWNNBINDIR = $(WNNBINDIR) + CWNNDICDIR = /var/lib/wnn/$(CWNNLANG)/dic CWNNSYSDICDIR = $(CWNNDICDIR)/sys CWNNCDSRC = $(CWNNTOP)/cd CWNNCDICSRC = $(CWNNTOP)/cdic -@@ -178,8 +178,8 @@ - KWNNLANG = ko_KR - KWNNWNNDIR = $(WNNWNNDIR)/$(KWNNLANG) +@@ -217,7 +217,7 @@ KWNNINCDIR = $(WNNINCDIR)/kwnn -- KWNNBINDIR = $(WNNBINDIR)/kWnn4 + KWNNBINDIR = $(WNNBINDIR)$(KWNNSUBBINDIR) + KWNNSBINDIR = $(WNNSBINDIR)$(KWNNSUBBINDIR) - KWNNDICDIR = $(KWNNWNNDIR)/dic -+ KWNNBINDIR = $(WNNBINDIR) + KWNNDICDIR = /var/lib/wnn/$(KWNNLANG)/dic KWNNSYSDICDIR = $(KWNNDICDIR)/sys KWNNKDSRC = $(KWNNTOP)/kd KWNNKDICSRC = $(KWNNTOP)/kdic -@@ -199,7 +199,7 @@ +@@ -237,7 +237,7 @@ TWNNLANG = zh_TW TWNNWNNDIR = $(WNNWNNDIR)/$(TWNNLANG) diff --git a/FreeWnn-include.patch b/FreeWnn-include.patch index a74c837..f3b56ae 100644 --- a/FreeWnn-include.patch +++ b/FreeWnn-include.patch @@ -1,5 +1,5 @@ ---- BUILD/FreeWnn-1.1.1-a021/PubdicPlus/ctopd.c -+++ BUILD/FreeWnn-1.1.1-a021/PubdicPlus/ctopd.c +--- FreeWnn-1.1.1-a022.bak/PubdicPlus/ctopd.c 2001-06-15 03:15:54.000000000 +0900 ++++ FreeWnn-1.1.1-a022/PubdicPlus/ctopd.c 2013-08-06 20:30:27.388141217 +0900 @@ -25,6 +25,7 @@ #endif @@ -8,8 +8,8 @@ static char *program; ---- BUILD/FreeWnn-1.1.1-a021/PubdicPlus/wtopd.c -+++ BUILD/FreeWnn-1.1.1-a021/PubdicPlus/wtopd.c +--- FreeWnn-1.1.1-a022.bak/PubdicPlus/wtopd.c 2001-06-15 03:15:54.000000000 +0900 ++++ FreeWnn-1.1.1-a022/PubdicPlus/wtopd.c 2013-08-06 20:31:09.300390651 +0900 @@ -25,6 +25,8 @@ #endif @@ -19,53 +19,3 @@ static char *program; ---- BUILD/FreeWnn-1.1.1-a021/Wnn/uum/basic_op.c -+++ BUILD/FreeWnn-1.1.1-a021/Wnn/uum/basic_op.c -@@ -48,6 +48,7 @@ - # include - # endif - #endif /* STDC_HEADERS */ -+#include - #include "jllib.h" - #include "commonhd.h" - #include "sdefine.h" ---- BUILD/FreeWnn-1.1.1-a021/Wnn/uum/hinsi.c -+++ BUILD/FreeWnn-1.1.1-a021/Wnn/uum/hinsi.c -@@ -30,6 +30,7 @@ - */ - - #include -+#include - #include "commonhd.h" - #include "sdefine.h" - #include "sheader.h" ---- BUILD/FreeWnn-1.1.1-a021/Wnn/uum/jikouho.c -+++ BUILD/FreeWnn-1.1.1-a021/Wnn/uum/jikouho.c -@@ -30,6 +30,7 @@ - */ - - #include -+#include - #include "jllib.h" - #include "commonhd.h" - #include "sdefine.h" ---- BUILD/FreeWnn-1.1.1-a021/Wnn/uum/printf.c -+++ BUILD/FreeWnn-1.1.1-a021/Wnn/uum/printf.c -@@ -30,6 +30,7 @@ - */ - - #include -+#include - #include "commonhd.h" - #include "sdefine.h" - #include "sheader.h" ---- BUILD/FreeWnn-1.1.1-a021/Wnn/uum/touroku.c -+++ BUILD/FreeWnn-1.1.1-a021/Wnn/uum/touroku.c -@@ -32,6 +32,7 @@ - /* 登録のためのルーチン */ - - #include -+#include - #include "jllib.h" - #include "commonhd.h" - #include "sdefine.h" diff --git a/FreeWnn-ja.patch b/FreeWnn-ja.patch index 38f051c..65c4b1b 100644 --- a/FreeWnn-ja.patch +++ b/FreeWnn-ja.patch @@ -1,6 +1,6 @@ ---- 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 @@ +--- FreeWnn-1.1.1-a022.orig/Wnn/etc/msg.c 2005-04-11 00:26:37.000000000 +0900 ++++ FreeWnn-1.1.1-a022/Wnn/etc/msg.c 2013-08-06 12:27:33.133572652 +0900 +@@ -412,12 +412,12 @@ { struct msg_cat *cd; @@ -16,9 +16,9 @@ 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 @@ +--- FreeWnn-1.1.1-a022.orig/Wnn/include/jd_sock.h 2005-04-11 00:26:37.000000000 +0900 ++++ FreeWnn-1.1.1-a022/Wnn/include/jd_sock.h 2013-08-06 11:47:16.078413575 +0900 +@@ -57,7 +57,7 @@ #ifdef JAPANESE /* Japanese */ # define WNN_PORT_IN (0x5701) static char *sockname = "/tmp/jd_sockV4"; /* for jserver */ @@ -27,7 +27,7 @@ # define SERVERNAME "wnn4" # define MESSAGE_FILE "jserver.msg" #else /* JAPANESE */ -@@ -98,7 +98,7 @@ +@@ -88,7 +88,7 @@ # define WNN_PORT_IN (0x5701) static char *sockname = "/tmp/jd_sockV4"; /* for jserver */ @@ -36,22 +36,22 @@ # 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 @@ +--- FreeWnn-1.1.1-a022.orig/Wnn/include/jslib.h 2008-10-26 19:27:53.000000000 +0900 ++++ FreeWnn-1.1.1-a022/Wnn/include/jslib.h 2013-08-06 11:49:04.110854622 +0900 +@@ -400,8 +400,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") ++#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 @@ + #ifndef FRWNN_PARAMS + /* +--- FreeWnn-1.1.1-a022.orig/Wnn/include/msg.h 2005-04-11 00:26:37.000000000 +0900 ++++ FreeWnn-1.1.1-a022/Wnn/include/msg.h 2013-08-06 12:12:08.301743383 +0900 +@@ -62,7 +62,7 @@ /* #define DEF_LANG "C" */ @@ -60,8 +60,8 @@ 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 +--- FreeWnn-1.1.1-a022.orig/Wnn/include/wnn_config.h 2005-04-11 00:26:37.000000000 +0900 ++++ FreeWnn-1.1.1-a022/Wnn/include/wnn_config.h 2013-08-06 12:01:00.836647352 +0900 @@ -44,7 +44,7 @@ #define WNN_CSERVER_ENV "CSERVER" #define WNN_KSERVER_ENV "KSERVER" @@ -98,8 +98,8 @@ #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 +--- FreeWnn-1.1.1-a022.orig/Wnn/jd/serverdefs 2001-06-15 02:55:32.000000000 +0900 ++++ FreeWnn-1.1.1-a022/Wnn/jd/serverdefs 2013-08-06 12:01:50.642348650 +0900 @@ -30,7 +30,7 @@ ; @@ -109,9 +109,9 @@ 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 @@ +--- FreeWnn-1.1.1-a022.orig/Wnn/jlib/jl.c 2005-04-11 00:26:37.000000000 +0900 ++++ FreeWnn-1.1.1-a022/Wnn/jlib/jl.c 2013-08-06 12:02:48.422128059 +0900 +@@ -456,7 +456,7 @@ if (!lang || !*lang) { /* Sorry! Default is Japanese. :-) */ @@ -120,14 +120,3 @@ } 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/FreeWnn-noroot.patch b/FreeWnn-noroot.patch index 6886adb..8f6947c 100644 --- a/FreeWnn-noroot.patch +++ b/FreeWnn-noroot.patch @@ -1,6 +1,6 @@ ---- BUILD/FreeWnn-1.1.1-a021/Contrib/dic/gerodic/Makefile.in -+++ BUILD/FreeWnn-1.1.1-a021/Contrib/dic/gerodic/Makefile.in -@@ -67,9 +67,7 @@ +--- FreeWnn-1.1.1-a022.orig/Contrib/dic/gerodic/Makefile.in 2006-05-29 01:37:02.000000000 +0900 ++++ FreeWnn-1.1.1-a022/Contrib/dic/gerodic/Makefile.in 2013-08-06 15:15:41.127790480 +0900 +@@ -70,9 +70,7 @@ install:: ${OBJ} @if [ -d $(DESTDIR)$(GERODIR) ]; then set +x; \ else (set -x; $(MKDIRHIER) $(DESTDIR)$(GERODIR)); fi @@ -11,36 +11,36 @@ clean:: $(RM) ${OBJ} ---- BUILD/FreeWnn-1.1.1-a021/Wnn/jserver/Makefile.in -+++ BUILD/FreeWnn-1.1.1-a021/Wnn/jserver/Makefile.in +--- FreeWnn-1.1.1-a022.orig/Wnn/jserver/Makefile.in 2010-07-11 19:18:17.000000000 +0900 ++++ FreeWnn-1.1.1-a022/Wnn/jserver/Makefile.in 2013-08-06 15:18:17.033652766 +0900 @@ -36,7 +36,7 @@ top_builddir = @top_builddir@ INSTALL = @INSTALL@ $(INSTALLFLAGS) -LOCAL_INSTFLAGS = -o $(WNNOWNER) -+LOCAL_INSTFLAGS = ++LOCAL_INSTFLAGS = JSERVERDEFINES = -DJSERVER -DWRITE_CHECK INCLUDES = -I$(WNNINCLUDESRC) -I$(top_builddir) -I$(srcdir) ---- BUILD/FreeWnn-1.1.1-a021/Wnn/jutil/Makefile.in -+++ BUILD/FreeWnn-1.1.1-a021/Wnn/jutil/Makefile.in +--- FreeWnn-1.1.1-a022.orig/Wnn/jutil/Makefile.in 2011-04-18 01:29:50.000000000 +0900 ++++ FreeWnn-1.1.1-a022/Wnn/jutil/Makefile.in 2013-08-06 15:20:07.397700941 +0900 @@ -37,7 +37,7 @@ INSTALL = @INSTALL@ $(INSTALLFLAGS) LT_INSTALL = $(LIBTOOL) --mode=install $(INSTALL) LT_LD = $(LIBTOOL) --mode=link $(CCLINK) -LOCAL_INSTFLAGS = -o $(WNNOWNER) -+LOCAL_INSTFLAGS = ++LOCAL_INSTFLAGS = - INCLUDES = -I$(WNNINCLUDESRC) -I$(top_builddir) + INCLUDES = -I$(top_builddir) @EXTWNNJINC@ -I$(WNNINCLUDESRC) DEFINES = $(WNNDEFINES) $(WNNLANGDEF) ---- BUILD/FreeWnn-1.1.1-a021/Wnn/pubdicplus/Makefile.in -+++ BUILD/FreeWnn-1.1.1-a021/Wnn/pubdicplus/Makefile.in +--- FreeWnn-1.1.1-a022.orig/Wnn/pubdicplus/Makefile.in 2010-02-23 02:06:54.000000000 +0900 ++++ FreeWnn-1.1.1-a022/Wnn/pubdicplus/Makefile.in 2013-08-06 15:24:05.010279338 +0900 @@ -35,7 +35,7 @@ WNNJUTILOBJ = $(top_builddir)/Wnn/jutil INSTALL = @INSTALL@ $(INSTALLFLAGS) -LOCAL_INSTFLAGS = -o $(WNNOWNER) -+LOCAL_INSTFLAGS = ++LOCAL_INSTFLAGS = INCLUDES = -I$(top_builddir) ATOD = $(WNNJUTILOBJ)/atod @@ -54,25 +54,14 @@ done install:: $(DIC) ---- BUILD/FreeWnn-1.1.1-a021/Wnn/uum/Makefile.in -+++ BUILD/FreeWnn-1.1.1-a021/Wnn/uum/Makefile.in -@@ -35,7 +35,7 @@ - VPATH = @srcdir@ - - INSTALL = @INSTALL@ $(INSTALLFLAGS) --LOCAL_INSTFLAGS = $(INSTUIDFLAGS) -o $(UUMOWNER) -+LOCAL_INSTFLAGS = - - UUMOWNER = root - INCLUDES = -I$(WNNINCLUDESRC) -I$(WNNROMKANSRC) -I$(top_builddir) ---- BUILD/FreeWnn-1.1.1-a021/Wnn/wnncons/dic/Makefile.in -+++ BUILD/FreeWnn-1.1.1-a021/Wnn/wnncons/dic/Makefile.in +--- FreeWnn-1.1.1-a022.orig/Wnn/wnncons/dic/Makefile.in 2001-08-14 22:43:21.000000000 +0900 ++++ FreeWnn-1.1.1-a022/Wnn/wnncons/dic/Makefile.in 2013-08-06 15:36:30.150639065 +0900 @@ -33,7 +33,7 @@ top_builddir = ../../.. INSTALL = @INSTALL@ $(INSTALLFLAGS) -LOCAL_INSTFLAGS = -o $(WNNOWNER) -+LOCAL_INSTFLAGS = ++LOCAL_INSTFLAGS = ATOD = $(WNNJUTILSRC)/atod WNNTOUCH = $(WNNJUTILSRC)/wnntouch @@ -85,40 +74,40 @@ done depend:: ---- BUILD/FreeWnn-1.1.1-a021/Xwnmo/xjutil/Makefile.in -+++ BUILD/FreeWnn-1.1.1-a021/Xwnmo/xjutil/Makefile.in +--- FreeWnn-1.1.1-a022.orig/Xwnmo/xjutil/Makefile.in 2001-08-14 22:43:21.000000000 +0900 ++++ FreeWnn-1.1.1-a022/Xwnmo/xjutil/Makefile.in 2013-08-06 15:39:43.115076499 +0900 @@ -26,7 +26,7 @@ top_builddir = ../.. INSTALL = @INSTALL@ $(INSTALLFLAGS) -LOCAL_INSTFLAGS = -o $(WNNOWNER) -+LOCAL_INSTFLAGS = ++LOCAL_INSTFLAGS = INCLUDES = -I. $(XWNMOINCLUDES) -I$(XWNMOSRC) ---- BUILD/FreeWnn-1.1.1-a021/Xwnmo/xwnmo/Makefile.in -+++ BUILD/FreeWnn-1.1.1-a021/Xwnmo/xwnmo/Makefile.in +--- FreeWnn-1.1.1-a022.orig/Xwnmo/xwnmo/Makefile.in 2001-08-14 22:43:21.000000000 +0900 ++++ FreeWnn-1.1.1-a022/Xwnmo/xwnmo/Makefile.in 2013-08-06 15:40:43.929300312 +0900 @@ -26,7 +26,7 @@ top_builddir = ../.. INSTALL = @INSTALL@ $(INSTALLFLAGS) -LOCAL_INSTFLAGS = -o $(WNNOWNER) -+LOCAL_INSTFLAGS = ++LOCAL_INSTFLAGS = INCLUDES = $(XWNMOINCLUDES) ---- BUILD/FreeWnn-1.1.1-a021/cWnn/cdic/Makefile.in -+++ BUILD/FreeWnn-1.1.1-a021/cWnn/cdic/Makefile.in -@@ -31,7 +31,7 @@ +--- FreeWnn-1.1.1-a022.orig/cWnn/cdic/Makefile.in 2010-02-23 02:06:54.000000000 +0900 ++++ FreeWnn-1.1.1-a022/cWnn/cdic/Makefile.in 2013-08-06 15:44:21.202520151 +0900 +@@ -32,7 +32,7 @@ CWNNJUTILOBJ = $(top_builddir)/cWnn/jutil INSTALL = @INSTALL@ $(INSTALLFLAGS) -LOCAL_INSTFLAGS = -o $(WNNOWNER) -+LOCAL_INSTFLAGS = ++LOCAL_INSTFLAGS = ATOD = $(CWNNJUTILOBJ)/catod ATOF = $(CWNNJUTILOBJ)/catof -@@ -85,8 +85,7 @@ +@@ -86,8 +86,7 @@ install:: @case '${MFLAGS}' in *[i]*) set +e;; esac; @for i in $(CWNNDICDIR); do if [ -d $(DESTDIR)$$i ]; then \ @@ -128,40 +117,40 @@ done install:: $(ALLTGT) ---- BUILD/FreeWnn-1.1.1-a021/cWnn/jserver/Makefile.in -+++ BUILD/FreeWnn-1.1.1-a021/cWnn/jserver/Makefile.in +--- FreeWnn-1.1.1-a022.orig/cWnn/jserver/Makefile.in 2010-07-11 19:18:17.000000000 +0900 ++++ FreeWnn-1.1.1-a022/cWnn/jserver/Makefile.in 2013-08-06 15:46:36.258366587 +0900 @@ -38,7 +38,7 @@ JSERVERDEFINES = -DJSERVER -DWRITE_CHECK INCLUDES = -I$(CWNNINCLUDESRC) -I$(top_builddir) DEFINES = $(CWNNDEFINES) $(JSERVERDEFINES) $(WNNTERM) $(CWNNLANGDEF) -LOCAL_INSTFLAGS = $(INSTUIDFLAGS) -o $(WNNOWNER) -+LOCAL_INSTFLAGS = ++LOCAL_INSTFLAGS = SERVERINITDEF = -DSERVER_INIT_FILE=\"/$(CWNNLANG)/cserverrc\" HINSIDEFINE = -DHINSIDATA_FILE=\"/$(CWNNLANG)/cixing.data\" TSERVERINITDEF = -DSERVER_INIT_FILE=\"/$(TWNNLANG)/tserverrc\" ---- BUILD/FreeWnn-1.1.1-a021/cWnn/jutil/Makefile.in -+++ BUILD/FreeWnn-1.1.1-a021/cWnn/jutil/Makefile.in +--- FreeWnn-1.1.1-a022.orig/cWnn/jutil/Makefile.in 2011-04-18 01:29:50.000000000 +0900 ++++ FreeWnn-1.1.1-a022/cWnn/jutil/Makefile.in 2013-08-06 15:48:15.404717460 +0900 @@ -36,7 +36,7 @@ INSTALL = @INSTALL@ $(INSTALLFLAGS) LT_INSTALL = $(LIBTOOL) --mode=install $(INSTALL) LT_LD = $(LIBTOOL) --mode=link $(CCLINK) -LOCAL_INSTFLAGS = -o $(WNNOWNER) -+LOCAL_INSTFLAGS = ++LOCAL_INSTFLAGS = - INCLUDES = -I$(CWNNINCLUDESRC) -I$(top_builddir) + INCLUDES = -I$(top_builddir) @EXTCWNNJINC@ -I$(CWNNINCLUDESRC) DEFINES = $(CWNNDEFINES) $(CWNNLANGDEF) ---- BUILD/FreeWnn-1.1.1-a021/cWnn/tdic/Makefile.in -+++ BUILD/FreeWnn-1.1.1-a021/cWnn/tdic/Makefile.in -@@ -31,7 +31,7 @@ +--- FreeWnn-1.1.1-a022.orig/cWnn/tdic/Makefile.in 2010-02-23 02:06:54.000000000 +0900 ++++ FreeWnn-1.1.1-a022/cWnn/tdic/Makefile.in 2013-08-06 15:50:08.039375445 +0900 +@@ -32,7 +32,7 @@ CWNNJUTILOBJ = $(top_builddir)/cWnn/jutil INSTALL = @INSTALL@ -INSTALLFLAGS = -o $(WNNOWNER) -+INSTALLFLAGS = ++INSTALLFLAGS = ATOD = $(CWNNJUTILOBJ)/catod ATOF = $(CWNNJUTILOBJ)/catof -@@ -85,8 +85,7 @@ +@@ -86,8 +86,7 @@ install:: @case '${MFLAGS}' in *[i]*) set +e;; esac; @for i in $(TWNNDICDIR); do if [ -d $(DESTDIR)$$i ]; then \ @@ -171,19 +160,8 @@ done install:: $(ALLTGT) ---- BUILD/FreeWnn-1.1.1-a021/cWnn/uum/Makefile.in -+++ BUILD/FreeWnn-1.1.1-a021/cWnn/uum/Makefile.in -@@ -37,7 +37,7 @@ - UUMOWNER = root - INCLUDES = -I$(CWNNINCLUDESRC) -I$(CWNNROMKANSRC) -I$(top_builddir) - DEFINES = $(CWNNDEFINES) $(CWNNLANGDEF) --LOCAL_INSTFLAGS = $(INSTUIDFLAGS) -o $(UUMOWNER) -+LOCAL_INSTFLAGS = - LOCAL_LIBRARIES = $(CWNNJLIB) $(CWNNCONVLIB) @LIBS@ - - HDRS= buffer.h cvtcode.h sdefine.h sheader.h ---- BUILD/FreeWnn-1.1.1-a021/kWnn/jserver/Makefile.in -+++ BUILD/FreeWnn-1.1.1-a021/kWnn/jserver/Makefile.in +--- FreeWnn-1.1.1-a022.orig/kWnn/jserver/Makefile.in 2010-07-11 19:18:17.000000000 +0900 ++++ FreeWnn-1.1.1-a022/kWnn/jserver/Makefile.in 2013-08-06 16:04:30.457591366 +0900 @@ -38,7 +38,7 @@ JSERVERDEFINES = -DJSERVER -DWRITE_CHECK INCLUDES = -I$(KWNNJSERVERSRC) -I$(KWNNINCLUDESRC) -I$(top_builddir) @@ -193,29 +171,29 @@ SERVERINITDEF = -DSERVER_INIT_FILE=\"/$(KWNNLANG)/kserverrc\" HINSIDEFINE = -DHINSIDATA_FILE=\"/$(KWNNLANG)/hinsi.data\" WRAPLIB = @WRAPLIB@ ---- BUILD/FreeWnn-1.1.1-a021/kWnn/jutil/Makefile.in -+++ BUILD/FreeWnn-1.1.1-a021/kWnn/jutil/Makefile.in +--- FreeWnn-1.1.1-a022.orig/kWnn/jutil/Makefile.in 2011-04-18 01:29:50.000000000 +0900 ++++ FreeWnn-1.1.1-a022/kWnn/jutil/Makefile.in 2013-08-06 16:07:46.321957315 +0900 @@ -39,7 +39,7 @@ - INCLUDES = -I$(KWNNINCLUDESRC) -I$(top_builddir) + INCLUDES = -I$(top_builddir) @EXTKWNNJINC@ -I$(KWNNINCLUDESRC) DEFINES = $(KWNNDEFINES) $(KWNNLANGDEF) -LOCAL_INSTFLAGS = -o $(WNNOWNER) -+LOCAL_INSTFLAGS = ++LOCAL_INSTFLAGS = HINSIDEFINE = -DHINSIDATA_FILE=\"/$(KWNNLANG)/hinsi.data\" - CLIENTPROGRAMS = kwnnstat kwnnkill kwddel kwdreg ---- BUILD/FreeWnn-1.1.1-a021/kWnn/kdic/Makefile.in -+++ BUILD/FreeWnn-1.1.1-a021/kWnn/kdic/Makefile.in -@@ -31,7 +31,7 @@ + CLIENTPROGRAMS = kwddel kwdreg +--- FreeWnn-1.1.1-a022.orig/kWnn/kdic/Makefile.in 2010-02-23 02:06:55.000000000 +0900 ++++ FreeWnn-1.1.1-a022/kWnn/kdic/Makefile.in 2013-08-06 16:34:59.173587868 +0900 +@@ -32,7 +32,7 @@ KWNNJUTILOBJ = $(top_builddir)/kWnn/jutil INSTALL = @INSTALL@ -INSTALLFLAGS = -o $(WNNOWNER) -+INSTALLFLAGS = ++INSTALLFLAGS = ATOD = $(KWNNJUTILOBJ)/katod ATOF = $(KWNNJUTILOBJ)/katof -@@ -76,8 +76,7 @@ +@@ -77,8 +77,7 @@ install:: @case '${MFLAGS}' in *[i]*) set +e;; esac; @for i in $(KWNNDICDIR); do if [ -d $(DESTDIR)$$i ]; then \ @@ -225,14 +203,3 @@ done install:: $(ALLTGT) ---- BUILD/FreeWnn-1.1.1-a021/kWnn/uum/Makefile.in -+++ BUILD/FreeWnn-1.1.1-a021/kWnn/uum/Makefile.in -@@ -37,7 +37,7 @@ - UUMOWNER = root - INCLUDES = -I$(KWNNINCLUDESRC) -I$(KWNNROMKANSRC) -I$(top_builddir) - DEFINES = $(KWNNDEFINES) $(KWNNLANGDEF) --LOCAL_INSTFLAGS = $(INSTUIDFLAGS) -o $(UUMOWNER) -+LOCAL_INSTFLAGS = - LOCAL_LIBRARIES = $(KWNNJLIB) $(KWNNCONVLIB) @LIBS@ - - HDRS= buffer.h cvtcode.h sdefine.h sheader.h diff --git a/FreeWnn-prototypes.patch b/FreeWnn-prototypes.patch index ce9c95d..04a5fec 100644 --- a/FreeWnn-prototypes.patch +++ b/FreeWnn-prototypes.patch @@ -1,16 +1,70 @@ ---- Wnn/etc/pwd.c -+++ Wnn/etc/pwd.c -@@ -61,6 +61,7 @@ - JS_STATIC void new_pwd (char* src, char* encd); - JS_STATIC int check_pwd (char* src, char* encd); +--- FreeWnn-1.1.1-a022.bak/Wnn/include/jllib.h 2008-10-26 19:27:53.000000000 +0900 ++++ FreeWnn-1.1.1-a022/Wnn/include/jllib.h 2013-08-07 04:36:57.146380820 +0900 +@@ -253,8 +253,8 @@ + /* extern function defines */ + /* Note: FRWNN_PARAMS is defined in jslib.h . */ -+extern char* crypt (const char *,const char *); - JS_STATIC void - new_pwd (char* src, char* encd) +-extern struct wnn_buf *jl_open_lang FRWNN_PARAMS((char *env_n, char *server_n, char *lang, char *wnnrc_n, int (*error_handler) (), int (*message_handler) (), int timeout)); +-extern struct wnn_env *jl_connect_lang FRWNN_PARAMS((register char *env_n, register char *server_n, register char *lang, register char *wnnrc_n, int (*error_handler) (), int (*message_handler) (), int timeout)); ++extern struct wnn_buf *jl_open_lang FRWNN_PARAMS((const char *, const char *, const char *, const char *, int (*) (const char *), int (*) (const char *), int)); ++extern struct wnn_env *jl_connect_lang FRWNN_PARAMS((register const char *, register const char *, register const char *, register const char *, int (*) (const char *), int (*) (const char *), int timeout)); + extern struct wnn_env *jl_env_get FRWNN_PARAMS((register struct wnn_buf *buf)); + extern struct wnn_jdata *jl_word_info_e FRWNN_PARAMS((register struct wnn_env *env, int dic_no, int entry)); + extern w_char *jl_hinsi_name_e FRWNN_PARAMS((register struct wnn_env *env, register int no)); +@@ -284,8 +284,8 @@ + extern int jl_param_get_e FRWNN_PARAMS((struct wnn_env *env, struct wnn_param *para)); + extern int jl_param_set_e FRWNN_PARAMS((register struct wnn_env *env, struct wnn_param *para)); + extern int jl_ren_conv FRWNN_PARAMS((register struct wnn_buf *buf, register w_char *yomi, int bun_no, int bun_no2, int use_maep)); +-extern int jl_set_env_wnnrc FRWNN_PARAMS((register struct wnn_env *env, char *wnnrc_n, int (*error_handler) (), int (*message_handler) () )); +-extern int jl_set_env_wnnrc1 FRWNN_PARAMS((register struct wnn_env *env, char *wnnrc_n, int (*error_handler) (), int (*message_handler) (), int level)); ++extern int jl_set_env_wnnrc FRWNN_PARAMS((register struct wnn_env *, const char *, int (*) (const char *), int (*) (const char *))); ++extern int jl_set_env_wnnrc1 FRWNN_PARAMS((register struct wnn_env *, const char *, int (*) (const char *), int (*) (const char *), int)); + extern int jl_set_jikouho FRWNN_PARAMS((register struct wnn_buf *buf, register int offset)); + extern int jl_set_jikouho_dai FRWNN_PARAMS((register struct wnn_buf *buf, int offset)); + extern int jl_tan_conv FRWNN_PARAMS((register struct wnn_buf *buf, w_char *yomi, register int bun_no, register int bun_no2, int use_maep, int ich_shop)); +diff -ur FreeWnn-1.1.1-a022.bak/Wnn/include/jslib.h FreeWnn-1.1.1-a022/Wnn/include/jslib.h +--- FreeWnn-1.1.1-a022.bak/Wnn/include/jslib.h 2013-08-07 06:07:20.597599679 +0900 ++++ FreeWnn-1.1.1-a022/Wnn/include/jslib.h 2013-08-07 04:59:14.523936167 +0900 +@@ -137,6 +137,18 @@ + /* js_who */ + #define WNN_MAX_ENV_OF_A_CLIENT 32 + ++#ifndef FRWNN_PARAMS ++/* ++ * I currently think ANSI-C is not sufficient on building your clients ++ * linked with libwnn. (aonoto) ++ */ ++#if __STDC__ /* Sufficient? */ ++#define FRWNN_PARAMS(paramlist) paramlist ++#else ++#define FRWNN_PARAMS(paramlist) () ++#endif ++#endif ++ + struct wnn_jwho { ---- Wnn/include/wnn_string.h -+++ Wnn/include/wnn_string.h -@@ -33,26 +33,26 @@ + int sd; /* jserver 内のソケットディスクリプタ */ +@@ -403,17 +415,6 @@ + #define js_open(server, timeout) js_open_lang((server), "ja", (timeout)) + #define js_connect(server,env_name) js_connect_lang((server), (env_name), "ja") + +-#ifndef FRWNN_PARAMS +-/* +- * I currently think ANSI-C is not sufficiant on building your clients +- * linked with libwnn. (aonoto) +- */ +-#if __STDC__ /* Sufficient? */ +-#define FRWNN_PARAMS(paramlist) paramlist +-#else +-#define FRWNN_PARAMS(paramlist) () +-#endif +-#endif + + extern WNN_JSERVER_ID *js_open_lang FRWNN_PARAMS((register char *server, register char *lang, register int timeout)); + extern int js_close FRWNN_PARAMS((WNN_JSERVER_ID *server)); +--- FreeWnn-1.1.1-a022.bak/Wnn/include/wnn_string.h 2005-04-11 00:26:37.000000000 +0900 ++++ FreeWnn-1.1.1-a022/Wnn/include/wnn_string.h 2013-08-07 04:46:51.470301270 +0900 +@@ -33,26 +33,28 @@ #ifndef WNN_STRING_H #define WNN_STRING_H @@ -29,56 +83,98 @@ -extern w_char *wnn_Strcpy (); -extern void wnn_delete_w_ss2 (); -extern int wnn_byte_count (); -+extern int wnn_sStrcpy (register char*,register w_char*); -+extern int wnn_Sstrcpy (w_char*,unsigned char*); -+extern void wnn_Sreverse (w_char*,w_char*); -+extern char *wnn_Stos (w_char*); -+extern char *wnn_sStrncpy (register char*,register w_char*,int); -+extern w_char *wnn_Strcat (register w_char*,register w_char*); -+extern w_char *wnn_Strncat (register w_char*,register w_char*,int); -+extern int wnn_Strcmp (register w_char*,register w_char*); -+extern int wnn_Substr (register w_char*,register w_char*); -+extern int wnn_Strncmp (register w_char*,register w_char*,int); -+extern w_char *wnn_Strncpy (register w_char*,register w_char*,int); -+extern int wnn_Strlen (register w_char*); -+extern w_char *wnn_Strcpy (register w_char*,register w_char*); -+extern void wnn_delete_w_ss2 (register w_char*,int); -+extern int wnn_byte_count (register int); ++#include "jslib.h" ++ ++extern int wnn_sStrcpy FRWNN_PARAMS((register char*, register w_char*)); ++extern int wnn_Sstrcpy FRWNN_PARAMS((w_char*,unsigned char*)); ++extern void wnn_Sreverse FRWNN_PARAMS((w_char*,w_char*)); ++extern char *wnn_Stos FRWNN_PARAMS((w_char*)); ++extern char *wnn_sStrncpy FRWNN_PARAMS((register char*,register w_char*,int)); ++extern w_char *wnn_Strcat FRWNN_PARAMS((register w_char*,register w_char*)); ++extern w_char *wnn_Strncat FRWNN_PARAMS((register w_char*,register w_char*,int)); ++extern int wnn_Strcmp FRWNN_PARAMS((register w_char*,register w_char*)); ++extern int wnn_Substr FRWNN_PARAMS((register w_char*,register w_char*)); ++extern int wnn_Strncmp FRWNN_PARAMS((register w_char*,register w_char*,int)); ++extern w_char *wnn_Strncpy FRWNN_PARAMS((register w_char*,register w_char*,int)); ++extern int wnn_Strlen FRWNN_PARAMS((register w_char*)); ++extern w_char *wnn_Strcpy FRWNN_PARAMS((register w_char*,register w_char*)); ++extern void wnn_delete_w_ss2 FRWNN_PARAMS((register w_char*,int)); ++extern int wnn_byte_count FRWNN_PARAMS((register int)); #ifndef JS -extern int check_pwd (); -+extern int check_pwd (char*,char*); ++extern int check_pwd FRWNN_PARAMS((char*,char*)); #endif #ifdef CHINESE -extern int wnn_Sstrcat (); -+extern int wnn_Sstrcat (w_char*,unsigned char*); ++extern int wnn_Sstrcat FRWNN_PARAMS((w_char*,unsigned char*)); #endif #endif /* WNN_STRING_H */ ---- Wnn/jutil/atod.c -+++ Wnn/jutil/atod.c -@@ -57,6 +57,7 @@ - #if HAVE_UNISTD_H - # include - #endif -+#include +--- FreeWnn-1.1.1-a022.bak/Wnn/jlib/jl.c 2013-08-07 06:09:46.107457087 +0900 ++++ FreeWnn-1.1.1-a022/Wnn/jlib/jl.c 2013-08-07 04:17:54.549210149 +0900 +@@ -132,7 +132,7 @@ - #include "commonhd.h" - #include "wnn_config.h" -@@ -70,19 +71,24 @@ + static void add_down_bnst (); + static int alloc_heap (); +-static int call_error_handler (); ++static int call_error_handler FRWNN_PARAMS((int (*) (const char *), const char *)); + static int change_ascii_to_int (); + static int create_file (); + static int dai_end (); +--- FreeWnn-1.1.1-a022.bak/Wnn/jserver/error.c 2013-08-07 06:10:21.510265098 +0900 ++++ FreeWnn-1.1.1-a022/Wnn/jserver/error.c 2003-06-08 12:09:51.000000000 +0900 +@@ -82,7 +82,7 @@ + void + error_exit1 (x, y1, y2, y3, y4, y5) + char *x; +- long y1, y2, y3, y4, y5; ++ int y1, y2, y3, y4, y5; + { + /* Need care with buffer size */ + char buf[512]; +@@ -270,7 +270,7 @@ + void + out (x, y1, y2, y3, y4, y5, y6, y7, y8, y9, y10, y11, y12) + char *x; +- long y1, y2, y3, y4, y5, y6, y7, y8, y9, y10, y11, y12; ++ int y1, y2, y3, y4, y5, y6, y7, y8, y9, y10, y11, y12; + { + if (!noisy) + return; +--- FreeWnn-1.1.1-a022.bak/Wnn/jutil/atod.c 2004-08-12 18:03:19.000000000 +0900 ++++ FreeWnn-1.1.1-a022/Wnn/jutil/atod.c 2013-08-07 00:06:48.611412840 +0900 +@@ -70,19 +70,60 @@ #include "wnn_string.h" #include "wnn_os.h" -extern int wnn_loadhinsi (), init_heap (), little_endian (), Sorted (), asshuku (), revdic (); -extern void ujis_header (), read_ujis (), reverse_yomi (), create_rev_dict (), -uniq_je (), sort_if_not_sorted (), output_header (), udytoS (), output_ri (), exit1 (), new_pwd (), rev_short_fun (), rev_w_char (); -+extern int wnn_loadhinsi (unsigned char*), init_heap (int,int,int,int,FILE*), little_endian (), Sorted (register char*,register int,int,int (*sort_fun)(char*,char*)), asshuku (int), revdic (struct JT *,int); ++extern int wnn_loadhinsi FRWNN_PARAMS((unsigned char*)), ++ init_heap FRWNN_PARAMS((int,int,int,int,FILE*)), ++ little_endian FRWNN_PARAMS(()), ++ Sorted FRWNN_PARAMS((register char*,register int,int,int (*sort_fun)(char*,char*))), ++ asshuku FRWNN_PARAMS((int)), ++ revdic FRWNN_PARAMS((struct JT *,int)); +#ifdef CHINESE -+extern void ujis_header (int*); ++extern void ujis_header FRWNN_PARAMS((int*)); +#else -+extern void ujis_header (void); ++extern void ujis_header FRWNN_PARAMS((void)); +#endif -+extern void read_ujis (int,int,int), reverse_yomi (void), create_rev_dict (void), -+uniq_je (int(*func)(char*,char*)), sort_if_not_sorted (void), output_header (FILE*,struct JT*,struct wnn_file_head*), udytoS (w_char*,int,char*,struct uind1*), output_ri (FILE*), exit1 (void), new_pwd (char*,char*), rev_short_fun (w_char*), rev_w_char (w_char*,int); ++extern void read_ujis FRWNN_PARAMS((int,int,int)), ++ reverse_yomi FRWNN_PARAMS((void)), ++ create_rev_dict FRWNN_PARAMS((void)), ++ uniq_je FRWNN_PARAMS((int(*func)(char*,char*))), ++ sort_if_not_sorted FRWNN_PARAMS((void)), ++ output_header FRWNN_PARAMS((FILE*,struct JT*,struct wnn_file_head*)), ++ udytoS FRWNN_PARAMS((w_char*,int,char*,struct uind1*)), ++ output_ri FRWNN_PARAMS((FILE*)), ++ exit1 FRWNN_PARAMS((void)), ++ new_pwd FRWNN_PARAMS((char*,char*)), ++ rev_short_fun FRWNN_PARAMS((w_char*)), ++ rev_w_char FRWNN_PARAMS((w_char*,int)); ++ ++ extern #ifdef BDIC_WRITE_CHECK int @@ -89,30 +185,48 @@ -static void ujistoud (), output_dic_index (), usage (), sdic_sort (), -ujistosd (), not_enough_area (), get_pwd (), output_hindo (), output_hinsi (), output_kanji (), rev_dic_data (), set_pter1 (), output_comment (), output_hinsi_list (); -void upd_kanjicount (), output_dic_data (); -+ put_n_EU_str (FILE*,w_char*,int); -+static void ujistoud (void), output_dic_index (void), usage (void), sdic_sort (void), -+ujistosd (int,int), not_enough_area (void), get_pwd (char*,char*), output_hindo (FILE*), output_hinsi (FILE*), output_kanji (FILE*), rev_dic_data (void), set_pter1 (void), output_comment (FILE*), output_hinsi_list (FILE*); -+void upd_kanjicount (int), output_dic_data (void); ++ put_n_EU_str FRWNN_PARAMS((FILE*,w_char*,int)); ++ ++extern int sort_func_sdic FRWNN_PARAMS((char*,char*)); ++extern int sort_func_je FRWNN_PARAMS((char*,char*)); ++extern char *get_cswidth_name FRWNN_PARAMS((register char*)); ++extern void set_cswidth FRWNN_PARAMS((register unsigned int)); ++ ++static void ujistoud FRWNN_PARAMS((void)), ++ output_dic_index FRWNN_PARAMS((void)), ++ usage FRWNN_PARAMS((void)), ++ sdic_sort FRWNN_PARAMS((void)), ++ ujistosd FRWNN_PARAMS((int,int)), ++ not_enough_area FRWNN_PARAMS((void)), ++ get_pwd FRWNN_PARAMS((char*,char*)), ++ output_hindo FRWNN_PARAMS((FILE*)), ++ output_hinsi FRWNN_PARAMS((FILE*)), ++ output_kanji FRWNN_PARAMS((FILE*)), ++ rev_dic_data FRWNN_PARAMS((void)), ++ set_pter1 FRWNN_PARAMS((void)), ++ output_comment FRWNN_PARAMS((FILE*)), ++ output_hinsi_list FRWNN_PARAMS((FILE*)); ++void upd_kanjicount FRWNN_PARAMS((int)), ++ output_dic_data FRWNN_PARAMS((void)); /* Switcher variable between UD and SD */ -@@ -115,7 +121,7 @@ +@@ -115,8 +156,7 @@ int tnum = 0; struct uind2 *uhopter; -char *hinsi_file_name = NULL; +- +unsigned char *hinsi_file_name = NULL; - void -@@ -221,16 +227,16 @@ + init (int argc, char **argv) +@@ -221,16 +261,12 @@ } } -extern int sort_func_sdic (); -extern int sort_func_je (); -+extern int sort_func_sdic (char*,char*); -+extern int sort_func_je (char*,char*); FILE *ofpter; int @@ -121,20 +235,10 @@ char *cswidth_name; - extern char *get_cswidth_name (); - extern void set_cswidth (); -+ extern char *get_cswidth_name (register char*); -+ extern void set_cswidth (register unsigned int); com_name = argv[0]; init (argc, argv); -@@ -301,7 +307,6 @@ - exit (0); - } - -- - w_char * - addyomient (int tn, w_char* yomi) - { -@@ -442,7 +447,7 @@ +@@ -442,7 +478,7 @@ { if (which_dict == WNN_UD_DICT) { @@ -143,7 +247,7 @@ jt.maxtable = tnum; jt.maxhontai = (char *) uhopter - (char *) hostart; jt.maxri2 = jt.maxri1[D_YOMI] = jt.maxri1[D_KANJI] = 0; -@@ -470,7 +475,7 @@ +@@ -470,7 +506,7 @@ } else { @@ -152,48 +256,88 @@ jt.maxtable = 0; jt.maxhontai = (char *) hopter - (char *) hostart; jt.maxri2 = jt.maxri1[D_YOMI] = jt.maxri1[D_KANJI] = 0; ---- Wnn/romkan/rk_bltinfn.c -+++ Wnn/romkan/rk_bltinfn.c -@@ -371,7 +371,7 @@ +--- FreeWnn-1.1.1-a022.bak/Wnn/romkan/rk_bltinfn.c 2005-04-11 00:26:38.000000000 +0900 ++++ FreeWnn-1.1.1-a022/Wnn/romkan/rk_bltinfn.c 2013-08-06 22:57:34.504818981 +0900 +@@ -52,6 +52,7 @@ + #include "commonhd.h" + #include "wnn_config.h" + #include "rk_header.h" ++#include "jslib.h" + + /* 半角文字のコードのdefine */ + #define HKCHOU (HNKAK1 * 0x100 + 0xB0) /* ー */ +@@ -73,6 +74,10 @@ + #define TOUTEN (0xA1A2) /* 、 */ + #define NKPOTU (0xA1A6) /* ・ */ + ++/* This is bad code . It should be declared in the header . ++ * But where should it be declared ? */ ++extern letter vtol FRWNN_PARAMS((letter)); ++ + static char _lang[6]; + + void +@@ -371,7 +376,7 @@ to_digit (in, base, outp) letter in, base, **outp; { - letter c, vtol (); -+ letter c, vtol (letter); ++ letter c; if (c = in, c /= base) to_digit (c, base, outp); ---- Wnn/romkan/rk_fundecl.h -+++ Wnn/romkan/rk_fundecl.h -@@ -39,12 +39,12 @@ +diff -ur FreeWnn-1.1.1-a022.bak/Wnn/romkan/rk_fundecl.h FreeWnn-1.1.1-a022/Wnn/romkan/rk_fundecl.h +--- FreeWnn-1.1.1-a022.bak/Wnn/romkan/rk_fundecl.h 2005-04-11 00:26:38.000000000 +0900 ++++ FreeWnn-1.1.1-a022/Wnn/romkan/rk_fundecl.h 2013-08-06 23:04:20.136621426 +0900 +@@ -39,12 +39,21 @@ ***********************************************************************/ /* Version 3.0 */ -extern letter *ltrncpy (); -extern int ltrcmp (), ltrncmp (); -+extern letter *ltrncpy (letter*,letter*,int); -+extern int ltrcmp (letter*,letter*), ltrncmp (letter*,letter*,int); -extern int romkan_init (), romkan_init2 (), romkan_init3 (); -extern letter romkan_getc (), *romkan_henkan (), romkan_next (); -extern letter romkan_ungetc (), romkan_unnext (); -extern void romkan_clear (); -extern char *romkan_dispmode (); -+extern int romkan_init (char*,letter,char,letter(*keyinfn)(),int(*bytcntfn)()), romkan_init2 (char*,letter,char,letter(*keyinfn)(),int(*bytcntfn)(),char,char,char), romkan_init3 (char*,letter,letter,letter,letter(*keyinfn)(),int(*bytcntfn)(),int(*kbytcntfn)(),char,int); -+extern letter romkan_getc (void), *romkan_henkan (letter), romkan_next (void); -+extern letter romkan_ungetc (letter), romkan_unnext (letter); -+extern void romkan_clear (void); -+extern char *romkan_dispmode (void); ++#include "jslib.h" ++ ++extern letter *ltrncpy FRWNN_PARAMS((letter*,letter*,int)); ++extern int ltrcmp FRWNN_PARAMS((letter*,letter*)), ++ ltrncmp FRWNN_PARAMS((letter*,letter*,int)); ++ ++extern int romkan_init FRWNN_PARAMS((char*,letter,char,letter(*keyinfn)(),int(*bytcntfn)())), ++ romkan_init2 FRWNN_PARAMS((char*,letter,char,letter(*keyinfn)(),int(*bytcntfn)(),char,char,char)), ++ romkan_init3 FRWNN_PARAMS((char*,letter,letter,letter,letter(*keyinfn)(),int(*bytcntfn)(),int(*kbytcntfn)(),char,int)); ++extern letter romkan_getc FRWNN_PARAMS((void)), ++ *romkan_henkan FRWNN_PARAMS((letter)), ++ romkan_next FRWNN_PARAMS((void)); ++extern letter romkan_ungetc FRWNN_PARAMS((letter)), ++ romkan_unnext FRWNN_PARAMS((letter)); ++extern void romkan_clear FRWNN_PARAMS((void)); ++extern char *romkan_dispmode FRWNN_PARAMS((void)); extern char rk_errstat; /* これは関数ではなく変数 */ ---- Wnn/romkan/rk_main.c -+++ Wnn/romkan/rk_main.c -@@ -91,23 +91,23 @@ +diff -ur FreeWnn-1.1.1-a022.bak/Wnn/romkan/rk_main.c FreeWnn-1.1.1-a022/Wnn/romkan/rk_main.c +--- FreeWnn-1.1.1-a022.bak/Wnn/romkan/rk_main.c 2005-04-11 00:26:38.000000000 +0900 ++++ FreeWnn-1.1.1-a022/Wnn/romkan/rk_main.c 2013-08-06 23:19:20.204768004 +0900 +@@ -42,6 +42,7 @@ + #include "rk_header.h" + #include "rk_extvars.h" + #include "rk_fundecl.h" ++#include "jslib.h" + + struct matchpair /* 現在マッチされている変数の番号と、マッチした文字の + 組を保持。 */ +@@ -91,23 +92,48 @@ letter saishu_out[OUTSIZ]; letter delchr, delchr2 = EOLTTR, nisedl; /* DELのキャラクタは二個まで持てる */ -modetyp chgmod (), incmod (), decmod (); -+modetyp chgmod (int,modetyp), incmod (int,modetyp), decmod (int,modetyp); - +- ++modetyp chgmod FRWNN_PARAMS((int,modetyp)), ++ incmod FRWNN_PARAMS((int,modetyp)), ++ decmod FRWNN_PARAMS((int,modetyp)); /* letterを返す関数の定義及び宣言(一部にはcharのものも混じっている) */ @@ -201,10 +345,15 @@ -letter romkan_next (), romkan_unnext (); -letter romkan_getc (), romkan_ungetc (), *romkan_henkan (); -letter to_zenalpha (), to_zenhira (), to_zenkata (); -+static letter mchedsrc (int); -+letter romkan_next (void), romkan_unnext (letter); -+letter romkan_getc (void), romkan_ungetc (letter), *romkan_henkan (letter); -+letter to_zenalpha (letter), to_zenhira (letter), to_zenkata (letter); ++static letter mchedsrc FRWNN_PARAMS((int)); ++letter romkan_next FRWNN_PARAMS((void)), ++ romkan_unnext FRWNN_PARAMS((letter)); ++letter romkan_getc FRWNN_PARAMS((void)), ++ romkan_ungetc FRWNN_PARAMS((letter)), ++ *romkan_henkan FRWNN_PARAMS((letter)); ++letter to_zenalpha FRWNN_PARAMS((letter)), ++ to_zenhira FRWNN_PARAMS((letter)), ++ to_zenkata FRWNN_PARAMS((letter)); /* to_zenhira;kata は濁点を持つ文字を一まとめにしない。 */ -void BUGreport (); @@ -213,90 +362,181 @@ -static int p_eq (), hen_ikisrc (), henkan_ok (), rk_rst (), head_bytecount (); -extern void readdata (), romkan_reset (), hank_setup (), to_hankata (), to_digit (), dakuadd (), handakuadd (), allchgmod (); -extern int ltov (); -+void BUGreport (int); -+static void maeato_henkan (letter,letter*,int*), add_at_eof (void), rk_delete (letter), set_rubout (letter*,int,letter), mchevl (letter**,letter*), codeout_chg (void), ltrevlcpy (letter*,letter*); -+int match (void); -+static int p_eq (register letter**,register letter**), hen_ikisrc (int,letter), henkan_ok (void), rk_rst (void), head_bytecount (uns_chr*); -+extern void readdata (letter*,struct dat*,letter**,char*), romkan_reset (void), hank_setup (void), to_hankata (letter,letter**), to_digit (letter,letter,letter**), dakuadd (letter,letter**), handakuadd (letter,letter**), allchgmod (modetyp); -+extern int ltov (letter); ++void BUGreport FRWNN_PARAMS((int)); ++static void maeato_henkan FRWNN_PARAMS((letter,letter*,int*)), ++ add_at_eof FRWNN_PARAMS((void)), ++ rk_delete FRWNN_PARAMS((letter)), ++ set_rubout FRWNN_PARAMS((letter*,int,letter)), ++ mchevl FRWNN_PARAMS((letter**,letter*)), ++ codeout_chg FRWNN_PARAMS((void)), ++ ltrevlcpy FRWNN_PARAMS((letter*,letter*)); ++int match FRWNN_PARAMS((void)); ++static int p_eq FRWNN_PARAMS((register letter**,register letter**)), ++ hen_ikisrc FRWNN_PARAMS((int,letter)), ++ henkan_ok FRWNN_PARAMS((void)), ++ rk_rst FRWNN_PARAMS((void)), ++ head_bytecount FRWNN_PARAMS((uns_chr*)); ++extern void readdata FRWNN_PARAMS((letter*,struct dat*,letter**,char*)), ++ romkan_reset FRWNN_PARAMS((void)), ++ hank_setup FRWNN_PARAMS((void)), ++ to_hankata FRWNN_PARAMS((letter,letter**)), ++ to_digit FRWNN_PARAMS((letter,letter,letter**)), ++ dakuadd FRWNN_PARAMS((letter,letter**)), ++ handakuadd FRWNN_PARAMS((letter,letter**)), ++ allchgmod FRWNN_PARAMS((modetyp)); ++extern int ltov FRWNN_PARAMS((letter)); ++int romkan_init2 FRWNN_PARAMS((char*,letter,char,letter(*keyinfn)(),int(*bytcntfn)(),char,char,char)); ++int romkan_init3 FRWNN_PARAMS((char*,letter,letter,letter,letter(*keyinfn)(),int(*bytcntfn)(),int(*kbytcntfn)(),char,int)); static letter * ltrcpy (lp1, lp2) -@@ -426,6 +426,7 @@ - lastoutlen = lastkbflen = 0; - } - -+int romkan_init2 (char*,letter,char,letter(*keyinfn)(),int(*bytcntfn)(),char,char,char); - /** 表を読み込んで変換の初期設定をする。(part 1)*/ - int - romkan_init (modhyo, delchr_, chmoutf, keyinfn, bytcntfn) -@@ -439,6 +440,7 @@ - - #define ifflg(a, b) ((a) ? (b) : 0) - -+int romkan_init3 (char*,letter,letter,letter,letter(*keyinfn)(),int(*bytcntfn)(),int(*kbytcntfn)(),char,int); - /** 表を読み込んで変換の初期設定をする。(part 2: キー入力に対し必ず何か - 返すようにするか、キーバッファをクリアするかどうかなども指定可)*/ - int ---- Wnn/romkan/rk_modread.c -+++ Wnn/romkan/rk_modread.c -@@ -63,17 +63,17 @@ +--- FreeWnn-1.1.1-a022.bak/Wnn/romkan/rk_modread.c 2005-04-11 00:26:38.000000000 +0900 ++++ FreeWnn-1.1.1-a022/Wnn/romkan/rk_modread.c 2013-08-06 23:35:25.974413286 +0900 +@@ -60,20 +60,42 @@ + /* マクロLIBDIRの定義(のためだけ)。コンパイル時は、ヘッダファイルの + サーチパスに、Wnnのインクルードファイルのありかを設定しておくこと。 */ + #endif ++#include "jslib.h" #define Terminator 0 /* intの列(naibu[])の終止コード */ -extern char *chrcat (), *strend (), *ename (); -+extern char *chrcat (char*,char), *strend (char*), *ename (char*); ++extern char *chrcat FRWNN_PARAMS((char*,char)), ++ *strend FRWNN_PARAMS((char*)), ++ *ename FRWNN_PARAMS((char*)); extern void romkan_clear (); char *modhyopath; -static void cond_evl (), mystrcpy (), rd_bcksla (), rd_ctrl (), hyouse (), look_choose (); -+static void cond_evl (char*), mystrcpy (char*,char*), rd_bcksla (register FILE*,char**), rd_ctrl (register FILE*,char**), hyouse (int), look_choose (int**,int); ++static void cond_evl FRWNN_PARAMS((char*)), ++ mystrcpy FRWNN_PARAMS((char*,char*)), ++ rd_bcksla FRWNN_PARAMS((register FILE*,char**)), ++ rd_ctrl FRWNN_PARAMS((register FILE*,char**)), ++ hyouse FRWNN_PARAMS((int)), ++ look_choose FRWNN_PARAMS((int**,int)); void choosehyo (); -static int mystrcmp (), read1tm (), mod_evl (), fnmsrc_tourk (), dspnamsrc_tourk (), -scan1tm (), modsrc_tourk (), chk_get_int (), pathsrc_tourk (), modnamchk (), ctov (), look_cond (), evlcond (), chkchar_getc (); -static char codeeval (); -extern void ERRMOD (), ERMOPN (), BUGreport (); -extern int filnamchk (); -+static int mystrcmp (char*,char*), read1tm (char**,int), mod_evl (char*), fnmsrc_tourk (char*), dspnamsrc_tourk (char*), -+scan1tm (char**,char*,int), modsrc_tourk (char*,int), chk_get_int (char*,unsigned int*,modetyp), pathsrc_tourk (char*), modnamchk (char*), ctov (char), look_cond (int**,int), evlcond (int**), chkchar_getc (FILE*); -+static char codeeval (register char**); -+extern void ERRMOD (unsigned int), ERMOPN (unsigned int), BUGreport (int); -+extern int filnamchk (char*); ++static int mystrcmp FRWNN_PARAMS((char*,char*)), ++ read1tm FRWNN_PARAMS((char**,int)), ++ mod_evl FRWNN_PARAMS((char*)), ++ fnmsrc_tourk FRWNN_PARAMS((char*)), ++ dspnamsrc_tourk FRWNN_PARAMS((char*)), ++ scan1tm FRWNN_PARAMS((char**,char*,int)), ++ modsrc_tourk FRWNN_PARAMS((char*,int)), ++ chk_get_int FRWNN_PARAMS((char*,unsigned int*,modetyp)), ++ pathsrc_tourk FRWNN_PARAMS((char*)), ++ modnamchk FRWNN_PARAMS((char*)), ++ ctov FRWNN_PARAMS((char)), ++ look_cond FRWNN_PARAMS((int**,int)), ++ evlcond FRWNN_PARAMS((int**)), ++ chkchar_getc FRWNN_PARAMS((FILE*)); ++static char codeeval FRWNN_PARAMS((register char**)); ++extern void ERRMOD FRWNN_PARAMS((unsigned int)), ++ ERMOPN FRWNN_PARAMS((unsigned int)), ++ BUGreport FRWNN_PARAMS((int)); ++extern int filnamchk FRWNN_PARAMS((char*)); struct kwdpair { -@@ -122,6 +122,7 @@ +@@ -122,6 +144,7 @@ return (i); ERRMOD (9); /*NOTREACHED*/ -+ return 0; ++ return 0; } /** モード表の読み込み */ ---- Wnn/romkan/rk_read.c -+++ Wnn/romkan/rk_read.c -@@ -51,16 +51,16 @@ +--- FreeWnn-1.1.1-a022.bak/Wnn/romkan/rk_read.c 2005-04-11 00:26:38.000000000 +0900 ++++ FreeWnn-1.1.1-a022/Wnn/romkan/rk_read.c 2013-08-06 23:47:10.950793006 +0900 +@@ -50,17 +50,48 @@ + #include #include "rk_header.h" #include "rk_extvars.h" ++#include "jslib.h" -letter onescan (), *rangekettei (); -char *ename (); -+letter onescan (letter**,letter*), *rangekettei (int,letter*); -+char *ename (char*); ++letter onescan FRWNN_PARAMS((letter**,letter*)), ++ *rangekettei FRWNN_PARAMS((int,letter*)); ++char *ename FRWNN_PARAMS((char*)); -extern letter *ltrgrow (), *ltrend (), letterpick (), *ltr1cut (); -extern char *chrcat (), *strend (); -+extern letter *ltrgrow (letter*,letter*), *ltrend (letter*), letterpick (uns_chr**), *ltr1cut (letter*); -+extern char *chrcat (char*,char), *strend (char*); ++extern letter *ltrgrow FRWNN_PARAMS((letter*,letter*)), ++ *ltrend FRWNN_PARAMS((letter*)), ++ letterpick FRWNN_PARAMS((uns_chr**)), ++ *ltr1cut FRWNN_PARAMS((letter*)); ++extern char *chrcat FRWNN_PARAMS((char*,char)), ++ *strend FRWNN_PARAMS((char*)); -static int termsscan (), evalandcpy (), eval1cpy (), partscan (), evlis (), atermscan (), serfun (), hensrc_tourk (), blankpass (), modsrcL (), chkL_get_int (); -static void ERRLIN (), ERHOPN (), readhyo (), ltr1tostr (), ERRHYO (), vchk (), rangeset (), de_bcksla (), listscan (), singleqscan (), doubleqscan (); -extern void BUGreport (), choosehyo (), readmode (); -extern int ltrcmp (), ltrstrcmp (), readfnm (), fixednamep (); -+static int termsscan (register letter**,letter*,int), evalandcpy (register letter**,int), eval1cpy (letter**,int,int), partscan (register letter**,register letter*), evlis (int,letter**,int), atermscan (register letter**,register letter*,int), serfun (register letter*), hensrc_tourk (letter*,int), blankpass (register letter**,int), modsrcL (letter*), chkL_get_int (letter*,modetyp*,modetyp); -+static void ERRLIN (unsigned int), ERHOPN (unsigned int), readhyo (int), ltr1tostr (letter,char**), ERRHYO (unsigned int), vchk (letter*), rangeset (int,letter*), de_bcksla (char*,char*), listscan (register letter**,register letter*), singleqscan (letter**,letter*), doubleqscan (letter**,letter*); -+extern void BUGreport (int), choosehyo (void), readmode (char*); -+extern int ltrcmp (letter*,letter*), ltrstrcmp (register letter*,register char*), readfnm (int (*readchar_func) (void),int (*unreadc_func) (int),int (*readstr_func) (char**,int),char**,int*), fixednamep (char*); ++static int termsscan FRWNN_PARAMS((register letter**,letter*,int)), ++ evalandcpy FRWNN_PARAMS((register letter**,int)), ++ eval1cpy FRWNN_PARAMS((letter**,int,int)), ++ partscan FRWNN_PARAMS((register letter**,register letter*)), ++ evlis FRWNN_PARAMS((int,letter**,int)), ++ atermscan FRWNN_PARAMS((register letter**,register letter*,int)), ++ serfun FRWNN_PARAMS((register letter*)), ++ hensrc_tourk FRWNN_PARAMS((letter*,int)), ++ blankpass FRWNN_PARAMS((register letter**,int)), ++ modsrcL FRWNN_PARAMS((letter*)), ++ chkL_get_int FRWNN_PARAMS((letter*,modetyp*,modetyp)); ++static void ERRLIN FRWNN_PARAMS((unsigned int)), ++ ERHOPN FRWNN_PARAMS((unsigned int)), ++ readhyo FRWNN_PARAMS((int)), ++ ltr1tostr FRWNN_PARAMS((letter,char**)), ++ ERRHYO FRWNN_PARAMS((unsigned int)), ++ vchk FRWNN_PARAMS((letter*)), ++ rangeset FRWNN_PARAMS((int,letter*)), ++ de_bcksla FRWNN_PARAMS((char*,char*)), ++ listscan FRWNN_PARAMS((register letter**,register letter*)), ++ singleqscan FRWNN_PARAMS((letter**,letter*)), ++ doubleqscan FRWNN_PARAMS((letter**,letter*)); ++extern void BUGreport FRWNN_PARAMS((int)), ++ choosehyo FRWNN_PARAMS((void)), ++ readmode FRWNN_PARAMS((char*)); ++extern int ltrcmp FRWNN_PARAMS((letter*,letter*)), ++ ltrstrcmp FRWNN_PARAMS((register letter*,register char*)), ++ readfnm FRWNN_PARAMS((int (*readchar_func) (void),int (*unreadc_func) (int),int (*readstr_func) (char**,int),char**,int*)), ++ fixednamep FRWNN_PARAMS((char*)); #define IHENSU (1 << 24) /* 内部表現の上位1バイトで、変数を表す */ #define IKANSU (2 << 24) /* 〃 関数を表す */ +--- FreeWnn-1.1.1-a022.bak/Xwnmo/xwnmo/do_socket.c 2013-08-07 06:10:21.520265048 +0900 ++++ FreeWnn-1.1.1-a022/Xwnmo/xwnmo/do_socket.c 2001-06-15 03:16:14.000000000 +0900 +@@ -90,9 +90,9 @@ + XIMCmblk *cblk; + XIMCmblk *cur_cblk = NULL; + +-fd_set *all_socks; +-fd_set *ready_socks; +-static fd_set *dummy1_socks, *dummy2_socks; ++int *all_socks; ++int *ready_socks; ++static int *dummy1_socks, *dummy2_socks; + static int sel_width; + + static int nofile; +@@ -114,14 +114,9 @@ + 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_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) ++#define sock_tst(array,pos) (array[pos/BINTSIZE] & (1<<(pos%BINTSIZE))) + + extern int read (), write (); + diff --git a/FreeWnn-prototypes_3.patch b/FreeWnn-prototypes_3.patch new file mode 100644 index 0000000..0ca851f --- /dev/null +++ b/FreeWnn-prototypes_3.patch @@ -0,0 +1,3825 @@ +From: Mitsutoshi NAKANO +Date: 2013-08-17 14:07:45 +0900 +Subject: input: prototype declarations for reducing compilation warnings +References: http://lists.opensuse.org/opensuse-ja/2013-08/msg00035.html +Upstream: sent + +1. prototype declarations for reducing compilation warnings +2. I found a bug in make_hinsi_list() at Wnn/jserver/hinsi_list.c, + then fixed it . + + + +--- + +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/conv/cvt_key.c FreeWnn-1.1.1-a022.new/Wnn/conv/cvt_key.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/conv/cvt_key.c 2002-05-13 07:47:03.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/conv/cvt_key.c 2013-08-15 08:07:45.978839734 +0900 +@@ -215,7 +215,7 @@ + /** コード変換を伴うキー入力関数 */ + int + keyin1 (get_ch, in_buf) +- int (*get_ch) (); /* getchar() と同様の関数 */ ++ int (*get_ch) (void); /* getchar() と同様の関数 */ + char *in_buf; + { + int ret; +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/conv/cvt_read.c FreeWnn-1.1.1-a022.new/Wnn/conv/cvt_read.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/conv/cvt_read.c 2006-03-05 04:01:45.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/conv/cvt_read.c 2013-08-14 15:44:50.679468396 +0900 +@@ -138,6 +138,8 @@ + #include "wnn_os.h" + #include "cvt_head.h" + ++#include "conv.h" ++ + #define ENTRY_LEN 10 /* コンバート表のエントリ名の最大長 */ + + /* +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/etc/bdic.c FreeWnn-1.1.1-a022.new/Wnn/etc/bdic.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/etc/bdic.c 2005-06-13 02:14:22.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/etc/bdic.c 2013-08-13 15:30:47.558466717 +0900 +@@ -69,6 +69,8 @@ + #include "wnn_os.h" + #include "wnn_string.h" + ++#include "etc.h" ++ + #ifdef JSERVER + # ifndef BDIC_WRITE_CHECK + # define vputc(X, pt) ((pt)? putc((X), (pt)):xputc_cur(X)) +@@ -88,8 +90,8 @@ + #endif /* !JSERVER */ + + #ifndef min +-# define min(a, b) ((a > b)? b:a) +-# define max(a, b) ((a < b)? b:a) ++# define min(a, b) (((a) > (b))? (b) : (a)) ++# define max(a, b) (((a) < (b))? (b) : (a)) + #endif + + /* XXX: function prototypes to be moved to some header file. */ +@@ -142,7 +144,7 @@ + + #ifndef JS + void Get_knj2 (UCHAR* kptr, int kanji2, w_char* kouho, w_char* yomi, w_char* comment); +-void get_kanji_str (UCHAR* kptr, w_char* kanji, w_char* yomi, w_char* comment); ++ + void Get_kanji_str_r (UCHAR* kptr, w_char** tmpk, w_char** tmpy, w_char** tmpc); + UCHAR kanjiaddr (UCHAR* d0, w_char* kanji, w_char* yomi, w_char* comment); + #endif /* !JS */ +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/etc/dic_atojis.c FreeWnn-1.1.1-a022.new/Wnn/etc/dic_atojis.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/etc/dic_atojis.c 2002-07-14 13:26:57.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/etc/dic_atojis.c 2013-08-13 07:41:09.616520023 +0900 +@@ -47,6 +47,8 @@ + #include "wnn_os.h" + #include "wnn_string.h" + ++#include "etc.h" ++ + static int keta_4; + + static w_char _tatojis[] = { +@@ -417,8 +419,6 @@ + w_char *kanji, *comment, *yomi, *oy; + int oyl; + { +- extern void get_kanji_str (); +- + get_kanji_str (kptr, kanji, yomi, comment); + if (kanji) + { +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/etc/gethinsi.c FreeWnn-1.1.1-a022.new/Wnn/etc/gethinsi.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/etc/gethinsi.c 2002-03-24 10:25:13.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/etc/gethinsi.c 2013-08-13 07:50:40.045772351 +0900 +@@ -48,6 +48,7 @@ + #include "hinsi_file.h" + #include "wnn_os.h" + #include "wnn_string.h" ++#include "etc.h" + + /* + wnn_loadhinsi(NULL) 品詞の情報を読み込む +@@ -89,8 +90,7 @@ + extern int wnn_errorno; + + #ifdef JSERVER +-/* must be #include "de_header.h" ? */ +-extern void log_debug (); ++#include "de_header.h" + #define error1 log_debug + #endif + +@@ -298,7 +298,6 @@ + int h; + unsigned short *c; + char tmp[256]; +- extern int wnn_find_hinsi_by_name (); + + if (fname == NULL) + { +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/etc/hindo.c FreeWnn-1.1.1-a022.new/Wnn/etc/hindo.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/etc/hindo.c 2001-06-15 03:15:55.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/etc/hindo.c 2013-08-12 14:24:20.889251190 +0900 +@@ -56,6 +56,9 @@ + 9/1/89 H.T. + */ + ++#include "etc.h" ++ ++ + /** 整数引数の平方根関数。但し引数<0の時のエラーチェックはなし(0を返す)。*/ + static int + isqrt (i) +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/etc/msg.c FreeWnn-1.1.1-a022.new/Wnn/etc/msg.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/etc/msg.c 2013-08-15 14:44:15.323965119 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/etc/msg.c 2013-08-12 11:07:54.192828534 +0900 +@@ -70,10 +70,10 @@ + + static char * + getlang (lang) +- char *lang; ++ const char *lang; + { + static char tmp[32]; +- char *p; ++ const char *p; + int i; + + if (lang == NULL || *lang == '\0') +@@ -258,7 +258,7 @@ + msg_open (name, nlspath, lang) + char *name; + char *nlspath; +- char *lang; ++ const char *lang; + { + struct msg_cat *cd; + +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/etc/pwd.c FreeWnn-1.1.1-a022.new/Wnn/etc/pwd.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/etc/pwd.c 2004-07-13 02:53:02.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/etc/pwd.c 2013-08-15 20:18:34.086149932 +0900 +@@ -46,6 +46,8 @@ + #if HAVE_UNISTD_H + # include + #endif ++#include ++ + #include "commonhd.h" + #include "jslib.h" + #include "wnn_os.h" +@@ -75,7 +77,7 @@ + bzero (encd, WNN_PASSWD_LEN); + return; + } +- x = time (NULL); ++ x = time ((time_t *) NULL); + xx[0] = x & 0x3f; + xx[1] = (x & 0x3f00) >> 8; + xx[2] = '\0'; /* for MD5 (that requires terminator) */ +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/etc/revdic.c FreeWnn-1.1.1-a022.new/Wnn/etc/revdic.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/etc/revdic.c 2004-05-22 01:39:32.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/etc/revdic.c 2013-08-13 08:15:05.777681844 +0900 +@@ -35,10 +35,18 @@ + #include "jh.h" + #include "jdata.h" + ++#include "etc.h" ++ ++void rev_w_char (w_char *, int); ++int rev_ud (struct JT *, int); ++int rev_rd (struct JT *, int); ++int rev_sd (struct JT *, int); ++void rev_common (struct JT *, int); ++ + + #ifndef min +-#define min(a, b) ((a > b)? b:a) +-#define max(a, b) ((a < b)? b:a) ++#define min(a, b) (((a) > (b))? (b) : (a)) ++#define max(a, b) (((a) < (b))? (b) : (a)) + #endif + + +@@ -150,8 +158,8 @@ + + #define match_machine(x) (*(unsigned short *)(x) & 0xff) + +-void travel_next_nodes (); +-void rev_sd_node (); ++void travel_next_nodes (UCHAR *, UCHAR *, int); ++void rev_sd_node (UCHAR *, UCHAR *, int); + + void + rev_sd_hontai0 (hopter, hostart, match) +@@ -321,8 +329,6 @@ + } + } + +-void rev_w_char (); +- + void + rev_kanji (kpter, maxk, match) + UCHAR *kpter; +@@ -361,7 +367,6 @@ + struct JT *jtl; + int match; + { +- extern int rev_ud (), rev_rd (), rev_sd (); + int syurui = jtl->syurui; + + syurui = jtl->syurui & 0xff; +@@ -384,8 +389,6 @@ + return (0); + } + +-void rev_common (); +- + int + rev_ud (jtl, match) + struct JT *jtl; +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/etc/sstrings.c FreeWnn-1.1.1-a022.new/Wnn/etc/sstrings.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/etc/sstrings.c 2002-07-14 13:26:57.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/etc/sstrings.c 2013-08-12 12:00:23.887634044 +0900 +@@ -45,8 +45,7 @@ + #include "wnn_os.h" + #include "wnn_string.h" + +-extern int eeuc_to_ieuc (); +-extern int ieuc_to_eeuc (); ++#include "etc.h" + + int + wnn_sStrcpy (c, w) +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/etc/xutoj.c FreeWnn-1.1.1-a022.new/Wnn/etc/xutoj.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/etc/xutoj.c 2002-03-24 10:25:13.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/etc/xutoj.c 2013-08-15 21:01:52.437163627 +0900 +@@ -42,10 +42,16 @@ + # include + #endif /* STDC_HEADERS */ + ++#if !STDC_HEADERS ++extern char *getenv (const char *); ++#endif /* !STDC_HEADERS */ ++ + #include "commonhd.h" + #include "wnn_config.h" + #include "wnn_os.h" + ++#include "etc.h" ++ + #define ECNS_IS_UCNS 1 /* The trust CNS is CNS11643 based on ISO2022, + but the CNS is binded on EUC */ + +@@ -472,11 +478,10 @@ + + char * + get_cswidth_name (lang) +- register char *lang; ++ const char *lang; + { + register cswidth_name_struct *p; + register char *name; +- extern char *getenv (); + + if (!lang || !*lang) + { +@@ -852,7 +857,7 @@ + #ifdef JIS7 + /* 内部 U-jis を 7bit jis コードに変換します + 文字列の長さを返します */ +-extern int ++int + iujis_to_jis (jis, iujis, iusiz) + unsigned char *jis; /* jisコードになったものをおくbuf */ + w_char *iujis; /* iujisコードのものをおいてくるbuf */ +@@ -894,7 +899,7 @@ + + /* 内部 U-jis を 8bit jis コードに変換します + 文字列の長さを返します */ +-extern int ++int + iujis_to_jis8 (jis, iujis, iusiz) + unsigned char *jis; /* jisコードになったものをおくbuf */ + w_char *iujis; /* iujisコードのものをおいてくるbuf */ +@@ -1126,7 +1131,7 @@ + + /* 外部 U-jis を S-jis コードに変換します + 文字列の長さを返します */ +-extern int ++int + eujis_to_sjis (sjis, eujis, eusiz) + unsigned char *sjis; /* sjisコードになったものをおくbuf */ + unsigned char *eujis; /* eujisコードのものをおいてくるbuf */ +@@ -2220,7 +2225,6 @@ + } + + static int oks_mode = ASCII; /* 出力時のKSCコードのモード */ +-extern int euksc_to_iuksc (); + + static void + ksc_change_mode (mode, new_mode) +@@ -2283,7 +2287,7 @@ + + + /* 外部 U-ksc を ksc コードに変換します */ +-extern int ++int + euksc_to_ksc (ksc, euksc, eusiz) + unsigned char *ksc, *euksc; + int eusiz; +@@ -2341,7 +2345,7 @@ + } + + /* 内部 U-ksc を 外部 U-ksc コードに変換します */ +-extern int ++int + iuksc_to_euksc (euksc, iuksc, iusiz) + unsigned char *euksc; + w_char *iuksc; +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/etc/yincoding.c FreeWnn-1.1.1-a022.new/Wnn/etc/yincoding.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/etc/yincoding.c 2005-04-11 00:26:37.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/etc/yincoding.c 2013-08-15 11:27:09.809902791 +0900 +@@ -50,6 +50,8 @@ + #include "jh.h" + #include "wnn_string.h" + ++#include "etc.h" ++ + extern char *py_table[]; + extern char *zy_table[]; + unsigned char last_mark; /* Using to reme previous auto_state() */ +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/include/conv.h FreeWnn-1.1.1-a022.new/Wnn/include/conv.h +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/include/conv.h 1970-01-01 09:00:00.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/include/conv.h 2013-08-14 19:51:33.191546415 +0900 +@@ -0,0 +1,15 @@ ++#ifndef FRWNN_CONV_H ++#define FRWNN_CONV_H 1 ++ ++#if __STDC__ ++#define FRWNN_PARAMS(paramlist) paramlist ++#else ++#define FRWNN_PARAMS(paramlist) () ++#endif /* __STDC__ */ ++ ++extern int convert_key_setup FRWNN_PARAMS((char *, int)); ++#ifdef TERMCAP ++extern int convert_getterm FRWNN_PARAMS((char *termname, int flg)); ++#endif /* TERMCAP */ ++ ++#endif /* FRWNN_CONV_H */ +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/include/etc.h FreeWnn-1.1.1-a022.new/Wnn/include/etc.h +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/include/etc.h 1970-01-01 09:00:00.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/include/etc.h 2013-08-15 23:50:42.008217016 +0900 +@@ -0,0 +1,185 @@ ++#ifndef FRWNN_ETC_H ++#define FRWNN_ETC_H 1 ++ ++#include "commonhd.h" ++#include "jlib.h" ++#include "jdata.h" ++#include "rk_spclval.h" ++ ++ ++#if __STDC__ ++#define FRWNN_PARAMS(paramlist) paramlist ++#else ++#define FRWNN_PARAMS(paramlist) () ++#endif /* __STDC__ */ ++ ++/* gethinsi.c */ ++extern int wnn_find_hinsi_by_name FRWNN_PARAMS((register char *c)); ++ ++ ++/* xutoj.c */ ++extern int through FRWNN_PARAMS((char *, char *, int)); ++extern int flush_designate FRWNN_PARAMS((w_char *)); ++extern int extc_to_intc FRWNN_PARAMS((w_char *, unsigned char *, int)); ++extern int ibit8_to_ebit8 FRWNN_PARAMS((unsigned char *, w_char *, int)); ++extern unsigned int create_cswidth FRWNN_PARAMS((char *s)); ++extern void set_cswidth FRWNN_PARAMS((register unsigned int)); ++extern char *get_cswidth_name FRWNN_PARAMS((const char *)); ++extern int get_cswidth FRWNN_PARAMS((int)); ++extern int get_cswidth_by_char FRWNN_PARAMS((register unsigned char)); ++extern int get_cs_mask FRWNN_PARAMS((int)); ++extern int columnlen FRWNN_PARAMS((unsigned char *)); ++extern int columnlen_w FRWNN_PARAMS((w_char *)); ++extern int ieuc_to_eeuc FRWNN_PARAMS((unsigned char *, w_char *, int)); ++extern int eeuc_to_ieuc FRWNN_PARAMS((w_char *, unsigned char *, register int)); ++#ifdef nodef ++extern void wnn_delete_ss2 FRWNN_PARAMS((register unsigned int *, register int n)); ++extern int wnn_byte_count FRWNN_PARAMS((register int)); ++#endif /* nodef */ ++extern void wnn_delete_w_ss2 FRWNN_PARAMS((register w_char *, register int)); ++#ifdef JAPANESE ++#ifdef JIS7 ++extern int iujis_to_jis FRWNN_PARAMS((unsigned char *, w_char *, int)); ++extern int eujis_to_jis FRWNN_PARAMS((unsigned char *, unsigned char *, int)); ++extern int sjis_to_jis FRWNN_PARAMS((unsigned char *, unsigned char *, int)); ++#endif /* JIS7 */ ++extern int eujis_to_jis8 FRWNN_PARAMS((unsigned char *, unsigned char *, int)); ++extern int iujis_to_jis8 FRWNN_PARAMS((unsigned char *, w_char *, int)); ++extern int jis_to_eujis FRWNN_PARAMS((unsigned char *, unsigned char *, int)); ++extern int eujis_to_sjis FRWNN_PARAMS((unsigned char *, unsigned char *, int)); ++extern int iujis_to_sjis FRWNN_PARAMS((unsigned char *, w_char *, int)); ++extern int sjis_to_iujis FRWNN_PARAMS((w_char *, unsigned char *, int)); ++extern int sjis_to_eujis FRWNN_PARAMS((unsigned char *, unsigned char *, int)); ++extern int sjis_to_jis8 FRWNN_PARAMS((unsigned char *, unsigned char *, int)); ++extern int jis_to_iujis FRWNN_PARAMS((w_char *, unsigned char *, int)); ++extern int jis_to_sjis FRWNN_PARAMS((unsigned char *, unsigned char *, int)); ++extern int eujis_to_iujis FRWNN_PARAMS((w_char *, unsigned char *, int)); ++#endif /* JAPANESE */ ++#ifdef CHINESE ++extern int ecns_to_icns FRWNN_PARAMS((w_char *, unsigned char *, int)); ++extern int icns_to_ecns FRWNN_PARAMS((unsigned char *, w_char *, int)); ++extern int icns_to_big5 FRWNN_PARAMS((unsigned char *, w_char *, int)); ++extern int ecns_to_big5 FRWNN_PARAMS((unsigned char *, unsigned char *, int)); ++extern int big5_to_icns FRWNN_PARAMS((w_char *, unsigned char *, int)); ++extern int big5_to_ecns FRWNN_PARAMS((unsigned char *, unsigned char *, int)); ++extern int iugb_to_eugb FRWNN_PARAMS((unsigned char *, w_char *, int)); ++extern int eugb_to_iugb FRWNN_PARAMS((w_char *, unsigned char *, int)); ++#endif /* CHINESE */ ++#ifdef KOREAN ++extern int iuksc_to_ksc FRWNN_PARAMS((unsigned char *, w_char *, int)); ++extern int euksc_to_ksc FRWNN_PARAMS((unsigned char *, unsigned char *, int)); ++extern int iuksc_to_euksc FRWNN_PARAMS((unsigned char *, w_char *, int)); ++extern int ksc_to_euksc FRWNN_PARAMS((unsigned char *, unsigned char *, int)); ++extern int ksc_to_iuksc FRWNN_PARAMS((w_char *, unsigned char *, int)); ++extern int euksc_to_iuksc FRWNN_PARAMS((w_char *, unsigned char *, int)); ++#endif /* KOREAN */ ++ ++/* hindo.c */ ++extern int asshuku FRWNN_PARAMS((int)); ++extern int motoni2 FRWNN_PARAMS((int)); ++ ++/* gethinsi.c */ ++extern int wnn_loadhinsi FRWNN_PARAMS((unsigned char *fname)); ++#ifdef JSERVER ++extern w_char *wnn_hinsi_name FRWNN_PARAMS((int)); ++extern int wnn_hinsi_number FRWNN_PARAMS((w_char *)); ++extern int wnn_hinsi_list FRWNN_PARAMS((w_char *, w_char **, struct wnn_hinsi_node *, int)); ++extern int wnn_has_hinsi FRWNN_PARAMS((struct wnn_hinsi_node *, int, w_char *)); ++#endif /* JSERVER */ ++extern int wnn_find_hinsi_by_name FRWNN_PARAMS((register char *)); ++extern char *wnn_get_hinsi_name FRWNN_PARAMS((int)); ++#ifdef JSERVER ++extern int wnn_get_fukugou_component_body FRWNN_PARAMS((register int, register unsigned short **)); ++#endif /* JSERVER */ ++extern int wnn_get_fukugou_component FRWNN_PARAMS((register int, register unsigned short **)); ++ ++/* dic_atojis.c */ ++extern void Get_kanji FRWNN_PARAMS((UCHAR *, w_char *, int, w_char *, w_char *, w_char *)); ++extern void Get_knj1 FRWNN_PARAMS((UCHAR *, w_char *, int, int, w_char *, w_char *, w_char *)); ++extern int substr FRWNN_PARAMS((char *, w_char *)); ++extern w_char *kanji_giji_str FRWNN_PARAMS((w_char *, int, w_char *, w_char *)); ++extern void kanji_esc_str FRWNN_PARAMS((w_char *, w_char *, int oyl)); ++ ++ ++/* bdic.c */ ++#ifndef JS ++extern int put_n_EU_str FRWNN_PARAMS((FILE* ofpter, w_char* c, int n)); ++extern int put_null FRWNN_PARAMS((FILE* ofpter, int n)); ++extern int put_nstring FRWNN_PARAMS((FILE* ofpter, char* c, int n)); ++extern int put_n_EU_str FRWNN_PARAMS((FILE* ofpter, w_char* c, int n)); ++extern int put_short FRWNN_PARAMS((FILE* ofpter, int i)); ++extern int put_int FRWNN_PARAMS((FILE* ofpter, int i)); ++extern int get_null FRWNN_PARAMS((FILE* ifpter, int n)); ++extern int get_nstring FRWNN_PARAMS((FILE* ifpter, int n, char* st)); ++extern int get_int FRWNN_PARAMS((int* ip, FILE* ifpter)); ++#ifdef BDIC_WRITE_CHECK ++extern void check_backup FRWNN_PARAMS((char* n)); ++extern void delete_tmp_file FRWNN_PARAMS((char* n)); ++extern char* make_backup_file FRWNN_PARAMS((char* n)); ++extern char* make_tmp_file FRWNN_PARAMS((char* n, int copy, FILE** ret_fp)); ++extern void move_tmp_to_org FRWNN_PARAMS((char* tmp_name, char* org_name, int copy)); ++#endif /* BDIC_WRITE_CHECK */ ++ ++extern int create_file_header FRWNN_PARAMS((FILE* ofpter, int file_type, char* file_passwd)); ++extern int output_file_header FRWNN_PARAMS((FILE* ofpter, struct wnn_file_head* hp)); ++extern int input_file_header FRWNN_PARAMS((FILE* ifpter, struct wnn_file_head* hp)); ++extern int output_file_uniq FRWNN_PARAMS((struct wnn_file_uniq* funiq, FILE* ofpter)); ++extern int input_file_uniq FRWNN_PARAMS((struct wnn_file_uniq* funiq, FILE* ifpter)); ++extern int check_inode FRWNN_PARAMS((FILE* f, struct wnn_file_head* fh)); ++extern int change_file_uniq FRWNN_PARAMS((struct wnn_file_head* fh, char* n)); ++extern int change_file_uniq1 FRWNN_PARAMS(( ++ FILE* ofpter, int file_type, char* file_passwd, ++ struct wnn_file_uniq* file_uniq)); ++ ++#ifdef JSERVER ++int f_uniq_cmp FRWNN_PARAMS((struct wnn_file_uniq *a, struct wnn_file_uniq* b)); ++#endif /* JSERVER */ ++ ++#if !defined(JSERVER) ++void vputs FRWNN_PARAMS((char* c, FILE* fp)); ++int vputws FRWNN_PARAMS((w_char* w, FILE* fp)); ++int put_yomi_str FRWNN_PARAMS((w_char* yomi, FILE* ofpter)); ++#endif /* !JSERVER */ ++ ++void Get_knj2 FRWNN_PARAMS((UCHAR* kptr, int kanji2, w_char* kouho, w_char* yomi, w_char* comment)); ++void Get_kanji_str_r FRWNN_PARAMS((UCHAR* kptr, w_char** tmpk, w_char** tmpy, w_char** tmpc)); ++UCHAR kanjiaddr FRWNN_PARAMS((UCHAR* d0, w_char* kanji, w_char* yomi, w_char* comment)); ++extern int create_null_dic FRWNN_PARAMS(( ++ char* fn, w_char* comm, char* passwd, char* hpasswd, int which)); ++extern int create_hindo_file FRWNN_PARAMS(( ++ struct wnn_file_uniq* funiq, ++ char* fn, w_char* comm, char* passwd, int serial)); ++ ++/* XXX: input_* are not used in JSlib */ ++extern int input_header_jt FRWNN_PARAMS((FILE* ifpter, struct JT* jt1)); ++extern int output_header_jt FRWNN_PARAMS((FILE* ofpter, struct JT* jt1)); ++extern int input_header_hjt FRWNN_PARAMS((FILE* ifpter, struct HJT* hjt1)); ++extern int output_header_hjt FRWNN_PARAMS((FILE* ofpter, struct HJT* hjt1)); ++ ++#if !defined(JSERVER) ++/* Only used in JUTIL */ ++void Print_entry FRWNN_PARAMS(( ++ w_char* yomi, w_char* kstr, w_char* cstr, ++ int hindo, int ima, int hinsi, int serial, ++ FILE* ofpter, int esc_exp)); ++#endif /* !JSERVER */ ++ ++#endif /* ndef JS */ ++extern void udytoS FRWNN_PARAMS((w_char* yomi, int tnum, char* hostart, struct uind1 * tary)); ++extern void get_kanji_str FRWNN_PARAMS((UCHAR*, w_char*, w_char*, w_char*)); ++ ++/* revdic.c */ ++extern int little_endian (); ++extern int revdic FRWNN_PARAMS((struct JT *, int)); ++ ++/* yincoding.c */ ++extern int cwnn_pzy_yincod FRWNN_PARAMS((letter *, letter *, int)); ++#ifdef CHINESE ++extern void cwnn_zy_str_analysis FRWNN_PARAMS((register char *, register char *, w_char *, w_char *)); ++extern void cwnn_py_str_analysis FRWNN_PARAMS((register char *, register char *, register w_char *, register w_char *)); ++#endif /* CHINESE */ ++#ifdef CONVERT_with_SiSheng ++extern int cwnn_yincod_pzy_str FRWNN_PARAMS((register w_char *, register w_char *, int, int)); ++#endif /* CONVERT_with_SiSheng */ ++ ++#endif /* FRWNN_ETC_H */ +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/include/jdata.h FreeWnn-1.1.1-a022.new/Wnn/include/jdata.h +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/include/jdata.h 2005-04-11 00:26:37.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/include/jdata.h 2013-08-12 19:51:54.412492124 +0900 +@@ -33,6 +33,8 @@ + #ifndef WNN_JDATA_H + #define WNN_JDATA_H + ++#include "jslib.h" ++ + #ifndef JS + struct jdata + { +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/include/jlib_hide.h FreeWnn-1.1.1-a022.new/Wnn/include/jlib_hide.h +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/include/jlib_hide.h 1970-01-01 09:00:00.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/include/jlib_hide.h 2013-08-13 11:09:17.978796990 +0900 +@@ -0,0 +1,19 @@ ++#ifndef FRWNN_JLIB_HIDE_H ++#define FRWNN_JLIB_HIDE_H 1 ++ ++#include "jslib.h" ++ ++/* defined in jlib/js.c */ ++#if DEBUG ++extern void xerror FRWNN_PARAMS((char *)); ++extern void dmp FRWNN_PARAMS((char *, int)); ++#endif /* DEBUG */ ++ ++ ++#ifdef nodef ++extern void js_set_lang FRWNN_PARAMS((struct wnn_env *, register char *)); ++#endif /* nodef */ ++ ++extern char *_wnn_get_machine_of_serv_defs FRWNN_PARAMS((const char *)); ++ ++#endif /* FRWNN_JLIB_HIDE_H */ +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/include/jllib.h FreeWnn-1.1.1-a022.new/Wnn/include/jllib.h +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/include/jllib.h 2013-08-15 14:44:15.359965120 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/include/jllib.h 2013-08-11 22:53:36.961715350 +0900 +@@ -254,7 +254,7 @@ + /* Note: FRWNN_PARAMS is defined in jslib.h . */ + + extern struct wnn_buf *jl_open_lang FRWNN_PARAMS((const char *, const char *, const char *, const char *, int (*) (const char *), int (*) (const char *), int)); +-extern struct wnn_env *jl_connect_lang FRWNN_PARAMS((register const char *, register const char *, register const char *, register const char *, int (*) (const char *), int (*) (const char *), int timeout)); ++extern struct wnn_env *jl_connect_lang FRWNN_PARAMS((const register char *, const register char *, const register char *, const register char *, int (*) (const char *), int (*) (const char *), int timeout)); + extern struct wnn_env *jl_env_get FRWNN_PARAMS((register struct wnn_buf *buf)); + extern struct wnn_jdata *jl_word_info_e FRWNN_PARAMS((register struct wnn_env *env, int dic_no, int entry)); + extern w_char *jl_hinsi_name_e FRWNN_PARAMS((register struct wnn_env *env, register int no)); +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/include/jslib.h FreeWnn-1.1.1-a022.new/Wnn/include/jslib.h +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/include/jslib.h 2013-08-15 14:44:15.359965120 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/include/jslib.h 2013-08-11 23:22:11.327609490 +0900 +@@ -416,10 +416,10 @@ + #define js_connect(server,env_name) js_connect_lang((server), (env_name), "ja") + + +-extern WNN_JSERVER_ID *js_open_lang FRWNN_PARAMS((register char *server, register char *lang, register int timeout)); ++extern WNN_JSERVER_ID *js_open_lang FRWNN_PARAMS((const register char *server, const register char *lang, register int timeout)); + extern int js_close FRWNN_PARAMS((WNN_JSERVER_ID *server)); + /* extern WNN_JSERVER_ID *js_change_current_jserver (); */ /* Not exist? */ +-extern struct wnn_env *js_connect_lang FRWNN_PARAMS((WNN_JSERVER_ID *server, register char *env_name, char *lang)); ++extern struct wnn_env *js_connect_lang FRWNN_PARAMS((WNN_JSERVER_ID *server, const register char *env_name, const char *lang)); + extern int js_disconnect FRWNN_PARAMS((register struct wnn_env *env)); + extern int js_env_list FRWNN_PARAMS((WNN_JSERVER_ID *server, struct wnn_ret_buf *ret)); + extern int js_param_set FRWNN_PARAMS((struct wnn_env *env, register struct wnn_param *para)); +@@ -435,7 +435,7 @@ + extern int js_dic_list FRWNN_PARAMS((struct wnn_env *env, struct wnn_ret_buf *ret)); + extern int js_dic_list_all FRWNN_PARAMS((WNN_JSERVER_ID *server, struct wnn_ret_buf *ret)); + extern int js_dic_use FRWNN_PARAMS((struct wnn_env *env, int dic_no, int flag)); +-extern int js_env_exist FRWNN_PARAMS((register WNN_JSERVER_ID *server, register char *env_name)); ++extern int js_env_exist FRWNN_PARAMS((register WNN_JSERVER_ID *server, const register char *env_name)); + extern int js_env_sticky FRWNN_PARAMS((register struct wnn_env *env)); + extern int js_env_un_sticky FRWNN_PARAMS((register struct wnn_env *env)); + extern int js_file_comment_set FRWNN_PARAMS((struct wnn_env *env, int fid, w_char *comment)); +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/include/jutil.h FreeWnn-1.1.1-a022.new/Wnn/include/jutil.h +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/include/jutil.h 1970-01-01 09:00:00.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/include/jutil.h 2013-08-13 20:02:09.558498371 +0900 +@@ -0,0 +1,81 @@ ++#ifndef FRWNN_JUTIL_H ++#define FRWNN_JUTIL_H 1 ++ ++#include ++ ++#if __STDC__ ++#define FRWNN_PARAMS(paramlist) paramlist ++#else ++#define FRWNN_PARAMS(paramlist) () ++#endif /* __STDC__ */ ++ ++/* -- macro -- */ ++/* ujisf.c */ ++#define WNN_HINSI_LEN 4096 ++ ++/* -- extern -- */ ++/* wdreg.c */ ++extern struct JT jt; ++/* ujisf.c */ ++extern w_char file_comment[WNN_COMMENT_LEN]; ++extern w_char hinsi_list[WNN_HINSI_LEN]; ++extern struct je **jeary; ++extern int wnnerror; ++extern int lc; ++#ifdef CHINESE ++extern int pzy_flag; ++#endif /* CHINESE */ ++ ++/* atod.c */ ++ ++/* -- function -- */ ++/* ujisf.c */ ++extern int init_heap FRWNN_PARAMS((int, int, int, int, FILE *)); ++extern void exit1 (); ++extern int get_line FRWNN_PARAMS((register char *)); ++extern void unget_line FRWNN_PARAMS((char *)); ++extern char *get_string FRWNN_PARAMS((register char *, char *)); ++extern void bad_line FRWNN_PARAMS((char *)); ++extern void error_no_heap FRWNN_PARAMS((void)); ++extern int w_stradd FRWNN_PARAMS((register w_char *, register w_char **)); ++ ++#ifdef CHINESE ++extern void ujis_header FRWNN_PARAMS((int *)); ++#else ++extern void ujis_header FRWNN_PARAMS((void)); ++#endif /* CHINESE */ ++ ++extern void read_ujis FRWNN_PARAMS((int, int, int)); ++extern void reverse_yomi FRWNN_PARAMS((void)); ++extern void print_je FRWNN_PARAMS((register struct je *, register FILE *, int, int)); ++#ifdef nodef ++extern kprint FRWNN_PARAMS((register FILE *, register w_char *)); ++#endif /* nodef */ ++extern void output_ujis FRWNN_PARAMS((register FILE *, int, int)); ++extern int init_heap FRWNN_PARAMS((int, int, int, int, FILE *)); ++extern void init_jeary FRWNN_PARAMS((void)); ++extern void exit1 FRWNN_PARAMS((void)); ++extern int sort_func_je FRWNN_PARAMS((char *, char *)); ++extern int sort_func_je_kanji FRWNN_PARAMS((char *, char *)); ++extern int sort_func FRWNN_PARAMS((register char *, register char *, int)); ++extern void sort FRWNN_PARAMS((void)); ++extern void sort_if_not_sorted FRWNN_PARAMS((void)); ++extern void sort_kanji FRWNN_PARAMS((void)); ++extern void uniq_je FRWNN_PARAMS((int (*) ())); ++#ifdef nodef ++extern int make_kanji_str FRWNN_PARAMS((register UCHAR *, register UCHAR *)); ++#endif /* nodef */ ++extern int Sorted FRWNN_PARAMS((register char *, register int, int, int (*) ())); ++extern int is_katakana FRWNN_PARAMS((register char *, register char *)); ++ ++/* dic_head.c */ ++/* extern int output_header FRWNN_PARAMS((FILE *, struct JT *, struct wnn_file_head *)); */ ++extern int input_header FRWNN_PARAMS((FILE *, struct JT *, struct wnn_file_head *)); ++extern int input_hindo_header FRWNN_PARAMS((FILE *, struct HJT *, struct wnn_file_head *)); ++ ++/* atod.c */ ++extern void upd_kanjicount FRWNN_PARAMS((int)); ++extern void output_dic_data FRWNN_PARAMS((void)); ++ ++ ++#endif /* FRWNN_JUTIL_H */ +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/include/msg.h FreeWnn-1.1.1-a022.new/Wnn/include/msg.h +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/include/msg.h 2013-08-15 14:44:15.374965120 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/include/msg.h 2013-08-12 10:24:11.899296971 +0900 +@@ -70,7 +70,7 @@ + #define FRWNN_PARAMS(paramlist) () + #endif + +-extern struct msg_cat *msg_open FRWNN_PARAMS((char *, char *, char *)); ++extern struct msg_cat *msg_open FRWNN_PARAMS((char *, char *, const char *)); + extern char *msg_get FRWNN_PARAMS((struct msg_cat *, int id, char *, register char *lang)); + extern void msg_close FRWNN_PARAMS((register struct msg_cat *)); + +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/include/romkan.h FreeWnn-1.1.1-a022.new/Wnn/include/romkan.h +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/include/romkan.h 1970-01-01 09:00:00.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/include/romkan.h 2013-08-14 15:24:52.534462081 +0900 +@@ -0,0 +1,13 @@ ++#ifndef FRWNN_ROMKAN_H ++#define FRWNN_ROMKAN_H 1 ++ ++#if __STDC__ ++#define FRWNN_PARAMS(paramlist) paramlist ++#else ++#define FRWNN_PARAMS(paramlist) () ++#endif /* __STDC__ */ ++ ++ ++extern void romkan_set_lang FRWNN_PARAMS((char *lang)); ++ ++#endif /* FRWNN_ROMKAN_H */ +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jlib/jl.c FreeWnn-1.1.1-a022.new/Wnn/jlib/jl.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jlib/jl.c 2013-08-15 14:44:15.360965120 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jlib/jl.c 2013-08-12 10:10:30.689347679 +0900 +@@ -67,6 +67,9 @@ + #include "jd_sock.h" + #include "jslib.h" + #include "jllib.h" ++ ++#include "jlib_hide.h" ++ + #include "msg.h" + #include "wnn_string.h" + #include "wnn_os.h" +@@ -130,42 +133,43 @@ + + int confirm_state; + +-static void add_down_bnst (); +-static int alloc_heap (); ++static void add_down_bnst FRWNN_PARAMS((register struct wnn_buf *, register int, register WNN_BUN *)); ++static int alloc_heap FRWNN_PARAMS((struct wnn_buf *, register int)); + static int call_error_handler FRWNN_PARAMS((int (*) (const char *), const char *)); +-static int change_ascii_to_int (); +-static int create_file (); +-static int dai_end (); +-static int expand_expr (); +-static int expand_expr_all (); +-static int file_discard (); +-static int file_exist (); +-static int file_read (); +-static int file_remove (); +-static int find_same_kouho (); +-static int find_same_kouho_dai (); +-static void free_bun (); +-static void free_down (); +-static void free_sho (); +-static void free_zenkouho (); +-static int get_c_jikouho (); +-static int get_c_jikouho_dai (); +-static int get_c_jikouho_from_zenkouho (); +-static int get_c_jikouho_from_zenkouho_dai (); +-static int get_pwd (); +-static int insert_dai (); +-static int insert_sho (); +-static int make_dir1 (); +-static int make_dir_rec1 (); +-static void make_space_for (); +-static void make_space_for_bun (); +-static void make_space_for_zenkouho (); +-static void message_out (int (*) (const char *), const char *, ...); +-static int ren_conv1 (); +-static void set_dai (); +-static void set_sho (); +-static int tan_conv1 (); +- ++static int change_ascii_to_int FRWNN_PARAMS((register char *, int *)); ++static int create_file FRWNN_PARAMS((register struct wnn_env *, char *, int, int, char *, char *, int (*) (const char *), int (*) (const char *))); ++static int dai_end FRWNN_PARAMS((register struct wnn_buf *, register int)); ++static int expand_expr FRWNN_PARAMS((register char *, struct wnn_env *)); ++static int expand_expr_all FRWNN_PARAMS((register char *, struct wnn_env *)); ++static int file_discard FRWNN_PARAMS((register struct wnn_env *, register int)); ++static int file_exist FRWNN_PARAMS((struct wnn_env *, char *)); ++static int file_read FRWNN_PARAMS((struct wnn_env *, char *)); ++static int file_remove FRWNN_PARAMS((register WNN_JSERVER_ID *, char *, char *)); ++static int find_same_kouho FRWNN_PARAMS((struct wnn_sho_bunsetsu *, register WNN_BUN **, register WNN_BUN **, int level)); ++static int find_same_kouho_dai FRWNN_PARAMS((struct wnn_dai_bunsetsu *, struct wnn_buf *, int, int)); ++static void free_bun FRWNN_PARAMS((struct wnn_buf *, register int, register int)); ++static void free_down FRWNN_PARAMS((struct wnn_buf *, int, int)); ++static void free_sho FRWNN_PARAMS((register struct wnn_buf *, WNN_BUN **)); ++static void free_zenkouho FRWNN_PARAMS((register struct wnn_buf *)); ++static int get_c_jikouho FRWNN_PARAMS((struct wnn_sho_bunsetsu *, int, WNN_BUN *)); ++static int get_c_jikouho_dai FRWNN_PARAMS((struct wnn_dai_bunsetsu *, int, WNN_BUN **, int)); ++static int get_c_jikouho_from_zenkouho FRWNN_PARAMS((struct wnn_buf *, WNN_BUN *)); ++static int get_c_jikouho_from_zenkouho_dai FRWNN_PARAMS((struct wnn_buf *, WNN_BUN *)); ++static int get_pwd FRWNN_PARAMS((register char *, register char *)); ++static int insert_dai FRWNN_PARAMS((struct wnn_buf *buf, int zenp, int bun_no, int bunno2, struct wnn_dai_bunsetsu *dp, int dcnt, int uniq_level)); ++static int insert_sho FRWNN_PARAMS((struct wnn_buf *, int, int, int, register struct wnn_sho_bunsetsu *, int, int)); ++ ++static int make_dir1 FRWNN_PARAMS((register struct wnn_env *, register char *, int (*) (const char *), int (*) (const char *))); ++ ++static int make_dir_rec1 FRWNN_PARAMS((struct wnn_env *, register char *, int (*) (const char *), int (*) (const char *))); ++static void make_space_for FRWNN_PARAMS((register struct wnn_buf *, int , int , int, int)); ++static void make_space_for_bun FRWNN_PARAMS((register struct wnn_buf *, int, int, int)); ++static void make_space_for_zenkouho FRWNN_PARAMS((struct wnn_buf *, int, int, register int)); ++static void message_out FRWNN_PARAMS((int (*) (const char *), const char *, ...)); ++static int ren_conv1 FRWNN_PARAMS((register struct wnn_buf *, w_char *, register int, register int, int)); ++static void set_dai FRWNN_PARAMS((register WNN_BUN **, register WNN_BUN **, register int)); ++static void set_sho FRWNN_PARAMS((register WNN_BUN *b, register WNN_BUN **p)); ++static int tan_conv1 FRWNN_PARAMS((register struct wnn_buf *, w_char *, register int, register int, int, int)); + /* + * Sub-routines to handle files, enviroments and connections. + */ +@@ -436,7 +440,7 @@ + + struct wnn_env * + jl_connect_lang (env_n, server_n, lang, wnnrc_n, error_handler, message_handler, timeout) +- register const char *env_n, *server_n, *wnnrc_n, *lang; ++ const register char *env_n, *server_n, *wnnrc_n, *lang; + int (*error_handler) (const char *), (*message_handler) (const char *); + int timeout; + { +@@ -446,8 +450,6 @@ + char p_lang[16]; + register char *p; + const char *l; +- extern char *getenv (); +- extern char *_wnn_get_machine_of_serv_defs (); + + wnn_errorno = 0; + /* if lang not specified use $LANG */ +@@ -1535,7 +1537,7 @@ + /* + "辞書ファイル \"%s\" が無いよ。作る?(Y/N)", + */ +- if (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) +@@ -1574,7 +1576,7 @@ + /* + "頻度ファイル \"%s\" が無いよ。作る?(Y/N)", + */ +- if (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); +@@ -1619,7 +1621,7 @@ + if_dead_disconnect (env, -1); + if (file_remove (env->js_id, hindo_name, hpwd) == -1) + if_dead_disconnect (env, -1); +- if (create_file (env, hindo_name, HINDO, fid, NULL, pwd_hindo, WNN_CREATE, message_handler) == -1) ++ if (create_file (env, hindo_name, HINDO, fid, NULL, pwd_hindo, (int (*) (const char *)) WNN_CREATE, message_handler) == -1) + return (-1); + if ((hfid = file_read (env, hindo_name)) == -1) + if_dead_disconnect (env, -1); +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jlib/js.c FreeWnn-1.1.1-a022.new/Wnn/jlib/js.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jlib/js.c 2013-08-15 14:44:15.340965120 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jlib/js.c 2013-08-12 10:59:16.905860476 +0900 +@@ -88,6 +88,9 @@ + + #include "wnnerror.h" + #include "jslib.h" ++ ++#include "jlib_hide.h" ++ + #include "jh.h" + + #include "msg.h" +@@ -128,12 +131,13 @@ + #endif /* defined(EAGAIN) */ + + static void connect_timeout (); +-static int _get_server_name (); +-static int writen (); +-static char *get_unixdomain_of_serv_defs (), *get_service_of_serv_defs (); +-static int get_port_num_of_serv_defs (); ++static int _get_server_name FRWNN_PARAMS((const char *, char *)); ++static int writen FRWNN_PARAMS((int)); ++static char *get_unixdomain_of_serv_defs FRWNN_PARAMS((const char *lang)); ++static char *get_service_of_serv_defs FRWNN_PARAMS((const char *)); ++static int get_port_num_of_serv_defs FRWNN_PARAMS((const char *)); + #if DEBUG +-void xerror (); ++void xerror FRWNN_PARAMS((const char *)); + #endif + + /********* V4 *****************/ +@@ -398,7 +402,7 @@ + /* get server name and return serverNo */ + static int + _get_server_name (server, pserver) +- char *server; ++ const char *server; + char *pserver; + { + register char *p; +@@ -431,7 +435,7 @@ + } + + /* Packet SND/RCV subroutines */ +-static void put4com (); ++static void put4com FRWNN_PARAMS((int)); + + /** パケットのヘッダーを送る **/ + static void +@@ -560,7 +564,7 @@ + /** サーバへ文字列を送る **/ + static void + putscom (p) +- register char *p; ++ const register char *p; + { + if (p == NULL) + { +@@ -690,7 +694,7 @@ + #if DEBUG + void + xerror (s) +- char *s; ++ const char *s; + { + fprintf (stderr, "%s\n", s); + } +@@ -742,7 +746,7 @@ + /** jserver と接続する。jserver_id を返す。 **/ + WNN_JSERVER_ID * + js_open_lang (server, lang, timeout) +- register char *server, *lang; ++ const register char *server, *lang; + register int timeout; + { + char *new_js; +@@ -863,9 +867,9 @@ + + struct wnn_env * + js_connect_lang (server, env_name, lang) +- register char *env_name; ++ const register char *env_name; + WNN_JSERVER_ID *server; +- char *lang; ++ const char *lang; + { + register int e_id; + register struct wnn_env *env; +@@ -925,7 +929,7 @@ + + int + js_env_exist (server, env_name) +- register char *env_name; ++ const register char *env_name; + register WNN_JSERVER_ID *server; + { + set_current_js (server); +@@ -1137,7 +1141,7 @@ + } + + /** js_file_list_all **/ +-static int rcv_file_list (); ++static int rcv_file_list FRWNN_PARAMS((struct wnn_ret_buf *)); + + int + js_file_list_all (server, ret) +@@ -1167,7 +1171,7 @@ + return rcv_file_list (ret); + } + +-static void re_alloc (); ++static void re_alloc FRWNN_PARAMS((register struct wnn_ret_buf *, int)); + + static int + rcv_file_list (ret) +@@ -1257,8 +1261,8 @@ + } + + /** js_file_loaded_local **/ +-static int check_local_file (); +-static int file_loaded_local (); ++static int check_local_file FRWNN_PARAMS((char *)); ++static int file_loaded_local FRWNN_PARAMS((char *)); + + int + js_file_loaded_local (server, path) +@@ -1485,7 +1489,7 @@ + + /** js_file_receive **/ + static int xget1com (); +-static void xput1com (); ++static void xput1com FRWNN_PARAMS((int)); + + int + js_file_receive (env, fid, fn) +@@ -1853,8 +1857,8 @@ + } + + /** js_dic_list_all **/ +-static int rcv_dic_list (); +-static void get_dic_info (); ++ static int rcv_dic_list FRWNN_PARAMS((struct wnn_ret_buf *ret)); ++ static void get_dic_info FRWNN_PARAMS((register WNN_DIC_INFO *dic)); + + int + js_dic_list_all (server, ret) +@@ -1980,7 +1984,7 @@ + + + /** js_word_search **/ +-static int rcv_word_data (); ++static int rcv_word_data FRWNN_PARAMS((struct wnn_ret_buf *, w_char *)); + + int + js_word_search (env, dic_no, yomi, ret) +@@ -2282,10 +2286,9 @@ + /** + kanren + **/ +-static int rcv_dai (); +-static void rcv_sho_x (); +-static void rcv_sho_kanji (); +- ++static int rcv_dai FRWNN_PARAMS((struct wnn_ret_buf *ret)); ++static void rcv_sho_x FRWNN_PARAMS((register struct wnn_sho_bunsetsu *, int)); ++static void rcv_sho_kanji FRWNN_PARAMS((struct wnn_sho_bunsetsu *, int, w_char **)); + int + js_kanren (env, yomi, hinsi, fzk, vec, vec1, vec2, rb) + struct wnn_env *env; +@@ -2946,7 +2949,7 @@ + + static char * + get_serv_defs (lang, cnt) +- char *lang; ++ const char *lang; + int cnt; + { + FILE *fp; +@@ -2989,28 +2992,28 @@ + + char * + _wnn_get_machine_of_serv_defs (lang) +- char *lang; ++ const char *lang; + { + return (get_serv_defs (lang, MACHINE_NAME)); + } + + static char * + get_unixdomain_of_serv_defs (lang) +- char *lang; ++ const char *lang; + { + return (get_serv_defs (lang, UNIXDOMAIN_NAME)); + } + + static char * + get_service_of_serv_defs (lang) +- char *lang; ++ const char *lang; + { + return (get_serv_defs (lang, SERVICE_NAME)); + } + + static int + get_port_num_of_serv_defs (lang) +- char *lang; ++ const char *lang; + { + char *port_char; + +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jlib.V3/jlv3.c FreeWnn-1.1.1-a022.new/Wnn/jlib.V3/jlv3.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jlib.V3/jlv3.c 2013-08-15 14:44:15.343965120 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jlib.V3/jlv3.c 2013-08-12 11:11:18.586815913 +0900 +@@ -152,8 +152,8 @@ + return (0); + } + +-int jd_begin (); +-static int henkan_rcv (); ++int jd_begin FRWNN_PARAMS((w_char *, int)); ++static int henkan_rcv FRWNN_PARAMS((int, w_char *, int)); + + /** jd_reconv **/ + int +@@ -457,7 +457,7 @@ + JD_WNN_DEAD return (jl_word_delete (buf, current_ud, ser_no)); + } + +-static int oldh_to_newh (); ++static int oldh_to_newh FRWNN_PARAMS((int, unsigned short **)); + + /** jd_wreg **/ + int +@@ -487,7 +487,7 @@ + #endif + } + +-static int newh_to_oldh (); ++static int newh_to_oldh FRWNN_PARAMS((unsigned short)); + + /** jd_wsch **/ + int +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/daibn_kai.c FreeWnn-1.1.1-a022.new/Wnn/jserver/daibn_kai.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/daibn_kai.c 2002-05-13 07:51:16.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jserver/daibn_kai.c 2013-08-12 22:37:25.428579063 +0900 +@@ -258,7 +258,7 @@ + { + if ( + #ifndef NO_FZK +- (fzkchar == NULL || *fzkchar == NULL) && ++ (fzkchar == NULL || *fzkchar == 0) && + #endif /* NO_FZK */ + beginvect == sentou_no) + { +@@ -324,7 +324,7 @@ + #ifndef NO_FZK + else + { +- if (fzkchar == NULL || *fzkchar == NULL) ++ if (fzkchar == NULL || *fzkchar == 0) + { + if ((ll = wnn_get_fukugou_component_body (hinsi, &buf)) == 0) + { +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/de.c FreeWnn-1.1.1-a022.new/Wnn/jserver/de.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/de.c 2013-08-15 14:44:15.336965120 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jserver/de.c 2013-08-16 00:11:45.934223678 +0900 +@@ -85,6 +85,8 @@ + #undef GLOBAL_VALUE_DEFINE + #include "msg.h" + ++#include "etc.h" ++ + #ifdef SOLARIS + #ifdef SO_DONTLINGER + #undef SO_DONTLINGER +@@ -231,8 +233,6 @@ + { + int tmpttyfd; + char *cswidth_name; +- extern char *get_cswidth_name (); +- extern void set_cswidth (); + + char nlspath[64]; + +@@ -246,8 +246,11 @@ + { + log_err ("cannot open message file libwnn.msg."); + } +- if (cswidth_name = get_cswidth_name (LANG_NAME)) +- set_cswidth (create_cswidth (cswidth_name)); ++ ++ if ((cswidth_name = get_cswidth_name (LANG_NAME)) != NULL) ++ { ++ set_cswidth (create_cswidth (cswidth_name)); ++ } + + port = -1; + /* option default */ +@@ -293,12 +296,12 @@ + daemon_init (); + + env_init (); +- if (file_init () == NULL) ++ if (file_init () == 0) + { + exit (1); + } + dic_init (); +- if (NULL == get_kaiseki_area (LENGTHCONV + 1)) /* 変換可能文字数 */ ++ if (0 == get_kaiseki_area (LENGTHCONV + 1)) /* 変換可能文字数 */ + { + log_err ("get_kaiseki_area failed."); + exit (1); +@@ -372,7 +375,8 @@ + del_client (); + continue; + } +- do_command (c_c); ++ /* do_command (c_c); */ ++ do_command (); + } + } + } +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/de_header.h FreeWnn-1.1.1-a022.new/Wnn/jserver/de_header.h +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/de_header.h 2011-04-11 01:51:16.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jserver/de_header.h 2013-08-15 11:21:33.381901018 +0900 +@@ -59,6 +59,10 @@ + #include "ddefine.h" + #include "wnn_os.h" + ++#include "fzk.h" ++#include "etc.h" ++#include "kaiseki.h" ++ + #define FILENAME 128 + #define SUCCESS 1 + #define FAILURE NULL +@@ -210,8 +214,8 @@ + GLOBAL char lang_dir[MAXPATHLEN]; + + /* atojis.c */ +-extern w_char *get_giji_knj (); +-extern void giji_hindoup (); ++extern w_char *get_giji_knj (int, int, int, w_char *); ++extern void giji_hindoup (int); + /* b_index.c */ + #ifdef CONVERT_by_STROKE + extern int create_b_index (struct JT *jt); +@@ -227,18 +231,33 @@ + extern int check_bar_katakana (int, int); + extern int kan_ckvt (unsigned short, int); + /* daibn_kai.c */ +-extern int dbn_kai (); +-extern int get_status (); +-extern int zentan_able (); ++extern int dbn_kai (int, register int, int, + #ifndef NO_FZK +-extern w_char *rev_fzk (); +-#endif +-extern struct SYO_BNSETSU *que_reorder (); +-extern int sbjunjo (); +-extern int set_daibnsetu (); +-extern int sum_hyouka (); +-extern int ave_hyouka (); +-extern int cmp_hyouka (); ++ w_char *, ++#endif /* NO_FZK */ ++ int, int, register int, struct BZD **); ++extern int get_status (register int, int, ++#ifndef NO_FZK ++ w_char *, ++#endif /* NO_FZK */ ++ register short *); ++ ++extern int zentan_able (int, register int ++#ifndef NO_FZK ++ , w_char * ++#endif /* NO_FZK */ ++ ); ++ ++#ifndef NO_FZK ++extern w_char *rev_fzk (register w_char *, int); ++#endif /* NO_FZK */ ++extern struct SYO_BNSETSU *que_reorder (register struct SYO_BNSETSU *, register struct SYO_BNSETSU *); ++extern int sbjunjo (register struct SYO_BNSETSU *, register struct SYO_BNSETSU *); ++extern int set_daibnsetu (struct BZD **, register struct BZD **, register struct SYO_BNSETSU *, int *, int); ++extern int sum_hyouka (register struct SYO_BNSETSU *); ++extern int ave_hyouka (register struct SYO_BNSETSU *); ++extern int cmp_hyouka (register struct SYO_BNSETSU *, register struct SYO_BNSETSU *); ++ + /* de.c */ + extern void del_client (void); + extern void daemon_fin (void); +@@ -264,19 +283,19 @@ + extern void error_ret (); + /* do_dic_env.c */ + extern void js_dic_add (); +-extern int add_dic_to_env (); +-extern int chk_dic (); +-extern int chk_hindo (); ++extern int add_dic_to_env (int, int); ++extern int chk_dic (int, int); ++extern int chk_hindo (int, int); + extern int get_new_dic (); +-extern int find_dic_in_env (); ++extern int find_dic_in_env (int, int); + extern void js_dic_delete (); +-extern void del_all_dic_in_env (); ++extern void del_all_dic_in_env (int); + extern void js_dic_list_all (); + extern void js_dic_list (); + extern void js_dic_use (); + extern void js_fuzokugo_set (); + extern void js_fuzokugo_get (); +-extern void used_dic_fuzoku_delete (); ++extern void used_dic_fuzoku_delete (int, int); + /* do_dic_no.c */ + extern void dic_init (); + extern void js_dic_info (); +@@ -333,24 +352,24 @@ + extern void js_file_remove (void); + extern void js_file_password_set (void); + /* do_henkan.c */ +-extern void ret_dai (); +-extern void ret_sho (); ++extern void ret_dai (struct DSD_DBN *, int); ++extern void ret_sho (register struct DSD_SBN *, register int cnt); + #ifdef CONVERT_by_STROKE +-extern void ret_B (); +-extern void ret_daiB (); ++extern void ret_B (int, int, register int, int); ++extern void ret_daiB (int, int, register int, int); + #endif + #ifdef DEBUG +-extern void print_dlist (); +-extern void print_dlist1 (); ++extern void print_dlist (struct DSD_DBN *, int); ++extern void print_dlist1 (struct DSD_SBN *, int); + #endif + /* do_henkan1.c */ +-extern void do_kanren (); +-extern void do_kantan_dai (); +-extern void do_kantan_sho (); +-extern void do_kanzen_dai (); +-extern void do_kanzen_sho (); +-extern void Get_knj (); +-extern void get_knj_com (); ++extern void do_kanren (void); ++extern void do_kantan_dai (void); ++extern void do_kantan_sho (void); ++extern void do_kanzen_dai (void); ++extern void do_kanzen_sho (void); ++extern void Get_knj (register struct jdata *, int, w_char *, w_char *, int); ++extern void get_knj_com (register struct jdata *, int, w_char *, w_char *); + /* do_hinsi_s.c */ + extern void js_hindo_set (); + /* error.c */ +@@ -373,95 +392,113 @@ + extern void wsputs (); + #endif + /* fzk.c */ +-extern struct FT *fzk_read (); +-extern struct FT *fzk_ld (); +-extern void fzk_discard (); +-extern int fzk_kai (); +-extern int fzk_ckvt (); ++extern struct FT *fzk_read (FILE *fp); ++extern struct FT *fzk_ld (FILE *fp); ++extern void fzk_discard (struct FT *fzk_tbl); ++extern int fzk_kai (w_char *, w_char *, int, int, struct ICHBNP **); ++extern int fzk_ckvt (int); + /* get_kaiarea.c */ + extern int get_kaiseki_area (size_t); + extern void init_work_areas (void); + /* hinsi_list.c */ +-extern void make_hinsi_list (); +-extern int hinsi_table_set (); ++extern void make_hinsi_list (struct JT *); ++extern int hinsi_table_set (struct JT *, w_char *); + /* initjserv.c */ + extern int read_default (void); + extern int read_default_files (void); + /* jbiki.c */ +-extern int jishobiki (); +-extern int binary1 (); +-extern int binary (); +-extern int Strcmpud (); +-extern int Substrud (); +-extern int Substrstud (); +-extern int Substrudud (); +-extern int word_search (); +-extern int rd_biki (); +-extern int rd_binary1 (); +-extern int rd_binary (); +-extern int rd_binary_same (); ++extern int jishobiki (w_char *, struct jdata **); ++extern int binary1 (register struct uind1 *, register w_char *, register int end, struct JT *); ++extern int binary (register struct uind1 *, register w_char *, int, struct JT *); ++extern int Strcmpud (struct uind1 *ui1p, w_char *yomi, struct JT *); ++extern int Substrud (struct uind1 *, w_char *, int, struct JT *); ++extern int Substrstud (w_char *, struct uind1 *, struct JT *); ++extern int Substrudud (register struct uind1 *, register struct uind1 *, register struct JT *); ++extern int word_search (int, w_char *, struct jdata **); ++extern int rd_biki (struct JT *, w_char *, register int); ++extern int rd_binary1 (register struct rind1 *, register w_char *, register int, struct rind2 *, UCHAR *, int); ++extern int rd_binary (register struct rind1 *, register w_char *, register int end, struct rind2 *, UCHAR *, int which); ++extern int rd_binary_same (register struct rind1 *, register w_char *, register int, struct rind2 *, UCHAR *kanji, int); + #ifdef CONVERT_by_STROKE + /* jbiki_b.c */ + extern int is_bwnn_rev_dict (); +-extern int jishobiki_b (); ++extern int jishobiki_b (int, int); + #endif + /* jikouho.c */ +-extern int jkt_sbn_one (); ++extern int jkt_sbn_one (int, int, struct JKT_SBN **, int, struct JKT_SBN *, struct ICHBNP *, register int); + #ifndef NO_KATA +-extern struct JKT_SBN *get_kata_kouho (); ++extern struct JKT_SBN *get_kata_kouho (struct JKT_SBN **, int, int, int, int *, int *, int); + #endif +-extern struct JKT_SBN *get_hira_kouho (); +-extern int jkt_get_syo (); +-extern int get_zen_giji (); ++extern struct JKT_SBN *get_hira_kouho (struct JKT_SBN **, int, int); ++extern int jkt_get_syo (int, int, int, ++#ifndef NO_FZK ++ w_char *, ++#endif /* NO_FZK */ ++ int, int, struct DSD_SBN **); ++extern int get_zen_giji (struct SYO_BNSETSU *, struct JKT_SBN **); ++ + /* jikouho_d.c */ +-extern int jkt_get_dai (); +-extern int get_jkt_status (); +-extern struct DSD_DBN *get_dsd_dbn (); +-extern struct DSD_DBN *get_dsd_dbn (); +-extern struct DSD_SBN *get_dsd_sbn (); +-extern int dbn_set (); +-extern int cnt_sone (); ++extern int jkt_get_dai (int, int, int, ++#ifndef NO_FZK ++ w_char *, ++#endif /* NO_FZK */ ++ int, int, int, struct DSD_DBN **); ++extern int get_jkt_status (int, int, ++#ifndef NO_FZK ++ w_char *, ++#endif /* NO_FZK */ ++ short *); ++extern struct DSD_DBN *get_dsd_dbn (register int); ++extern struct DSD_SBN *get_dsd_sbn (register int); ++extern int dbn_set (struct DSD_DBN **, register struct JKT_DBN *); ++extern int cnt_sone (register struct JKT_SONE *); ++ + /* jishoop.c */ +-extern int word_add (); +-extern int word_comment_set (); +-extern int word_delete (); +-extern void kanjiadd (); +-extern int dic_in_envp (); +-extern int hindo_file_size_justify (); ++extern int word_add (int, int, w_char *, w_char *, int, int, w_char *); ++extern int word_comment_set (int, int, int, w_char *); ++extern int word_delete (int, int, int); ++extern void kanjiadd (struct JT *, w_char *, w_char *, w_char *); ++extern int dic_in_envp (int, int); ++extern int hindo_file_size_justify (struct wnn_file *, struct wnn_file *); + /* jishosub.c */ +-extern int inspect (); +-extern int get_yomi_from_serial (); +-extern int get_yomi_from_serial (); ++extern int inspect (int, int, w_char *, struct jdata *); ++extern int get_yomi_from_serial (int, int, w_char *); + /* jmt0.c */ + extern void init_jmt (void); + extern int jmt_set (int); + /* mknode0.c */ + extern int init_bzd (void); +-extern int init_ichbnp (); +-extern void clr_node (); +-extern void freebzd (); +-extern void freeibsp (); +-extern struct BZD *getbzdsp (); +-extern struct ICHBNP *getibsp (); +-extern struct fzkkouho *getfzkoh_body (); +-extern struct fzkkouho *getfzkoh1_body (); +-extern int mknode (); ++extern int init_ichbnp (void); ++extern void clr_node (register struct BZD *); ++extern void freebzd (register struct BZD *); ++extern void freeibsp (struct ICHBNP *); ++extern struct BZD *getbzdsp (void); ++extern struct ICHBNP *getibsp (void); ++extern struct fzkkouho *getfzkoh_body (register struct ICHBNP *, int); ++extern struct fzkkouho *getfzkoh1_body (register struct ICHBNP *, register int); ++extern int mknode (struct BZD *, int, int, ++#ifndef NO_FZK ++ w_char *, ++#endif /* NO_FZK */ ++ int, int); ++extern void freebzd (register struct BZD *); ++ + /* mknode1.c */ + extern int init_sbn (); +-extern int get_area (); +-extern void free_area (); +-extern void freesbn (); +-extern void clr_sbn_node (); ++extern int get_area (register int, register int, struct free_list **); ++extern void free_area (register struct free_list *); ++extern void freesbn (register struct SYO_BNSETSU *); ++extern void clr_sbn_node (register struct SYO_BNSETSU *); + extern struct SYO_BNSETSU *getsbnsp (); + /* mknode2.c */ +-extern int init_jktdbn (); +-extern int init_jktsbn (); +-extern int init_jktsone (); +-extern void freejktdbn (); +-extern void freejktsbn (); +-extern struct JKT_DBN *getjktdbn (); +-extern struct JKT_SBN *getjktsbn (); +-extern struct JKT_SONE *getjktsone (); ++extern int init_jktdbn (void); ++extern int init_jktsbn (void); ++extern int init_jktsone (void); ++extern void freejktdbn (register struct JKT_DBN *); ++extern void freejktsbn (struct JKT_SBN *); ++extern struct JKT_DBN *getjktdbn (void); ++extern struct JKT_SBN *getjktsbn (void); ++extern struct JKT_SONE *getjktsone (void); + /* rd_jishoop.c */ + extern int rd_word_add1 (struct JT *, w_char *, int, w_char *, w_char *); + extern int rd_word_delete1 (struct JT *, struct HJT *, int); +@@ -503,37 +540,28 @@ + extern int tan_syo (int, int, int, int, int, struct DSD_SBN **); + #endif /* NO_FZK */ + /* sisheng.c */ +-extern int get_sisheng (); +-extern w_char *biki_sisheng (); +-extern unsigned int diff_sisheng (); ++extern int get_sisheng (w_char *, char *, w_char *); ++extern w_char *biki_sisheng (w_char *, char *, w_char *); ++extern unsigned int diff_sisheng (int, int); + /* snd_rcv.c */ +-extern int fopen_read_cur (); +-extern int fopen_write_cur (); +-extern int fread_cur (); ++extern int fopen_read_cur (char *); ++extern int fopen_write_cur (char *); ++extern int fread_cur (char *, register int, register int); + extern int xgetc_cur (); +-extern void xungetc_cur (); +-extern void fwrite_cur (); ++extern void xungetc_cur (int); ++extern void fwrite_cur (unsigned char *, int, int); + extern void xputc_cur (unsigned char); + extern void fclose_cur (); + /* w_string.c */ +-extern void Sreverse (); +-extern int Sstrcpy (); +-extern int Strcmp (); +-extern int Substr (); +-extern int Strncmp (); +-extern w_char *Strcpy (); +-extern w_char *Strncpy (); +-extern int Strlen (); +-/* gethinsi.c */ +-extern int wnn_loadhinsi (); +-extern w_char *wnn_hinsi_name (); +-extern int wnn_hinsi_number (); +-extern int wnn_hinsi_list (); +-extern int wnn_has_hinsi (); +-extern int wnn_find_hinsi_by_name (); +-extern char *wnn_get_hinsi_name (); +-extern int wnn_get_fukugou_component_body (); +-extern int wnn_get_fukugou_component (); ++extern void Sreverse (register w_char *, register w_char *); ++extern int Sstrcpy (register w_char *, register unsigned char *); ++extern int Strcmp (register w_char *, register w_char *); ++extern int Substr (register w_char *, register w_char *); ++extern int Strncmp (register w_char *w1, register w_char *, register int n); ++extern w_char *Strcpy (register w_char *, register w_char *); ++extern w_char *Strncpy (register w_char *w1, register w_char *, register int n); ++extern int Strlen (register w_char *w); ++ + /* bdic.c */ + extern void check_backup (char*); + extern void delete_tmp_file (char*); +@@ -556,15 +584,8 @@ + extern int output_header_jt (FILE*, struct JT*); + extern int input_header_hjt (FILE*, struct HJT*); + extern int output_header_hjt (FILE*, struct HJT*); +-/* dic_atojis.c */ +-extern void Get_kanji (); +-extern void Get_knj1 (); +-/* revdic.c */ +-extern int little_endian (); +-extern int revdic (); +-/* hindo.c */ +-extern int asshuku (); +-extern int motoni2 (); ++ ++ + /* pwd.c */ + extern void new_pwd (char*, char*); + extern int check_pwd (char*, char*); +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/do_dic_env.c FreeWnn-1.1.1-a022.new/Wnn/jserver/do_dic_env.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/do_dic_env.c 2001-06-15 03:28:53.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jserver/do_dic_env.c 2013-08-12 13:00:42.374561078 +0900 +@@ -41,7 +41,7 @@ + #include "jdata.h" + + +-static void del_dic_from_env (), dic_delete (); ++static void del_dic_from_env (int, int), dic_delete (int, int, int); + + /* + Dic. OPE for Env +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/do_filecom.c FreeWnn-1.1.1-a022.new/Wnn/jserver/do_filecom.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/do_filecom.c 2003-06-07 11:23:58.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jserver/do_filecom.c 2013-08-12 15:51:16.580788036 +0900 +@@ -85,7 +85,7 @@ + if ( files == NULL ) + { + log_err ("file_init: malloc faild."); +- return (NULL); ++ return (0); + } + for (i = 0; i < MAX_FILES; i++) + { +@@ -518,7 +518,7 @@ + wnn_errorno = WNN_RDONLY; + goto ERR_RET; + } +- if (file_comment_set (&files[fid], comment) == NULL) ++ if (file_comment_set (&files[fid], comment) == 0) + { + goto ERR_RET; + } +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/do_henkan.c FreeWnn-1.1.1-a022.new/Wnn/jserver/do_henkan.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/do_henkan.c 2001-06-18 18:09:41.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jserver/do_henkan.c 2013-08-13 06:54:24.029693265 +0900 +@@ -43,8 +43,13 @@ + #include "jdata.h" + #include "de_header.h" + +-static void ret_sho_x (), ret_sho_kanji (), ret_kanji (); +-static int count_sho (), count_d_kanji (), count_s_kanji (), count_kanji (); ++static void ret_sho_x (register struct DSD_SBN *, register int); ++static void ret_sho_kanji (register struct DSD_SBN *, register int); ++static void ret_kanji (register struct DSD_SBN *); ++static int count_sho (struct DSD_DBN *, int); ++static int count_d_kanji (struct DSD_DBN *, int); ++static int count_s_kanji (struct DSD_SBN *, int); ++static int count_kanji (struct DSD_SBN *); + + /* DAI BUN */ + void +@@ -457,8 +462,8 @@ + #undef putwchar + #endif + +-static void _print_dlist (); +-static void _print_dlist1 (); ++static void _print_dlist (struct DSD_DBN *); ++static void _print_dlist1 (struct DSD_SBN *); + + void + print_dlist (dlist, cnt) +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/do_henkan1.c FreeWnn-1.1.1-a022.new/Wnn/jserver/do_henkan1.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/do_henkan1.c 2003-05-12 03:41:49.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jserver/do_henkan1.c 2013-08-15 12:29:52.957922625 +0900 +@@ -53,7 +53,7 @@ + #undef putwchar + #endif + +-static int make_buns_par (); ++static int make_buns_par (register w_char, register int); + + static int bun_pter_; + +@@ -118,7 +118,7 @@ + { + int b_suu_; + +- b_suu_ = jishobiki_b (1, bun_pter_, 0); ++ b_suu_ = jishobiki_b (1, bun_pter_); /* jishobiki_b (1, bun_pter_, 0); */ + if (b_suu_ < 0) + { + error_ret (); /* ERROR */ +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/do_hindo_s.c FreeWnn-1.1.1-a022.new/Wnn/jserver/do_hindo_s.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/do_hindo_s.c 2002-06-22 22:25:45.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jserver/do_hindo_s.c 2013-08-13 07:11:58.215628170 +0900 +@@ -43,7 +43,7 @@ + #include "jdata.h" + #include "de_header.h" + +-static int hindo_set (); ++static int hindo_set (int, int, int, int); + + void + js_hindo_set () +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/fzk.c FreeWnn-1.1.1-a022.new/Wnn/jserver/fzk.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/fzk.c 2003-05-12 04:01:06.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jserver/fzk.c 2013-08-13 06:37:05.750757378 +0900 +@@ -627,7 +627,7 @@ + for (yomicnt = 0; (yomicnt < YOMI_L) && (start < end); key[yomicnt++] = *start++) + ; + key[yomicnt] = 0; +- for (; yomicnt > 0; key[--yomicnt] = NULL) ++ for (; yomicnt > 0; key[--yomicnt] = 0) + { + search_ptr = (struct fzkentry *) bsrch (key); + if (search_ptr != NULL) +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/get_kaiarea.c FreeWnn-1.1.1-a022.new/Wnn/jserver/get_kaiarea.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/get_kaiarea.c 2003-06-07 11:22:23.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jserver/get_kaiarea.c 2013-08-13 06:56:38.164684982 +0900 +@@ -51,7 +51,7 @@ + + /* + * get_kaiseki_area: take memory areas for analysing. +- * return value: fail = NULL, success != NULL ++ * return value: fail = 0, success != 0 + */ + int + get_kaiseki_area (size_t kana_len) +@@ -60,28 +60,28 @@ + { + wnn_errorno = WNN_MALLOC_INITIALIZE; + log_debug ("malloc failed in maxj."); +- return (NULL); ++ return (0); + } + + if (NULL == (jmtp = (struct jdata ***) calloc (kana_len, sizeof (struct jdata **)))) + { + wnn_errorno = WNN_MALLOC_INITIALIZE; + log_debug ("malloc failed in jmtp."); +- return (NULL); ++ return (0); + } + + if (NULL == (jmt_ = (struct jdata **) calloc (SIZE_JISHOTABLE, sizeof (struct jdata *)))) + { + wnn_errorno = WNN_MALLOC_INITIALIZE; + log_debug ("malloc failed in jmt_."); +- return (NULL); ++ return (0); + } + + if (NULL == (jmtw_ = (struct jdata *) calloc (SIZE_JISHOHEAP, sizeof (struct jdata)))) + { + wnn_errorno = WNN_MALLOC_INITIALIZE; + log_debug ("malloc failed in jmtw_."); +- return (NULL); ++ return (0); + } + + jmt_end = jmt_ + SIZE_JISHOTABLE; +@@ -92,7 +92,7 @@ + { + wnn_errorno = WNN_MALLOC_INITIALIZE; + log_debug ("malloc failed in bun."); +- return (NULL); ++ return (0); + } + + maxchg = kana_len; +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/hinsi_list.c FreeWnn-1.1.1-a022.new/Wnn/jserver/hinsi_list.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/hinsi_list.c 2002-05-13 07:51:16.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jserver/hinsi_list.c 2013-08-15 20:11:15.876147622 +0900 +@@ -49,7 +49,8 @@ + #include "hinsi_file.h" + #include "jdata.h" + +-static int Strtime (), get_a_word (); ++static int Strtime (w_char *, int, w_char); ++static int get_a_word (w_char *, w_char **, int *); + + void + make_hinsi_list (jtl) +@@ -181,8 +182,10 @@ + if (Strcmp (n[m].name, w) == 0) + for (j = n[m].kosuu; j; j--) + { +- if (Strcmp (n[m].son[j], w) == 0) +- return (1); ++ if (Strcmp (n[m].son + j, w) == 0) /* changed 2013-08-15! */ ++ { ++ return (1); ++ } + } + } + return (0); +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/jbiki.c FreeWnn-1.1.1-a022.new/Wnn/jserver/jbiki.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/jbiki.c 2003-06-07 11:22:23.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jserver/jbiki.c 2013-08-12 16:00:22.398754333 +0900 +@@ -61,9 +61,9 @@ + #endif /* CONVERT_with_SiSheng */ + + static int ud_biki (struct JT *, w_char *); +-static int sd_biki (); +-static int sd_biki_one (); +-static int sdbinary (); ++static int sd_biki (struct JT *, w_char *); ++static int sd_biki_one (char *, int, w_char *); ++static int sdbinary (register w_char, register w_char *, int tsize); + + int + jishobiki (w_char *yomi, /* 読みの先頭へのポインタ */ +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/jbiki_b.c FreeWnn-1.1.1-a022.new/Wnn/jserver/jbiki_b.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/jbiki_b.c 2001-06-15 03:16:02.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jserver/jbiki_b.c 2013-08-15 11:05:18.411895879 +0900 +@@ -52,8 +52,11 @@ + #define MAX_B_KOHO 64 + #define MIN_B_KOHO 5 + +-static void rd_biki_b (), set_kohos (), koho_insert (), b_koho_put (); +-static int set_value (); ++static void rd_biki_b (struct JT *, int, int, int); ++static void set_kohos (struct JT *, int); ++static void koho_insert (register struct b_koho *); ++static void b_koho_put (struct b_koho *); ++static int set_value (struct b_koho *); + + static int number; /** クライアントの辞書番号 */ + static int prior; +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/jikouho.c FreeWnn-1.1.1-a022.new/Wnn/jserver/jikouho.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/jikouho.c 2002-05-13 07:51:16.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jserver/jikouho.c 2013-08-13 06:31:38.785777567 +0900 +@@ -48,8 +48,12 @@ + #include "fzk.h" + #include "kaiseki.h" + +-static struct JKT_SBN *find_jktsbn (); +-static int cmp_dsd_sbn (), cnt_jkt_sbn (), get_suuji_kouho (), get_eisuu_kouho (), get_kigou_kouho (); ++static struct JKT_SBN *find_jktsbn (struct JKT_SBN **, struct JKT_SONE *, int, int j_c); ++static int cmp_dsd_sbn (struct DSD_SBN *, struct DSD_SBN *); ++static int cnt_jkt_sbn (register struct JKT_SBN *sbn); ++static int get_suuji_kouho (register struct JKT_SBN *); ++static int get_eisuu_kouho (struct JKT_SBN *); ++static int get_kigou_kouho (struct JKT_SBN *jktsbn); + + static int + jkt_sbn (yomi_sno, yomi_eno, endvect, endvect1, tjktsbn, bnst_num, parent) +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/jikouho_d.c FreeWnn-1.1.1-a022.new/Wnn/jserver/jikouho_d.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/jikouho_d.c 2002-05-13 07:51:16.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jserver/jikouho_d.c 2013-08-12 22:31:39.407600430 +0900 +@@ -53,12 +53,29 @@ + #include "kaiseki.h" + + #ifdef CONVERT_from_TOP +-static void sbn_set (), sons_set (); ++static void sbn_set (register struct JKT_DBN *, register struct DSD_SBN **, register struct JKT_SONE *, register struct JKT_SBN *); ++static void sons_set (register struct JKT_DBN *, register struct JKT_SONE *, register struct JKT_SBN *, register struct DSD_SBN *, register int, register int); + #endif /* CONVERT_from_TOP */ + +-static void dsd_hyouka (), cnt_sbn (), cnt_dbn (); +-static int cmp_dsd_dbn (), jkt_dbn (), jkt_sbjunjo (), set_jkt_dai (), zen_sbn (), cnt_par (), cnt_son (); +-static struct JKT_SBN *jkt_que_reorder (); ++static void dsd_hyouka (struct DSD_DBN *); ++static void cnt_sbn (register struct JKT_SBN *, register int *, register int *); ++static void cnt_dbn (register struct JKT_DBN *, register int *dbn_cnt, register int *sbn_cnt); ++static int cmp_dsd_dbn (struct DSD_DBN *, struct DSD_DBN *); ++static int jkt_dbn (int, int, int, ++#ifndef NO_FZK ++ w_char *, ++#endif /* NO_FZK */ ++ int, int, register int, struct JKT_DBN **); ++static int jkt_sbjunjo (struct JKT_SBN *, struct JKT_SBN *); ++static int set_jkt_dai (struct JKT_DBN **, register struct JKT_DBN **, register struct JKT_SBN *); ++static int zen_sbn (int, int, int, int, struct JKT_SBN **, int, struct JKT_SBN * ++#ifndef NO_KANA ++ , int * ++#endif /* NO_KANA */ ++ ); ++static int cnt_par (register struct JKT_SBN *sbn); ++static int cnt_son (register struct JKT_SBN *, register struct JKT_SBN *); ++static struct JKT_SBN *jkt_que_reorder (register struct JKT_SBN *, register struct JKT_SBN *); + + static int yomi_sno_tmp; + +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/jishoop.c FreeWnn-1.1.1-a022.new/Wnn/jserver/jishoop.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/jishoop.c 2003-06-07 11:23:58.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jserver/jishoop.c 2013-08-12 18:12:52.051041555 +0900 +@@ -43,12 +43,20 @@ + #include "de_header.h" + #include "jdata.h" + +-static void make_space (); +-static int word_add1 (), word_delete1 (), word_comment_set1 (); ++#if __STDC__ ++#define FRWNN_PARAMS(paramlist) paramlist ++#else ++#define FRWNN_PARAMS(paramlist) () ++#endif /* __STDC__ */ ++ ++static void make_space FRWNN_PARAMS((register struct uind1 *, register int, register struct JT *)); ++static int word_add1 FRWNN_PARAMS((struct JT *, w_char *, int, w_char *, w_char *)); ++static int word_delete1 FRWNN_PARAMS((struct JT *, struct HJT *, w_char *, int)); ++static int word_comment_set1 FRWNN_PARAMS((struct JT *, w_char *, int, w_char *)); + + #ifndef min +-#define min(a, b) ((a > b)? b:a) +-#define max(a, b) ((a < b)? b:a) ++#define min(a, b) (((a) > (b))? (b) : (a)) ++#define max(a, b) (((a) < (b))? (b) : (a)) + #endif + + int +@@ -304,22 +312,22 @@ + Sreverse (yomi, pyomi); + + if ((jtl->bufsize_hontai <= jtl->maxhontai + sizeof (struct uind2) + Strlen (yomi)) +- && (ud_realloc_hontai (jtl) == NULL)) ++ && (ud_realloc_hontai (jtl) == 0)) + { + return (-1); + } + if ((jtl->bufsize_kanji <= jtl->maxkanji + (Strlen (kanji) + Strlen (comment) + Strlen (yomi) + 3) * sizeof (w_char) + 1) +- && (ud_realloc_kanji (jtl) == NULL)) ++ && (ud_realloc_kanji (jtl) == 0)) + { + return (-1); + } + if (jtl->bufsize_serial <= jtl->maxserial + 4 +- && ud_realloc_serial (jtl) == NULL) ++ && ud_realloc_serial (jtl) == 0) + { + return (-1); + } + if (jtl->bufsize_table <= jtl->maxtable + sizeof (struct uind1) +- && ud_realloc_table (jtl) == NULL) ++ && ud_realloc_table (jtl) == 0) + { + return (-1); + } +@@ -556,7 +564,7 @@ + if (jtl->bufsize_hontai <= jtl->maxhontai + sizeof (struct uind2) + Strlen (yomi)) + { + tmp = (char *) p - (char *) jtl->hontai; +- if (ud_realloc_hontai (jtl) == NULL) ++ if (ud_realloc_hontai (jtl) == 0) + { + return (-1); + } +@@ -647,7 +655,7 @@ + { + if (jtl->bufsize_kanji <= jtl->maxkanji + (Strlen (kanji) + Strlen (comment) + Strlen (yomi1) + 4) * 2) + { +- if (ud_realloc_kanji (jtl) == NULL) ++ if (ud_realloc_kanji (jtl) == 0) + { + return (-1); + } +@@ -667,7 +675,7 @@ + /* We need to spend one serial_no to ensure that the entry + before this and after this are not connected */ + if (jtl->bufsize_serial <= jtl->maxserial + 4 +- && ud_realloc_serial (jtl) == NULL) ++ && ud_realloc_serial (jtl) == 0) + { + return (-1); + } +@@ -762,7 +770,7 @@ + { + while (hjtp->bufsize_serial <= jtp->maxserial) + { +- if (hindo_file_realloc (hjtp) == NULL) ++ if (hindo_file_realloc (hjtp) == 0) + return (-1); + } + error1 ("Dic file size is bigger than that of Hindo file!"); +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/jishosub.c FreeWnn-1.1.1-a022.new/Wnn/jserver/jishosub.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/jishosub.c 2001-06-15 03:16:02.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jserver/jishosub.c 2013-08-12 19:27:23.886582927 +0900 +@@ -34,7 +34,15 @@ + #include "de_header.h" + #include "jdata.h" + +-static int inspect_sd (), get_fst_serial (), inspect_ud (); ++#if __STDC__ ++#define FRWNN_PARAMS(paramlist) paramlist ++#else ++#define FRWNN_PARAMS(paramlist) () ++#endif /* __STDC__ */ ++ ++static int inspect_sd FRWNN_PARAMS((int, int, w_char *, struct jdata *)); ++static int get_fst_serial FRWNN_PARAMS((char *, UCHAR *)); ++static int inspect_ud FRWNN_PARAMS((int, int, w_char *, struct jdata *)); + + int + inspect (dic_no, serial, yomi, jd) +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/mknode0.c FreeWnn-1.1.1-a022.new/Wnn/jserver/mknode0.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/mknode0.c 2002-05-13 07:51:16.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jserver/mknode0.c 2013-08-12 20:42:37.974995257 +0900 +@@ -36,10 +36,16 @@ + #include "de_header.h" + #include "kaiseki.h" + +-static struct BZD *clrnd_sub (); +-static void lnk_bzd (), lnk_ichbn (); +-static int mknd_sub (), hyoka2 (); +-void freebzd (); ++static struct BZD *clrnd_sub (register struct BZD *); ++static void lnk_bzd (struct free_list *), lnk_ichbn (struct free_list *); ++ ++static int mknd_sub (struct BZD *, int, int, ++#ifndef NO_FZK ++ w_char *, ++#endif /* NO_FZK */ ++ int, int, int); ++ ++static int hyoka2 (int, int); + + static struct BZD *free_bzd_top = NULL; + static struct free_list *free_list_bzd = NULL; +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/mknode1.c FreeWnn-1.1.1-a022.new/Wnn/jserver/mknode1.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/mknode1.c 2002-05-13 07:51:17.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jserver/mknode1.c 2013-08-12 20:01:03.833458198 +0900 +@@ -44,7 +44,7 @@ + #include "de_header.h" + #include "kaiseki.h" + +-static void lnk_sbn (); ++static void lnk_sbn (struct free_list *); + + static struct SYO_BNSETSU *free_sbn_top = NULL; + static struct free_list *free_list_sbn = NULL; +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/mknode2.c FreeWnn-1.1.1-a022.new/Wnn/jserver/mknode2.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/mknode2.c 2002-05-13 07:51:17.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jserver/mknode2.c 2013-08-12 21:19:11.067859835 +0900 +@@ -36,7 +36,10 @@ + #include "de_header.h" + #include "kaiseki.h" + +-static void lnk_jkdbn (), lnk_jksbn (), lnk_jksone (), freejktsone (); ++static void lnk_jkdbn (struct free_list *); ++static void lnk_jksbn (struct free_list *); ++static void lnk_jksone (struct free_list *); ++static void freejktsone (register struct JKT_SONE *); + + static struct JKT_DBN *free_jkdbn_top = NULL; + static struct free_list *free_list_jkdbn = NULL; +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/rd_jishoop.c FreeWnn-1.1.1-a022.new/Wnn/jserver/rd_jishoop.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/rd_jishoop.c 2003-06-07 11:23:58.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jserver/rd_jishoop.c 2013-08-12 18:05:13.786069852 +0900 +@@ -86,22 +86,22 @@ + #endif /* CONVERT_with_SiSheng */ + + if ((jtl->bufsize_kanji <= jtl->maxkanji + (Strlen (kanji) + Strlen (comment) + Strlen (yomi) + 3) * sizeof (w_char) + 1) +- && (ud_realloc_kanji (jtl) == NULL)) ++ && (ud_realloc_kanji (jtl) == 0)) + { + return (-1); + } + if (jtl->bufsize_ri1[D_YOMI] <= jtl->maxri1[D_YOMI] + 2 +- && rd_realloc_ri1 (jtl, D_YOMI) == NULL) ++ && rd_realloc_ri1 (jtl, D_YOMI) == 0) + { + return (-1); + } + if (jtl->bufsize_ri1[D_KANJI] <= jtl->maxri1[D_KANJI] + 2 +- && rd_realloc_ri1 (jtl, D_KANJI) == NULL) ++ && rd_realloc_ri1 (jtl, D_KANJI) == 0) + { + return (-1); + } + if (jtl->bufsize_serial <= jtl->maxserial + 4 +- && ud_realloc_serial (jtl) == NULL) ++ && ud_realloc_serial (jtl) == 0) + { + return (-1); + } +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/readfile.c FreeWnn-1.1.1-a022.new/Wnn/jserver/readfile.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/readfile.c 2003-06-07 11:23:58.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jserver/readfile.c 2013-08-12 18:34:50.166777666 +0900 +@@ -55,6 +55,8 @@ + #include "de_header.h" + #include "jdata.h" + ++#include "etc.h" ++ + #ifdef WRITE_CHECK + static int vfwrite (void*, int, int, FILE *); + #endif +@@ -101,7 +103,7 @@ + struct wnn_file_head fh; + if (wf->localf == REMOTE) + { +- if (fopen_read_cur (wf->name) == NULL) ++ if (fopen_read_cur (wf->name) == 0) + { + wnn_errorno = WNN_FILE_READ_ERROR; + log_err ("read_file:could not open file %s.", wf->name); +@@ -341,7 +343,7 @@ + { + wnn_errorno = WNN_MALLOC_ERR; + log_err ("could not make the jisho area bigger."); +- return (NULL); ++ return (0); + } + jt->bufsize_hontai = new_bufsize; + jt->hontai = tp; +@@ -360,7 +362,7 @@ + { + wnn_errorno = WNN_MALLOC_ERR; + log_err ("could not make the jisho area bigger."); +- return (NULL); ++ return (0); + } + jt->bufsize_kanji = new_bufsize; + jt->kanji = tp; +@@ -403,7 +405,7 @@ + + wnn_errorno = WNN_MALLOC_ERR; + log_err ("could notmake the jisho area bigger."); +- return (NULL); ++ return (0); + } + jt->bufsize_serial = new_bufsize; + jt->hindo = tp_hindo; +@@ -425,7 +427,7 @@ + { + wnn_errorno = WNN_MALLOC_ERR; + log_err ("could not make the jisho area bigger."); +- return (NULL); ++ return (0); + } + jt->ri2 = tp_ri2; + } +@@ -446,7 +448,7 @@ + { + wnn_errorno = WNN_MALLOC_ERR; + log_err ("could not make the jisho area bigger."); +- return (NULL); ++ return (0); + } + jt->bufsize_table = new_bufsize; + jt->table = tp; +@@ -467,7 +469,7 @@ + { + wnn_errorno = WNN_MALLOC_ERR; + log_err ("could not make the jisho area bigger."); +- return (NULL); ++ return (0); + } + jt->bufsize_ri1[which] = new_bufsize; + jt->ri1[which] = tp; +@@ -488,7 +490,7 @@ + { + wnn_errorno = WNN_MALLOC_ERR; + log_err ("could not make the hindo file area bigger."); +- return (NULL); ++ return (0); + } + hjt->bufsize_serial = new_bufsize; + hjt->hindo = tp; +@@ -509,7 +511,7 @@ + { + wnn_errorno = WNN_MALLOC_ERR; + log_err ("could not make the jisho area bigger."); +- return (NULL); ++ return (0); + } + jt->bufsize_bnode = new_bufsize; + jt->bind = tp; +@@ -613,7 +615,7 @@ + /* if(wf->localf == REMOTE){ + } + */ +- if (fopen_write_cur (wf->name) == NULL) ++ if (fopen_write_cur (wf->name) == 0) + { + log_err ("receive_file:No file %s.", wf->name); + wnn_errorno = WNN_FILE_WRITE_ERROR; +@@ -1051,7 +1053,7 @@ + new_size = Strlen (com) + 1; + if ((tp = (w_char *) realloc (jt->comment, jt->maxcomment * sizeof (w_char))) == NULL) + { +- return (NULL); ++ return (0); + } + jt->maxcomment = new_size; + jt->comment = tp; +@@ -1063,7 +1065,7 @@ + new_size = Strlen (com) + 1; + if ((tp = (w_char *) realloc (hjt->comment, new_size * sizeof (w_char))) == NULL) + { +- return (NULL); ++ return (0); + } + hjt->maxcomment = new_size; + hjt->comment = tp; +@@ -1072,7 +1074,7 @@ + break; + case WNN_FT_FUZOKUGO_FILE: + wnn_errorno = NOT_SUPPORTED_OPERATION; +- return (NULL); ++ return (0); + } + return (SUCCESS); + } +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/sisheng.c FreeWnn-1.1.1-a022.new/Wnn/jserver/sisheng.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/sisheng.c 2002-07-14 13:26:57.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jserver/sisheng.c 2013-08-15 11:15:33.997899124 +0900 +@@ -49,9 +49,9 @@ + #include "cplib.h" + #include "de_header.h" + +-#define isfuyuanyin(c) ((c=='m')||(c=='n')||(c=='g')) ++#define isfuyuanyin(c) (((c)=='m')||((c)=='n')||((c)=='g')) + #define isyuanyin(c) \ +- ((c=='a')||(c=='e')||(c=='i')||(c=='o')||(c=='u')||(c=='v')) ++ (((c)=='a')||((c)=='e')||((c)=='i')||((c)=='o')||((c)=='u')||((c)=='v')) + + /* yincod_flt_sisheng(): filter sisheng of Yincode strings */ + +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/w_string.c FreeWnn-1.1.1-a022.new/Wnn/jserver/w_string.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jserver/w_string.c 2003-05-12 03:43:16.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jserver/w_string.c 2013-08-12 13:21:22.514484501 +0900 +@@ -33,6 +33,8 @@ + #include "commonhd.h" + #include "wnn_string.h" + ++#include "de_header.h" ++ + void + Sreverse (w1, w2) + register w_char *w1, *w2; +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jutil/atod.c FreeWnn-1.1.1-a022.new/Wnn/jutil/atod.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jutil/atod.c 2013-08-15 14:44:15.361965120 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jutil/atod.c 2013-08-15 20:06:06.796145993 +0900 +@@ -70,6 +70,9 @@ + #include "wnn_string.h" + #include "wnn_os.h" + ++#include "jutil.h" ++#include "etc.h" ++ + extern int wnn_loadhinsi FRWNN_PARAMS((unsigned char*)), + init_heap FRWNN_PARAMS((int,int,int,int,FILE*)), + little_endian FRWNN_PARAMS(()), +@@ -94,18 +97,8 @@ + rev_short_fun FRWNN_PARAMS((w_char*)), + rev_w_char FRWNN_PARAMS((w_char*,int)); + +- +-extern +-#ifdef BDIC_WRITE_CHECK +- int +-#else +- void +-#endif +- put_n_EU_str FRWNN_PARAMS((FILE*,w_char*,int)); +- + extern int sort_func_sdic FRWNN_PARAMS((char*,char*)); + extern int sort_func_je FRWNN_PARAMS((char*,char*)); +-extern char *get_cswidth_name FRWNN_PARAMS((register char*)); + extern void set_cswidth FRWNN_PARAMS((register unsigned int)); + + static void ujistoud FRWNN_PARAMS((void)), +@@ -122,15 +115,12 @@ + set_pter1 FRWNN_PARAMS((void)), + output_comment FRWNN_PARAMS((FILE*)), + output_hinsi_list FRWNN_PARAMS((FILE*)); +-void upd_kanjicount FRWNN_PARAMS((int)), +- output_dic_data FRWNN_PARAMS((void)); + + /* Switcher variable between UD and SD */ + + int which_dict = WNN_REV_DICT; + #ifdef CHINESE +-extern int pzy_flag; +-static void output_sisheng (); ++static void output_sisheng FRWNN_PARAMS((FILE *)); + #endif + + /* Variables both for UD and SD */ +@@ -271,8 +261,10 @@ + com_name = argv[0]; + init (argc, argv); + +- if (cswidth_name = get_cswidth_name (WNN_DEFAULT_LANG)) +- set_cswidth (create_cswidth (cswidth_name)); ++ if ((cswidth_name = get_cswidth_name (WNN_DEFAULT_LANG)) != NULL) ++ { ++ set_cswidth (create_cswidth (cswidth_name)); ++ } + + #ifdef CHINESE + ujis_header (&which_dict); /* read header of UJIS dic */ +@@ -909,7 +901,6 @@ + } + + #ifdef CONVERT_with_SiSheng +-extern void put_short (); + + static void + output_sisheng (FILE* ofpter) +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jutil/atof.c FreeWnn-1.1.1-a022.new/Wnn/jutil/atof.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jutil/atof.c 2002-07-14 13:26:57.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jutil/atof.c 2013-08-13 21:51:18.947318514 +0900 +@@ -131,6 +131,9 @@ + #include "wnn_os.h" + #include "wnn_string.h" + ++#include "etc.h" ++ ++ + #define FUZOKUGO_LEN 8 + #define OUT_INT_KOSUU 20 + #ifndef NO_FZK +@@ -249,18 +252,44 @@ + #define SIZE 1024 + char buf[SIZE]; + +-static int find_id (), bsch (), tcp (), +-#ifndef NO_FZK +- count_yomi (), count_fz_num (), count_same_yomi (), +-#endif +- find_id_name (), search_attr (), is_same_jiritugov (); +-static void init (), read_attr (), read_id (), read_jiritugov (), ++static int tcp FRWNN_PARAMS((char *)); ++static int find_id FRWNN_PARAMS((char *)); ++static int bsch FRWNN_PARAMS((char *, int, int)); ++static int find_id_name FRWNN_PARAMS((int)); ++static int search_attr FRWNN_PARAMS((char *)); ++static int is_same_jiritugov FRWNN_PARAMS((int)); ++ + #ifndef NO_FZK +- make_fuzokugo_table (), check_fuzokugo (), sort (), ++static int count_yomi FRWNN_PARAMS((void)); ++static int count_fz_num FRWNN_PARAMS((void)); ++static int count_same_yomi FRWNN_PARAMS((int)); ++static void sort FRWNN_PARAMS((void)); ++static void check_fuzokugo FRWNN_PARAMS((void)); ++static void make_fuzokugo_table FRWNN_PARAMS((void)); + #endif +- read_syuutanv (), set_tc_from_name (), manipulate_tc (), +-print_out (), set_heap (), get_id_part (), check_attrs (), read_a_vector (), set_attribute (), bit_or (), set_id (), pre_clear_jiritugo_v (), usage (), sort_id (); +-extern int wnn_find_hinsi_by_name (), wnn_loadhinsi (), create_file_header (); ++ ++static void set_heap FRWNN_PARAMS((char **, char *)); ++static void set_tc_from_name FRWNN_PARAMS((void)); ++static void get_id_part FRWNN_PARAMS((char *, char *)); ++static void sort_id FRWNN_PARAMS((void)); ++static void usage FRWNN_PARAMS((void)); ++static void read_attr FRWNN_PARAMS((void)); ++static void read_id FRWNN_PARAMS((void)); ++static void read_jiritugov FRWNN_PARAMS((void)); ++static void read_syuutanv FRWNN_PARAMS((void)); ++static void set_tc_from_name FRWNN_PARAMS((void)); ++static void print_out FRWNN_PARAMS((void)); ++static void manipulate_tc FRWNN_PARAMS((void)); ++static void manipulate_tc_vector FRWNN_PARAMS((struct vector *)); ++static void check_attrs FRWNN_PARAMS((int, char *)); ++static void read_a_vector FRWNN_PARAMS((struct vector *)); ++static void set_attribute FRWNN_PARAMS((char *c, struct vector *)); ++static void bit_or FRWNN_PARAMS((int [], int [])); ++static void set_id FRWNN_PARAMS((int, int)); ++static void pre_clear_jiritugo_v FRWNN_PARAMS((int)); ++static void init FRWNN_PARAMS((int, char **)); ++ ++extern int wnn_loadhinsi (), create_file_header (); + + static void + error_format (s, d1, d2, d3, d4, d5) +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jutil/atorev.c FreeWnn-1.1.1-a022.new/Wnn/jutil/atorev.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jutil/atorev.c 2004-07-20 03:24:26.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jutil/atorev.c 2013-08-13 19:47:30.016552682 +0900 +@@ -53,12 +53,19 @@ + #include "jdata.h" + #include "wnn_string.h" + ++#include "jutil.h" ++ + extern int kanjicount; + extern struct JT jt; + +-static void r_alloc (), make_ri2 (), make_ri1 (), set_rpter1 (); ++static void set_rpter1 (); ++static void r_alloc FRWNN_PARAMS((void)); ++static void make_ri2 FRWNN_PARAMS((void)); ++static void make_ri1 FRWNN_PARAMS((int)); ++static void set_rpter1 FRWNN_PARAMS((int)); ++ + extern int sort_func_je (); +-extern void sort_if_not_sorted (), uniq_je (), output_dic_data (), sort_kanji (), upd_kanjicount (); ++extern void sort_kanji (); + + struct je **ptmp; + +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jutil/dic_head.c FreeWnn-1.1.1-a022.new/Wnn/jutil/dic_head.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jutil/dic_head.c 2004-07-20 03:24:26.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jutil/dic_head.c 2013-08-13 17:45:11.832844819 +0900 +@@ -35,7 +35,10 @@ + #include "jh.h" + #include "jdata.h" + +-extern int create_file_header (), output_header_jt (), input_file_header (), input_header_jt (), input_header_hjt (); ++#include "jutil.h" ++#include "etc.h" ++ ++/* extern int create_file_header (), output_header_jt (), input_file_header (), input_header_jt (), input_header_hjt (); */ + + int + output_header (FILE* ofpter, struct JT* jtp, struct wnn_file_head* fhp) +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jutil/dtoa.c FreeWnn-1.1.1-a022.new/Wnn/jutil/dtoa.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jutil/dtoa.c 2005-06-13 02:14:23.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jutil/dtoa.c 2013-08-15 20:07:50.045146537 +0900 +@@ -55,7 +55,11 @@ + #endif /* STDC_HEADERS */ + #if HAVE_UNISTD_H + # include +-#endif ++#else /* HAVE_UNISTD_H */ ++extern int optind; ++extern char *optarg; ++#endif /* HAVE_UNISTD_H */ ++ + + #include "commonhd.h" + #include "wnn_config.h" +@@ -70,12 +74,31 @@ + extern int pzy_flag; /* Pinyin or Zhuyin */ + #endif + +-extern void parse_options (), usage (), input_dic (), udtoujis (), kset (), sdtoujis (), ghindo (), sort (), output_ujis (), exit1 (), init_jeary (), get_kanji_str (); +-extern int input_header (), input_comment (), input_hinsi_list (), little_endian (), revdic (), wnn_loadhinsi (), init_heap (), w_stradd (), input_hindo_header (), motoni2 (); ++#include "etc.h" ++#include "jutil.h" ++ ++void parse_options FRWNN_PARAMS((int *, char ***)); ++void usage FRWNN_PARAMS((void)); ++void udtoujis FRWNN_PARAMS((void)); ++void kset FRWNN_PARAMS((void)); ++void sdtoujis FRWNN_PARAMS((char *hopter, register int level)); ++void ghindo FRWNN_PARAMS((int, char **)); ++int input_comment FRWNN_PARAMS((register FILE *)); ++int input_hinsi_list FRWNN_PARAMS((register FILE *)); ++void input_dic FRWNN_PARAMS((FILE *)); ++ ++extern void sort (), output_ujis (), exit1 (), init_jeary (), get_kanji_str (); ++extern int input_header (), little_endian (), revdic (), wnn_loadhinsi (), init_heap (), w_stradd (), input_hindo_header (), motoni2 (); ++ + #ifdef CONVERT_with_SiSheng +-extern int cwnn_yincod_pzy_str (), input_sisheng (); +-#endif +-static int rdtoujis (), set_hinsi (), input_hindo (), add_hindo (); ++int input_sisheng FRWNN_PARAMS((register FILE *ifpter)); ++#endif /* CONVERT_with_SiSheng */ ++ ++static int rdtoujis FRWNN_PARAMS((void)); ++static int add_hindo FRWNN_PARAMS((register FILE *, int)); ++static int input_hindo FRWNN_PARAMS((register FILE *)); ++static int set_hinsi FRWNN_PARAMS((void)); ++ + /* Moved from Wnn/etc/bdic.c */ + int get_n_EU_str (FILE* ifpter, int n, w_char* st); + int get_short (short* sp, FILE* ifpter); +@@ -100,13 +123,13 @@ + { + FILE *ifpter; + char *cswidth_name; +- extern char *get_cswidth_name (); +- extern void set_cswidth (); + + com_name = argv[0]; + +- if (cswidth_name = get_cswidth_name (WNN_DEFAULT_LANG)) +- set_cswidth (create_cswidth (cswidth_name)); ++ if ((cswidth_name = get_cswidth_name (WNN_DEFAULT_LANG)) != NULL) ++ { ++ set_cswidth (create_cswidth (cswidth_name)); ++ } + parse_options (&argc, &argv); + + if ((ifpter = fopen (infile, "r")) == NULL) +@@ -161,8 +184,6 @@ + char ***argv; + { + int c; +- extern int optind; +- extern char *optarg; + + #ifdef CONVERT_with_SiSheng + # define OPTSTRING "nseEzh:" +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jutil/oldatonewa.c FreeWnn-1.1.1-a022.new/Wnn/jutil/oldatonewa.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jutil/oldatonewa.c 2004-07-20 03:24:26.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jutil/oldatonewa.c 2013-08-13 14:32:53.743940895 +0900 +@@ -49,6 +49,8 @@ + #include "wnn_os.h" + #include "wnn_string.h" + ++#include "etc.h" ++ + static char *ohinsi[] = { + "カ行五段", + "カ行(行く)", +@@ -86,7 +88,6 @@ + + #define LINE_SIZE 1024 + +-extern int motoni2 (); + static int get_line1 (char* buffer); + static char* get_string (char* str, char* buf); + +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jutil/ujisf.c FreeWnn-1.1.1-a022.new/Wnn/jutil/ujisf.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jutil/ujisf.c 2010-12-24 02:17:43.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jutil/ujisf.c 2013-08-15 11:44:02.345908128 +0900 +@@ -57,30 +57,31 @@ + #include "wnn_os.h" + #include "wnn_string.h" + ++#include "etc.h" ++#include "jutil.h" ++ + #ifdef CHINESE + #include "cplib.h" + int pzy_flag = CWNN_PINYIN; /* Pinyin or Zhuyin */ +-static void sisheng_num (), read_kanji_str_w (); ++static void sisheng_num (register char *, register int *); ++static void read_kanji_str_w (register w_char *, register w_char *); + #endif + + #ifndef min +-#define min(a, b) ((a > b)? b:a) +-#define max(a, b) ((a < b)? b:a) ++#define min(a, b) (((a) > (b))? (b) : (a)) ++#define max(a, b) (((a) < (b))? (b) : (a)) + #endif + + extern unsigned char kanjiaddr (unsigned char *d0, w_char* kanji, w_char* yomi, w_char* comment); + extern void Print_entry (w_char* yomi, w_char* kstr, w_char* cstr, + int hindo, int ima, int hinsi, int serial, + FILE* ofpter, int esc_exp); +-extern int wnn_find_hinsi_by_name (); +-#ifdef CHINESE +-extern void cwnn_zy_str_analysis (), cwnn_py_str_analysis (); +-#endif +-int sort_func (), Sorted (), w_stradd (); +-static void Kanjistradd (), bunpou_num (), read_kanji_str (), toesc (); +-void exit1 (); ++extern int w_stradd (); + +-extern struct JT jt; ++static void Kanjistradd FRWNN_PARAMS((w_char *, w_char *, w_char *, register UCHAR **)); ++static void bunpou_num FRWNN_PARAMS((register char *, register int *)); ++static void read_kanji_str FRWNN_PARAMS((register char *, register char *)); ++static void toesc FRWNN_PARAMS((char *, char *)); + + /* extern variables */ + +@@ -547,7 +548,7 @@ + } + } + +-extern char *wnn_get_hinsi_name (); ++/* extern char *wnn_get_hinsi_name (); */ + + void + print_je (jep, opter, serial_out, esc_exp) +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jutil/wddel.c FreeWnn-1.1.1-a022.new/Wnn/jutil/wddel.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jutil/wddel.c 2012-06-13 04:18:32.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jutil/wddel.c 2013-08-15 20:13:04.762148196 +0900 +@@ -48,10 +48,12 @@ + # if HAVE_MALLOC_H + # include + # endif ++extern char *getenv (); + #endif /* STDC_HEADERS */ ++ + #if HAVE_UNISTD_H + # include +-#endif ++#endif /* HAVE_UNISTD_H */ + + #include "commonhd.h" + #include "wnn_config.h" +@@ -60,6 +62,8 @@ + #include "wnn_string.h" + #include "wnn_os.h" + ++#include "etc.h" ++ + #define WORD_DELETE 1 + #define COMMENT_SET 2 + #define HINDO_SET 3 +@@ -105,9 +109,6 @@ + int argc; + char **argv; + { +- extern char *getenv (); +- extern int optind; +- extern char *optarg; + struct wnn_dic_info *info; + int c; + int k; +@@ -115,8 +116,6 @@ + int sno; + char s[LINE_SIZE]; + char *cswidth_name; +- extern char *get_cswidth_name (); +- extern void set_cswidth (); + + if (getenv (WNN_DEF_SERVER_ENV)) + { +@@ -128,8 +127,10 @@ + } + server_n = def_server; + +- if (cswidth_name = get_cswidth_name (WNN_DEFAULT_LANG)) +- set_cswidth (create_cswidth (cswidth_name)); ++ if ((cswidth_name = get_cswidth_name (WNN_DEFAULT_LANG)) != NULL) ++ { ++ set_cswidth (create_cswidth (cswidth_name)); ++ } + while ((c = getopt (argc, argv, "D:n:d:CHEL")) != EOF) + { + switch (c) +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jutil/wdreg.c FreeWnn-1.1.1-a022.new/Wnn/jutil/wdreg.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jutil/wdreg.c 2012-06-13 04:18:32.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jutil/wdreg.c 2013-08-15 20:14:40.489148701 +0900 +@@ -48,6 +48,7 @@ + # if HAVE_MALLOC_H + # include + # endif ++extern char *getenv (); + #endif /* STDC_HEADERS */ + #include + #include +@@ -63,9 +64,8 @@ + #include "jdata.h" + #include "wnn_os.h" + +-extern int init_heap (); +-extern void ujis_header (), read_ujis (); +-extern struct je **jeary; ++#include "etc.h" ++#include "jutil.h" + + char *def_server; + struct JT jt; +@@ -105,16 +105,11 @@ + int argc; + char **argv; + { +- extern int optind; +- extern char *optarg; + struct wnn_dic_info *info; + int c; + int k; + int num; + char *cswidth_name; +- extern char *get_cswidth_name (); +- extern void set_cswidth (); +- extern char *getenv (); + + if (getenv (WNN_DEF_SERVER_ENV)) + { +@@ -126,8 +121,10 @@ + } + server_n = def_server; + +- if (cswidth_name = get_cswidth_name (WNN_DEFAULT_LANG)) +- set_cswidth (create_cswidth (cswidth_name)); ++ if ((cswidth_name = get_cswidth_name (WNN_DEFAULT_LANG)) != NULL) ++ { ++ set_cswidth (create_cswidth (cswidth_name)); ++ } + while ((c = getopt (argc, argv, "D:n:d:L")) != EOF) + { + switch (c) +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jutil/wnnkill.c FreeWnn-1.1.1-a022.new/Wnn/jutil/wnnkill.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jutil/wnnkill.c 2005-01-31 02:14:20.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jutil/wnnkill.c 2013-08-13 14:02:01.093055294 +0900 +@@ -55,6 +55,9 @@ + #include "wnn_config.h" + #include "wnn_os.h" + ++#include "jlib_hide.h" ++#include "etc.h" ++ + WNN_JSERVER_ID *js; + struct wnn_ret_buf rb = { 0, NULL }; + #define BUFSTRLEN 1024 +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jutil/wnnstat.c FreeWnn-1.1.1-a022.new/Wnn/jutil/wnnstat.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jutil/wnnstat.c 2002-05-13 07:51:17.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jutil/wnnstat.c 2013-08-13 13:59:30.119064617 +0900 +@@ -52,6 +52,7 @@ + #if HAVE_UNISTD_H + # include + #endif ++#include + + #include "jslib.h" + #include "jllib.h" +@@ -61,6 +62,9 @@ + #include "wnn_os.h" + #include "msg.h" + ++#include "jlib_hide.h" ++#include "etc.h" ++ + WNN_JSERVER_ID *js; + struct wnn_ret_buf rb = { 0, NULL }; + #define WNNSTAT_ENV "This_is_wnnstat" +@@ -73,13 +77,24 @@ + #define W_DIC_ALL 5 + #define W_VERSION 6 + ++extern int optind; ++extern char *optarg; ++extern char *getenv (); ++ + #ifdef JAPANESE + extern int eujis_to_jis8 (), eujis_to_sjis (); + #endif + #ifdef CHINESE + extern int ecns_to_big5 (); + #endif +-static void printall (), printpat (), err (), usage (), who (), dic (), dic_all (), file_all (), wsttost (), out (); ++static void err (), usage (), dic (), dic_all (), file_all (); ++static void printall FRWNN_PARAMS((WNN_ENV_INFO *, int)); ++static void printpat FRWNN_PARAMS((WNN_ENV_INFO *, int)); ++static void wsttost FRWNN_PARAMS((char *, w_char *)); ++ ++static void who FRWNN_PARAMS((char *lang)); ++static void out FRWNN_PARAMS((const char *, ...)); ++ + + #ifdef CHINESE + #ifdef TAIWANESE +@@ -108,16 +123,13 @@ + int c, i, j; + WNN_ENV_INFO *w; + static char lang[64] = { 0 }; +- extern int optind; +- extern char *optarg; +- extern char *getenv (); + char nlspath[64]; + /* + char *p; + */ + char *server_env = NULL; + char *prog = argv[0]; +- extern char *_wnn_get_machine_of_serv_defs (), *get_server_env (); ++ extern char *get_server_env (); + + /* + if ((p = getenv("LANG")) != NULL) { +@@ -246,8 +258,8 @@ + { + out ("%s:", prog); + if (serv && *serv) +- out (serv); +- out (wnn_perror_lang (lang)); ++ out ("%s", serv); ++ out ("%s", wnn_perror_lang (lang)); + putchar ('\n'); + /* out(" jserver と接続出来ません。\n"); */ + exit (-1); +@@ -519,13 +531,20 @@ + } + + static void +-out (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) +- char *a1, *a2, *a3, *a4, *a5, *a6, *a7, *a8, *a9, *a10, *a11, *a12, *a13; ++out (const char * format, ...) + { + int len; + char buf[1024]; + char jbuf[1024]; +- sprintf (buf, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); ++ va_list ap; ++ ++ va_start (ap, format); ++#ifdef HAVE_SNPRINTF /* Should also have vsnprintf */ ++ vsnprintf (buf, sizeof buf, format, ap); ++#else ++ vsprintf (buf, format, ap); /* Dangerous */ ++#endif /* HAVE_SNPRINTF */ ++ va_end (ap); + + len = strlen (buf); + switch (ocode) +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/jutil/wnntouch.c FreeWnn-1.1.1-a022.new/Wnn/jutil/wnntouch.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/jutil/wnntouch.c 2004-07-20 03:24:26.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/jutil/wnntouch.c 2013-08-13 22:12:35.103367152 +0900 +@@ -52,6 +52,8 @@ + #include "commonhd.h" + #include "getopt.h" /* GNU getopt in the stock */ + ++#include "etc.h" ++ + extern int input_file_header (), check_inode (), change_file_uniq (); + static void usage (void); + +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/romkan/rk_bltinfn.c FreeWnn-1.1.1-a022.new/Wnn/romkan/rk_bltinfn.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/romkan/rk_bltinfn.c 2013-08-15 14:44:15.361965120 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/romkan/rk_bltinfn.c 2013-08-14 15:25:33.429462296 +0900 +@@ -54,6 +54,8 @@ + #include "rk_header.h" + #include "jslib.h" + ++#include "romkan.h" ++ + /* 半角文字のコードのdefine */ + #define HKCHOU (HNKAK1 * 0x100 + 0xB0) /* ー */ + #define HKDKTN (HNKAK1 * 0x100 + 0xDE) /* ゙ */ +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/basic_op.c FreeWnn-1.1.1-a022.new/Wnn/uum/basic_op.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/basic_op.c 2006-02-11 03:29:38.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/uum/basic_op.c 2013-08-15 08:59:54.712856224 +0900 +@@ -189,10 +189,6 @@ + int in; + unsigned int *output; + +- extern int kakutei (); +- extern int send_string (); +- extern int return_it (); +- + not_redraw = 0; + while (1) + { +@@ -287,7 +283,8 @@ + { + if (tmp_send) + { +- ret = return_it (c, romkan); ++ /* ret = return_it (c, romkan); */ ++ ret = return_it (c); + tmp_send = 0; + } + else +@@ -401,7 +398,7 @@ + + int + input_a_char_from_function (fun) +- int (*fun) (); ++ int (*fun) (void); + { + int c; + int ret = 0; +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/header.c FreeWnn-1.1.1-a022.new/Wnn/uum/header.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/header.c 2006-03-05 04:01:46.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/uum/header.c 2013-08-15 12:33:46.636923857 +0900 +@@ -38,6 +38,8 @@ + #include "sheader.h" + #include "buffer.h" + ++#include "etc.h" ++ + int not_redraw; + w_char *input_buffer; + w_char *return_buf; /* return you mojiretsu buffer */ +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/history.c FreeWnn-1.1.1-a022.new/Wnn/uum/history.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/history.c 2002-05-13 07:51:17.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/uum/history.c 2013-08-14 20:12:25.911553017 +0900 +@@ -104,7 +104,7 @@ + { + if (!history_cunt) + return (0); +- if (n <= 0 || n > maxchg || *wstr == NULL) ++ if (n <= 0 || n > maxchg || *wstr == 0) + return (-1); + + if (n == 1 && NORMAL_CHAR (*wstr)) +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/inspect.c FreeWnn-1.1.1-a022.new/Wnn/uum/inspect.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/inspect.c 2012-06-16 19:02:04.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/uum/inspect.c 2013-08-15 08:52:56.838854022 +0900 +@@ -181,7 +181,7 @@ + return (0); + } + +-static void sakujo_kouho1 (); ++static void sakujo_kouho1 (int); + + int + sakujo_kouho () +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/jhlp.c FreeWnn-1.1.1-a022.new/Wnn/uum/jhlp.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/jhlp.c 2013-08-04 00:06:16.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/uum/jhlp.c 2013-08-15 12:56:49.795931147 +0900 +@@ -141,6 +141,8 @@ + #include + #endif /* SVR4 */ + ++#include "etc.h" ++ + #define ERROR -1 + + jmp_buf kk_env; +@@ -162,7 +164,7 @@ + + static void save_signals (void); + static void restore_signals (void); +-static RETSIGTYPE terminate_handler (void); ++static RETSIGTYPE terminate_handler (int); + static void do_end (void); + static void open_pty (void); + static void open_pty_traditional (void); +@@ -412,7 +414,7 @@ + switch (init_uum ()) + { /* initialize of kana-kanji henkan */ + case -1: +- terminate_handler (); ++ terminate_handler (-1); + break; + case -2: + epilogue (); +@@ -1109,7 +1111,7 @@ + + /** signal SIGCHLD を受けた後の処理をする。*/ + RETSIGTYPE +-chld_handler (void) ++chld_handler (int sig) + { + #ifdef HAVE_WAIT3 + #ifdef HAVE_UNION_WAIT +@@ -1168,7 +1170,7 @@ + + /** signal SIGTERM を受けた時の処理をする。*/ + static RETSIGTYPE +-terminate_handler (void) ++terminate_handler (int sig) + { + signal (SIGCHLD, SIG_IGN); + epilogue_no_close (); +@@ -1182,7 +1184,7 @@ + + #ifdef SIGWINCH + RETSIGTYPE +-resize_handler (void) ++resize_handler (int sig) + { + re_signal (SIGWINCH, resize_handler); + change_size (); +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/jikouho.c FreeWnn-1.1.1-a022.new/Wnn/uum/jikouho.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/jikouho.c 2006-02-11 18:51:44.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/uum/jikouho.c 2013-08-14 18:31:19.091521041 +0900 +@@ -370,6 +370,6 @@ + buf[m++] = *tmp; + } + } +- buf[m] = NULL; ++ buf[m] = '\0'; + strcpy (x, buf); + } +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/jis_in.c FreeWnn-1.1.1-a022.new/Wnn/uum/jis_in.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/jis_in.c 2001-06-15 03:16:07.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/uum/jis_in.c 2013-08-14 11:06:19.040380314 +0900 +@@ -43,7 +43,7 @@ + #define FROM_JIS 0x21 + #define TO_JIS 0x7E + +-static int get_jis_ichiran (); ++static int get_jis_ichiran (char *, int); + + int + in_jis () /* returns code for a moji */ +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/jutil.c FreeWnn-1.1.1-a022.new/Wnn/uum/jutil.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/jutil.c 2002-03-30 10:45:41.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/uum/jutil.c 2013-08-14 19:27:04.087538672 +0900 +@@ -371,16 +371,18 @@ + return (select_line_element (buf_ptr, dic_list_size, 0, "", 0, 0, main_table[tbl])); + } + +-void ++int + print_msg1 (X) + char *X; + { ++ int ans; + push_cursor (); + throw_c (0); + clr_line (); +- printf (X); ++ ans = printf ("%s", X); + flush (); + pop_cursor (); ++ return ans; + } + + void +@@ -544,12 +546,12 @@ + + int + yes_or_no (string) +- char *string; ++ const char *string; + { + int x; + throw_c (0); + clr_line (); +- printf (string); ++ printf ("%s", string); + flush (); + for (;;) + { +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/key_bind.c FreeWnn-1.1.1-a022.new/Wnn/uum/key_bind.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/key_bind.c 2002-03-30 10:45:41.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/uum/key_bind.c 2013-08-14 20:12:12.045552944 +0900 +@@ -248,7 +248,7 @@ + + static char key_binded[sizeof (kansuu_hyo) / sizeof (struct kansuu) + 1]; + +-int key_binding (); ++int key_binding (char [64]); + + int + init_key_table () +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/kuten.c FreeWnn-1.1.1-a022.new/Wnn/uum/kuten.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/kuten.c 2001-06-15 03:16:07.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/uum/kuten.c 2013-08-14 10:58:28.788377836 +0900 +@@ -41,7 +41,7 @@ + + #define MAX_TEN_LENGTH 94 + +-static int get_ichiran (); ++static int get_ichiran (int); + + int + in_kuten () /* returns code for a moji */ +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/printf.c FreeWnn-1.1.1-a022.new/Wnn/uum/printf.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/printf.c 2006-02-11 18:51:44.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/uum/printf.c 2013-08-14 10:25:43.812367479 +0900 +@@ -55,7 +55,7 @@ + { + return ((*char_q_len_func) (x)); + } +- ++/* + void + fprintf (file, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13) + FILE *file; +@@ -68,6 +68,7 @@ + + puteustring (buf2, file); + } ++*/ + + void + puteustring (buf2, file) +@@ -85,6 +86,7 @@ + } + } + ++/* + void + printf (format, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13) + char *format; +@@ -93,6 +95,7 @@ + fprintf (stdout, format, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13); + + } ++*/ + + #define W_BUFLEN 32 + static w_char w_buf[W_BUFLEN]; +@@ -185,8 +188,8 @@ + push_cursor (); + throw_c (0); + clr_line (); +- printf (wnn_perror ()); +- printf (MSG_GET (8)); ++ printf ("%s", wnn_perror ()); ++ printf ("%s", MSG_GET (8)); + /* + printf(" (如何)"); + */ +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/prologue.c FreeWnn-1.1.1-a022.new/Wnn/uum/prologue.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/prologue.c 2002-05-13 07:51:17.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/uum/prologue.c 2013-08-14 16:48:22.888488489 +0900 +@@ -63,6 +63,8 @@ + #include "sheader.h" + #include "wnn_os.h" + ++#include "romkan.h" ++#include "conv.h" + + /** romkan のイニシャライズ */ + int +@@ -222,32 +224,35 @@ + return (0); + } + +-static void ++static int + puts1 (s) +- char *s; ++ const char *s; + { +- printf ("%s\n", s); ++ int ans = printf ("%s\n", s); + flush (); ++ return ans; + } + +-static void ++static int + puts2 (s) +- char *s; ++ const char *s; + { ++ int ans; + throw_c (0); + clr_line (); +- printf ("%s", s); ++ ans = printf ("%s", s); + flush (); ++ return ans; + } + + static int + yes_or_no_init (s) +- char *s; ++ const char *s; + { + for (;;) + { + char x[256]; +- printf (s); ++ printf ("%s", s); + flush (); + if (fgets (x, 256, stdin) == NULL) + { +@@ -269,8 +274,8 @@ + char environment[PATHNAMELEN]; + WnnEnv *p; + WnnEnv *save_cur_normal_env = NULL, *save_cur_reverse_env = NULL; +- int (*yes_no_func) (); +- void (*puts_func) (); ++ int (*yes_no_func) (const char *); ++ int (*puts_func) (const char *); + + if (first == 0) + { +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/screen.c FreeWnn-1.1.1-a022.new/Wnn/uum/screen.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/screen.c 2002-06-22 22:26:21.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/uum/screen.c 2013-08-14 20:24:31.897556844 +0900 +@@ -97,7 +97,8 @@ + #define MARJIN 1 /* カーソルが右端からこれだけの所にくれば、次の画面に行く */ + + static void t_cont_line_note (); +-static int find_character_on_that_col (), set_vst (); ++static int find_character_on_that_col (int, int); ++static int set_vst (); + + void + throw (x) +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/sdefine.h FreeWnn-1.1.1-a022.new/Wnn/uum/sdefine.h +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/sdefine.h 2006-03-05 04:01:46.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/uum/sdefine.h 2013-08-14 10:45:27.831373720 +0900 +@@ -181,8 +181,8 @@ + #define w_char unsigned short + #endif + +-#define printf PRINTF +-#define fprintf FPRINTF ++/* #define printf PRINTF */ ++/* #define fprintf FPRINTF */ + #define remove REMOVE + + #define throw_c(col) throw_col((col) + disp_mode_length) +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/select_ele.c FreeWnn-1.1.1-a022.new/Wnn/uum/select_ele.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/select_ele.c 2012-06-13 04:18:33.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/uum/select_ele.c 2013-08-15 08:30:02.847846780 +0900 +@@ -80,10 +80,10 @@ + /* 1: all */ + static int kosuu; /* kosuu of elements */ + +-static void display_all (), display (); +-static void reverse (); +-static void clear_it (); +-static int find_cc (), set_kouho (), change_decimal (), findcp (); ++static void display_all (int, int), display (int, int); ++static void reverse (int, int); ++static void clear_it (int, int); ++static int find_cc (int), set_kouho (void), change_decimal (int), findcp (int, int); + + int + select_one_element (c, kosuu1, init, msg1, msg_len1, state1, key_tbl) +@@ -113,7 +113,7 @@ + msg_len = msg_len1; + state = state1; + +- dd_size = set_kouho (kosuu); ++ dd_size = set_kouho (); /* dd_size = set_kouho (kosuu); */ + cc = find_cc (init); + + mm = init; +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/sheader.h FreeWnn-1.1.1-a022.new/Wnn/uum/sheader.h +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/sheader.h 2009-06-01 01:35:06.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/uum/sheader.h 2013-08-15 13:00:14.803932228 +0900 +@@ -29,6 +29,10 @@ + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + ++#ifndef FRWNN_SHEADER_H ++#define FRWNN_SHEADER_H 1 ++ ++ + /************************** + * header of standard i/o + **************************/ +@@ -36,6 +40,8 @@ + #include "jslib.h" + #include "wnn_os.h" + ++#include "etc.h" ++ + typedef struct _WnnEnv + { + char *host_name; /* server name */ +@@ -237,7 +243,7 @@ + extern void clr_line (); + extern void clr_line_all (); + extern int connect_jserver (int); +-extern int convert_getterm (); ++/* extern int convert_getterm (char *, int); */ /* moved to include/conv.h */ + extern int convert_key_setup (); + extern int cur_ichi (int, int); + extern void cursor_invisible_raw (void); +@@ -262,16 +268,16 @@ + extern void flushw_buf (void); + extern int forward_char (void); + extern int backward_char (void); +-extern void get_end_of_history (); +-extern void getfname (); ++extern void get_end_of_history (register w_char *); ++extern void getfname (char *, char *); + extern void h_r_off (); + extern void h_r_off_raw (); + extern void h_r_on (); + extern void h_r_on_raw (); + extern int henkan_gop (); +-extern void henkan_if_maru (); ++extern void henkan_if_maru (w_char); + extern int henkan_off (); +-extern int hextodec (); ++extern int hextodec (char); + extern int hinsi_in (); + extern int init_history (); + extern int init_key_table (); +@@ -279,143 +285,140 @@ + extern int init_uum (); + extern int initial_message_out (); + extern void initialize_vars (); +-extern int input_a_char_from_function (); +-extern int insert_char (); +-extern int insert_char_and_change_to_insert_mode (); ++extern int input_a_char_from_function (int (*) (void)); ++extern int insert_char (w_char); ++extern int insert_char_and_change_to_insert_mode (int); + extern int insert_modep (); + extern int j_term_init (); +-extern int flush_designate (); ++/* extern int flush_designate (w_char *); */ /* move to include/etc.h */ + extern int jtosj (); + extern int jutil (); +-extern int kakutei (); +-extern int kana_in (); +-extern int kana_in_w_char_msg (); +-extern int keyin1 (); ++extern int kana_in (char *, int, w_char *, int); ++extern int kana_in_w_char_msg (w_char *, int, w_char *, int); ++extern int keyin1 (int (*) (void), char *); + extern int kk (); + extern void kk_cursor_invisible (); + extern void kk_cursor_normal (); + extern void kk_restore_cursor (); + extern void kk_save_cursor (); +-extern int make_history (); +-extern int make_info_out (); +-extern int make_jikouho_retu (); +-extern void make_kanji_buffer (); +-extern int make_string_for_ke (); +-extern int next_history1 (); ++extern int make_history (register w_char *, register int); ++extern int make_info_out (char [], int, WNN_DIC_INFO [], int); ++extern int make_jikouho_retu (char *, int, char *[], int); ++extern void make_kanji_buffer (int); ++extern int make_string_for_ke (int, char *, int); ++extern int next_history1 (register w_char *); + extern int nobasi_tijimi_mode (); +-extern int nobi_conv (); ++extern int nobi_conv (int, struct wnn_env *); + extern void pop_cursor (); + extern void pop_hrus (); +-extern int previous_history1 (); +-extern void print_buf_msg (); ++extern int previous_history1 (register w_char *); ++extern void print_buf_msg (char *); + extern void reset_cursor (); + extern void push_cursor (); + extern void push_hrus (); +-extern void putchar1 (); +-extern void putchar_norm (); +-extern void puteustring (); ++extern void putchar1 (int); ++extern void putchar_norm (int); ++extern void puteustring (char *, FILE *); + extern int reconnect_jserver_body (); + extern int redraw_line (); + extern int redraw_nisemono (); +-extern void remove_key_bind (); ++extern void remove_key_bind (int); + extern int isconect_jserver (); + extern int ren_henkan0 (); +-extern void reset_bold (); ++extern void reset_bold (int); + extern void reset_cursor_status (); + extern void restore_cursor_raw (); + extern void ring_bell (); + extern void save_cursor_raw (); + extern void scroll_up (); +-extern int select_jikouho1 (); +-extern int select_line_element (); +-extern int select_one_dict1 (); +-extern int select_one_element (); ++extern int select_jikouho1 (int); ++extern int select_line_element (char **, int, int, char *, int, int, int (**) ()); ++extern int select_one_dict1 (int); ++extern int select_one_element (char **, int, int, char *, int, int, int (**) ()); + extern int set_TERMCAP (); +-extern void set_bold (); ++extern void set_bold (int); + extern void set_cursor_status (); +-extern void set_escape_code (); +-extern void set_hanten_ul (); +-extern void set_lc_offset (); ++extern void set_escape_code (char *); ++extern void set_hanten_ul (int, int); ++extern void set_lc_offset (int); + extern void set_screen_vars_default (); + extern void set_keypad_on (); + extern void set_keypad_off (); +-extern void set_scroll_region (); +-extern int st_colum (); ++extern void set_scroll_region (int, int); ++extern int st_colum (int); + extern void t_cont_line_note_delete (); +-extern int t_delete_char (); ++extern int t_delete_char (void); + extern int t_kill (); +-extern int t_move (); ++extern int t_move (int); + extern int t_print_l (); +-extern void t_print_line (); +-extern int t_redraw_move (); +-extern int t_rubout (); ++extern void t_print_line (int, int, int); ++extern int t_redraw_move (int, int, int, int); ++extern int t_rubout (int, int); + extern void t_throw (); + extern int t_yank (); +-extern int tan_conv (); +-extern int tan_henkan1 (); +-extern void throw_col (); +-extern void throw_cur_raw (); ++extern int tan_conv (int); ++extern int tan_henkan1 (int, struct wnn_env *); ++extern void throw_col (int); ++extern void throw_cur_raw (int, int); + extern void touroku (); + extern void u_s_off (); + extern void u_s_off_raw (); + extern void u_s_on (); + extern void u_s_on_raw (); +-extern int update_dic_list (); ++extern int update_dic_list (struct wnn_buf *); + extern int uumrc_get_entries (); +-extern void w_printf (); +-extern int w_putchar (); ++extern void w_printf (w_char *, int); ++extern int w_putchar (w_char); + extern void w_sttost (); +-extern int wchartochar (); +-extern int yes_or_no (); +-extern int yes_or_no_or_newline (); ++extern int wchartochar (w_char *, UCHAR *); ++extern int yes_or_no (const char *); ++extern int yes_or_no_or_newline (char *); + extern int zenkouho_dai_c (); +-extern void find_yomi_for_kanji (); ++extern void find_yomi_for_kanji (w_char *, w_char *); + extern int check_vst (); + extern void t_redraw_one_line (); +-extern void throw (); ++extern void throw (int); + extern int keyin (); +-extern int push_unget_buf (); ++extern int push_unget_buf (int); + extern unsigned int *get_unget_buf (); + extern int if_unget_buf (); + +-extern int set_cur_env (); ++extern int set_cur_env (char); + extern char env_state (); +-extern void get_new_env (); ++extern void get_new_env (int); + + extern int call_t_redraw_move_normal (); +-extern int call_t_redraw_move (); ++extern int call_t_redraw_move (int, int, int, int, int); + extern int call_t_redraw_move_1_normal (); +-extern int call_t_redraw_move_1 (); ++extern int call_t_redraw_move_1 (int, int, int, int, int, int, int); + extern int call_t_redraw_move_2_normal (); +-extern int call_t_redraw_move_2 (); +-extern int call_t_print_l_normal (); +-extern int call_t_print_l (); +-extern int c_top_normal (); +-extern int c_end_normal (); ++extern int call_t_redraw_move_2 (int, int, int, int, int, int, int); ++extern int call_t_print_l_normal (int, int); ++extern int call_t_print_l (int, int); ++extern int c_top_normal (void); ++extern int c_end_normal (void); + extern int c_end_nobi_normal (); + extern int char_q_len_normal (); + extern int char_len_normal (); +-extern int t_redraw_move_normal (); ++extern int t_redraw_move_normal (int, int, int, int); + extern int t_print_l_normal (); + extern int call_redraw_line_normal (); +-extern int call_redraw_line (); ++extern int call_redraw_line (int, int); + extern int hani_settei_normal (); + extern void call_errorkeyin (); + extern int call_jl_yomi_len (); +-extern int through (); +-extern int sStrcpy (); +-extern int Sstrcpy (); ++/* extern int through (char *, char *, int); */ ++extern int sStrcpy (UCHAR *, w_char *); ++extern int Sstrcpy (register w_char *, register UCHAR *); + extern char *sStrncpy (); +-extern w_char *Strcat (); +-extern w_char *Strncat (); +-extern int Strncmp (); +-extern w_char *Strcpy (); +-extern w_char *Strncpy (); +-extern int Strlen (); +-extern void conv_ltr_to_ieuc (); +-extern int get_cswidth_by_char (); +-extern int eeuc_to_ieuc (); +-extern int conv_keyin (); ++extern w_char *Strcat (register w_char *, register w_char *); ++extern w_char *Strncat (register w_char *, register w_char *, register int); ++extern int Strncmp (register w_char *, register w_char *, register int); ++extern w_char *Strcpy (register w_char *, register w_char *); ++extern w_char *Strncpy (register w_char *, register w_char *, int); ++extern int Strlen (register w_char *); ++extern void conv_ltr_to_ieuc (register unsigned int *); ++extern int conv_keyin (char *); + + #ifdef JAPANESE + extern int eujis_to_iujis (); +@@ -457,7 +460,7 @@ + extern int hani_settei_yincod (); + extern void errorkeyin_q (); + extern int not_call_jl_yomi_len (); +-extern int cwnn_pzy_yincod (); ++/* extern int cwnn_pzy_yincod (); */ /* move to include/etc.h */ + extern int cwnn_yincod_pzy_str (); + + extern int icns_to_ecns (); +@@ -485,4 +488,10 @@ + extern int do_U_opt (); + #endif /* KOREAN */ + +-extern void romkan_set_lang (); ++/* uif.c */ ++extern int return_it (int); ++extern int send_string (int); ++extern int kakutei (void); ++ ++ ++#endif /* FRWNN_SHEADER_H */ +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/termio.c FreeWnn-1.1.1-a022.new/Wnn/uum/termio.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/termio.c 2006-09-05 02:21:29.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/uum/termio.c 2013-08-14 20:01:47.956549655 +0900 +@@ -119,7 +119,7 @@ + return (-1); + } + #endif /* defined(uniosu) */ +- if (save_cursor == (char *) NULL || *save_cursor == NULL || restore_cursor == (char *) NULL || *restore_cursor == NULL || change_scroll_region == (char *) NULL || *change_scroll_region == NULL) ++ if (save_cursor == (char *) NULL || *save_cursor == '\0' || restore_cursor == (char *) NULL || *restore_cursor == '\0' || change_scroll_region == (char *) NULL || *change_scroll_region == '\0') + { + fprintf (stderr, "Your terminal is not strong enough. Goodbye !\n"); + return (-1); +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/touroku.c FreeWnn-1.1.1-a022.new/Wnn/uum/touroku.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/touroku.c 2006-02-11 18:51:44.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/uum/touroku.c 2013-08-14 17:38:18.193504276 +0900 +@@ -66,7 +66,7 @@ + + int touroku_mark = -1; + +-static int hani_settei (); ++static int hani_settei (w_char *, int); + + /* 登録のための外部関数*/ + void +@@ -473,7 +473,7 @@ + { + kana_end += jl_jiri_len (bun_data_, e_bun) + e_offset - klen; + } +- Strcpy (yomi_buf, yomi_buf + kana_start, kana_end - kana_start); ++ Strncpy (yomi_buf, yomi_buf + kana_start, kana_end - kana_start); + yomi_buf[kana_end - kana_start] = 0; + } + } +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/ttyfdslot.c FreeWnn-1.1.1-a022.new/Wnn/uum/ttyfdslot.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/ttyfdslot.c 2002-06-22 22:26:21.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/uum/ttyfdslot.c 2013-08-14 20:03:19.854550139 +0900 +@@ -68,7 +68,7 @@ + register int slotnum; + + if ((fullnamp = ttyname (fd)) == NULL) +- return NULL; ++ return 0; + if ((ttynamp = rindex (fullnamp, '/')) == NULL) + { + ttynamp = fullnamp; +@@ -78,7 +78,7 @@ + ttynamp++; + } + if ((ttysfp = fopen ("/etc/ttys", "r")) == NULL) +- return NULL; ++ return 0; + for (slotnum = 0; fgets (eachslot, SLOTSIZ, ttysfp);) + { + p = eachslot + strlen (eachslot) - 1; +@@ -92,7 +92,7 @@ + } + } + fclose (ttysfp); +- return NULL; ++ return 0; + } + #endif /* defined(BSD42) && (! defined(BSD43)) || defined(linux) */ + +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/uif.c FreeWnn-1.1.1-a022.new/Wnn/uum/uif.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/uif.c 2003-05-12 03:27:42.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/uum/uif.c 2013-08-15 08:49:44.507853008 +0900 +@@ -169,7 +169,7 @@ + int c, romkan; + { + push_unget_buf (romkan); +- kakutei (c); ++ kakutei (); /* kakutei (c);*/ + return (1); + } + +@@ -670,7 +670,7 @@ + delete_c (c, romkan) + int c, romkan; + { +- t_delete_char (c, romkan); ++ t_delete_char (); /* t_delete_char (c, romkan); */ + if ((c_b->maxlen == 0) && is_HON (romkan)) + { + change_to_empty_mode (); +@@ -1136,7 +1136,7 @@ + /* + char *message = " 接続ホスト名 > "; + */ +- w_char *kana_buf[1024]; ++ w_char *kana_buf[1024]; /* w_char kana_buf[1024]; ? */ + char hostname[128]; + + Sstrcpy (kana_buf, servername); +diff -urN FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/wnnrc_op.c FreeWnn-1.1.1-a022.new/Wnn/uum/wnnrc_op.c +--- FreeWnn-1.1.1-a022.openSUSE/Wnn/uum/wnnrc_op.c 2002-06-22 22:26:21.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/Wnn/uum/wnnrc_op.c 2013-08-15 08:54:02.068854366 +0900 +@@ -645,7 +645,7 @@ + + total = 0; + flag = 0; +- while (*st != NULL) ++ while (*st != '\0') + { + if (isdigit (*st)) + { +diff -urN FreeWnn-1.1.1-a022.openSUSE/cWnn/include/Makefile.in FreeWnn-1.1.1-a022.new/cWnn/include/Makefile.in +--- FreeWnn-1.1.1-a022.openSUSE/cWnn/include/Makefile.in 2003-05-12 03:31:46.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/cWnn/include/Makefile.in 2013-08-15 09:54:20.460873437 +0900 +@@ -38,11 +38,13 @@ + LINKS = wnn_config.h copyright.h demcom.h hinsi_file.h jd_sock.h \ + jdata.h jh.h jlib.h wnn_string.h wnn_os.h hinsi.h ansidecl.h + LINKS2 = getopt.h ++LINKS3 = etc.h jutil.h romkan.h conv.h kaiseki.h jlib_hide.h + + +-all:: $(HEADERS) $(LINKS) $(LINKS2) + +-includes:: $(HEADERS) $(LINKS) $(LINKS2) ++all:: $(HEADERS) $(LINKS) $(LINKS2) $(LINKS3) ++ ++includes:: $(HEADERS) $(LINKS) $(LINKS2) $(LINKS3) + + commonhd.h: $(WNNINCLUDESRC)/commonhd.h + $(RM) $@ +@@ -204,6 +206,60 @@ + + depend:: getopt.h + ++etc.h: $(WNNINCLUDESRC)/etc.h ++ $(RM) $@ ++ $(LN) $? $@ ++ ++includes:: etc.h ++ ++depend:: etc.h ++ ++ ++jutil.h: $(WNNINCLUDESRC)/jutil.h ++ $(RM) $@ ++ $(LN) $? $@ ++ ++includes:: jutil.h ++ ++depend:: jutil.h ++ ++ ++romkan.h: $(WNNINCLUDESRC)/romkan.h ++ $(RM) $@ ++ $(LN) $? $@ ++ ++includes:: romkan.h ++ ++depend:: romkan.h ++ ++ ++conv.h: $(WNNINCLUDESRC)/conv.h ++ $(RM) $@ ++ $(LN) $? $@ ++ ++includes:: conv.h ++ ++depend:: conv.h ++ ++ ++kaiseki.h: $(WNNINCLUDESRC)/kaiseki.h ++ $(RM) $@ ++ $(LN) $? $@ ++ ++includes:: kaiseki.h ++ ++depend:: kaiseki.h ++ ++ ++jlib_hide.h: $(WNNINCLUDESRC)/jlib_hide.h ++ $(RM) $@ ++ $(LN) $? $@ ++ ++includes:: jlib_hide.h ++ ++depend:: jlib_hide.h ++ ++ + # 'clean' entry is not added because last + # 'clean' entry (action = '$(RM) $(LINKS)') does same thing. (aono) + +@@ -224,3 +280,4 @@ + $(RM) $(HEADERS) + $(RM) $(LINKS) + $(RM) $(LINKS2) ++ $(RM) $(LINKS3) +diff -urN FreeWnn-1.1.1-a022.openSUSE/cWnn/jserver/Makefile.in FreeWnn-1.1.1-a022.new/cWnn/jserver/Makefile.in +--- FreeWnn-1.1.1-a022.openSUSE/cWnn/jserver/Makefile.in 2013-08-15 14:44:15.332965120 +0900 ++++ FreeWnn-1.1.1-a022.new/cWnn/jserver/Makefile.in 2013-08-15 10:27:38.379883967 +0900 +@@ -31,12 +31,13 @@ + + include @top_builddir@/makerule.mk + top_srcdir = @top_srcdir@ ++ srcdir = @srcdir@ + top_builddir = @top_builddir@ + + INSTALL = @INSTALL@ $(INSTALLFLAGS) + + JSERVERDEFINES = -DJSERVER -DWRITE_CHECK +- INCLUDES = -I$(CWNNINCLUDESRC) -I$(top_builddir) ++ INCLUDES = -I$(CWNNINCLUDESRC) -I$(top_builddir) -I$(srcdir) + DEFINES = $(CWNNDEFINES) $(JSERVERDEFINES) $(WNNTERM) $(CWNNLANGDEF) + LOCAL_INSTFLAGS = + SERVERINITDEF = -DSERVER_INIT_FILE=\"/$(CWNNLANG)/cserverrc\" +@@ -45,7 +46,7 @@ + THINSIDEFINE = -DHINSIDATA_FILE=\"/$(TWNNLANG)/cixing.data\" + WRAPLIB = @WRAPLIB@ + +-HDRS = ddefine.h de_header.h fzk.h kaiseki.h ++HDRS = ddefine.h de_header.h fzk.h + + SRC0 = de.c + SRC1= dispatch.c do_dic_env.c do_dic_no.c do_filecom.c error.c jbiki.c jbiki_b.c jishoop.c rd_jishoop.c readfile.c b_index.c jishosub.c jmt0.c mknode0.c mknode1.c mknode2.c renbn_kai.c bnsetu_kai.c daibn_kai.c jikouho.c jikouho_d.c fzk.c atojis.c get_kaiarea.c snd_rcv.c do_henkan.c do_henkan1.c do_env.c do_hindo_s.c initjserv.c hinsi_list.c sisheng.c w_string.c +@@ -176,16 +177,6 @@ + clean:: + $(RM) fzk.h + +-kaiseki.h: $(WNNJSERVERSRC)/kaiseki.h +- $(RM) $@ +- $(LN) $? $@ +- +-includes:: kaiseki.h +- +-depend:: kaiseki.h +- +-clean:: +- $(RM) kaiseki.h + + de.c: $(WNNJSERVERSRC)/de.c + $(RM) $@ +diff -urN FreeWnn-1.1.1-a022.openSUSE/kWnn/include/Makefile.in FreeWnn-1.1.1-a022.new/kWnn/include/Makefile.in +--- FreeWnn-1.1.1-a022.openSUSE/kWnn/include/Makefile.in 2003-05-12 03:31:46.000000000 +0900 ++++ FreeWnn-1.1.1-a022.new/kWnn/include/Makefile.in 2013-08-15 17:36:53.098098801 +0900 +@@ -38,10 +38,11 @@ + LINKS = wnn_config.h copyright.h demcom.h hinsi_file.h jd_sock.h jdata.h \ + jh.h jlib.h wnn_string.h wnn_os.h hinsi.h ansidecl.h + LINKS2 = getopt.h ++LINKS3 = etc.h jutil.h romkan.h conv.h kaiseki.h jlib_hide.h + +-all:: $(HEADERS) $(LINKS) $(LINKS2) ++all:: $(HEADERS) $(LINKS) $(LINKS2) $(LINKS3) + +-includes:: $(HEADERS) $(LINKS) $(LINKS2) ++includes:: $(HEADERS) $(LINKS) $(LINKS2) $(LINKS3) + + commonhd.h: $(WNNINCLUDESRC)/commonhd.h + $(RM) $@ +@@ -257,6 +258,61 @@ + + depend:: getopt.h + ++ ++etc.h: $(WNNINCLUDESRC)/etc.h ++ $(RM) $@ ++ $(LN) $? $@ ++ ++includes:: etc.h ++ ++depend:: etc.h ++ ++ ++jutil.h: $(WNNINCLUDESRC)/jutil.h ++ $(RM) $@ ++ $(LN) $? $@ ++ ++includes:: jutil.h ++ ++depend:: jutil.h ++ ++ ++romkan.h: $(WNNINCLUDESRC)/romkan.h ++ $(RM) $@ ++ $(LN) $? $@ ++ ++includes:: romkan.h ++ ++depend:: romkan.h ++ ++ ++conv.h: $(WNNINCLUDESRC)/conv.h ++ $(RM) $@ ++ $(LN) $? $@ ++ ++includes:: conv.h ++ ++depend:: conv.h ++ ++ ++kaiseki.h: $(WNNINCLUDESRC)/kaiseki.h ++ $(RM) $@ ++ $(LN) $? $@ ++ ++includes:: kaiseki.h ++ ++depend:: kaiseki.h ++ ++ ++jlib_hide.h: $(WNNINCLUDESRC)/jlib_hide.h ++ $(RM) $@ ++ $(LN) $? $@ ++ ++includes:: jlib_hide.h ++ ++depend:: jlib_hide.h ++ ++ + # 'clean' entry is not added because last + # 'clean' entry (action = '$(RM) $(LINKS)') does same thing. (aono) + +@@ -280,3 +336,4 @@ + $(RM) $(HEADERS) + $(RM) $(LINKS) + $(RM) $(LINKS2) ++ $(RM) $(LINKS3) +diff -urN FreeWnn-1.1.1-a022.openSUSE/kWnn/jserver/Makefile.in FreeWnn-1.1.1-a022.new/kWnn/jserver/Makefile.in +--- FreeWnn-1.1.1-a022.openSUSE/kWnn/jserver/Makefile.in 2013-08-15 14:44:15.333965120 +0900 ++++ FreeWnn-1.1.1-a022.new/kWnn/jserver/Makefile.in 2013-08-15 10:48:52.143890681 +0900 +@@ -31,19 +31,20 @@ + + include @top_builddir@/makerule.mk + top_srcdir = @top_srcdir@ ++ srcdir = @srcdir@ + top_builddir = @top_builddir@ + + INSTALL = @INSTALL@ + + JSERVERDEFINES = -DJSERVER -DWRITE_CHECK +- INCLUDES = -I$(KWNNJSERVERSRC) -I$(KWNNINCLUDESRC) -I$(top_builddir) ++ INCLUDES = -I$(KWNNJSERVERSRC) -I$(KWNNINCLUDESRC) -I$(top_builddir) -I$(srcdir) + DEFINES = $(KWNNDEFINES) $(JSERVERDEFINES) $(WNNTERM) $(KWNNLANGDEF) + LOCAL_INSTFLAGS = + SERVERINITDEF = -DSERVER_INIT_FILE=\"/$(KWNNLANG)/kserverrc\" + HINSIDEFINE = -DHINSIDATA_FILE=\"/$(KWNNLANG)/hinsi.data\" + WRAPLIB = @WRAPLIB@ + +-HDRS = ddefine.h de_header.h fzk.h kaiseki.h ++HDRS = ddefine.h de_header.h fzk.h + + SRC0 = de.c + SRC1= dispatch.c do_dic_env.c do_dic_no.c do_filecom.c error.c jbiki.c jbiki_b.c jishoop.c rd_jishoop.c readfile.c b_index.c jishosub.c jmt0.c mknode0.c mknode1.c mknode2.c renbn_kai.c bnsetu_kai.c daibn_kai.c jikouho.c jikouho_d.c fzk.c atojis.c get_kaiarea.c snd_rcv.c do_henkan.c do_henkan1.c do_env.c do_hindo_s.c initjserv.c hinsi_list.c sisheng.c w_string.c +@@ -142,16 +143,7 @@ + clean:: + $(RM) fzk.h + +-kaiseki.h: $(WNNJSERVERSRC)/kaiseki.h +- $(RM) $@ +- $(LN) $? $@ +- +-includes:: kaiseki.h + +-depend:: kaiseki.h +- +-clean:: +- $(RM) kaiseki.h + + de.c: $(WNNJSERVERSRC)/de.c + $(RM) $@ diff --git a/FreeWnn-prototypes_msg.patch b/FreeWnn-prototypes_msg.patch new file mode 100644 index 0000000..ab93db4 --- /dev/null +++ b/FreeWnn-prototypes_msg.patch @@ -0,0 +1,38 @@ +From: Mitsutoshi NAKANO +Date: 2013-08-09 09:51:15 +0900 +Subject: input: prototype declarations for bugs about error messages . +References: http://lists.opensuse.org/opensuse-ja/2013-08/msg00014.html +Upstream: sent + +Bugfix: In openSUSE 13.1 Milestone 3, +uum could not get error messages . +This issue's cause is that we forgot prototype declaration +of msg_get() in Wnn/include/msg.h . +Then I added "FreeWnn-prototypes_msg.patch" as %Patch15 . +http://lists.opensuse.org/opensuse-ja/2013-08/msg00014.html +http://sourceforge.jp/projects/freewnn/lists/archive/users/2013-August/000140.html + + +--- + +diff -r -u Wnn/include/msg.h /home/mitsutoshi/src/Wnn/include/msg.h +--- Wnn/include/msg.h 2013-08-09 08:34:01.169023491 +0900 ++++ /home/mitsutoshi/src/Wnn/include/msg.h 2013-08-09 08:25:29.353137583 +0900 +@@ -64,8 +64,14 @@ + */ + #define DEF_LANG "ja" + +-extern struct msg_cat *msg_open (); +-extern char *msg_get (); +-extern void msg_close (); ++#if __STDC__ ++#define FRWNN_PARAMS(paramlist) paramlist ++#else ++#define FRWNN_PARAMS(paramlist) () ++#endif ++ ++extern struct msg_cat *msg_open FRWNN_PARAMS((char *, char *, char *)); ++extern char *msg_get FRWNN_PARAMS((struct msg_cat *, int id, char *, register char *lang)); ++extern void msg_close FRWNN_PARAMS((register struct msg_cat *)); + + #endif /* WNN_MSG_H */ diff --git a/FreeWnn-returnvalue.diff b/FreeWnn-returnvalue.diff deleted file mode 100644 index 8f7d4ae..0000000 --- a/FreeWnn-returnvalue.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- Wnn/uum/jhlp.c -+++ Wnn/uum/jhlp.c -@@ -402,6 +402,8 @@ - #endif /* defined(uniosu) */ - - do_main (); -+ /* Shouldn't get here */ -+ return 42; - } - - /* diff --git a/FreeWnn-sighandler.patch b/FreeWnn-sighandler.patch index 8916bf6..8bb5c4e 100644 --- a/FreeWnn-sighandler.patch +++ b/FreeWnn-sighandler.patch @@ -13,7 +13,7 @@ + if (sig == SIGTERM) + _exit(0); + else -+ _exit(-1); ++ _exit(255); +} +#endif + diff --git a/FreeWnn-trad_cpp.patch b/FreeWnn-trad_cpp.patch index e5d4105..0a73155 100644 --- a/FreeWnn-trad_cpp.patch +++ b/FreeWnn-trad_cpp.patch @@ -1,51 +1,52 @@ ---- Wnn/pubdicplus/Makefile.in -+++ Wnn/pubdicplus/Makefile.in +--- FreeWnn-1.1.1-a022.bak/Wnn/pubdicplus/Makefile.in 2013-08-07 06:08:05.039178998 +0900 ++++ FreeWnn-1.1.1-a022/Wnn/pubdicplus/Makefile.in 2013-08-07 00:37:02.866652685 +0900 @@ -421,7 +421,7 @@ $(LN) $? $@ std.fzk: fzk.master-.c $(FZK_SRC) -- $(CPP) $(FZK_FLAG) fzk.master-.c | egrep -v '^(# |#line |#pragma |$$)' | $(ATOF) -h $(HINSI) $@ +- $(FZK_PP) $(FZK_FLAG) fzk.master-.c | egrep -v '^(# |#line |#pragma |$$)' | $(ATOF) -h $(HINSI) $@ + $(CPP) -traditional-cpp $(FZK_FLAG) fzk.master-.c | egrep -v '^(# |#line |#pragma |$$)' | $(ATOF) -h $(HINSI) $@ full.fzk: $(FZK_SRC) $(MAKE) FZK_FLAG=-DKANSAI std.fzk ---- cWnn/cdic/Makefile.in -+++ cWnn/cdic/Makefile.in -@@ -63,10 +63,10 @@ +diff -ur FreeWnn-1.1.1-a022.bak/cWnn/cdic/Makefile.in FreeWnn-1.1.1-a022/cWnn/cdic/Makefile.in +--- FreeWnn-1.1.1-a022.bak/cWnn/cdic/Makefile.in 2013-08-07 06:08:05.110178385 +0900 ++++ FreeWnn-1.1.1-a022/cWnn/cdic/Makefile.in 2013-08-07 00:39:21.716718581 +0900 +@@ -64,10 +64,10 @@ $(DICS): $(HINSI) $(FULL):: $(FZK_SRCS) con.master-.c -- $(CPP) -I$(srcdir) $(FZK_FLAG) con.master-.c | egrep -v '^(# |#line |#pragma |$$)' | $(ATOF) -h $(HINSI) $@ +- $(FZK_PP) -I$(srcdir) $(FZK_FLAG) con.master-.c | egrep -v '^(# |#line |#pragma |$$)' | $(ATOF) -h $(HINSI) $@ + $(CPP) -traditional-cpp -I$(srcdir) $(FZK_FLAG) con.master-.c | egrep -v '^(# |#line |#pragma |$$)' | $(ATOF) -h $(HINSI) $@ $(FULLR):: $(FZK_SRCS) con.masterR-.c -- $(CPP) -I$(srcdir) $(FZK_FLAG) con.masterR-.c | egrep -v '^(# |#line |#pragma |$$)' | $(ATOF) -h $(HINSI) $@ +- $(FZK_PP) -I$(srcdir) $(FZK_FLAG) con.masterR-.c | egrep -v '^(# |#line |#pragma |$$)' | $(ATOF) -h $(HINSI) $@ + $(CPP) -traditional-cpp -I$(srcdir) $(FZK_FLAG) con.masterR-.c | egrep -v '^(# |#line |#pragma |$$)' | $(ATOF) -h $(HINSI) $@ # To avoid circular dependency, we don't use 'con.master?.c' con.master-.c: con.master ---- cWnn/tdic/Makefile.in -+++ cWnn/tdic/Makefile.in -@@ -63,10 +63,10 @@ +--- FreeWnn-1.1.1-a022.bak/cWnn/tdic/Makefile.in 2013-08-07 06:08:05.139178134 +0900 ++++ FreeWnn-1.1.1-a022/cWnn/tdic/Makefile.in 2013-08-07 00:43:26.207005663 +0900 +@@ -64,10 +64,10 @@ $(DICS): $(HINSI) $(FULL):: $(FZK_SRCS) con.master-.c -- $(CPP) -I$(srcdir) $(FZK_FLAG) con.master-.c | egrep -v '^(# |#line |#pragma |$$)' | $(ATOF) -h $(HINSI) $@ +- $(FZK_PP) -I$(srcdir) $(FZK_FLAG) con.master-.c | egrep -v '^(# |#line |#pragma |$$)' | $(ATOF) -h $(HINSI) $@ + $(CPP) -traditional-cpp -I$(srcdir) $(FZK_FLAG) con.master-.c | egrep -v '^(# |#line |#pragma |$$)' | $(ATOF) -h $(HINSI) $@ $(FULLR):: $(FZK_SRCS) con.masterR-.c -- $(CPP) -I$(srcdir) $(FZK_FLAG) con.masterR-.c | egrep -v '^(# |#line |#pragma |$$)' | $(ATOF) -h $(HINSI) $@ +- $(FZK_PP) -I$(srcdir) $(FZK_FLAG) con.masterR-.c | egrep -v '^(# |#line |#pragma |$$)' | $(ATOF) -h $(HINSI) $@ + $(CPP) -traditional-cpp -I$(srcdir) $(FZK_FLAG) con.masterR-.c | egrep -v '^(# |#line |#pragma |$$)' | $(ATOF) -h $(HINSI) $@ # To avoid circular dependency, we don't use 'con.master?.c' con.master-.c: con.master ---- kWnn/kdic/Makefile.in -+++ kWnn/kdic/Makefile.in -@@ -61,7 +61,7 @@ +--- FreeWnn-1.1.1-a022.bak/kWnn/kdic/Makefile.in 2013-08-07 06:08:05.151178030 +0900 ++++ FreeWnn-1.1.1-a022/kWnn/kdic/Makefile.in 2013-08-07 00:44:57.500267277 +0900 +@@ -62,7 +62,7 @@ $(DICS): $(HINSI) $(FULL):: $(FZK_SRCS) fzk.master-.c -- $(CPP) -I$(srcdir) $(FZK_FLAG) fzk.master-.c | egrep -v '^(# |#line |#pragma |$$)' | $(ATOF) -h $(HINSI) $@ +- $(FZK_PP) -I$(srcdir) $(FZK_FLAG) fzk.master-.c | egrep -v '^(# |#line |#pragma |$$)' | $(ATOF) -h $(HINSI) $@ + $(CPP) -traditional-cpp -I$(srcdir) $(FZK_FLAG) fzk.master-.c | egrep -v '^(# |#line |#pragma |$$)' | $(ATOF) -h $(HINSI) $@ # To avoid circular dependency, we don't use 'fzk.master.c' diff --git a/FreeWnn-uum.patch b/FreeWnn-uum.patch deleted file mode 100644 index ea49bbb..0000000 --- a/FreeWnn-uum.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- BUILD/FreeWnn-1.1.1-a021/Wnn/uum/jhlp.c -+++ BUILD/FreeWnn-1.1.1-a021/Wnn/uum/jhlp.c -@@ -1755,7 +1755,7 @@ - } - #endif /* defined(uniosu) */ - --#ifndef sgi -+#if !defined(sgi) && !defined(linux) - ptyname (nmbuf, ptynm, ptyno); - if (chown (nmbuf, 0, 0) == ERROR) - { ---- BUILD/FreeWnn-1.1.1-a021/makerule.mk.in -+++ BUILD/FreeWnn-1.1.1-a021/makerule.mk.in -@@ -94,7 +94,7 @@ - CFLAGS = @CFLAGS@ @CDEBUGFLAGS@ $(CCOPTIONS) @ipv6@ @DEFS@ $(ALLDEFINES) - LIBS = @LIBS@ - LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES) --LDOPTIONS = @CDEBUGFLAGS@ $(CCOPTIONS) -+LDOPTIONS = @CDEBUGFLAGS@ $(CCOPTIONS) -L@libdir@/termcap - - - # -@@ -112,7 +112,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/fwnn.changes b/fwnn.changes index 800716f..bb426cb 100644 --- a/fwnn.changes +++ b/fwnn.changes @@ -1,3 +1,342 @@ +------------------------------------------------------------------- +Thu Aug 15 15:42:53 UTC 2013 - bkbin005@rinku.zaq.ne.jp + +- Modify FreeWnn-prototypes_3.patch . + I found a bug in make_hinsi_list() at Wnn/jserver/hinsi_list.c, + then fixed it . + +------------------------------------------------------------------- +Thu Aug 15 15:07:13 UTC 2013 - bkbin005@rinku.zaq.ne.jp + +- Add FreeWnn-prototypes_3.patch . + Prototype declarations for reducing compilation warnings . + +------------------------------------------------------------------- +Fri Aug 9 00:51:15 UTC 2013 - bkbin005@rinku.zaq.ne.jp + +- Add FreeWnn-prototypes_msg.patch . + Bugfix: In openSUSE 13.1 Milestone 3, + uum could not get error messages . + This issue's cause is that we forgot prototype declaration + of msg_get() in Wnn/include/msg.h . + Then I added "FreeWnn-prototypes_msg.patch" as %Patch15 . + http://lists.opensuse.org/opensuse-ja/2013-08/msg00014.html + http://sourceforge.jp/projects/freewnn/lists/archive/users/2013-August/000140.html +- I added %configure --with-libwrap option . + The [jctk]server s were linked -lwrap . + Then we can use /etc/hosts.allow /etc/hosts.deny . +- Degrade fix: In "FreeWnn-prototypes.patch", + I invalidated the patch of "FreeWnn-sighandler.patch" . + Then I deleted a wrong patch to "Wnn/jserver/de.c" + from "FreeWnn-prototypes.patch" . + http://sourceforge.jp/projects/freewnn/lists/archive/users/2013-August/000141.html +- Change: In "FreeWnn-sighandler.patch", + I changed from _exit(-1) to _exit(255) . + This change effects [jctk]server's exit status . + +------------------------------------------------------------------- +Thu Aug 8 04:16:47 UTC 2013 - bkbin005@rinku.zaq.ne.jp + +- SLE_11 and openSUSE 12.2 does not provide libwrap0, + then I could not build FreeWnn on them . + So, I deleted %configure --with-libwrap option + and "BuildRequires: libwrap0" from fwnn.spec file . + +------------------------------------------------------------------- +Wed Aug 7 22:53:49 UTC 2013 - bkbin005@rinku.zaq.ne.jp + +- The uum can use UNIX 98 pseudoterminal now . (bnc#830533) + https://bugzilla.novell.com/show_bug.cgi?id=830533 +- The kuum is packaged in fkwnn . +- The cuum is packaged in fcwnncom . +- The [jctk]server s were linked -lwrap . + Then we can use /etc/hosts.allow /etc/hosts.deny . +- This release need not link to -ltermcap, but use ncurses, + then fwnn.spec was changed . +- FreeWnn-trad_cpp.patch: + Makefile.in s were changed formats, then remade the patch . +- FreeWnn-prototypes.patch: + Already, many functions were added prototype decraretion + in the tarball, then remade this patch . +- FreeWnn-returnvalue.diff: + Already, the tarball's source was fixed about return value . + Then this patch was removed . +- FreeWnn-include.patch: + Many sources already included proper header files . + Then this patch was remade . +- Freewnn-1.1.1-a21.dif was deleted, + but Freewnn-1.1.1-a22.dif was added: + In Wnn/include/jllib.h, many functions were added + prototype decraretion in the tarball, + then they need not to declare in the patch . + In Wnn/jlib/jlib.c, wrong cast changed . +- FreeWnn-uum.patch, fwnn.spec: + Now, FreeWnn need not to use -ltermcap, + but need to use -lncursess, then this patch was deleted . + And "BuildRequires:" was changed from termcap to ncurses + in fwnn.spec . +- FreeWnn-ja.patch: + FreeWnn-1.1.1-a017/Xsi/Wnn/uum/header.c was changed , then remade it . +- Fwnn-fsstnd-patch: + Changed makerule.mk.in format, then remade it . +- FreeWnn 1.1.1-a-22 released . + * Removed strange word (pronounces as 'Hirokazu', transfers to + 'Kobayashi'). Spotted by some poster of FreeWnn thread in + 2ch.net + (http://toro.2ch.net/test/read.cgi/unix/1084551838/458) + * uum failed to start on traditional systems because opening + tty fails. Fixed open_pty_traditional() + to set tty_slave correctly. + * Improve libutil detection. Systems that have both ptsname() and + openpty() does not need libutil, this change (probably) + covers these systems. ([freewnn-users 133]). + http://sourceforge.jp/projects/freewnn/lists/archive/users/2013-August/000132.html + * libutil is (may be) used only in uum, so separate this library + (if exists) from normal LIBS. + Patch by 1xx (itsango at gmail.com) ([freewnn-users 126]) + http://sourceforge.jp/projects/freewnn/lists/archive/users/2013-July/000125.html + . + * Pass CPPFLAGS and LDFLAGS on configure / make. + Original suggestion by Hideki Yamane, but arranged a bit. + * Wnn/uum/inspect.c: + Fix typo in comment. + * Wnn/: jutil/wddel.c, jutil/wdreg.c, uum/inspect.c, + uum/select_ele.c: + * Quick fix for warning about format-security by gcc. + Based on patch by Hideki Yamane and Makoto Fujiwara + ([Freewnn-users 102]). + http://sourceforge.jp/projects/freewnn/lists/archive/users/2012-May/000101.html + Replacing from sprintf() to snprintf() or strncat() + would be better. + * (Wnn/jutil/wddel.c) Change (fix?) type of Com[] to w_char + in code for 'wddel -C' mode. I think I'm doing right, + but not tested. + * Strip old mail address (as usual). + * configure, configure.in, Wnn/jutil/Makefile.in, + Wnn/uum/Makefile.in, cWnn/jutil/Makefile.in, + cWnn/uum/Makefile.in, kWnn/jutil/Makefile.in, + kWnn/uum/Makefile.in: + Fix to work --with-*wnn-includes . + Same as --with-*wnn-libraries , these are enabled + on *Wnn/jutil and *Wnn/uum only. + * Fix to work as expected in case --without-lib*wnn is explicitly + specified. + * Wnn/jserver/renbn_kai.c: + * Explicitly add cast to pointer in tan_syo(). + It helps compilers to guess argument type of sbn_kai(), + and fix other jserver crash bug on Linux/amd64 . + * Wnn/jserver/de_header.h: + Added prototype declaration of functions in bnsetu_kai.c + (for safety) . + * configure, configure.in: + We cannot build Xwnmo for now, so we (temporally) disabled + AC_PATH_X . + Probably workaround for systems with modern install layout + of X11. + * Wnn/jserver/de_header.h: + Fix return type mismatch of kanjiaddr() + prototype declaration . + Spotted on + http://twitter.com/pachira23/status/8875168688513024 , + and reported to freewnn-users by Hideki Yamane. Original + reporter saids it also fixes crash bug of jserver when client + register new word to dictionary. + * Add prototype declaration of functions in bdic.c (and some + source files). + * Wnn/jutil/ujisf.c: + Added prototype declaration of kanjiaddr() and Print_entry() . + * INSTALL, configure, configure.in, makerule.mk.in, + Wnn/jserver/Makefile.in, Wnn/jutil/Makefile.in, + Wnn/man/4.cmd/Makefile.in, Wnn/man/6.jutil/Makefile.in, + Wnn/uum/Makefile.in, cWnn/jserver/Makefile.in, + cWnn/jutil/Makefile.in, cWnn/man/4.cmd/Makefile.in, + cWnn/man/6.jutil/Makefile.in, cWnn/uum/Makefile.in, + kWnn/jserver/Makefile.in, kWnn/jutil/Makefile.in, + kWnn/uum/Makefile.in: + Added (first step of) support for new installation path + layout . + Maybe useful for package managers . + * Makefile.in: + Remove rules that exist on makerule.mk. make install + (for example) runs two times faster :-p + * configure, configure.in, makerule.mk.in, + Wnn/pubdicplus/Makefile.in, cWnn/cdic/Makefile.in, + cWnn/tdic/Makefile.in, kWnn/kdic/Makefile.in: + Recent cpp of gcc (at least 4.4) splits line that has many + characters per line (in C language manner). This is problem + on *.fzk (pubdic etc.) file processing. So adds + -traditional-cpp parameter to cpp + (at least gcc-2.95 passes this parameter). + Simply adding it to CPPFLAGS may break other build, + so split FZK_PP (cpp for text processing) from normal CPP . + Spotted by some posters of FreeWnn thread in 2ch.net . + (Other changes) + * Use AC_SEARCH_LIBS for libnsl checking + (Linux (for example) does not need it) . + * Modified to build correctly if builddir != srcdir (as usual). + * Wnn/: man/2.env/wnn/2b_romkan.man, manual/2.env/wnn/2b_romkana: + * Change '\' to '\e' to correctly format backslash + in man file . + (Also change formatted text file.) + It should reduce Debian lintian warning . + * Added .nf / .fi to pre-formatted table. + * Wnn/uum/setutmp.c: + * Stop checking return value of pututline() + because many systems does not have return value + of this function. + * Change handling of ut_err to work correctly + (especially on systems that have utmp (pututline()) + without utmpx) . + * aclocal.m4, config.guess, config.sub, configure, ltmain.sh: + Update libtool to 1.5.26 + (last release of 1.5 series - bit old). + * (jhlp.c) Check owner / permission of ttyp (tty_slave / ttypfd) + on open_ttyp(). If check (and chown/chmod) fails, + uum warns it may be insecure (ttyp readable) + from other local users. + (Probably you need proper privileges to uum + (ex. setuid-root) . ) + * (jhlp.c) Verbose error message on restoring owner + / permission of tty_master and ttyp in do_end() . + * (sheader.h) Added Prototype of openTermData() / getTermData() . + * Wnn/jlib/Makefile.in, Wnn/jlib.V3/Makefile.in, + cWnn/jlib/Makefile.in, kWnn/jlib/Makefile.in: + * Tell Libtool to use external libraries needed for libwnn (and + lib[ck]wnn). (ex. libcrypt, libnsl) + You don't need detection of these libraries to use libwnn + itself in configure (I hope). + * Use LT_LD to link libraries. + * (*Wnn/jlib/Makefile.in) Remove definition of LT_{CC,INSTALL} + because we already defined in makerule.mk . + * (Wnn/jlib.V3/Makefile.in) Make use of LT_{CC,INSTALL} + in makerule.mk to reduce libtool warning . + * (Wnn/jlib.V3/Makefile.in) My usual work to build correctly + if builddir != srcdir . + * Wnn/include/: jllib.h, jslib.h: + * Added prototype (and simple macro (FRWNN_PARAMS) around the + parameters for good-old C compilers) or jslib.h / jllib.h . + Parameters are came from js.c / jl.c . + * Added extern "C" { ... } for C++ clients. + * cWnn/man/2.env/ckey.man: + * Added .nf / .fi to pre-formatted table. + * INSTALL, INSTALL.en, configure, configure.in, makerule.mk.in, + Wnn/uum/Makefile.in, cWnn/uum/Makefile.in, + kWnn/uum/Makefile.in: + * Added detection code if your system need to install uum as + set-[ug]id program on configure time. + Recent systems may install uum as normal program + (to reduce security risk) . + You can also specify + --enable-client-setuid / --enable-client-setgid=group + (group must be specified) to control set-[ug]id of uum . + (NOTE: SUSE/openSUSE are using --disable-client-setuid + and --disable-client-setgid . ) + * Added uum-related option to INSTALL* file . + * Use modern style AC_INIT. (added pseudo(?) version number and + contact address. comments are welcome.) + * Wnn/uum/epilogue.c: + epilogue_no_close(): Replaced to HAVE_TERMINFO + (maybe it's right) . + * config.h.in, configure, configure.in, Wnn/uum/jhlp.c: + Use posix_openpt() (if it and ptsname() exists) + when opening tty . + Traditional pts system (that doesn't have posix_openpt()) + fallback to dummy function opening /dev/ptmx directly. + Getting tty without setting setuid root works in non-pts + systems that have posix-compatible pty functions + (ex. recent FreeBSD) . (bnc#830533) + * Other changes to configure.in: + Commented out useless AC_DEFINE in term library detection + part . + * jhlp.c: + * Mask IEXTEN in j_term_init(). + * Use tty_master for systems that has /dev/ptmx and not have + ptsname(). (ex. old Debian (2.1 or so)) + * Added comment. + * termio.c: + * Use tparm() as macro for fixed parameter system (ex. SVR4) . + * Wnn/uum/jhlp.c: + More use of USE_LINUX_TERM in exec_cmd() + (as of original canuum patch) . + And window size setting code moved from Linux specific + to generic . + * config.h.in, configure, configure.in: + Added configure test for setsid(). (I forgot it.) + * config.h.in, configure, configure.in, Wnn/uum/jhlp.c, + Wnn/uum/setutmp.c: + More utmp fix: + * Fix build (more) correctly on recent NetBSD (that both have + utmpx & traditional utmp) + * Moved setutmp() call from child to parent proces + (not sure if this is right thing) + * config.h.in, configure, configure.in, Wnn/uum/jhlp.c, + Wnn/uum/setutmp.c, Wnn/uum/sheader.h: + * Rewrote utmp code in uum (without libspt). + * Because it cannot work on gcc with Linux/i386, + temporally remove -fstack-check from CDEBUGFLAGS + if you specify --enable-debug (and you're using gcc) . + * Contrib/dic/gerodic/Makefile.in: + Usual work: + * Some modification in case if builddir != srcdir + (Does not harm normal build.) + * Wnn/uum/setutmp.c: + In current setutmp.c code, saveut / nullut must be struct utmp. + So removed struct utmpx statement. + This will fix compile on systems that both have utmp.h and utmpx.h + (e.g. NetBSD). + * Wnn/uum/jhlp.c: Some minor fix for compiling some platforms: + * crow is declared in header.h, so remove duplicate extern. + * #ifdef-ed I_PUSH ptem / ldterm for platforms that don't have + STREAMS but have ptsname (e.g. Linux, recent NetBSD) . + * Wnn/uum/setutmp.c: + Some minor change to fix compile error on Linux. + UTMP feature is so complex to understand ... + * configure, configure.in, makerule.mk.in: + Modified WNNCNVFILEDIR to install correct cnv_* file + if you're in terminfo environment. + * CONTRIBUTORS, config.h.in, configure, configure.in, + Wnn/conv/cvt_head.h, Wnn/conv/cvt_read.c, + Wnn/include/commonhd.h, Wnn/include/wnn_os.h, + Wnn/uum/Makefile.in, Wnn/uum/header.c, + Wnn/uum/jhlp.c, Wnn/uum/sdefine.h, Wnn/uum/setutmp.c, + Wnn/uum/sheader.h, Wnn/uum/termcap.c, Wnn/uum/termio.c, + cWnn/uum/Makefile.in, kWnn/uum/Makefile.in: + Long awaited merge of uum-related patch (based on hiroo's work + in November, 2003) + * Detect termcap / terminfo, curses etc. automatically + (from canuum) + But, configure support of libspt does not implemented / + does not include Canna support / utmp implementation does not + work correctly. + * pty / pts processing (from Kabe). Auto detection in configure + by hiroo. + * Some modification due to build error in my environment. + * Adding lines in case if builddir != srcdir . + Many thanks to AIDA shinra, Taketo Kabe @ SRA Tohoku, hiroo, + kouji at hiroshima-u.ac.jp (original author of Kabe's patch) . + * makerule.mk.in, Wnn/romkan/Makefile.in, + cWnn/romkan/Makefile.in, kWnn/romkan/Makefile.in: + Some minor changes before large commit: + makerule.mk.in: + * Remove MAKE (if your make does not need this). + You can build with other make command (ex. gmake) . + * Define LT_{CC,LD,INSTALL} globally . + * Wnn/romkan/Makefile.in: + * Use LT_CC to remove warning. + * (Usual work) changed some lines to build correctly + in case builddir != srcdir . (I think this don't break + normal build.) + * Wnn/uum/: hinsi.c, jikouho.c, printf.c, termio.c, touroku.c: + * Include string related header to reduce warning. (more merged + from hiroo's work tree.) + * Stripped old mail address (as usual) . + * Wnn/uum/basic_op.c: + * Include string related header to reduce warning. + (Merged from hiroo's work tree.) + * PubdicPlus/pod.c: Reverse condition of prototype section. + * Wnn/include/commonhd.h: Increment _SERVER_VERSION for next + (alpha?) release. + ------------------------------------------------------------------- Sun Dec 16 21:19:31 UTC 2012 - schwab@linux-m68k.org diff --git a/fwnn.spec b/fwnn.spec index 3ba608f..77cddea 100644 --- a/fwnn.spec +++ b/fwnn.spec @@ -1,7 +1,7 @@ # # spec file for package fwnn # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,39 +16,44 @@ # +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + Name: fwnn BuildRequires: ncurses-devel -BuildRequires: termcap +BuildRequires: tcpd-devel +#BuildRequires: termcap %define base_version 1.1.1 -%define alpha_version a021 +%define alpha_version a022 Requires: fwnncom Conflicts: wnn6 PreReq: /usr/sbin/useradd %insserv_prereq %fillup_prereq -Version: 1.1.1a021 -Release: 0 -Url: http://www.freewnn.org +Version: 1.1.1a022 +Release: 28.1 +Url: http://freewnn.sourceforge.jp/ BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: FreeWnn Japanese Input System--Server Only License: GPL-2.0+ Group: System/I18n/Japanese -Source: ftp://ftp.etl.go.jp/pub/FreeWnn/alpha/FreeWnn-%{base_version}-%{alpha_version}.tar.bz2 +Source0: ftp://ftp.iij.ad.jp/pub/sourceforge.jp/freewnn/59257/FreeWnn-%{base_version}-%{alpha_version}.tar.bz2 Source1: rcfwnn Source2: rcfcwnn Source3: rcftwnn Source4: rcfkwnn -Source99: fwnn-rpmlintrc Patch0: FreeWnn-fsstnd.patch Patch1: FreeWnn-ja.patch Patch2: FreeWnn-noroot.patch Patch3: FreeWnn-sighandler.patch -Patch4: FreeWnn-uum.patch -Patch5: FreeWnn-%{base_version}-%{alpha_version}.dif +Patch5: FreeWnn-1.1.1-a022.dif Patch7: FreeWnn-s390x.patch Patch8: FreeWnn-warnings.patch Patch11: FreeWnn-include.patch -Patch12: FreeWnn-returnvalue.diff Patch13: FreeWnn-prototypes.patch Patch14: FreeWnn-trad_cpp.patch +# PATCH-FIX-OPENSUSE bkbin005@rinku.zaq.ne.jp -- fixed a bug in make_hinsi_list() +Patch15: FreeWnn-prototypes_msg.patch +# PATCH-FIX-OPENSUSE bkbin005@rinku.zaq.ne.jp -- fixed uum can't get messages . +Patch16: FreeWnn-prototypes_3.patch # Summary(ja): FreeWnn ユ茯ュ激鴻 - 泣若 # %description -l ja # @@ -245,19 +250,20 @@ client programs that use the Korean Input System, Free kWnn. # 処ュ医箴障ゃ≪潟鐚醐而鐚ゃ篏帥 # xwnmo 篏睡с障紊潟吾潟初鐚件鐔篏睡 # 障ゃ≪潟潟蚊若吾綽紊泣若御障 -%setup -q -n FreeWnn-%{base_version}-%{alpha_version} -%patch0 -p2 -%patch1 -p2 -%patch2 -p2 +%setup -q -n FreeWnn-%{base_version}-%{alpha_version} +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 %patch3 -p2 -%patch4 -p2 %patch5 -p1 %patch7 -p2 -b .s390x %patch8 -%patch11 -p2 -%patch12 -%patch13 -%patch14 +%patch11 -p1 +%patch13 -p1 +%patch14 -p1 +%patch15 -p0 +%__mv Wnn/jserver/kaiseki.h Wnn/include/ +%patch16 -p1 #%setup -b 1 -n Xsi # add include-files for Xwnmo # SuSE setlocale patch, try to set LC_CTYPE if LC_ALL fails (Xwnmo) and #...................................................................... @@ -267,23 +273,28 @@ client programs that use the Korean Input System, Free kWnn. # %patch3 -p1 %build -./configure --prefix=/usr \ +%configure --prefix=/usr \ --libdir=%{_libdir} \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ - %{_target_cpu}-suse-linux-gnu + %{_target_cpu}-suse-linux-gnu \ + --disable-sub-bindir \ + --enable-client --disable-client-setuid --disable-client-setgid \ + --with-libwrap # not -j safe, see Wnn/pubdicplus/Makefile.in -make CCOPTIONS="$RPM_OPT_FLAGS" -pushd Wnn/uum -make CCOPTIONS="$RPM_OPT_FLAGS" -popd +make +#pushd Wnn/uum +#make CCOPTIONS="$RPM_OPT_FLAGS" +#popd %install -make install DESTDIR=$RPM_BUILD_ROOT INSTPGMFLAGS= -make install.man DESTDIR=$RPM_BUILD_ROOT -pushd Wnn/uum -make install DESTDIR=$RPM_BUILD_ROOT INSTPGMFLAGS= -popd +%makeinstall +#make install DESTDIR=$RPM_BUILD_ROOT INSTPGMFLAGS= +make install.man DESTDIR=$RPM_BUILD_ROOT +#pushd Wnn/uum +#make install DESTDIR=$RPM_BUILD_ROOT INSTPGMFLAGS= +#popd + #---------------------------------------------------------------------- # move Japanese man pages to their correct destination: # (the above 'make install.man' command installs Japanese AND English @@ -291,49 +302,49 @@ popd # The Japanese manpages should be in a subdirectory 'ja' # (or maybe ja_JP.eucJP), therefore I move them here: for i in 1 2 3 4 5 6 7 8 9 ; do - mkdir -p $RPM_BUILD_ROOT/%{_mandir}/ja/man$i + %__mkdir_p $RPM_BUILD_ROOT/%{_mandir}/ja/man$i done for i in atod.1 atof.1 dtoa.1 jserver.1 oldatonewa.1 uum.1 wddel.1 wdreg.1 \ wnnkill.1 wnnstat.1 wnntouch.1 do - mv $RPM_BUILD_ROOT/%{_mandir}/man1/$i $RPM_BUILD_ROOT/%{_mandir}/ja/man1/ + %__mv $RPM_BUILD_ROOT/%{_mandir}/man1/$i $RPM_BUILD_ROOT/%{_mandir}/ja/man1/ done -mv $RPM_BUILD_ROOT/%{_mandir}/man3/* $RPM_BUILD_ROOT/%{_mandir}/ja/man3/ +%__mv $RPM_BUILD_ROOT/%{_mandir}/man3/* $RPM_BUILD_ROOT/%{_mandir}/ja/man3/ for i in 2a_ctrl.4 2b_romkana.4 cvt_key_tbl.4 fzk.data.4 fzk.u.4 \ hinsi_data.4 jserverrc.4 mode.4 serverdefs.4 ujis_dic.4 \ uumkey.4 uumrc.4 wnnenvrc.4 do - mv $RPM_BUILD_ROOT/%{_mandir}/man4/$i $RPM_BUILD_ROOT/%{_mandir}/ja/man4/ + %__mv $RPM_BUILD_ROOT/%{_mandir}/man4/$i $RPM_BUILD_ROOT/%{_mandir}/ja/man4/ done for i in pubdic.5 usr_dic.5 do - mv $RPM_BUILD_ROOT/%{_mandir}/man5/$i $RPM_BUILD_ROOT/%{_mandir}/ja/man5/ + %__mv $RPM_BUILD_ROOT/%{_mandir}/man5/$i $RPM_BUILD_ROOT/%{_mandir}/ja/man5/ done #---------------------------------------------------------------------- # Make sure directories for of boot script installation exist: -mkdir -p $RPM_BUILD_ROOT/etc/init.d -mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates -mkdir -p $RPM_BUILD_ROOT/usr/sbin +%__mkdir_p $RPM_BUILD_ROOT/etc/init.d +%__mkdir_p $RPM_BUILD_ROOT/var/adm/fillup-templates +%__mkdir_p $RPM_BUILD_ROOT/usr/sbin #---------------------------------------------------------------------- # Install boot scripts: -install -m 755 $RPM_SOURCE_DIR/rcfwnn $RPM_BUILD_ROOT/etc/init.d/fwnn -install -m 755 $RPM_SOURCE_DIR/rcfcwnn $RPM_BUILD_ROOT/etc/init.d/fcwnn -install -m 755 $RPM_SOURCE_DIR/rcftwnn $RPM_BUILD_ROOT/etc/init.d/ftwnn -install -m 755 $RPM_SOURCE_DIR/rcfkwnn $RPM_BUILD_ROOT/etc/init.d/fkwnn +%__install -m 755 $RPM_SOURCE_DIR/rcfwnn $RPM_BUILD_ROOT/etc/init.d/fwnn +%__install -m 755 $RPM_SOURCE_DIR/rcfcwnn $RPM_BUILD_ROOT/etc/init.d/fcwnn +%__install -m 755 $RPM_SOURCE_DIR/rcftwnn $RPM_BUILD_ROOT/etc/init.d/ftwnn +%__install -m 755 $RPM_SOURCE_DIR/rcfkwnn $RPM_BUILD_ROOT/etc/init.d/fkwnn #---------------------------------------------------------------------- # Make symbolic links for i in fwnn fcwnn ftwnn fkwnn ; do - ( cd $RPM_BUILD_ROOT/usr/sbin; ln -sf ../../etc/init.d/$i rc$i ) + ( cd $RPM_BUILD_ROOT/usr/sbin; %__ln_s -f ../../etc/init.d/$i rc$i ) done -ln -sf /var/lib/wnn/ja/dic ${RPM_BUILD_ROOT}/etc/FreeWnn/ja/dic -ln -sf /var/lib/wnn/zh_CN/dic ${RPM_BUILD_ROOT}/etc/FreeWnn/zh_CN/dic -ln -sf /var/lib/wnn/zh_TW/dic ${RPM_BUILD_ROOT}/etc/FreeWnn/zh_TW/dic -ln -sf /var/lib/wnn/ko_KR/dic ${RPM_BUILD_ROOT}/etc/FreeWnn/ko_KR/dic +%__ln_s -f /var/lib/wnn/ja/dic ${RPM_BUILD_ROOT}/etc/FreeWnn/ja/dic +%__ln_s -f /var/lib/wnn/zh_CN/dic ${RPM_BUILD_ROOT}/etc/FreeWnn/zh_CN/dic +%__ln_s -f /var/lib/wnn/zh_TW/dic ${RPM_BUILD_ROOT}/etc/FreeWnn/zh_TW/dic +%__ln_s -f /var/lib/wnn/ko_KR/dic ${RPM_BUILD_ROOT}/etc/FreeWnn/ko_KR/dic #---------------------------------------------------------------------- -rm -f ${RPM_BUILD_ROOT}/%{_libdir}/lib*.la +%__rm -f ${RPM_BUILD_ROOT}/%{_libdir}/lib*.la %clean -[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT; +[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && %__rm -rf $RPM_BUILD_ROOT; %pre -n fwnn /usr/sbin/useradd -r -o -g root -u 66 -s /bin/false -c "Wnn System Account" -d /var/lib/wnn wnn 2> /dev/null || : @@ -535,6 +546,7 @@ chroot . usr/bin/kwnntouch var/lib/wnn/ko_KR/dic/sys/*.* /usr/bin/cwnnkill /usr/bin/cwnnstat /usr/bin/cwnntouch +/usr/bin/cuum %files -n fcwnndev %defattr(-,root,root) @@ -584,6 +596,7 @@ chroot . usr/bin/kwnntouch var/lib/wnn/ko_KR/dic/sys/*.* /usr/bin/kwnnkill /usr/bin/kwnnstat /usr/bin/kwnntouch +/usr/bin/kuum %dir /etc/FreeWnn/ %dir /etc/FreeWnn/ko_KR/ /etc/FreeWnn/ko_KR/dic