fwnn/FreeWnn-ja.patch
Fuminobu Takeyama 94c4a3d26d 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
2013-08-21 14:26:34 +00:00

123 lines
4.5 KiB
Diff

--- 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;
- cd = msg_open ("msg", "%L", "ja_JP");
+ cd = msg_open ("msg", "%L", "ja");
- printf (msg_get (cd, 5, "message not found\n", "ja_JP"), 555);
+ printf (msg_get (cd, 5, "message not found\n", "ja"), 555);
printf (msg_get (cd, 6, "message not found\n", "zh_CN"));
printf (msg_get (cd, -1, "", "ja_JP"), 555);
- printf (msg_get (cd, 2, "message not found\n", "ja_JP"), "abc");
+ printf (msg_get (cd, 2, "message not found\n", "ja"), "abc");
printf (msg_get (cd, 100, "message not found\n", "zh_CN"), "abc");
}
#endif /* not_use */
--- FreeWnn-1.1.1-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 */
-# define LANG_NAME "ja_JP"
+# define LANG_NAME "ja"
# define SERVERNAME "wnn4"
# define MESSAGE_FILE "jserver.msg"
#else /* JAPANESE */
@@ -88,7 +88,7 @@
# define WNN_PORT_IN (0x5701)
static char *sockname = "/tmp/jd_sockV4"; /* for jserver */
-# define LANG_NAME "ja_JP"
+# define LANG_NAME "ja"
# define SERVERNAME "wnn4"
# define MESSAGE_FILE "jserver.msg"
#endif /* KOREAN */
--- FreeWnn-1.1.1-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")
#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"
*/
-#define DEF_LANG "ja_JP"
+#define DEF_LANG "ja"
extern struct msg_cat *msg_open ();
extern char *msg_get ();
--- 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"
#define WNN_TSERVER_ENV "TSERVER"
-#define WNN_J_LANG "ja_JP"
+#define WNN_J_LANG "ja"
#define WNN_C_LANG "zh_CN"
#define WNN_K_LANG "ko_KR"
#define WNN_T_LANG "zh_TW"
@@ -79,7 +79,7 @@
/* for jserver */
#ifndef SERVER_INIT_FILE
# ifdef JAPANESE
-# define SERVER_INIT_FILE "/ja_JP/jserverrc"
+# define SERVER_INIT_FILE "/ja/jserverrc"
# else /* JAPANESE */
# ifdef CHINESE
# ifdef TAIWANESE
@@ -91,7 +91,7 @@
# ifdef KOREAN
# define SERVER_INIT_FILE "/ko_KR/kserverrc"
# else /* KOREAN */
-# define SERVER_INIT_FILE "/ja_JP/jserverrc" /* Default */
+# define SERVER_INIT_FILE "/ja/jserverrc" /* Default */
# endif /* KOREAN */
# endif /* CHINESE */
# endif /* JAPANESE */
@@ -109,7 +109,7 @@
#define ENVRCFILE "/wnnenvrc"
#ifndef HINSIDATA_FILE
-# define HINSIDATA_FILE "/ja_JP/hinsi.data"
+# define HINSIDATA_FILE "/ja/hinsi.data"
#endif /* HINSIDATA_FILE */
#define USR_DIC_DIR_VAR "@USR"
--- FreeWnn-1.1.1-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 @@
;
;lang_name machine_name unix_domain_socket_name service_name port_num
-ja_JP jserver /tmp/jd_sockV4 wnn4 22273
+ja jserver /tmp/jd_sockV4 wnn4 22273
japanese jserver /tmp/jd_sockV4 wnn4 22273
nihongo jserver /tmp/jd_sockV4 wnn4 22273
zh_CN cserver /tmp/cd_sockV4 wnn4_Cn 22289
--- FreeWnn-1.1.1-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. :-) */
- strcpy (p_lang, "ja_JP");
+ strcpy (p_lang, "ja");
}
else
{