mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-03 01:23:49 +00:00
- Improve buffer management. This change should fix issues on amd64.
- Fix daemonizing part. It now returns the exit status correctly. - Fix *_{pre,post}cmd handling in the rc.d scripts. Plus, wnntouch is now invoked just before running the server process. - Use ${*_WNNMANDIR} in Makefile to use the common patchset in both FreeWnn-server and -lib. - Integrate libtool22 change and regenerate patch files.
This commit is contained in:
parent
321eea39e0
commit
4b38031b7f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=246996
@ -7,7 +7,7 @@
|
||||
|
||||
PORTNAME= FreeWnn
|
||||
PORTVERSION= 1.1.1.a021
|
||||
PORTREVISION= 7
|
||||
PORTREVISION= 8
|
||||
CATEGORIES?= japanese
|
||||
MASTER_SITES= ftp://ftp.freewnn.org/pub/%SUBDIR%/ \
|
||||
${MASTER_SITE_SOURCEFORGE_JP}
|
||||
@ -23,7 +23,9 @@ USE_BZIP2= yes
|
||||
GNU_CONFIGURE= yes
|
||||
USE_AUTOTOOLS= autoconf:262 libtool:22
|
||||
USE_LDCONFIG= yes
|
||||
MAKE_ARGS= MANLANG="${MANLANG}" CDEBUGFLAGS="${CFLAGS}"
|
||||
MAKE_ARGS= MANLANG="${MANLANG}" CDEBUGFLAGS="${CFLAGS}" \
|
||||
LIBRARY_WNNMANDIR="3.libwnn" \
|
||||
SERVER_WNNMANDIR=""
|
||||
ALL_TARGET= includes all
|
||||
INSTALL_TARGET= install install.man
|
||||
MAKE_JOBS_UNSAFE= yes
|
||||
|
31
japanese/FreeWnn-lib/files/patch-Wnn-conv-cvt_head.h
Normal file
31
japanese/FreeWnn-lib/files/patch-Wnn-conv-cvt_head.h
Normal file
@ -0,0 +1,31 @@
|
||||
Index: Wnn/conv/cvt_head.h
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/conv/cvt_head.h,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/conv/cvt_head.h 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/conv/cvt_head.h 20 Dec 2008 15:22:37 -0000 1.2
|
||||
@@ -52,17 +52,17 @@
|
||||
|
||||
#ifdef WNNDEFAULT
|
||||
# include "wnn_config.h"
|
||||
- /* マクロCONVERT_FILENAMEの定義(のためだけ)。コンパイル時は、ヘッダファイル
|
||||
- のサーチパスに、Wnnのインクルードファイルのありかを設定しておくこと。 */
|
||||
+/* マクロCONVERT_FILENAMEの定義(のためだけ)。コンパイル時は、ヘッダファイル
|
||||
+ のサーチパスに、Wnnのインクルードファイルのありかを設定しておくこと。 */
|
||||
#else
|
||||
# define CONVERT_FILENAME "cvt_key_tbl"
|
||||
#endif
|
||||
|
||||
#define div_up(a, b) ((a + b - 1) / b)
|
||||
- /* a,bは非負整数。a/bを切り上げて整数にする */
|
||||
+/* a,bは非負整数。a/bを切り上げて整数にする */
|
||||
|
||||
struct CONVCODE
|
||||
{
|
||||
- int tokey; /* 変換されたコード */
|
||||
- char *fromkey; /* 変換するコード */
|
||||
+ int tokey; /* 変換されたコード */
|
||||
+ char *fromkey; /* 変換するコード */
|
||||
};
|
322
japanese/FreeWnn-lib/files/patch-Wnn-conv-cvt_key.c
Normal file
322
japanese/FreeWnn-lib/files/patch-Wnn-conv-cvt_key.c
Normal file
@ -0,0 +1,322 @@
|
||||
Index: Wnn/conv/cvt_key.c
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/conv/cvt_key.c,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/conv/cvt_key.c 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/conv/cvt_key.c 20 Dec 2008 15:22:37 -0000 1.2
|
||||
@@ -65,172 +65,165 @@
|
||||
extern struct CONVCODE tbl[];
|
||||
extern int cnv_tbl_cnt; /* convert table count */
|
||||
|
||||
-
|
||||
- /** intの配列 h をビットベクタとみなし、第iビットをチェックあるいは立てる */
|
||||
+/** intの配列 h をビットベクタとみなし、第iビットをチェックあるいは立てる */
|
||||
#define BITONP(h, i) (h[i / BITSIZ] & (1 << (i % BITSIZ)))
|
||||
#define BITOFP(h, i) (!BITONP(h, i))
|
||||
#define BIT_UP(h, i) (h[i / BITSIZ] |= (1 << (i % BITSIZ)))
|
||||
#define BITDWN(h, i) (h[i / BITSIZ] &= ~(1 << (i % BITSIZ)))
|
||||
|
||||
- /** 変換コードのチェックとコード変換 */
|
||||
+/** 変換コードのチェックとコード変換 */
|
||||
int
|
||||
-key_check (inbuf, conv_tbl, tbl_cnt, check_flg)
|
||||
- int inbuf[]; /* ソースストリング */
|
||||
- struct CONVCODE conv_tbl[]; /* コード変換テーブル */
|
||||
- int tbl_cnt;
|
||||
- int check_flg[];
|
||||
+key_check (int inbuf[], /* ソースストリング */
|
||||
+ struct CONVCODE conv_tbl[], /* コード変換テーブル */
|
||||
+ int tbl_cnt,
|
||||
+ int check_flg[])
|
||||
{
|
||||
- int dist, base;
|
||||
- char *code_p;
|
||||
- int i;
|
||||
-
|
||||
- for (base = 0; inbuf[base] != -1; base++)
|
||||
- {
|
||||
- for (dist = 0; dist < tbl_cnt; dist++)
|
||||
- {
|
||||
- if (BITONP (check_flg, dist) && conv_tbl[dist].fromkey != 0)
|
||||
- {
|
||||
- code_p = conv_tbl[dist].fromkey + base;
|
||||
- if (*code_p == (char) inbuf[base])
|
||||
- {
|
||||
- if (*(code_p + 1) == (char) 0)
|
||||
- {
|
||||
- /* マッチした */
|
||||
- for (i = 0, base++; (inbuf[i] = inbuf[base]) != -1; i++, base++);
|
||||
- return (conv_tbl[dist].tokey);
|
||||
- }
|
||||
- /* まだマッチしていない */
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- BITDWN (check_flg, dist); /* 無効 */
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- /* ビットベクタ check_flg[] の第0~tblcntビットに立ったまま残っている
|
||||
- ものがあるか調べる。 */
|
||||
- for (i = 0; i < tbl_cnt / BITSIZ; i++)
|
||||
- {
|
||||
- if (check_flg[i])
|
||||
- return (-1);
|
||||
- }
|
||||
- if ((tbl_cnt %= BITSIZ) && (check_flg[i] & ~(~0 << tbl_cnt)))
|
||||
- return (-1);
|
||||
- /* return -1 … まだ未決定の物がある */
|
||||
+ int dist, base;
|
||||
+ char *code_p;
|
||||
+ int i;
|
||||
+
|
||||
+ for (base = 0; inbuf[base] != -1; base++) {
|
||||
+ for (dist = 0; dist < tbl_cnt; dist++) {
|
||||
+ if (BITONP (check_flg, dist) && conv_tbl[dist].fromkey != 0) {
|
||||
+ code_p = conv_tbl[dist].fromkey + base;
|
||||
+
|
||||
+ if (*code_p == (char) inbuf[base]) {
|
||||
+ if (*(code_p + 1) == (char) 0) {
|
||||
+ /* マッチした */
|
||||
+ for (i = 0, base++; (inbuf[i] = inbuf[base]) != -1; i++, base++);
|
||||
+ return (conv_tbl[dist].tokey);
|
||||
+ }
|
||||
+ /* まだマッチしていない */
|
||||
+ } else {
|
||||
+ /* 無効 */
|
||||
+ BITDWN (check_flg, dist);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* ビットベクタ check_flg[] の第0~tblcntビットに立ったまま残っている
|
||||
+ ものがあるか調べる。 */
|
||||
+
|
||||
+ for (i = 0; i < tbl_cnt / BITSIZ; i++) {
|
||||
+ if (check_flg[i])
|
||||
+ return (-1);
|
||||
+ }
|
||||
+
|
||||
+ if ((tbl_cnt %= BITSIZ) && (check_flg[i] & ~(~0 << tbl_cnt)))
|
||||
+ return (-1);
|
||||
+ /* return -1 … まだ未決定の物がある */
|
||||
|
||||
- return (-2); /* 変換対象となる物はない */
|
||||
+ /* 変換対象となる物はない */
|
||||
+ return (-2);
|
||||
}
|
||||
|
||||
- /** 指定された変換テーブルに従ってコード変換する。*/
|
||||
+/** 指定された変換テーブルに従ってコード変換する。*/
|
||||
int
|
||||
-convert_key (inkey, conv_tbl, tbl_cnt, matching_flg, in_buf)
|
||||
- int (*inkey) (); /* キー入力関数 */
|
||||
- struct CONVCODE conv_tbl[]; /* 変換テーブル */
|
||||
- int tbl_cnt; /* conv_tbl[] の個数 */
|
||||
- int matching_flg; /* マッチングしなかったストリングの処理指定
|
||||
- 0 : 返値として返す
|
||||
- 1 : そのストリングは捨てる */
|
||||
- char *in_buf;
|
||||
+convert_key (int (*inkey)(), /* キー入力関数 */
|
||||
+ struct CONVCODE conv_tbl[], /* 変換テーブル */
|
||||
+ int tbl_cnt, /* conv_tbl[] の個数 */
|
||||
+ int matching_flg, /* マッチングしなかったストリングの処理指定
|
||||
+ 0 : 返値として返す
|
||||
+ 1 : そのストリングは捨てる */
|
||||
+ char *in_buf)
|
||||
{
|
||||
#define MAX 20 /* キー入力バッファの最大値 */
|
||||
|
||||
- static int inbuf[MAX]; /* キー入力バッファ */
|
||||
- /* バッファの終端は、-1 で示される。 */
|
||||
-
|
||||
- int out_cnt; /* 出力バッファの出力カウント */
|
||||
-
|
||||
- static int buf_cnt = 0; /* inbuf の入力時のカウンタ */
|
||||
-
|
||||
- int check_flg[CHANGE_MAX];
|
||||
- /* ビットベクタとして扱われ、マッチング時に対象となっているconv_tbl[]
|
||||
- を示す。1の時対象となり、0で非対象 */
|
||||
-
|
||||
- int i, c, flg = 0; /* work */
|
||||
-
|
||||
- for (i = 0; i < div_up (tbl_cnt, BITSIZ); check_flg[i++] = ~0);
|
||||
- /* 配列check_flgをビットベクタ扱いし、その第0~tbl_cnt ビットを立てる。
|
||||
- 但し、実際はその少し先まで立つ */
|
||||
-
|
||||
- for (;;)
|
||||
- {
|
||||
- if (flg != 0 || buf_cnt == 0)
|
||||
- {
|
||||
- inbuf[buf_cnt] = (*inkey) (); /* 一文字入力 */
|
||||
- in_buf[buf_cnt] = (char) (inbuf[buf_cnt] & 0xff);
|
||||
- if (inbuf[buf_cnt] == -1)
|
||||
- {
|
||||
- if (buf_cnt > 0)
|
||||
- {
|
||||
- c = -2; /* タイムアウト */
|
||||
- goto LABEL;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- continue;
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- inbuf[++buf_cnt] = -1; /* ターミネータ */
|
||||
- }
|
||||
- }
|
||||
- flg++;
|
||||
-
|
||||
- if (buf_cnt >= MAX - 1)
|
||||
- {
|
||||
- in_buf[0] = '\0';
|
||||
- return (-1); /* ERROR */
|
||||
- }
|
||||
-
|
||||
- c = key_check (inbuf, conv_tbl, tbl_cnt, check_flg);
|
||||
- LABEL:
|
||||
- switch (c)
|
||||
- {
|
||||
- case -1: /* 未決定 */
|
||||
- continue;
|
||||
-
|
||||
- case -2: /* 変換対象でないことが決定した */
|
||||
- buf_cnt--;
|
||||
- out_cnt = 0;
|
||||
- c = inbuf[out_cnt++];
|
||||
- for (i = 0; inbuf[i] != -1; inbuf[i++] = inbuf[out_cnt++]);
|
||||
- if (matching_flg != 0)
|
||||
- {
|
||||
- flg = 0;
|
||||
- continue;
|
||||
- }
|
||||
- in_buf[0] = '\0';
|
||||
- return (c);
|
||||
-
|
||||
- default: /* 変換されたコード */
|
||||
- in_buf[buf_cnt] = '\0';
|
||||
- buf_cnt = 0;
|
||||
- return (c);
|
||||
- }
|
||||
- }
|
||||
+ /* キー入力バッファ */
|
||||
+ /* バッファの終端は、-1 で示される。 */
|
||||
+ static int inbuf[MAX];
|
||||
+
|
||||
+ /* 出力バッファの出力カウント */
|
||||
+ int out_cnt;
|
||||
+
|
||||
+ /* inbuf の入力時のカウンタ */
|
||||
+ static int buf_cnt = 0;
|
||||
+
|
||||
+
|
||||
+ /* ビットベクタとして扱われ、マッチング時に対象となっているconv_tbl[]
|
||||
+ を示す。1の時対象となり、0で非対象 */
|
||||
+ int check_flg[CHANGE_MAX];
|
||||
+
|
||||
+ /* work */
|
||||
+ int i, c, flg = 0;
|
||||
+
|
||||
+ for (i = 0; i < div_up (tbl_cnt, BITSIZ); check_flg[i++] = ~0);
|
||||
+ /* 配列check_flgをビットベクタ扱いし、その第0~tbl_cnt ビットを立てる。
|
||||
+ 但し、実際はその少し先まで立つ */
|
||||
+
|
||||
+ for (;;) {
|
||||
+ if (flg != 0 || buf_cnt == 0) {
|
||||
+ inbuf[buf_cnt] = (*inkey) (); /* 一文字入力 */
|
||||
+ in_buf[buf_cnt] = (char) (inbuf[buf_cnt] & 0xff);
|
||||
+ if (inbuf[buf_cnt] == -1) {
|
||||
+ if (buf_cnt > 0) {
|
||||
+ c = -2;
|
||||
+ /* タイムアウト */
|
||||
+ goto LABEL;
|
||||
+ } else {
|
||||
+ continue;
|
||||
+ }
|
||||
+ } else {
|
||||
+ /* ターミネータ */
|
||||
+ inbuf[++buf_cnt] = -1;
|
||||
+ }
|
||||
+ }
|
||||
+ flg++;
|
||||
+
|
||||
+ if (buf_cnt >= MAX - 1) {
|
||||
+ in_buf[0] = '\0';
|
||||
+
|
||||
+ /* ERROR */
|
||||
+ return (-1);
|
||||
+ }
|
||||
+
|
||||
+ c = key_check (inbuf, conv_tbl, tbl_cnt, check_flg);
|
||||
+
|
||||
+ LABEL:
|
||||
+ switch (c) {
|
||||
+ case -1:
|
||||
+ /* 未決定 */
|
||||
+ continue;
|
||||
+
|
||||
+ case -2:
|
||||
+ /* 変換対象でないことが決定した */
|
||||
+ buf_cnt--;
|
||||
+ out_cnt = 0;
|
||||
+ c = inbuf[out_cnt++];
|
||||
+ for (i = 0; inbuf[i] != -1; inbuf[i++] = inbuf[out_cnt++]);
|
||||
+
|
||||
+ if (matching_flg != 0) {
|
||||
+ flg = 0;
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ in_buf[0] = '\0';
|
||||
+ return (c);
|
||||
+
|
||||
+ default:
|
||||
+ /* 変換されたコード */
|
||||
+ in_buf[buf_cnt] = '\0';
|
||||
+ buf_cnt = 0;
|
||||
+ return (c);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
/** コード変換を伴うキー入力関数 */
|
||||
int
|
||||
-keyin1 (get_ch, in_buf)
|
||||
- int (*get_ch) (); /* getchar() と同様の関数 */
|
||||
- char *in_buf;
|
||||
+keyin1(int (*get_ch)(), /* getchar() と同様の関数 */
|
||||
+ char *in_buf)
|
||||
{
|
||||
- int ret;
|
||||
+ int ret;
|
||||
|
||||
- for (;;)
|
||||
- {
|
||||
- if (cnv_tbl_cnt == 0)
|
||||
- {
|
||||
- ret = (*get_ch) ();
|
||||
- if (ret >= 0)
|
||||
- return (ret);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- return (convert_key (get_ch, tbl, cnv_tbl_cnt, 0, in_buf));
|
||||
- }
|
||||
- }
|
||||
+ for (;;) {
|
||||
+ if (cnv_tbl_cnt == 0) {
|
||||
+ ret = (*get_ch)();
|
||||
+ if (ret >= 0)
|
||||
+ return (ret);
|
||||
+ } else {
|
||||
+ return (convert_key(get_ch, tbl, cnv_tbl_cnt, 0, in_buf));
|
||||
+ }
|
||||
+ }
|
||||
}
|
1044
japanese/FreeWnn-lib/files/patch-Wnn-conv-cvt_read.c
Normal file
1044
japanese/FreeWnn-lib/files/patch-Wnn-conv-cvt_read.c
Normal file
File diff suppressed because it is too large
Load Diff
81
japanese/FreeWnn-lib/files/patch-Wnn-etc-bcopy.c
Normal file
81
japanese/FreeWnn-lib/files/patch-Wnn-etc-bcopy.c
Normal file
@ -0,0 +1,81 @@
|
||||
Index: Wnn/etc/bcopy.c
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/etc/bcopy.c,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/etc/bcopy.c 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/etc/bcopy.c 20 Dec 2008 15:22:40 -0000 1.2
|
||||
@@ -38,47 +38,43 @@
|
||||
|
||||
#ifndef HAVE_BCOPY
|
||||
void
|
||||
-bcopy (b1, b2, length)
|
||||
- unsigned char *b1, *b2;
|
||||
- int length;
|
||||
+bcopy(unsigned char *b1,
|
||||
+ unsigned char *b2,
|
||||
+ int length)
|
||||
{
|
||||
- if (length <= 0)
|
||||
- return;
|
||||
- if (b1 < b2 && b1 + length > b2)
|
||||
- {
|
||||
- b2 += length;
|
||||
- b1 += length;
|
||||
- while (length--)
|
||||
- {
|
||||
- *--b2 = *--b1;
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- memcpy (b2, b1, length);
|
||||
- }
|
||||
+ if (length <= 0)
|
||||
+ return;
|
||||
+
|
||||
+ if (b1 < b2 && b1 + length > b2) {
|
||||
+ b2 += length;
|
||||
+ b1 += length;
|
||||
+
|
||||
+ while (length--)
|
||||
+ *--b2 = *--b1;
|
||||
+ } else {
|
||||
+ memcpy (b2, b1, length);
|
||||
+ }
|
||||
}
|
||||
#endif /* !HAVE_BCOPY */
|
||||
|
||||
#ifndef HAVE_BZERO
|
||||
void
|
||||
-bzero (b, length)
|
||||
- unsigned char *b;
|
||||
- int length;
|
||||
+bzero(unsigned char *b,
|
||||
+ int length)
|
||||
{
|
||||
- memset (b, 0, length);
|
||||
+ memset (b, 0, length);
|
||||
}
|
||||
#endif /* !HAVE_BZERO */
|
||||
|
||||
#ifndef HAVE_BCMP
|
||||
int
|
||||
-bcmp (b1, b2, length)
|
||||
- unsigned char *b1;
|
||||
- unsigned char *b2;
|
||||
- int length;
|
||||
+bcmp(unsigned char *b1,
|
||||
+ unsigned *b2,
|
||||
+ int length)
|
||||
{
|
||||
- if (length == 0)
|
||||
- return 0;
|
||||
- return memcmp (b1, b2, length);
|
||||
+ if (length == 0)
|
||||
+ return 0;
|
||||
+
|
||||
+ return memcmp(b1, b2, length);
|
||||
}
|
||||
#endif /* !HAVE_BCMP */
|
217
japanese/FreeWnn-lib/files/patch-Wnn-etc-getopt1.c
Normal file
217
japanese/FreeWnn-lib/files/patch-Wnn-etc-getopt1.c
Normal file
@ -0,0 +1,217 @@
|
||||
Index: Wnn/etc/getopt1.c
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/etc/getopt1.c,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/etc/getopt1.c 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/etc/getopt1.c 20 Dec 2008 15:22:40 -0000 1.2
|
||||
@@ -66,14 +66,13 @@
|
||||
#endif
|
||||
|
||||
int
|
||||
-getopt_long (argc, argv, options, long_options, opt_index)
|
||||
- int argc;
|
||||
- char *const *argv;
|
||||
- const char *options;
|
||||
- const struct option *long_options;
|
||||
- int *opt_index;
|
||||
+getopt_long(int argc,
|
||||
+ char * const *argv,
|
||||
+ const char *options,
|
||||
+ const struct option *long_options,
|
||||
+ int *opt_index)
|
||||
{
|
||||
- return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
|
||||
+ return _getopt_internal(argc, argv, options, long_options, opt_index, 0);
|
||||
}
|
||||
|
||||
/* Like getopt_long, but '-' as well as '--' can indicate a long option.
|
||||
@@ -82,14 +81,13 @@ getopt_long (argc, argv, options, long_o
|
||||
instead. */
|
||||
|
||||
int
|
||||
-getopt_long_only (argc, argv, options, long_options, opt_index)
|
||||
- int argc;
|
||||
- char *const *argv;
|
||||
- const char *options;
|
||||
- const struct option *long_options;
|
||||
- int *opt_index;
|
||||
+getopt_long_only(int argc,
|
||||
+ char * const *argv,
|
||||
+ const char *options,
|
||||
+ const struct option *long_options,
|
||||
+ int *opt_index)
|
||||
{
|
||||
- return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
|
||||
+ return _getopt_internal(argc, argv, options, long_options, opt_index, 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -100,91 +98,87 @@ getopt_long_only (argc, argv, options, l
|
||||
#include <stdio.h>
|
||||
|
||||
int
|
||||
-main (argc, argv)
|
||||
- int argc;
|
||||
- char **argv;
|
||||
+main(int argc, char **argv)
|
||||
{
|
||||
- int c;
|
||||
- int digit_optind = 0;
|
||||
+ int c;
|
||||
+ int digit_optind = 0;
|
||||
|
||||
- while (1)
|
||||
- {
|
||||
- int this_option_optind = optind ? optind : 1;
|
||||
- int option_index = 0;
|
||||
- static struct option long_options[] =
|
||||
- {
|
||||
- {"add", 1, 0, 0},
|
||||
- {"append", 0, 0, 0},
|
||||
- {"delete", 1, 0, 0},
|
||||
- {"verbose", 0, 0, 0},
|
||||
- {"create", 0, 0, 0},
|
||||
- {"file", 1, 0, 0},
|
||||
- {0, 0, 0, 0}
|
||||
- };
|
||||
-
|
||||
- c = getopt_long (argc, argv, "abc:d:0123456789",
|
||||
- long_options, &option_index);
|
||||
- if (c == -1)
|
||||
- break;
|
||||
-
|
||||
- switch (c)
|
||||
- {
|
||||
- case 0:
|
||||
- printf ("option %s", long_options[option_index].name);
|
||||
- if (optarg)
|
||||
- printf (" with arg %s", optarg);
|
||||
- printf ("\n");
|
||||
- break;
|
||||
-
|
||||
- case '0':
|
||||
- case '1':
|
||||
- case '2':
|
||||
- case '3':
|
||||
- case '4':
|
||||
- case '5':
|
||||
- case '6':
|
||||
- case '7':
|
||||
- case '8':
|
||||
- case '9':
|
||||
- if (digit_optind != 0 && digit_optind != this_option_optind)
|
||||
- printf ("digits occur in two different argv-elements.\n");
|
||||
- digit_optind = this_option_optind;
|
||||
- printf ("option %c\n", c);
|
||||
- break;
|
||||
-
|
||||
- case 'a':
|
||||
- printf ("option a\n");
|
||||
- break;
|
||||
-
|
||||
- case 'b':
|
||||
- printf ("option b\n");
|
||||
- break;
|
||||
-
|
||||
- case 'c':
|
||||
- printf ("option c with value `%s'\n", optarg);
|
||||
- break;
|
||||
-
|
||||
- case 'd':
|
||||
- printf ("option d with value `%s'\n", optarg);
|
||||
- break;
|
||||
+ while (1) {
|
||||
+ int this_option_optind = optind ? optind : 1;
|
||||
+ int option_index = 0;
|
||||
+ static struct option long_options[] = {
|
||||
+ {"add", 1, 0, 0},
|
||||
+ {"append", 0, 0, 0},
|
||||
+ {"delete", 1, 0, 0},
|
||||
+ {"verbose", 0, 0, 0},
|
||||
+ {"create", 0, 0, 0},
|
||||
+ {"file", 1, 0, 0},
|
||||
+ {0, 0, 0, 0}
|
||||
+ };
|
||||
+
|
||||
+ c = getopt_long(argc, argv, "abc:d:0123456789",
|
||||
+ long_options, &option_index);
|
||||
+
|
||||
+ if (c == -1)
|
||||
+ break;
|
||||
+
|
||||
+ switch (c) {
|
||||
+ case 0:
|
||||
+ printf ("option %s", long_options[option_index].name);
|
||||
+ if (optarg)
|
||||
+ printf (" with arg %s", optarg);
|
||||
+
|
||||
+ printf ("\n");
|
||||
+ break;
|
||||
+ case '0':
|
||||
+ case '1':
|
||||
+ case '2':
|
||||
+ case '3':
|
||||
+ case '4':
|
||||
+ case '5':
|
||||
+ case '6':
|
||||
+ case '7':
|
||||
+ case '8':
|
||||
+ case '9':
|
||||
+ if (digit_optind != 0 && digit_optind != this_option_optind)
|
||||
+ printf ("digits occur in two different argv-elements.\n");
|
||||
+ digit_optind = this_option_optind;
|
||||
+ printf ("option %c\n", c);
|
||||
+ break;
|
||||
+
|
||||
+ case 'a':
|
||||
+ printf ("option a\n");
|
||||
+ break;
|
||||
+
|
||||
+ case 'b':
|
||||
+ printf ("option b\n");
|
||||
+ break;
|
||||
+
|
||||
+ case 'c':
|
||||
+ printf ("option c with value `%s'\n", optarg);
|
||||
+ break;
|
||||
+
|
||||
+ case 'd':
|
||||
+ printf ("option d with value `%s'\n", optarg);
|
||||
+ break;
|
||||
+
|
||||
+ case '?':
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ printf ("?? getopt returned character code 0%o ??\n", c);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
- case '?':
|
||||
- break;
|
||||
+ if (optind < argc) {
|
||||
+ printf ("non-option ARGV-elements: ");
|
||||
|
||||
- default:
|
||||
- printf ("?? getopt returned character code 0%o ??\n", c);
|
||||
+ while (optind < argc)
|
||||
+ printf ("%s ", argv[optind++]);
|
||||
+ printf ("\n");
|
||||
}
|
||||
- }
|
||||
-
|
||||
- if (optind < argc)
|
||||
- {
|
||||
- printf ("non-option ARGV-elements: ");
|
||||
- while (optind < argc)
|
||||
- printf ("%s ", argv[optind++]);
|
||||
- printf ("\n");
|
||||
- }
|
||||
|
||||
- exit (0);
|
||||
+ exit(0);
|
||||
}
|
||||
|
||||
#endif /* TEST */
|
128
japanese/FreeWnn-lib/files/patch-Wnn-etc-hindo.c
Normal file
128
japanese/FreeWnn-lib/files/patch-Wnn-etc-hindo.c
Normal file
@ -0,0 +1,128 @@
|
||||
Index: Wnn/etc/hindo.c
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/etc/hindo.c,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/etc/hindo.c 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/etc/hindo.c 20 Dec 2008 15:22:40 -0000 1.2
|
||||
@@ -5,7 +5,7 @@
|
||||
/*
|
||||
* FreeWnn is a network-extensible Kana-to-Kanji conversion system.
|
||||
* This file is part of FreeWnn.
|
||||
- *
|
||||
+ *
|
||||
* Copyright Kyoto University Research Institute for Mathematical Sciences
|
||||
* 1987, 1988, 1989, 1990, 1991, 1992
|
||||
* Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999
|
||||
@@ -49,8 +49,8 @@
|
||||
仮頻度がbのとき、頻度の更新の確率は 1 / ([b÷4]+1)
|
||||
但し b=0の時は、頻度更新確率 0
|
||||
|
||||
-
|
||||
- a == -1 <==> b == 0x7f = 127;
|
||||
+
|
||||
+ a == -1 <==> b == 0x7f = 127;
|
||||
この時、このエントリーは、変換に決して用いられない
|
||||
(コメントアウトされている)ことを表す。
|
||||
9/1/89 H.T.
|
||||
@@ -58,47 +58,48 @@
|
||||
|
||||
/** 整数引数の平方根関数。但し引数<0の時のエラーチェックはなし(0を返す)。*/
|
||||
static int
|
||||
-isqrt (i)
|
||||
- int i;
|
||||
+isqrt(int i)
|
||||
{
|
||||
- register int a, b;
|
||||
+ register int a, b;
|
||||
+
|
||||
+ if (i <= 0)
|
||||
+ return (0);
|
||||
+
|
||||
+ for (a = i, b = 1; b <<= 1, a >>= 2;);
|
||||
+
|
||||
+ while ((a = i / b) < b)
|
||||
+ b = (b + a) >> 1;
|
||||
|
||||
- if (i <= 0)
|
||||
- return (0);
|
||||
- for (a = i, b = 1; b <<= 1, a >>= 2;);
|
||||
- while ((a = i / b) < b)
|
||||
- b = (b + a) >> 1;
|
||||
- return (b);
|
||||
+ return (b);
|
||||
}
|
||||
|
||||
/** 実頻度a→仮頻度b */
|
||||
int
|
||||
-asshuku (hin)
|
||||
- int hin;
|
||||
+asshuku(int hin)
|
||||
{
|
||||
- register int c;
|
||||
+ register int c;
|
||||
|
||||
- if (hin == -1)
|
||||
- return (127);
|
||||
- if (hin <= 4)
|
||||
- return (hin);
|
||||
- /* 大半は頻度0と想定してのスピードアップ。motoni1,2でも同じ */
|
||||
-
|
||||
- c = (isqrt ((hin <<= 1) + 1) + 1) & ~1;
|
||||
- c += hin / c - 2;
|
||||
- return (c < 126 ? c : 126);
|
||||
+ if (hin == -1)
|
||||
+ return (127);
|
||||
+ if (hin <= 4)
|
||||
+ return (hin);
|
||||
+ /* 大半は頻度0と想定してのスピードアップ。motoni1,2でも同じ */
|
||||
+
|
||||
+ c = (isqrt((hin <<= 1) + 1) + 1) & ~1;
|
||||
+ c += hin / c - 2;
|
||||
+
|
||||
+ return (c < 126 ? c : 126);
|
||||
}
|
||||
|
||||
/** 仮頻度b→実頻度(min)a */
|
||||
/*
|
||||
int
|
||||
-motoni1(hin)
|
||||
-int hin;
|
||||
+motoni1(int hin)
|
||||
{
|
||||
register int c;
|
||||
|
||||
if(hin == 127) return(-1);
|
||||
- if(hin <= 4) return(hin);
|
||||
+ if(hin <= 4) return(hin);
|
||||
c = hin >> 2;
|
||||
return( (hin - (c << 1)) * (c + 1) );
|
||||
}
|
||||
@@ -106,15 +107,17 @@ int hin;
|
||||
|
||||
/** 仮頻度b→実頻度(mid)a */
|
||||
int
|
||||
-motoni2 (hin)
|
||||
- int hin;
|
||||
+motoni2(int hin)
|
||||
{
|
||||
- register int c;
|
||||
+ register int c;
|
||||
+
|
||||
+ if (hin == 127)
|
||||
+ return (-1);
|
||||
+
|
||||
+ if (hin <= 4)
|
||||
+ return (hin);
|
||||
+
|
||||
+ c = hin >> 2;
|
||||
|
||||
- if (hin == 127)
|
||||
- return (-1);
|
||||
- if (hin <= 4)
|
||||
- return (hin);
|
||||
- c = hin >> 2;
|
||||
- return ((hin - (c << 1)) * (c + 1) + (c >> 1));
|
||||
+ return ((hin - (c << 1)) * (c + 1) + (c >> 1));
|
||||
}
|
58
japanese/FreeWnn-lib/files/patch-Wnn-etc-mkdir.c
Normal file
58
japanese/FreeWnn-lib/files/patch-Wnn-etc-mkdir.c
Normal file
@ -0,0 +1,58 @@
|
||||
Index: Wnn/etc/mkdir.c
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/etc/mkdir.c,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/etc/mkdir.c 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/etc/mkdir.c 20 Dec 2008 15:22:40 -0000 1.2
|
||||
@@ -5,7 +5,7 @@
|
||||
/*
|
||||
* FreeWnn is a network-extensible Kana-to-Kanji conversion system.
|
||||
* This file is part of FreeWnn.
|
||||
- *
|
||||
+ *
|
||||
* Copyright Kyoto University Research Institute for Mathematical Sciences
|
||||
* 1987, 1988, 1989, 1990, 1991, 1992
|
||||
* Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999
|
||||
@@ -57,25 +57,24 @@
|
||||
#endif /* !WIFEXITED */
|
||||
|
||||
int
|
||||
-mkdir (path, mode)
|
||||
- const char *path;
|
||||
- mode_t mode;
|
||||
+mkdir(const char *path,
|
||||
+ mode_t mode)
|
||||
{
|
||||
- const char *args[3];
|
||||
- int status;
|
||||
+ const char *args[3];
|
||||
+ int status;
|
||||
|
||||
- if (!path)
|
||||
- return -1;
|
||||
+ if (!path)
|
||||
+ return -1;
|
||||
|
||||
- args[0] = "/bin/mkdir";
|
||||
- args[1] = path;
|
||||
- args[2] = NULL;
|
||||
-
|
||||
- if (!fork ())
|
||||
- execv (args[0], args);
|
||||
- else
|
||||
- wait (&status);
|
||||
+ args[0] = "/bin/mkdir";
|
||||
+ args[1] = path;
|
||||
+ args[2] = NULL;
|
||||
+
|
||||
+ if (!fork())
|
||||
+ execv(args[0], args);
|
||||
+ else
|
||||
+ wait(&status);
|
||||
|
||||
- return !(WIFEXITED (status));
|
||||
+ return !(WIFEXITED(status));
|
||||
}
|
||||
#endif
|
667
japanese/FreeWnn-lib/files/patch-Wnn-etc-msg.c
Normal file
667
japanese/FreeWnn-lib/files/patch-Wnn-etc-msg.c
Normal file
@ -0,0 +1,667 @@
|
||||
Index: Wnn/etc/msg.c
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/etc/msg.c,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/etc/msg.c 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/etc/msg.c 20 Dec 2008 15:22:40 -0000 1.2
|
||||
@@ -5,7 +5,7 @@
|
||||
/*
|
||||
* FreeWnn is a network-extensible Kana-to-Kanji conversion system.
|
||||
* This file is part of FreeWnn.
|
||||
- *
|
||||
+ *
|
||||
* Copyright Kyoto University Research Institute for Mathematical Sciences
|
||||
* 1987, 1988, 1989, 1990, 1991, 1992
|
||||
* Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999
|
||||
@@ -69,124 +69,116 @@
|
||||
#include "msg.h"
|
||||
|
||||
static char *
|
||||
-getlang (lang)
|
||||
- char *lang;
|
||||
+getlang(char *lang)
|
||||
{
|
||||
- static char tmp[32];
|
||||
- char *p;
|
||||
- int i;
|
||||
+ static char tmp[32];
|
||||
+ char *p;
|
||||
+ int i;
|
||||
|
||||
- if (lang == NULL || *lang == '\0')
|
||||
- {
|
||||
+ if (lang == NULL || *lang == '\0') {
|
||||
#ifdef HAS_SETLOCALE
|
||||
- lang = setlocale (LC_ALL, NULL);
|
||||
- if (lang == NULL || *lang == '\0')
|
||||
+ lang = setlocale(LC_ALL, NULL);
|
||||
+ if (lang == NULL || *lang == '\0')
|
||||
#endif
|
||||
- {
|
||||
- lang = getenv ("LC_MESSAGES");
|
||||
- if (lang == NULL || *lang == '\0')
|
||||
- {
|
||||
- lang = getenv ("LANG");
|
||||
- if (lang == NULL || *lang == '\0')
|
||||
- {
|
||||
- lang = DEF_LANG;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- for (i = 0, p = lang; *p && *p != '.'; i++, p++)
|
||||
- {
|
||||
- tmp[i] = *p;
|
||||
- }
|
||||
- tmp[i] = '\0';
|
||||
- return (tmp);
|
||||
- /*
|
||||
- return(lang);
|
||||
- */
|
||||
+ {
|
||||
+ lang = getenv("LC_MESSAGES");
|
||||
+ if (lang == NULL || *lang == '\0') {
|
||||
+ lang = getenv("LANG");
|
||||
+
|
||||
+ if (lang == NULL || *lang == '\0') {
|
||||
+ lang = DEF_LANG;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ for (i = 0, p = lang; *p && *p != '.'; i++, p++)
|
||||
+ tmp[i] = *p;
|
||||
+
|
||||
+ tmp[i] = '\0';
|
||||
+
|
||||
+ return (tmp);
|
||||
+ /*
|
||||
+ return(lang);
|
||||
+ */
|
||||
}
|
||||
|
||||
static int
|
||||
-_search (id, bd)
|
||||
- int *id;
|
||||
- struct msg_bd *bd;
|
||||
+_search(int *id,
|
||||
+ struct msg_bd *bd)
|
||||
{
|
||||
- return (*id - bd->msg_id);
|
||||
+ return (*id - bd->msg_id);
|
||||
}
|
||||
|
||||
static void
|
||||
-_escape (op, ip)
|
||||
- register char *op, *ip;
|
||||
+_escape(register char *op,
|
||||
+ register char *ip)
|
||||
{
|
||||
- for (; *ip != 0; ip++, op++)
|
||||
- {
|
||||
- if (*ip == '\\')
|
||||
- {
|
||||
- switch (*++ip)
|
||||
- {
|
||||
- case 'n':
|
||||
- *op = '\n';
|
||||
- break;
|
||||
- case 't':
|
||||
- *op = '\t';
|
||||
- break;
|
||||
- case 'b':
|
||||
- *op = '\b';
|
||||
- break;
|
||||
- case 'r':
|
||||
- *op = '\r';
|
||||
- break;
|
||||
- case 'f':
|
||||
- *op = '\f';
|
||||
- break;
|
||||
- case 'v':
|
||||
- *op = '\v';
|
||||
- break;
|
||||
- case '0':
|
||||
- *op = 0;
|
||||
- break;
|
||||
- /*
|
||||
- case 'a':
|
||||
- *op = '\a';
|
||||
- break;
|
||||
- case 'e':
|
||||
- case 'E':
|
||||
- case 'o':
|
||||
- case 'd':
|
||||
- case 'x':
|
||||
- break;
|
||||
- */
|
||||
- default:
|
||||
- *op = *ip;
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- if (*ip == '\n')
|
||||
- {
|
||||
- *op = '\0';
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- *op = *ip;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- *op = 0;
|
||||
+ for (; *ip != 0; ip++, op++) {
|
||||
+ if (*ip == '\\') {
|
||||
+ switch (*++ip) {
|
||||
+ case 'n':
|
||||
+ *op = '\n';
|
||||
+ break;
|
||||
+ case 't':
|
||||
+ *op = '\t';
|
||||
+ break;
|
||||
+ case 'b':
|
||||
+ *op = '\b';
|
||||
+ break;
|
||||
+ case 'r':
|
||||
+ *op = '\r';
|
||||
+ break;
|
||||
+ case 'f':
|
||||
+ *op = '\f';
|
||||
+ break;
|
||||
+ case 'v':
|
||||
+ *op = '\v';
|
||||
+ break;
|
||||
+ case '0':
|
||||
+ *op = 0;
|
||||
+ break;
|
||||
+ /*
|
||||
+ case 'a':
|
||||
+ *op = '\a';
|
||||
+ break;
|
||||
+ case 'e':
|
||||
+ case 'E':
|
||||
+ case 'o':
|
||||
+ case 'd':
|
||||
+ case 'x':
|
||||
+ break;
|
||||
+ */
|
||||
+ default:
|
||||
+ *op = *ip;
|
||||
+ break;
|
||||
+ }
|
||||
+ } else {
|
||||
+ if (*ip == '\n')
|
||||
+ *op = '\0';
|
||||
+ else
|
||||
+ *op = *ip;
|
||||
+ }
|
||||
+ }
|
||||
+ *op = 0;
|
||||
}
|
||||
|
||||
static char *
|
||||
-get_msg_bd (cd, id)
|
||||
- struct msg_cat *cd;
|
||||
- int id;
|
||||
+get_msg_bd(struct msg_cat *cd,
|
||||
+ int id)
|
||||
{
|
||||
- register struct msg_bd *bd;
|
||||
- if (cd->msg_bd == 0 || cd->msg_cnt == 0)
|
||||
- return (NULL);
|
||||
- bd = (struct msg_bd *) bsearch (&id, cd->msg_bd, cd->msg_cnt, sizeof (struct msg_bd), _search);
|
||||
- if (bd == NULL)
|
||||
- return (NULL);
|
||||
- return (bd->msg);
|
||||
+ register struct msg_bd *bd;
|
||||
+
|
||||
+ if (cd->msg_bd == 0 || cd->msg_cnt == 0)
|
||||
+ return (NULL);
|
||||
+
|
||||
+ bd = (struct msg_bd *)bsearch(&id,
|
||||
+ cd->msg_bd,
|
||||
+ cd->msg_cnt,
|
||||
+ sizeof (struct msg_bd),
|
||||
+ _search);
|
||||
+ if (bd == NULL)
|
||||
+ return (NULL);
|
||||
+ return (bd->msg);
|
||||
}
|
||||
|
||||
/* expand
|
||||
@@ -195,229 +187,236 @@ get_msg_bd (cd, id)
|
||||
%l: the language element from LANG
|
||||
%t: the territory element from LANG
|
||||
%c: the codeset element from LANG
|
||||
- %%: a single % charctor
|
||||
+ %%: a single % charctor
|
||||
*/
|
||||
static int
|
||||
-expand (op, ip, name, lang)
|
||||
- register char *op, *ip, *name, *lang;
|
||||
+expand (register char *op,
|
||||
+ register char *ip,
|
||||
+ register char *name,
|
||||
+ register char *lang)
|
||||
{
|
||||
- if (!ip || !*ip)
|
||||
- return (-1);
|
||||
- for (; *ip != 0; ip++)
|
||||
- {
|
||||
- if (*ip == '%')
|
||||
- {
|
||||
- switch (*++ip)
|
||||
- {
|
||||
- case 'N':
|
||||
- if (!name || !*name)
|
||||
- return (-1);
|
||||
- strcpy (op, name);
|
||||
- op += strlen (name);
|
||||
- break;
|
||||
- case 'L':
|
||||
- if (!lang || !*lang)
|
||||
- return (-1);
|
||||
- strcpy (op, lang);
|
||||
- op += strlen (lang);
|
||||
- break;
|
||||
- /*
|
||||
- case 'l':
|
||||
- strcpy(op, language);
|
||||
- op += strlen(language);
|
||||
- break;
|
||||
- case 't':
|
||||
- strcpy(op, terr);
|
||||
- op += strlen(terr);
|
||||
- break;
|
||||
- case 'c':
|
||||
- strcpy(op, code);
|
||||
- op += strlen(code);
|
||||
- break;
|
||||
- case '%':
|
||||
- strcpy(op, "%");
|
||||
- op += strlen("%");
|
||||
- break;
|
||||
- */
|
||||
- default:
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- *op = *ip;
|
||||
- op++;
|
||||
- }
|
||||
- }
|
||||
- *op = '\0';
|
||||
- return (0);
|
||||
+ if (!ip || !*ip)
|
||||
+ return (-1);
|
||||
+
|
||||
+ for (; *ip != 0; ip++) {
|
||||
+ if (*ip == '%') {
|
||||
+ switch (*++ip) {
|
||||
+ case 'N':
|
||||
+ if (!name || !*name)
|
||||
+ return (-1);
|
||||
+ strcpy(op, name);
|
||||
+ op += strlen(name);
|
||||
+ break;
|
||||
+ case 'L':
|
||||
+ if (!lang || !*lang)
|
||||
+ return (-1);
|
||||
+ strcpy(op, lang);
|
||||
+ op += strlen(lang);
|
||||
+ break;
|
||||
+ /*
|
||||
+ case 'l':
|
||||
+ strcpy(op, language);
|
||||
+ op += strlen(language);
|
||||
+ break;
|
||||
+ case 't':
|
||||
+ strcpy(op, terr);
|
||||
+ op += strlen(terr);
|
||||
+ break;
|
||||
+ case 'c':
|
||||
+ strcpy(op, code);
|
||||
+ op += strlen(code);
|
||||
+ break;
|
||||
+ case '%':
|
||||
+ strcpy(op, "%");
|
||||
+ op += strlen("%");
|
||||
+ break;
|
||||
+ */
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+ } else {
|
||||
+ *op = *ip;
|
||||
+ op++;
|
||||
+ }
|
||||
+ }
|
||||
+ *op = '\0';
|
||||
+
|
||||
+ return (0);
|
||||
}
|
||||
|
||||
|
||||
struct msg_cat *
|
||||
-msg_open (name, nlspath, lang)
|
||||
- char *name;
|
||||
- char *nlspath;
|
||||
- char *lang;
|
||||
+msg_open (char *name,
|
||||
+ char *nlspath,
|
||||
+ char *lang)
|
||||
{
|
||||
- struct msg_cat *cd;
|
||||
+ struct msg_cat *cd;
|
||||
|
||||
- char fn[MAXPATHLEN];
|
||||
- FILE *fp;
|
||||
- char data[1024];
|
||||
- char save[1024];
|
||||
- int msg_cnt = 0;
|
||||
- int msg_byte = 0;
|
||||
- register char *dp;
|
||||
- register struct msg_bd *bd;
|
||||
- register char *msg, *l;
|
||||
-
|
||||
- l = getlang (lang);
|
||||
- if (name && *name == '/')
|
||||
- {
|
||||
- strcpy (fn, name);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- if (expand (fn, nlspath, name, l) == -1)
|
||||
- {
|
||||
- return (NULL);
|
||||
+ char fn[MAXPATHLEN];
|
||||
+ FILE *fp;
|
||||
+ char data[1024];
|
||||
+ char save[1024];
|
||||
+ int msg_cnt = 0;
|
||||
+ int msg_byte = 0;
|
||||
+ register char *dp;
|
||||
+ register struct msg_bd *bd;
|
||||
+ register char *msg, *l;
|
||||
+
|
||||
+ l = getlang(lang);
|
||||
+
|
||||
+ if (name && *name == '/')
|
||||
+ strcpy (fn, name);
|
||||
+ else {
|
||||
+ if (expand (fn, nlspath, name, l) == -1)
|
||||
+ return (NULL);
|
||||
}
|
||||
- }
|
||||
|
||||
- if (!(cd = (struct msg_cat *) malloc (sizeof (struct msg_cat))))
|
||||
- return (NULL);
|
||||
+ if (!(cd = (struct msg_cat *) malloc (sizeof (struct msg_cat))))
|
||||
+ return (NULL);
|
||||
+
|
||||
+ strcpy (cd->name, name);
|
||||
+ strcpy (cd->lang, l);
|
||||
+ strcpy (cd->nlspath, nlspath);
|
||||
+ cd->nextp = NULL;
|
||||
+ cd->msg_cnt = 0;
|
||||
+
|
||||
+ if ((fp = fopen (fn, "r")) == NULL) {
|
||||
+ /* message file not found */
|
||||
+ cd->msg_bd = 0;
|
||||
+ return (cd);
|
||||
+ }
|
||||
+
|
||||
+ for (;;) {
|
||||
+ /* first: count bytes */
|
||||
+ if (fgets (data, 1024, fp) == NULL)
|
||||
+ break;
|
||||
+
|
||||
+ /* comment */
|
||||
+ if (*data == '#')
|
||||
+ continue;
|
||||
+
|
||||
+ for (dp = data; *dp && *dp != '\t'; dp++);
|
||||
+ /* msg_id:message\n */
|
||||
+
|
||||
+ if (*dp == '\0')
|
||||
+ continue;
|
||||
+
|
||||
+ dp++;
|
||||
+ msg_byte += strlen (dp);
|
||||
+ msg_cnt++;
|
||||
+ }
|
||||
+
|
||||
+ rewind(fp);
|
||||
+
|
||||
+ cd->msg_cnt = msg_cnt;
|
||||
+
|
||||
+ if (!(bd = cd->msg_bd =
|
||||
+ (struct msg_bd *)malloc((sizeof (struct msg_bd)) * msg_cnt + msg_byte + 1))) {
|
||||
+ fclose(fp);
|
||||
+ free(cd);
|
||||
+ return (NULL);
|
||||
+ }
|
||||
+
|
||||
+ msg = (char *) bd + (sizeof (struct msg_bd)) * msg_cnt;
|
||||
+
|
||||
+ for (;;) {
|
||||
+ /* second : get message */
|
||||
+ if (fgets(data, 1024, fp) == NULL)
|
||||
+ break;
|
||||
+
|
||||
+ if (*data == '#')
|
||||
+ /* comment */
|
||||
+ continue;
|
||||
+
|
||||
+ for (dp = data; *dp && *dp != '\t'; dp++);
|
||||
+ /* msg_id:message\n */
|
||||
+
|
||||
+ if (*dp == '\0')
|
||||
+ continue;
|
||||
+
|
||||
+ *dp = 0;
|
||||
+ dp++;
|
||||
+ bd->msg_id = atoi(data);
|
||||
+ bd->msg = msg;
|
||||
+ bd++;
|
||||
+ _escape(save, dp);
|
||||
+ strcpy(msg, save);
|
||||
+ msg += strlen(save);
|
||||
+ *msg = 0;
|
||||
+ msg++;
|
||||
+ }
|
||||
|
||||
- strcpy (cd->name, name);
|
||||
- strcpy (cd->lang, l);
|
||||
- strcpy (cd->nlspath, nlspath);
|
||||
- cd->nextp = NULL;
|
||||
- cd->msg_cnt = 0;
|
||||
-
|
||||
- if ((fp = fopen (fn, "r")) == NULL)
|
||||
- {
|
||||
- /* message file not found */
|
||||
- cd->msg_bd = 0;
|
||||
- return (cd);
|
||||
- }
|
||||
- for (;;)
|
||||
- {
|
||||
- /* first: count bytes */
|
||||
- if (fgets (data, 1024, fp) == NULL)
|
||||
- break;
|
||||
- if (*data == '#')
|
||||
- continue; /* comment */
|
||||
- for (dp = data; *dp && *dp != '\t'; dp++); /* msg_id:message\n */
|
||||
- if (*dp == '\0')
|
||||
- continue;
|
||||
- dp++;
|
||||
- msg_byte += strlen (dp);
|
||||
- msg_cnt++;
|
||||
- }
|
||||
- rewind (fp);
|
||||
-
|
||||
- cd->msg_cnt = msg_cnt;
|
||||
- if (!(bd = cd->msg_bd = (struct msg_bd *) malloc ((sizeof (struct msg_bd)) * msg_cnt + msg_byte + 1)))
|
||||
- {
|
||||
- fclose (fp);
|
||||
- free (cd);
|
||||
- return (NULL);
|
||||
- }
|
||||
- msg = (char *) bd + (sizeof (struct msg_bd)) * msg_cnt;
|
||||
-
|
||||
- for (;;)
|
||||
- {
|
||||
- /* second : get message */
|
||||
- if (fgets (data, 1024, fp) == NULL)
|
||||
- break;
|
||||
- if (*data == '#')
|
||||
- continue; /* comment */
|
||||
- for (dp = data; *dp && *dp != '\t'; dp++); /* msg_id:message\n */
|
||||
- if (*dp == '\0')
|
||||
- continue;
|
||||
- *dp = 0;
|
||||
- dp++;
|
||||
- bd->msg_id = atoi (data);
|
||||
- bd->msg = msg;
|
||||
- bd++;
|
||||
- _escape (save, dp);
|
||||
- strcpy (msg, save);
|
||||
- msg += strlen (save);
|
||||
- *msg = 0;
|
||||
- msg++;
|
||||
- }
|
||||
- fclose (fp);
|
||||
- return (cd);
|
||||
+ fclose(fp);
|
||||
+ return (cd);
|
||||
}
|
||||
|
||||
char *
|
||||
-msg_get (catd, id, msg, lang)
|
||||
- struct msg_cat *catd;
|
||||
- int id;
|
||||
- char *msg;
|
||||
- register char *lang;
|
||||
+msg_get(struct msg_cat *catd,
|
||||
+ int id,
|
||||
+ char *msg,
|
||||
+ register char *lang)
|
||||
{
|
||||
- register struct msg_cat *cd;
|
||||
- register char *msg_bd;
|
||||
+ register struct msg_cat *cd;
|
||||
+ register char *msg_bd;
|
||||
|
||||
- if (catd == 0)
|
||||
- goto error;
|
||||
- cd = catd;
|
||||
- if (lang == 0 || *lang == '\0')
|
||||
- {
|
||||
- lang = cd->lang;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- for (;; cd = cd->nextp)
|
||||
- {
|
||||
- if (strcmp (lang, cd->lang) == 0)
|
||||
- break;
|
||||
- if (cd->nextp == 0)
|
||||
- {
|
||||
- cd->nextp = msg_open (cd->name, cd->nlspath, lang);
|
||||
- cd = cd->nextp;
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
+ if (catd == 0)
|
||||
+ goto error;
|
||||
+
|
||||
+ cd = catd;
|
||||
+
|
||||
+ if (lang == 0 || *lang == '\0')
|
||||
+ lang = cd->lang;
|
||||
+ else {
|
||||
+ for (;; cd = cd->nextp) {
|
||||
+ if (strcmp(lang, cd->lang) == 0)
|
||||
+ break;
|
||||
+ if (cd->nextp == 0) {
|
||||
+ cd->nextp = msg_open(cd->name, cd->nlspath, lang);
|
||||
+ cd = cd->nextp;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
|
||||
- if (msg_bd = get_msg_bd (cd, id))
|
||||
- return (msg_bd);
|
||||
+ if (msg_bd = get_msg_bd(cd, id))
|
||||
+ return (msg_bd);
|
||||
error:
|
||||
- if (msg != 0 && *msg != '\0')
|
||||
- return (msg);
|
||||
- {
|
||||
- static char ret[128];
|
||||
- sprintf (ret, "mes_id = %d: %s", id, DEF_MSG);
|
||||
- return (ret);
|
||||
- }
|
||||
+
|
||||
+ if (msg != 0 && *msg != '\0')
|
||||
+ return (msg);
|
||||
+
|
||||
+ {
|
||||
+ static char ret[128];
|
||||
+ sprintf(ret, "mes_id = %d: %s", id, DEF_MSG);
|
||||
+ return (ret);
|
||||
+ }
|
||||
}
|
||||
|
||||
void
|
||||
-msg_close (cd)
|
||||
- register struct msg_cat *cd;
|
||||
+msg_close(register struct msg_cat *cd)
|
||||
{
|
||||
- if (cd->nextp)
|
||||
- msg_close (cd->nextp);
|
||||
- if (cd->msg_bd)
|
||||
- free (cd->msg_bd);
|
||||
- if (cd)
|
||||
- free (cd);
|
||||
+ if (cd->nextp)
|
||||
+ msg_close(cd->nextp);
|
||||
+
|
||||
+ if (cd->msg_bd)
|
||||
+ free(cd->msg_bd);
|
||||
+
|
||||
+ if (cd)
|
||||
+ free(cd);
|
||||
}
|
||||
|
||||
#ifdef not_use
|
||||
/* test */
|
||||
-main ()
|
||||
+main()
|
||||
{
|
||||
- struct msg_cat *cd;
|
||||
+ struct msg_cat *cd;
|
||||
|
||||
- cd = msg_open ("msg", "%L", "ja_JP");
|
||||
+ cd = msg_open("msg", "%L", "ja_JP");
|
||||
|
||||
- printf (msg_get (cd, 5, "message not found\n", "ja_JP"), 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, 100, "message not found\n", "zh_CN"), "abc");
|
||||
+ printf (msg_get(cd, 5, "message not found\n", "ja_JP"), 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, 100, "message not found\n", "zh_CN"), "abc");
|
||||
}
|
||||
#endif /* not_use */
|
97
japanese/FreeWnn-lib/files/patch-Wnn-etc-pwd.c
Normal file
97
japanese/FreeWnn-lib/files/patch-Wnn-etc-pwd.c
Normal file
@ -0,0 +1,97 @@
|
||||
Index: Wnn/etc/pwd.c
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/etc/pwd.c,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/etc/pwd.c 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/etc/pwd.c 20 Dec 2008 15:22:40 -0000 1.2
|
||||
@@ -5,7 +5,7 @@
|
||||
/*
|
||||
* FreeWnn is a network-extensible Kana-to-Kanji conversion system.
|
||||
* This file is part of FreeWnn.
|
||||
- *
|
||||
+ *
|
||||
* Copyright Kyoto University Research Institute for Mathematical Sciences
|
||||
* 1987, 1988, 1989, 1990, 1991, 1992
|
||||
* Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999
|
||||
@@ -62,41 +62,47 @@ JS_STATIC void new_pwd (char* src, char*
|
||||
JS_STATIC int check_pwd (char* src, char* encd);
|
||||
|
||||
JS_STATIC void
|
||||
-new_pwd (char* src, char* encd)
|
||||
+new_pwd(char *src, char *encd)
|
||||
{
|
||||
- int i, x, c;
|
||||
- char xx[3];
|
||||
- char *cr;
|
||||
-
|
||||
- if (encd == NULL)
|
||||
- encd = src;
|
||||
- if (strcmp (src, "") == 0)
|
||||
- {
|
||||
- bzero (encd, WNN_PASSWD_LEN);
|
||||
- return;
|
||||
- }
|
||||
- x = time (NULL);
|
||||
- xx[0] = x & 0x3f;
|
||||
- xx[1] = (x & 0x3f00) >> 8;
|
||||
- xx[2] = '\0'; /* for MD5 (that requires terminator) */
|
||||
- for (i = 0; i < 2; i++)
|
||||
- {
|
||||
- c = xx[i] + '.';
|
||||
- if (c > '9')
|
||||
- c += 7;
|
||||
- if (c > 'Z')
|
||||
- c += 6;
|
||||
- xx[i] = c;
|
||||
- }
|
||||
- cr = crypt (src, xx);
|
||||
- bzero (encd, WNN_PASSWD_LEN);
|
||||
- strncpy (encd, cr, WNN_PASSWD_LEN);
|
||||
+ int i, x, c;
|
||||
+ char xx[3];
|
||||
+ char *cr;
|
||||
+
|
||||
+ if (encd == NULL)
|
||||
+ encd = src;
|
||||
+
|
||||
+ if (strcmp (src, "") == 0) {
|
||||
+ bzero (encd, WNN_PASSWD_LEN);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ x = time (NULL);
|
||||
+ xx[0] = x & 0x3f;
|
||||
+ xx[1] = (x & 0x3f00) >> 8;
|
||||
+
|
||||
+ /* for MD5 (that requires terminator) */
|
||||
+ xx[2] = '\0';
|
||||
+
|
||||
+ for (i = 0; i < 2; i++) {
|
||||
+ c = xx[i] + '.';
|
||||
+ if (c > '9')
|
||||
+ c += 7;
|
||||
+ if (c > 'Z')
|
||||
+ c += 6;
|
||||
+ xx[i] = c;
|
||||
+ }
|
||||
+
|
||||
+ cr = crypt(src, xx);
|
||||
+ bzero(encd, WNN_PASSWD_LEN);
|
||||
+ strncpy(encd, cr, WNN_PASSWD_LEN);
|
||||
}
|
||||
|
||||
JS_STATIC int
|
||||
-check_pwd (char* src, char* encd)
|
||||
+check_pwd(char* src, char* encd)
|
||||
{
|
||||
- if (strcmp (encd, "") == 0)
|
||||
- return (1); /* No passwd */
|
||||
- return (!strncmp (encd, crypt (src, encd), WNN_PASSWD_LEN));
|
||||
+ if (strcmp (encd, "") == 0)
|
||||
+ /* No passwd */
|
||||
+ return (1);
|
||||
+
|
||||
+ return (!strncmp(encd, crypt(src, encd), WNN_PASSWD_LEN));
|
||||
}
|
173
japanese/FreeWnn-lib/files/patch-Wnn-etc-py_table.c
Normal file
173
japanese/FreeWnn-lib/files/patch-Wnn-etc-py_table.c
Normal file
@ -0,0 +1,173 @@
|
||||
Index: Wnn/etc/py_table.c
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/etc/py_table.c,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/etc/py_table.c 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/etc/py_table.c 20 Dec 2008 15:22:40 -0000 1.2
|
||||
@@ -5,7 +5,7 @@
|
||||
/*
|
||||
* FreeWnn is a network-extensible Kana-to-Kanji conversion system.
|
||||
* This file is part of FreeWnn.
|
||||
- *
|
||||
+ *
|
||||
* Copyright Kyoto University Research Institute for Mathematical Sciences
|
||||
* 1987, 1988, 1989, 1990, 1991, 1992
|
||||
* Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999
|
||||
@@ -39,87 +39,83 @@
|
||||
|
||||
/* pyshengmu_tbl[]: ShengMu table of Chinese PinYin */
|
||||
char *py_shengmu_tbl[PY_NUM_SHENGMU] = {
|
||||
-
|
||||
- "", "B", "C", "Ch", "D",
|
||||
- "F", "G", "H", "J", "K",
|
||||
- "L", "M", "N", "P", "Q",
|
||||
- "R", "S", "Sh", "T", "W",
|
||||
- "X", "Y", "Z", "Zh"
|
||||
+ "", "B", "C", "Ch", "D",
|
||||
+ "F", "G", "H", "J", "K",
|
||||
+ "L", "M", "N", "P", "Q",
|
||||
+ "R", "S", "Sh", "T", "W",
|
||||
+ "X", "Y", "Z", "Zh"
|
||||
};
|
||||
|
||||
/* py_yunmu_tbl[]: YunMu table of Chinese ZhuYin */
|
||||
char *py_yunmu_tbl[PY_NUM_YUNMU * 5] = {
|
||||
-
|
||||
- "ŽÀ", "ŽÀ", "ŽÀ", "ŽÀ", "ŽÀ",
|
||||
- "aŽÀ", "Ž¡ŽÀ", "Ž¢ŽÀ", "Ž£ŽÀ", "Ž¤ŽÀ",
|
||||
- "aiŽÀ", "Ž¡iŽÀ", "Ž¢iŽÀ", "Ž£iŽÀ", "Ž¤iŽÀ",
|
||||
- "anŽÀ", "Ž¡nŽÀ", "Ž¢nŽÀ", "Ž£nŽÀ", "Ž¤nŽÀ",
|
||||
- "angŽÀ", "Ž¡ngŽÀ", "Ž¢ngŽÀ", "Ž£ngŽÀ", "Ž¤ngŽÀ",
|
||||
- "aoŽÀ", "Ž¡oŽÀ", "Ž¢oŽÀ", "Ž£oŽÀ", "Ž¤oŽÀ",
|
||||
- "eŽÀ", "Ž¥ŽÀ", "Ž¦ŽÀ", "Ž§ŽÀ", "Ž¨ŽÀ",
|
||||
- "eiŽÀ", "Ž¥iŽÀ", "Ž¦iŽÀ", "Ž§iŽÀ", "Ž¨iŽÀ",
|
||||
- "enŽÀ", "Ž¥nŽÀ", "Ž¦nŽÀ", "Ž§nŽÀ", "Ž¨nŽÀ",
|
||||
- "engŽÀ", "Ž¥ngŽÀ", "Ž¦ngŽÀ", "Ž§ngŽÀ", "Ž¨ngŽÀ",
|
||||
- "erŽÀ", "Ž¥rŽÀ", "Ž¦rŽÀ", "Ž§rŽÀ", "Ž¨rŽÀ",
|
||||
- "iŽÀ", "Ž©ŽÀ", "ŽªŽÀ", "Ž«ŽÀ", "Ž¬ŽÀ",
|
||||
- "iaŽÀ", "iŽ¡ŽÀ", "iŽ¢ŽÀ", "iŽ£ŽÀ", "iŽ¤ŽÀ",
|
||||
- "ianŽÀ", "iŽ¡nŽÀ", "iŽ¢nŽÀ", "iŽ£nŽÀ", "iŽ¤nŽÀ",
|
||||
- "iangŽÀ", "iŽ¡ngŽÀ", "iŽ¢ngŽÀ", "iŽ£ngŽÀ", "iŽ¤ngŽÀ",
|
||||
- "iaoŽÀ", "iŽ¡oŽÀ", "iŽ¢oŽÀ", "iŽ£oŽÀ", "iŽ¤oŽÀ",
|
||||
- "ieŽÀ", "iŽ¥ŽÀ", "iŽ¦ŽÀ", "iŽ§ŽÀ", "iŽ¨ŽÀ",
|
||||
- "inŽÀ", "Ž©nŽÀ", "ŽªnŽÀ", "Ž«nŽÀ", "Ž¬nŽÀ",
|
||||
- "ingŽÀ", "Ž©ngŽÀ", "ŽªngŽÀ", "Ž«ngŽÀ", "Ž¬ngŽÀ",
|
||||
- "iongŽÀ", "iŽngŽÀ", "iŽ®ngŽÀ", "iŽ¯ngŽÀ", "iŽ°ngŽÀ",
|
||||
- "iuŽÀ", "iŽ±ŽÀ", "iŽ²ŽÀ", "iŽ³ŽÀ", "iŽ´ŽÀ",
|
||||
- "mŽÀ", "mŽÀ", "mŽÀ", "mŽÀ", "mŽÀ",
|
||||
- "nŽÀ", "nŽÀ", "Ž½ŽÀ", "Ž¾ŽÀ", "Ž¿ŽÀ",
|
||||
- "ngŽÀ", "ngŽÀ", "ngŽÀ", "ngŽÀ", "ngŽÀ",
|
||||
- "oŽÀ", "ŽŽÀ", "Ž®ŽÀ", "Ž¯ŽÀ", "Ž°ŽÀ",
|
||||
- "ongŽÀ", "ŽngŽÀ", "Ž®ngŽÀ", "Ž¯ngŽÀ", "Ž°ngŽÀ",
|
||||
- "ouŽÀ", "ŽuŽÀ", "Ž®uŽÀ", "Ž¯uŽÀ", "Ž°uŽÀ",
|
||||
- "uŽÀ", "Ž±ŽÀ", "Ž²ŽÀ", "Ž³ŽÀ", "Ž´ŽÀ",
|
||||
- "uaŽÀ", "uŽ¡ŽÀ", "uŽ¢ŽÀ", "uŽ£ŽÀ", "uŽ¤ŽÀ",
|
||||
- "uaiŽÀ", "uŽ¡iŽÀ", "uŽ¢iŽÀ", "uŽ£iŽÀ", "uŽ¤iŽÀ",
|
||||
- "uanŽÀ", "uŽ¡nŽÀ", "uŽ¢nŽÀ", "uŽ£nŽÀ", "uŽ¤nŽÀ",
|
||||
- "uangŽÀ", "uŽ¡ngŽÀ", "uŽ¢ngŽÀ", "uŽ£ngŽÀ", "uŽ¤ngŽÀ",
|
||||
- "ueŽÀ", "uŽ¥ŽÀ", "uŽ¦ŽÀ", "uŽ§ŽÀ", "uŽ¨ŽÀ",
|
||||
- "uiŽÀ", "uŽ©ŽÀ", "uŽªŽÀ", "uŽ«ŽÀ", "uŽ¬ŽÀ",
|
||||
- "unŽÀ", "Ž±nŽÀ", "Ž²nŽÀ", "Ž³nŽÀ", "Ž´nŽÀ",
|
||||
- "uoŽÀ", "uŽŽÀ", "uŽ®ŽÀ", "uŽ¯ŽÀ", "uŽ°ŽÀ",
|
||||
- "Ž¹ŽÀ", "ŽµŽÀ", "Ž¶ŽÀ", "Ž·ŽÀ", "Ž¸ŽÀ",
|
||||
- "Ž¹eŽÀ", "Ž¹Ž¥ŽÀ", "Ž¹Ž¦ŽÀ", "Ž¹Ž§ŽÀ", "Ž¹Ž¨ŽÀ",
|
||||
- "0ŽÀ", "1ŽÀ", "2ŽÀ", "3ŽÀ", "4ŽÀ", /* for undefinited YunMu */
|
||||
+ "ŽÀ", "ŽÀ", "ŽÀ", "ŽÀ", "ŽÀ",
|
||||
+ "aŽÀ", "Ž¡ŽÀ", "Ž¢ŽÀ", "Ž£ŽÀ", "Ž¤ŽÀ",
|
||||
+ "aiŽÀ", "Ž¡iŽÀ", "Ž¢iŽÀ", "Ž£iŽÀ", "Ž¤iŽÀ",
|
||||
+ "anŽÀ", "Ž¡nŽÀ", "Ž¢nŽÀ", "Ž£nŽÀ", "Ž¤nŽÀ",
|
||||
+ "angŽÀ", "Ž¡ngŽÀ", "Ž¢ngŽÀ", "Ž£ngŽÀ", "Ž¤ngŽÀ",
|
||||
+ "aoŽÀ", "Ž¡oŽÀ", "Ž¢oŽÀ", "Ž£oŽÀ", "Ž¤oŽÀ",
|
||||
+ "eŽÀ", "Ž¥ŽÀ", "Ž¦ŽÀ", "Ž§ŽÀ", "Ž¨ŽÀ",
|
||||
+ "eiŽÀ", "Ž¥iŽÀ", "Ž¦iŽÀ", "Ž§iŽÀ", "Ž¨iŽÀ",
|
||||
+ "enŽÀ", "Ž¥nŽÀ", "Ž¦nŽÀ", "Ž§nŽÀ", "Ž¨nŽÀ",
|
||||
+ "engŽÀ", "Ž¥ngŽÀ", "Ž¦ngŽÀ", "Ž§ngŽÀ", "Ž¨ngŽÀ",
|
||||
+ "erŽÀ", "Ž¥rŽÀ", "Ž¦rŽÀ", "Ž§rŽÀ", "Ž¨rŽÀ",
|
||||
+ "iŽÀ", "Ž©ŽÀ", "ŽªŽÀ", "Ž«ŽÀ", "Ž¬ŽÀ",
|
||||
+ "iaŽÀ", "iŽ¡ŽÀ", "iŽ¢ŽÀ", "iŽ£ŽÀ", "iŽ¤ŽÀ",
|
||||
+ "ianŽÀ", "iŽ¡nŽÀ", "iŽ¢nŽÀ", "iŽ£nŽÀ", "iŽ¤nŽÀ",
|
||||
+ "iangŽÀ", "iŽ¡ngŽÀ", "iŽ¢ngŽÀ", "iŽ£ngŽÀ", "iŽ¤ngŽÀ",
|
||||
+ "iaoŽÀ", "iŽ¡oŽÀ", "iŽ¢oŽÀ", "iŽ£oŽÀ", "iŽ¤oŽÀ",
|
||||
+ "ieŽÀ", "iŽ¥ŽÀ", "iŽ¦ŽÀ", "iŽ§ŽÀ", "iŽ¨ŽÀ",
|
||||
+ "inŽÀ", "Ž©nŽÀ", "ŽªnŽÀ", "Ž«nŽÀ", "Ž¬nŽÀ",
|
||||
+ "ingŽÀ", "Ž©ngŽÀ", "ŽªngŽÀ", "Ž«ngŽÀ", "Ž¬ngŽÀ",
|
||||
+ "iongŽÀ", "iŽngŽÀ", "iŽ®ngŽÀ", "iŽ¯ngŽÀ", "iŽ°ngŽÀ",
|
||||
+ "iuŽÀ", "iŽ±ŽÀ", "iŽ²ŽÀ", "iŽ³ŽÀ", "iŽ´ŽÀ",
|
||||
+ "mŽÀ", "mŽÀ", "mŽÀ", "mŽÀ", "mŽÀ",
|
||||
+ "nŽÀ", "nŽÀ", "Ž½ŽÀ", "Ž¾ŽÀ", "Ž¿ŽÀ",
|
||||
+ "ngŽÀ", "ngŽÀ", "ngŽÀ", "ngŽÀ", "ngŽÀ",
|
||||
+ "oŽÀ", "ŽŽÀ", "Ž®ŽÀ", "Ž¯ŽÀ", "Ž°ŽÀ",
|
||||
+ "ongŽÀ", "ŽngŽÀ", "Ž®ngŽÀ", "Ž¯ngŽÀ", "Ž°ngŽÀ",
|
||||
+ "ouŽÀ", "ŽuŽÀ", "Ž®uŽÀ", "Ž¯uŽÀ", "Ž°uŽÀ",
|
||||
+ "uŽÀ", "Ž±ŽÀ", "Ž²ŽÀ", "Ž³ŽÀ", "Ž´ŽÀ",
|
||||
+ "uaŽÀ", "uŽ¡ŽÀ", "uŽ¢ŽÀ", "uŽ£ŽÀ", "uŽ¤ŽÀ",
|
||||
+ "uaiŽÀ", "uŽ¡iŽÀ", "uŽ¢iŽÀ", "uŽ£iŽÀ", "uŽ¤iŽÀ",
|
||||
+ "uanŽÀ", "uŽ¡nŽÀ", "uŽ¢nŽÀ", "uŽ£nŽÀ", "uŽ¤nŽÀ",
|
||||
+ "uangŽÀ", "uŽ¡ngŽÀ", "uŽ¢ngŽÀ", "uŽ£ngŽÀ", "uŽ¤ngŽÀ",
|
||||
+ "ueŽÀ", "uŽ¥ŽÀ", "uŽ¦ŽÀ", "uŽ§ŽÀ", "uŽ¨ŽÀ",
|
||||
+ "uiŽÀ", "uŽ©ŽÀ", "uŽªŽÀ", "uŽ«ŽÀ", "uŽ¬ŽÀ",
|
||||
+ "unŽÀ", "Ž±nŽÀ", "Ž²nŽÀ", "Ž³nŽÀ", "Ž´nŽÀ",
|
||||
+ "uoŽÀ", "uŽŽÀ", "uŽ®ŽÀ", "uŽ¯ŽÀ", "uŽ°ŽÀ",
|
||||
+ "Ž¹ŽÀ", "ŽµŽÀ", "Ž¶ŽÀ", "Ž·ŽÀ", "Ž¸ŽÀ",
|
||||
+ "Ž¹eŽÀ", "Ž¹Ž¥ŽÀ", "Ž¹Ž¦ŽÀ", "Ž¹Ž§ŽÀ", "Ž¹Ž¨ŽÀ",
|
||||
+ "0ŽÀ", "1ŽÀ", "2ŽÀ", "3ŽÀ", "4ŽÀ", /* for undefinited YunMu */
|
||||
};
|
||||
|
||||
-
|
||||
/* pinyin_tbl: size is NUM_SHENGMU*NUM_YUNMU, including empty ShengMu */
|
||||
/* and empty YunMu , and undefinited YunMu'-' */
|
||||
|
||||
int pinyin_tbl[PY_NUM_SHENGMU * PY_NUM_YUNMU] = {
|
||||
-
|
||||
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
- 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
|
||||
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1,
|
||||
- 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1,
|
||||
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1,
|
||||
- 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
|
||||
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1,
|
||||
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1,
|
||||
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1,
|
||||
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1,
|
||||
- 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1,
|
||||
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
|
||||
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1,
|
||||
- 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
|
||||
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1,
|
||||
- 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1,
|
||||
- 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1,
|
||||
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1,
|
||||
- 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1,
|
||||
- 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
|
||||
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1,
|
||||
- 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1,
|
||||
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1,
|
||||
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
+ 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1,
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1,
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1,
|
||||
+ 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1,
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1,
|
||||
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1,
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1,
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1,
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1,
|
||||
+ 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
|
||||
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1,
|
||||
+ 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1,
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1,
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1,
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1,
|
||||
+ 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
|
||||
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1,
|
||||
+ 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1,
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1,
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1
|
||||
};
|
||||
#endif /* CHINESE */
|
687
japanese/FreeWnn-lib/files/patch-Wnn-etc-revdic.c
Normal file
687
japanese/FreeWnn-lib/files/patch-Wnn-etc-revdic.c
Normal file
@ -0,0 +1,687 @@
|
||||
Index: Wnn/etc/revdic.c
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/etc/revdic.c,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/etc/revdic.c 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/etc/revdic.c 20 Dec 2008 15:22:40 -0000 1.2
|
||||
@@ -5,7 +5,7 @@
|
||||
/*
|
||||
* FreeWnn is a network-extensible Kana-to-Kanji conversion system.
|
||||
* This file is part of FreeWnn.
|
||||
- *
|
||||
+ *
|
||||
* Copyright Kyoto University Research Institute for Mathematical Sciences
|
||||
* 1987, 1988, 1989, 1990, 1991, 1992
|
||||
* Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999
|
||||
@@ -35,13 +35,11 @@
|
||||
#include "jh.h"
|
||||
#include "jdata.h"
|
||||
|
||||
-
|
||||
#ifndef min
|
||||
#define min(a, b) ((a > b)? b:a)
|
||||
#define max(a, b) ((a < b)? b:a)
|
||||
#endif
|
||||
|
||||
-
|
||||
/*
|
||||
* rev_ud_hontai(hostart, maxhontai)
|
||||
* rev_ud_table(tary, maxtable)
|
||||
@@ -51,96 +49,81 @@
|
||||
|
||||
static int tmptmp;
|
||||
|
||||
-#define rev_int(x) (tmptmp = *(x), *(x) = ((tmptmp >> 24) & 0xff) | \
|
||||
- (((tmptmp >> 16) & 0xff) << 8) | \
|
||||
- (((tmptmp >> 8) & 0xff) << 16) | \
|
||||
- (((tmptmp & 0xff) << 24)))
|
||||
+#define rev_int(x) (tmptmp = *(x), *(x) = ((tmptmp >> 24) & 0xff) | \
|
||||
+ (((tmptmp >> 16) & 0xff) << 8) | \
|
||||
+ (((tmptmp >> 8) & 0xff) << 16) | \
|
||||
+ (((tmptmp & 0xff) << 24)))
|
||||
|
||||
#define rev_short(x) (tmptmp = *(x), *(x) = ((tmptmp >> 8) & 0xff) | \
|
||||
- ((tmptmp & 0xff) << 8))
|
||||
+ ((tmptmp & 0xff) << 8))
|
||||
|
||||
#define rev_int_org(x) (tmptmp = *(x), *(x) = ((tmptmp >> 24) & 0xff) | \
|
||||
- (((tmptmp >> 16) & 0xff) << 8) | \
|
||||
- (((tmptmp >> 8) & 0xff) << 16) | \
|
||||
- ((tmptmp & 0xff) << 24), tmptmp)
|
||||
+ (((tmptmp >> 16) & 0xff) << 8) | \
|
||||
+ (((tmptmp >> 8) & 0xff) << 16) | \
|
||||
+ ((tmptmp & 0xff) << 24), tmptmp)
|
||||
|
||||
#define rev_short_org(x) (tmptmp = *(x), *(x) = ((tmptmp >> 8) & 0xff) | \
|
||||
- ((tmptmp & 0xff) << 8), tmptmp)
|
||||
+ ((tmptmp & 0xff) << 8), tmptmp)
|
||||
|
||||
+void
|
||||
+rev_ud_hontai(UCHAR *hostart,
|
||||
+ int maxhontai,
|
||||
+ int match /* whether the cpu type match the dictionary */
|
||||
+ )
|
||||
+{
|
||||
+ UCHAR *hoend = hostart + maxhontai;
|
||||
+ struct uind2 *hop, *hop1;
|
||||
+ int k;
|
||||
+ int len;
|
||||
+
|
||||
+ /* Skip first 4 bytes for some reason. (cf. ujistoud() in atod.c) */
|
||||
+ for (hop = (struct uind2 *)((int *) hostart + 1); (UCHAR *) hop < hoend;) {
|
||||
+ rev_int(&(hop->next));
|
||||
+ rev_int(&(hop->serial));
|
||||
+ rev_int(&(hop->kanjipter));
|
||||
+ rev_short(&(hop->kosuu));
|
||||
+
|
||||
+ if (match) {
|
||||
+ len = hop->yomi[0];
|
||||
+ hop1 = (struct uind2 *)(AL_INT (&(hop->yomi[0]) + 1 + max((len - 4), 0)));
|
||||
+ rev_short(&(hop->yomi[0]));
|
||||
+ for (k = 0; k < len - 4; k++)
|
||||
+ rev_short(&(hop->yomi[k + 1]));
|
||||
+ hop = hop1;
|
||||
+ } else {
|
||||
+ rev_short(&(hop->yomi[0]));
|
||||
+ len = hop->yomi[0];
|
||||
+ for (k = 0; k < len - 4; k++)
|
||||
+ rev_short(&(hop->yomi[k + 1]));
|
||||
+ hop = (struct uind2 *)(AL_INT (&(hop->yomi[0]) + 1 + max((len - 4), 0)));
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
|
||||
+void
|
||||
+rev_ud_table(struct uind1 *tary,
|
||||
+ int maxtable,
|
||||
+ int match)
|
||||
+{
|
||||
+ int k;
|
||||
+
|
||||
+ for (k = 0; k < maxtable; k++) {
|
||||
+ rev_int(&(tary[k].pter1));
|
||||
+ rev_int(&(tary[k].pter));
|
||||
+ rev_int(&(tary[k].yomi1));
|
||||
+ rev_int(&(tary[k].yomi2));
|
||||
+ }
|
||||
+}
|
||||
|
||||
void
|
||||
-rev_ud_hontai (hostart, maxhontai, match)
|
||||
- UCHAR *hostart;
|
||||
- int maxhontai;
|
||||
- int match; /* whether the cpu type match the dictionary */
|
||||
-{
|
||||
- UCHAR *hoend = hostart + maxhontai;
|
||||
- struct uind2 *hop, *hop1;
|
||||
- int k;
|
||||
- int len;
|
||||
-
|
||||
- /* Skip first 4 bytes for some reason. (cf. ujistoud() in atod.c) */
|
||||
- for (hop = (struct uind2 *)((int *) hostart + 1); (UCHAR *) hop < hoend;)
|
||||
- {
|
||||
- rev_int (&(hop->next));
|
||||
- rev_int (&(hop->serial));
|
||||
- rev_int (&(hop->kanjipter));
|
||||
- rev_short (&(hop->kosuu));
|
||||
- if (match)
|
||||
- {
|
||||
- len = hop->yomi[0];
|
||||
- hop1 = (struct uind2 *) (AL_INT (&(hop->yomi[0]) + 1 + max ((len - 4), 0)));
|
||||
- rev_short (&(hop->yomi[0]));
|
||||
- for (k = 0; k < len - 4; k++)
|
||||
- {
|
||||
- rev_short (&(hop->yomi[k + 1]));
|
||||
- }
|
||||
- hop = hop1;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- rev_short (&(hop->yomi[0]));
|
||||
- len = hop->yomi[0];
|
||||
- for (k = 0; k < len - 4; k++)
|
||||
- {
|
||||
- rev_short (&(hop->yomi[k + 1]));
|
||||
- }
|
||||
- hop = (struct uind2 *) (AL_INT (&(hop->yomi[0]) + 1 + max ((len - 4), 0)));
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-
|
||||
-void
|
||||
-rev_ud_table (tary, maxtable, match)
|
||||
- struct uind1 *tary;
|
||||
- int maxtable;
|
||||
- int match;
|
||||
-{
|
||||
- int k;
|
||||
-
|
||||
- for (k = 0; k < maxtable; k++)
|
||||
- {
|
||||
- rev_int (&(tary[k].pter1));
|
||||
- rev_int (&(tary[k].pter));
|
||||
- rev_int (&(tary[k].yomi1));
|
||||
- rev_int (&(tary[k].yomi2));
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-void
|
||||
-rev_hinsi (hinsi, maxserial, match)
|
||||
- unsigned short *hinsi;
|
||||
- int maxserial;
|
||||
- int match;
|
||||
-{
|
||||
- int k;
|
||||
-
|
||||
- for (k = 0; k < maxserial; k++)
|
||||
- {
|
||||
- rev_short (&(hinsi[k]));
|
||||
- }
|
||||
+rev_hinsi(unsigned short *hinsi,
|
||||
+ int maxserial,
|
||||
+ int match)
|
||||
+{
|
||||
+ int k;
|
||||
+
|
||||
+ for (k = 0; k < maxserial; k++)
|
||||
+ rev_short(&(hinsi[k]));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -154,200 +137,183 @@ void travel_next_nodes ();
|
||||
void rev_sd_node ();
|
||||
|
||||
void
|
||||
-rev_sd_hontai0 (hopter, hostart, match)
|
||||
- UCHAR *hostart;
|
||||
- UCHAR *hopter;
|
||||
- int match;
|
||||
-{
|
||||
- if (match)
|
||||
- {
|
||||
- travel_next_nodes (hopter, hostart, match);
|
||||
- rev_sd_node (hopter, hostart, match);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- rev_sd_node (hopter, hostart, match);
|
||||
- travel_next_nodes (hopter, hostart, match);
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-void
|
||||
-rev_sd_hontai (hostart, match)
|
||||
- UCHAR *hostart;
|
||||
- int match;
|
||||
-{
|
||||
- rev_sd_hontai0 (hostart, hostart, match);
|
||||
-}
|
||||
-
|
||||
-void
|
||||
-travel_next_nodes (hopter, hostart, match)
|
||||
- UCHAR *hostart, *hopter;
|
||||
- int match;
|
||||
-{
|
||||
- int k;
|
||||
- int tsize;
|
||||
- w_char *charst;
|
||||
- w_char *sumst;
|
||||
- int *ptrst;
|
||||
-
|
||||
- switch (*(unsigned short *) hopter)
|
||||
- {
|
||||
- case ST_NORMAL:
|
||||
- tsize = *(w_char *) (hopter + 2);
|
||||
- charst = (w_char *) (hopter + 12);
|
||||
- sumst = ((w_char *) charst + tsize + 2); /* + 2 keeps two zero words */
|
||||
- ptrst = (int *) ((w_char *) sumst + tsize);
|
||||
- for (k = 0; k < tsize; k++)
|
||||
- {
|
||||
- if (ptrst[k] != ENDPTR)
|
||||
- {
|
||||
- rev_sd_hontai0 (hostart + ptrst[k], hostart, match);
|
||||
- }
|
||||
- }
|
||||
- break;
|
||||
- case ST_NOPTER:
|
||||
- break;
|
||||
- case ST_NOENT:
|
||||
- tsize = *(w_char *) (hopter + 2);
|
||||
- charst = (w_char *) (hopter + 4);
|
||||
- ptrst = (int *) AL_INT ((w_char *) charst + tsize);
|
||||
- for (k = 0; k < tsize; k++)
|
||||
- {
|
||||
- rev_sd_hontai0 (hostart + ptrst[k], hostart, match);
|
||||
- }
|
||||
- break;
|
||||
- case ST_SMALL:
|
||||
- rev_sd_hontai0 (hopter + 4, hostart, match);
|
||||
- break;
|
||||
- }
|
||||
+rev_sd_hontai0(UCHAR *hopter,
|
||||
+ UCHAR *hostart,
|
||||
+ int match)
|
||||
+{
|
||||
+ if (match) {
|
||||
+ travel_next_nodes(hopter, hostart, match);
|
||||
+ rev_sd_node(hopter, hostart, match);
|
||||
+ } else {
|
||||
+ rev_sd_node(hopter, hostart, match);
|
||||
+ travel_next_nodes(hopter, hostart, match);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+rev_sd_hontai(UCHAR *hostart,
|
||||
+ int match)
|
||||
+{
|
||||
+ rev_sd_hontai0(hostart, hostart, match);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+travel_next_nodes(UCHAR *hopter,
|
||||
+ UCHAR *hostart,
|
||||
+ int match)
|
||||
+{
|
||||
+ int k;
|
||||
+ int tsize;
|
||||
+ w_char *charst;
|
||||
+ w_char *sumst;
|
||||
+ int *ptrst;
|
||||
+
|
||||
+ switch (*(unsigned short *)hopter) {
|
||||
+ case ST_NORMAL:
|
||||
+ tsize = *(w_char *)(hopter + 2);
|
||||
+ charst = (w_char *)(hopter + 12);
|
||||
+ sumst = ((w_char *)charst + tsize + 2); /* + 2 keeps two zero words */
|
||||
+ ptrst = (int *)((w_char *)sumst + tsize);
|
||||
+
|
||||
+ for (k = 0; k < tsize; k++) {
|
||||
+ if (ptrst[k] != ENDPTR)
|
||||
+ rev_sd_hontai0(hostart + ptrst[k], hostart, match);
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ case ST_NOPTER:
|
||||
+ break;
|
||||
+ case ST_NOENT:
|
||||
+ tsize = *(w_char *)(hopter + 2);
|
||||
+ charst = (w_char *)(hopter + 4);
|
||||
+ ptrst = (int *)AL_INT((w_char *)charst + tsize);
|
||||
+
|
||||
+ for (k = 0; k < tsize; k++)
|
||||
+ rev_sd_hontai0(hostart + ptrst[k], hostart, match);
|
||||
+ break;
|
||||
+ case ST_SMALL:
|
||||
+ rev_sd_hontai0(hopter + 4, hostart, match);
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
|
||||
#define rev_if_short(x) (match? rev_short_org(x): rev_short(x))
|
||||
#define rev_if_int(x) (match? rev_int_org(x): rev_int(x))
|
||||
|
||||
void
|
||||
-rev_sd_node (hopter, hostart, match)
|
||||
- UCHAR *hostart, *hopter;
|
||||
- int match;
|
||||
-{
|
||||
- /* whether current state of dict matches the cpu type of the machine */
|
||||
- int k;
|
||||
- int tsize;
|
||||
- w_char *charst;
|
||||
- w_char *sumst;
|
||||
- int *ptrst;
|
||||
- int state;
|
||||
-
|
||||
- state = rev_if_short ((unsigned short *) hopter);
|
||||
- switch (state)
|
||||
- {
|
||||
- case ST_NORMAL:
|
||||
- case ST_NOPTER:
|
||||
- tsize = rev_if_short ((w_char *) (hopter + 2));
|
||||
- rev_int ((int *) (hopter + 4));
|
||||
- rev_int ((int *) (hopter + 8));
|
||||
- charst = (w_char *) (hopter + 12);
|
||||
- sumst = ((w_char *) charst + tsize + 2); /* + 2 keeps two zero words */
|
||||
- ptrst = (int *) ((w_char *) sumst + tsize);
|
||||
- for (k = 0; k < tsize; k++)
|
||||
- {
|
||||
- rev_short (charst + k);
|
||||
- rev_short (sumst + k);
|
||||
- }
|
||||
- if (state == ST_NORMAL)
|
||||
- {
|
||||
- for (k = 0; k < tsize; k++)
|
||||
- {
|
||||
- rev_int (ptrst + k);
|
||||
- }
|
||||
- }
|
||||
- break;
|
||||
- case ST_NOENT:
|
||||
- tsize = rev_if_short ((w_char *) (hopter + 2));
|
||||
- charst = (w_char *) (hopter + 4);
|
||||
- ptrst = (int *) AL_INT ((w_char *) charst + tsize);
|
||||
- for (k = 0; k < tsize; k++)
|
||||
- {
|
||||
- rev_short (charst + k);
|
||||
- rev_int (ptrst + k);
|
||||
- }
|
||||
- break;
|
||||
- case ST_SMALL:
|
||||
- rev_short ((unsigned short *) (hopter + 2));
|
||||
- break;
|
||||
- }
|
||||
+rev_sd_node(UCHAR *hopter,
|
||||
+ UCHAR *hostart,
|
||||
+ int match)
|
||||
+{
|
||||
+ /* whether current state of dict matches the cpu type of the machine */
|
||||
+ int k;
|
||||
+ int tsize;
|
||||
+ w_char *charst;
|
||||
+ w_char *sumst;
|
||||
+ int *ptrst;
|
||||
+ int state;
|
||||
+
|
||||
+ state = rev_if_short((unsigned short *) hopter);
|
||||
+
|
||||
+ switch (state) {
|
||||
+ case ST_NORMAL:
|
||||
+ case ST_NOPTER:
|
||||
+ tsize = rev_if_short((w_char *)(hopter + 2));
|
||||
+ rev_int((int *)(hopter + 4));
|
||||
+ rev_int((int *)(hopter + 8));
|
||||
+ charst = (w_char *)(hopter + 12);
|
||||
+ sumst = ((w_char *)charst + tsize + 2); /* + 2 keeps two zero words */
|
||||
+ ptrst = (int *)((w_char *)sumst + tsize);
|
||||
+
|
||||
+ for (k = 0; k < tsize; k++) {
|
||||
+ rev_short(charst + k);
|
||||
+ rev_short(sumst + k);
|
||||
+ }
|
||||
+
|
||||
+ if (state == ST_NORMAL) {
|
||||
+ for (k = 0; k < tsize; k++)
|
||||
+ rev_int (ptrst + k);
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ case ST_NOENT:
|
||||
+ tsize = rev_if_short((w_char *)(hopter + 2));
|
||||
+ charst = (w_char *)(hopter + 4);
|
||||
+ ptrst = (int *)AL_INT((w_char *)charst + tsize);
|
||||
+
|
||||
+ for (k = 0; k < tsize; k++) {
|
||||
+ rev_short(charst + k);
|
||||
+ rev_int(ptrst + k);
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ case ST_SMALL:
|
||||
+ rev_short((unsigned short *)(hopter + 2));
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
|
||||
-
|
||||
int
|
||||
-little_endian ()
|
||||
+little_endian()
|
||||
{
|
||||
- int a = 1;
|
||||
+ int a = 1;
|
||||
#ifdef BYTE_SWAP
|
||||
- return (1);
|
||||
+ return (1);
|
||||
#else
|
||||
- return (*(char *) &a == 1);
|
||||
+ return (*(char *) &a == 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
-rev_rd_rind1 (ri1, maxri1, match)
|
||||
- struct rind1 *ri1;
|
||||
- int maxri1;
|
||||
- int match;
|
||||
-{
|
||||
- int k;
|
||||
-
|
||||
- for (k = 0; k < maxri1; k++)
|
||||
- {
|
||||
- rev_int (&(ri1[k].pter1));
|
||||
- rev_int (&(ri1[k].pter));
|
||||
- }
|
||||
+rev_rd_rind1(struct rind1 *ri1,
|
||||
+ int maxri1,
|
||||
+ int match)
|
||||
+{
|
||||
+ int k;
|
||||
+
|
||||
+ for (k = 0; k < maxri1; k++) {
|
||||
+ rev_int(&(ri1[k].pter1));
|
||||
+ rev_int(&(ri1[k].pter));
|
||||
+ }
|
||||
}
|
||||
|
||||
void
|
||||
-rev_rd_rind2 (ri2, maxri2, match)
|
||||
- struct rind2 *ri2;
|
||||
- int maxri2;
|
||||
- int match;
|
||||
-{
|
||||
- int k;
|
||||
-
|
||||
- for (k = 0; k < maxri2; k++)
|
||||
- {
|
||||
- rev_int (&(ri2[k].kanjipter));
|
||||
- rev_int (&(ri2[k].next[D_YOMI]));
|
||||
- rev_int (&(ri2[k].next[D_KANJI]));
|
||||
- }
|
||||
+rev_rd_rind2(struct rind2 *ri2,
|
||||
+ int maxri2,
|
||||
+ int match)
|
||||
+{
|
||||
+ int k;
|
||||
+
|
||||
+ for (k = 0; k < maxri2; k++) {
|
||||
+ rev_int(&(ri2[k].kanjipter));
|
||||
+ rev_int(&(ri2[k].next[D_YOMI]));
|
||||
+ rev_int(&(ri2[k].next[D_KANJI]));
|
||||
+ }
|
||||
}
|
||||
|
||||
void rev_w_char ();
|
||||
|
||||
void
|
||||
-rev_kanji (kpter, maxk, match)
|
||||
- UCHAR *kpter;
|
||||
- int maxk;
|
||||
- int match;
|
||||
-{
|
||||
- UCHAR *kend = kpter + maxk;
|
||||
-
|
||||
- while (kpter < kend && *kpter)
|
||||
- {
|
||||
- rev_w_char ((w_char *) (kpter + 2), *kpter / 2 - 1);
|
||||
- kpter += *kpter;
|
||||
- }
|
||||
+rev_kanji(UCHAR *kpter,
|
||||
+ int maxk,
|
||||
+ int match)
|
||||
+{
|
||||
+ UCHAR *kend = kpter + maxk;
|
||||
+
|
||||
+ while (kpter < kend && *kpter) {
|
||||
+ rev_w_char((w_char *)(kpter + 2), *kpter / 2 - 1);
|
||||
+ kpter += *kpter;
|
||||
+ }
|
||||
}
|
||||
|
||||
void
|
||||
-rev_w_char (p, maxp)
|
||||
- w_char *p;
|
||||
- int maxp;
|
||||
-{
|
||||
- for (; maxp > 0; maxp--)
|
||||
- {
|
||||
- rev_short (p);
|
||||
- p++;
|
||||
- }
|
||||
+rev_w_char(w_char *p,
|
||||
+ int maxp)
|
||||
+{
|
||||
+ for (; maxp > 0; maxp--) {
|
||||
+ rev_short(p);
|
||||
+ p++;
|
||||
+ }
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -357,87 +323,78 @@ rev_w_char (p, maxp)
|
||||
*/
|
||||
|
||||
int
|
||||
-revdic (jtl, match)
|
||||
- struct JT *jtl;
|
||||
- int match;
|
||||
-{
|
||||
- extern int rev_ud (), rev_rd (), rev_sd ();
|
||||
- int syurui = jtl->syurui;
|
||||
-
|
||||
- syurui = jtl->syurui & 0xff;
|
||||
-
|
||||
- if (syurui == WNN_UD_DICT)
|
||||
- {
|
||||
- if (rev_ud (jtl, match) == -1)
|
||||
- return (-1);
|
||||
- }
|
||||
- else if (syurui == WNN_REV_DICT)
|
||||
- {
|
||||
- if (rev_rd (jtl, match) == -1)
|
||||
- return (-1);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- if (rev_sd (jtl, match) == -1)
|
||||
- return (-1);
|
||||
- }
|
||||
- return (0);
|
||||
+revdic(struct JT *jtl,
|
||||
+ int match)
|
||||
+{
|
||||
+ extern int rev_ud(), rev_rd(), rev_sd();
|
||||
+ int syurui = jtl->syurui;
|
||||
+
|
||||
+ syurui = jtl->syurui & 0xff;
|
||||
+
|
||||
+ if (syurui == WNN_UD_DICT) {
|
||||
+ if (rev_ud (jtl, match) == -1)
|
||||
+ return (-1);
|
||||
+ } else if (syurui == WNN_REV_DICT) {
|
||||
+ if (rev_rd (jtl, match) == -1)
|
||||
+ return (-1);
|
||||
+ } else {
|
||||
+ if (rev_sd (jtl, match) == -1)
|
||||
+ return (-1);
|
||||
+ }
|
||||
+
|
||||
+ return (0);
|
||||
}
|
||||
|
||||
void rev_common ();
|
||||
|
||||
int
|
||||
-rev_ud (jtl, match)
|
||||
- struct JT *jtl;
|
||||
- int match;
|
||||
-{
|
||||
- rev_common (jtl, match);
|
||||
- rev_ud_hontai (jtl->hontai, jtl->maxhontai, match);
|
||||
- rev_ud_table (jtl->table, jtl->maxtable, match);
|
||||
- return (0);
|
||||
+rev_ud(struct JT *jtl,
|
||||
+ int match)
|
||||
+{
|
||||
+ rev_common(jtl, match);
|
||||
+ rev_ud_hontai(jtl->hontai, jtl->maxhontai, match);
|
||||
+ rev_ud_table(jtl->table, jtl->maxtable, match);
|
||||
+
|
||||
+ return (0);
|
||||
}
|
||||
|
||||
int
|
||||
-rev_sd (jtl, match)
|
||||
- struct JT *jtl;
|
||||
- int match;
|
||||
-{
|
||||
- rev_common (jtl, match);
|
||||
- rev_sd_hontai (jtl->hontai, match);
|
||||
- return (0);
|
||||
+rev_sd(struct JT *jtl,
|
||||
+ int match)
|
||||
+{
|
||||
+ rev_common(jtl, match);
|
||||
+ rev_sd_hontai(jtl->hontai, match);
|
||||
+ return (0);
|
||||
}
|
||||
|
||||
int
|
||||
-rev_rd (jtl, match)
|
||||
- struct JT *jtl;
|
||||
- int match;
|
||||
-{
|
||||
- rev_common (jtl, match);
|
||||
- rev_rd_rind1 (jtl->ri1[D_YOMI], jtl->maxri1[D_YOMI], match);
|
||||
- rev_rd_rind1 (jtl->ri1[D_KANJI], jtl->maxri1[D_KANJI], match);
|
||||
- rev_rd_rind2 (jtl->ri2, jtl->maxri2, match);
|
||||
- return (0);
|
||||
+rev_rd(struct JT *jtl,
|
||||
+ int match)
|
||||
+{
|
||||
+ rev_common(jtl, match);
|
||||
+ rev_rd_rind1(jtl->ri1[D_YOMI], jtl->maxri1[D_YOMI], match);
|
||||
+ rev_rd_rind1(jtl->ri1[D_KANJI], jtl->maxri1[D_KANJI], match);
|
||||
+ rev_rd_rind2(jtl->ri2, jtl->maxri2, match);
|
||||
+ return (0);
|
||||
}
|
||||
|
||||
void
|
||||
-rev_common (jtl, match)
|
||||
- struct JT *jtl;
|
||||
- int match;
|
||||
-{
|
||||
- if (jtl->hinsi)
|
||||
- rev_hinsi (jtl->hinsi, jtl->maxserial, match);
|
||||
- if (jtl->kanji)
|
||||
- rev_kanji (jtl->kanji, jtl->maxkanji, match);
|
||||
- if (jtl->comment)
|
||||
- rev_w_char (jtl->comment, jtl->maxcomment);
|
||||
- if (jtl->hinsi_list)
|
||||
- rev_w_char (jtl->hinsi_list, jtl->maxhinsi_list);
|
||||
+rev_common(struct JT *jtl,
|
||||
+ int match)
|
||||
+{
|
||||
+ if (jtl->hinsi)
|
||||
+ rev_hinsi(jtl->hinsi, jtl->maxserial, match);
|
||||
+ if (jtl->kanji)
|
||||
+ rev_kanji(jtl->kanji, jtl->maxkanji, match);
|
||||
+ if (jtl->comment)
|
||||
+ rev_w_char(jtl->comment, jtl->maxcomment);
|
||||
+ if (jtl->hinsi_list)
|
||||
+ rev_w_char(jtl->hinsi_list, jtl->maxhinsi_list);
|
||||
}
|
||||
|
||||
/* rev_short is called from atod.c.... kanapiiii */
|
||||
void
|
||||
-rev_short_fun (sp)
|
||||
- w_char *sp;
|
||||
+rev_short_fun(w_char *sp)
|
||||
{
|
||||
- rev_short (sp);
|
||||
+ rev_short (sp);
|
||||
}
|
73
japanese/FreeWnn-lib/files/patch-Wnn-etc-server_env.c
Normal file
73
japanese/FreeWnn-lib/files/patch-Wnn-etc-server_env.c
Normal file
@ -0,0 +1,73 @@
|
||||
Index: Wnn/etc/server_env.c
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/etc/server_env.c,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/etc/server_env.c 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/etc/server_env.c 20 Dec 2008 15:22:40 -0000 1.2
|
||||
@@ -5,7 +5,7 @@
|
||||
/*
|
||||
* FreeWnn is a network-extensible Kana-to-Kanji conversion system.
|
||||
* This file is part of FreeWnn.
|
||||
- *
|
||||
+ *
|
||||
* Copyright Kyoto University Research Institute for Mathematical Sciences
|
||||
* 1987, 1988, 1989, 1990, 1991, 1992
|
||||
* Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999
|
||||
@@ -44,36 +44,31 @@
|
||||
#include "wnn_config.h"
|
||||
#include "wnn_os.h"
|
||||
|
||||
-typedef struct _server_env_struct
|
||||
-{
|
||||
- char *lang;
|
||||
- char *env;
|
||||
-}
|
||||
-server_env_struct;
|
||||
+typedef struct _server_env_struct {
|
||||
+ char *lang;
|
||||
+ char *env;
|
||||
+} server_env_struct;
|
||||
|
||||
static server_env_struct server_env[] = {
|
||||
- {WNN_J_LANG, WNN_JSERVER_ENV},
|
||||
- {WNN_C_LANG, WNN_CSERVER_ENV},
|
||||
- {WNN_K_LANG, WNN_KSERVER_ENV},
|
||||
- {WNN_T_LANG, WNN_TSERVER_ENV},
|
||||
- {NULL, NULL}
|
||||
+ {WNN_J_LANG, WNN_JSERVER_ENV},
|
||||
+ {WNN_C_LANG, WNN_CSERVER_ENV},
|
||||
+ {WNN_K_LANG, WNN_KSERVER_ENV},
|
||||
+ {WNN_T_LANG, WNN_TSERVER_ENV},
|
||||
+ {NULL, NULL}
|
||||
};
|
||||
|
||||
char *
|
||||
-get_server_env (lang)
|
||||
- register char *lang;
|
||||
+get_server_env(register char *lang)
|
||||
{
|
||||
- register server_env_struct *p;
|
||||
+ register server_env_struct *p;
|
||||
+
|
||||
+ if (!lang || !*lang)
|
||||
+ return (NULL);
|
||||
|
||||
- if (!lang || !*lang)
|
||||
- return (NULL);
|
||||
+ for (p = server_env; p->lang; p++) {
|
||||
+ if (!strncmp(lang, p->lang, strlen(lang)))
|
||||
+ return (p->env);
|
||||
+ }
|
||||
|
||||
- for (p = server_env; p->lang; p++)
|
||||
- {
|
||||
- if (!strncmp (lang, p->lang, strlen (lang)))
|
||||
- {
|
||||
- return (p->env);
|
||||
- }
|
||||
- }
|
||||
- return (NULL);
|
||||
+ return (NULL);
|
||||
}
|
142
japanese/FreeWnn-lib/files/patch-Wnn-etc-sstrings.c
Normal file
142
japanese/FreeWnn-lib/files/patch-Wnn-etc-sstrings.c
Normal file
@ -0,0 +1,142 @@
|
||||
Index: Wnn/etc/sstrings.c
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/etc/sstrings.c,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/etc/sstrings.c 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/etc/sstrings.c 20 Dec 2008 15:22:40 -0000 1.2
|
||||
@@ -5,7 +5,7 @@
|
||||
/*
|
||||
* FreeWnn is a network-extensible Kana-to-Kanji conversion system.
|
||||
* This file is part of FreeWnn.
|
||||
- *
|
||||
+ *
|
||||
* Copyright Kyoto University Research Institute for Mathematical Sciences
|
||||
* 1987, 1988, 1989, 1990, 1991, 1992
|
||||
* Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999
|
||||
@@ -49,77 +49,75 @@ extern int eeuc_to_ieuc ();
|
||||
extern int ieuc_to_eeuc ();
|
||||
|
||||
int
|
||||
-wnn_sStrcpy (c, w)
|
||||
- register char *c;
|
||||
- register w_char *w;
|
||||
+wnn_sStrcpy(register char *c,
|
||||
+ register w_char *w)
|
||||
{
|
||||
- register int ret;
|
||||
+ register int ret;
|
||||
|
||||
- ret = ieuc_to_eeuc (c, w, -1);
|
||||
- c[ret] = '\0';
|
||||
- return (ret);
|
||||
-}
|
||||
+ ret = ieuc_to_eeuc(c, w, -1);
|
||||
+ c[ret] = '\0';
|
||||
|
||||
+ return (ret);
|
||||
+}
|
||||
|
||||
int
|
||||
-wnn_Sstrcpy (w, c)
|
||||
- w_char *w;
|
||||
- unsigned char *c;
|
||||
+wnn_Sstrcpy(w_char *w,
|
||||
+ unsigned char *c)
|
||||
{
|
||||
- register int ret;
|
||||
+ register int ret;
|
||||
|
||||
- ret = eeuc_to_ieuc (w, c, -1) / sizeof (w_char);
|
||||
- w[ret] = (w_char) 0;
|
||||
- return (ret);
|
||||
+ ret = eeuc_to_ieuc(w, c, -1) / sizeof(w_char);
|
||||
+ w[ret] = (w_char)0;
|
||||
+
|
||||
+ return (ret);
|
||||
}
|
||||
|
||||
#ifdef nodef
|
||||
char *
|
||||
-wnn_Stos (c)
|
||||
- w_char *c;
|
||||
+wnn_Stos(cw_char *c)
|
||||
{
|
||||
- char *c1 = (char *) c;
|
||||
- for (; *c; c++)
|
||||
- {
|
||||
- if (ASCIIP (*c))
|
||||
- {
|
||||
- *c1++ = *c;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- *c1++ = (*c << 8);
|
||||
- *c1++ = *c;
|
||||
- }
|
||||
- }
|
||||
- return ((char *) c);
|
||||
+ char *c1 = (char *)c;
|
||||
+
|
||||
+ for (; *c; c++) {
|
||||
+ if (ASCIIP(*c))
|
||||
+ *c1++ = *c;
|
||||
+ else {
|
||||
+ *c1++ = (*c << 8);
|
||||
+ *c1++ = *c;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return ((char *) c);
|
||||
}
|
||||
#endif
|
||||
|
||||
char *
|
||||
-wnn_sStrncpy (s1, s2, n)
|
||||
- register char *s1;
|
||||
- register w_char *s2;
|
||||
- register int n;
|
||||
+wnn_sStrncpy(register char *s1,
|
||||
+ register char *s2,
|
||||
+ register int n)
|
||||
{
|
||||
- eeuc_to_ieuc (s1, s2, n / sizeof (w_char));
|
||||
- return s1;
|
||||
+ eeuc_to_ieuc(s1, s2, n / sizeof(w_char));
|
||||
+
|
||||
+ return s1;
|
||||
}
|
||||
|
||||
#ifdef CHINESE
|
||||
int
|
||||
-wnn_Sstrcat (w, c)
|
||||
- w_char *w;
|
||||
- unsigned char *c;
|
||||
+wnn_Sstrcat(w_char *w,
|
||||
+ unsigned char *c)
|
||||
{
|
||||
- w_char *w0 = w;
|
||||
- register int ret;
|
||||
+ w_char *w0 = w;
|
||||
+ register int ret;
|
||||
+
|
||||
+ if (!c || !*c)
|
||||
+ return (0);
|
||||
+
|
||||
+ for (; *w; w++);
|
||||
+
|
||||
+ ret = eeuc_to_ieuc(w, c, strlen (c)) / sizeof(w_char);
|
||||
+ w[ret] = (w_char)0;
|
||||
+ ret += (w - w0);
|
||||
|
||||
- if (!c || !*c)
|
||||
- return (0);
|
||||
- for (; *w; w++);
|
||||
- ret = eeuc_to_ieuc (w, c, strlen (c)) / sizeof (w_char);
|
||||
- w[ret] = (w_char) 0;
|
||||
- ret += (w - w0);
|
||||
- return (ret);
|
||||
+ return (ret);
|
||||
}
|
||||
#endif
|
@ -3,10 +3,10 @@ Index: Wnn/include/wnn_os.h
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/include/wnn_os.h,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -d -u -I\$FreeBSD$ -w -r1.1.1.1 -r1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/include/wnn_os.h 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/include/wnn_os.h 2 Jan 2009 21:09:34 -0000 1.2
|
||||
@@ -154,4 +154,5 @@
|
||||
@@ -154,4 +154,5 @@ int euksc_to_ksc (unsigned char *ksc,
|
||||
unsigned char *euksc,
|
||||
int eusiz); /* xutoj.c */
|
||||
|
||||
|
@ -3,7 +3,7 @@ Index: Wnn/jd/jserverrc
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/jd/jserverrc,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.3
|
||||
diff -d -u -I\$FreeBSD$ -w -r1.1.1.1 -r1.3
|
||||
diff -u -p -r1.1.1.1 -r1.3
|
||||
--- Wnn/jd/jserverrc 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/jd/jserverrc 2 Jan 2009 21:56:36 -0000 1.3
|
||||
@@ -29,6 +29,9 @@
|
||||
|
@ -3,7 +3,7 @@ Index: Wnn/jd/serverdefs
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/jd/serverdefs,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -d -u -I\$FreeBSD$ -w -r1.1.1.1 -r1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/jd/serverdefs 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/jd/serverdefs 20 Dec 2008 07:23:09 -0000 1.2
|
||||
@@ -30,12 +30,12 @@
|
||||
|
@ -3,10 +3,10 @@ Index: Wnn/jlib/Makefile.in
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/jlib/Makefile.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -d -u -I\$FreeBSD$ -w -r1.1.1.1 -r1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/jlib/Makefile.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/jlib/Makefile.in 2 Jan 2009 21:09:34 -0000 1.2
|
||||
@@ -62,13 +62,15 @@
|
||||
@@ -62,13 +62,15 @@ SRC8= $(WNNETCSRC)/bcopy.c
|
||||
OBJ8= bcopy.o
|
||||
SRC9= $(WNNETCSRC)/mkdir.c
|
||||
OBJ9= mkdir.o
|
||||
@ -24,7 +24,7 @@ diff -d -u -I\$FreeBSD$ -w -r1.1.1.1 -r1.2
|
||||
SRCS= $(SRC1) $(LOCAL_ETCSRCS)
|
||||
OBJS= $(OBJ1) $(LOCAL_ETCOBJS) $(LOCAL_RKOBJS)
|
||||
|
||||
@@ -137,6 +139,9 @@
|
||||
@@ -137,6 +139,9 @@ $(OBJ8) : $(SRC8)
|
||||
$(OBJ9) : $(SRC9)
|
||||
$(LT_CC) -c $(CFLAGS) $(WNNETCSRC)/`basename $@ .o`.c
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,17 +1,12 @@
|
||||
--- Wnn/romkan/Makefile.in.orig 2009-07-12 22:17:42.000000000 -0500
|
||||
+++ Wnn/romkan/Makefile.in 2009-07-12 22:18:01.000000000 -0500
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
.c.o:
|
||||
$(RM) $@
|
||||
- $(LIBTOOL) $(CC) -c $(CFLAGS) $(_NOOP_) $<
|
||||
+ $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) $(_NOOP_) $<
|
||||
|
||||
clean::
|
||||
$(RM) -r .libs
|
||||
--- Wnn/jlib.V3/Makefile.in.orig 2009-07-12 22:19:13.000000000 -0500
|
||||
+++ Wnn/jlib.V3/Makefile.in 2009-07-12 22:21:06.000000000 -0500
|
||||
@@ -71,12 +71,12 @@
|
||||
Index: Wnn/jlib.V3/Makefile.in
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/jlib.V3/Makefile.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/jlib.V3/Makefile.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/jlib.V3/Makefile.in 2 Jan 2010 12:10:14 -0000 1.2
|
||||
@@ -71,12 +71,12 @@ includes::
|
||||
|
||||
.c.o:
|
||||
$(RM) $@
|
||||
@ -26,7 +21,7 @@
|
||||
|
||||
lintlib:: llib-ljd.ln
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
@@ -87,7 +87,7 @@ llib-ljd.ln: $(SRCS) $(EXTRALIBRARYDEPS)
|
||||
install:: libjd.la
|
||||
@if [ -d $(DESTDIR)$(WNNLIBDIR) ]; then set +x; \
|
||||
else (set -x; $(MKDIRHIER) $(DESTDIR)$(WNNLIBDIR)); fi
|
||||
@ -35,7 +30,7 @@
|
||||
|
||||
install:: jlib.h
|
||||
@if [ -d $(DESTDIR)$(JWNNINCDIR) ]; then set +x; \
|
||||
@@ -109,13 +109,13 @@
|
||||
@@ -109,13 +109,13 @@ $(WNNJLIB)::
|
||||
done
|
||||
|
||||
$(OBJ2) : $(SRC2)
|
||||
@ -52,25 +47,3 @@
|
||||
|
||||
depend:: .depend
|
||||
|
||||
--- kWnn/romkan/Makefile.in.orig 2009-07-12 22:26:37.000000000 -0500
|
||||
+++ kWnn/romkan/Makefile.in 2009-07-12 22:26:55.000000000 -0500
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
.c.o:
|
||||
$(RM) $@
|
||||
- $(LIBTOOL) $(CC) -c $(CFLAGS) $(_NOOP_) $<
|
||||
+ $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) $(_NOOP_) $<
|
||||
|
||||
clean::
|
||||
$(RM) -r .libs
|
||||
--- cWnn/romkan/Makefile.in.orig 2009-07-12 22:29:35.000000000 -0500
|
||||
+++ cWnn/romkan/Makefile.in 2009-07-12 22:29:49.000000000 -0500
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
.c.o:
|
||||
$(RM) $@
|
||||
- $(LIBTOOL) $(CC) -c $(CFLAGS) $(_NOOP_) $<
|
||||
+ $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) $(_NOOP_) $<
|
||||
|
||||
clean::
|
||||
$(RM) -r .libs
|
36
japanese/FreeWnn-lib/files/patch-Wnn-jserver-Makefile.in
Normal file
36
japanese/FreeWnn-lib/files/patch-Wnn-jserver-Makefile.in
Normal file
@ -0,0 +1,36 @@
|
||||
Index: Wnn/jserver/Makefile.in
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/jserver/Makefile.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/jserver/Makefile.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/jserver/Makefile.in 2 Jan 2009 21:09:34 -0000 1.2
|
||||
@@ -80,13 +80,15 @@ SRC20= $(WNNETCSRC)/getopt.c
|
||||
OBJ20= getopt.o
|
||||
SRC21= $(WNNETCSRC)/getopt1.c
|
||||
OBJ21= getopt1.o
|
||||
+SRC22= $(WNNETCSRC)/fake-rfc2553.c
|
||||
+OBJ22= fake-rfc2553.o
|
||||
OBJSUPPORT = @JS_SUPPORTOBJS@
|
||||
SRCS= $(SRC0) $(SRC1) $(SRC3) $(SRC4) $(SRC5) $(SRC6) $(SRC7) $(SRCGETHINSI) \
|
||||
- $(SRC9) $(SRC10) $(SRC11) $(SRC12) $(SRC13) $(SRC14) $(SRC20) $(SRC21)
|
||||
+ $(SRC9) $(SRC10) $(SRC11) $(SRC12) $(SRC13) $(SRC14) $(SRC20) $(SRC21) $(SRC22)
|
||||
|
||||
OBJS= $(OBJ0) $(OBJ1) $(OBJ3) $(OBJ4) $(OBJ5) $(OBJ6) $(OBJ7) $(OBJGETHINSI) \
|
||||
$(OBJ9) $(OBJ10) $(OBJ11) $(OBJ12) $(OBJ13) $(OBJ14) $(OBJSUPPORT) \
|
||||
- $(OBJ20) $(OBJ21)
|
||||
+ $(OBJ20) $(OBJ21) $(OBJ22)
|
||||
|
||||
all:: jserver
|
||||
|
||||
@@ -151,6 +153,9 @@ $(OBJ20) : $(SRC20) $(WNNINCLUDESRC)/get
|
||||
$(OBJ21) : $(SRC21) $(WNNINCLUDESRC)/getopt.h
|
||||
$(CC) -c $(CFLAGS) $(WNNETCSRC)/`basename $@ .o`.c
|
||||
|
||||
+$(OBJ22) : $(SRC22)
|
||||
+ $(CC) -c $(CFLAGS) $(WNNETCSRC)/`basename $@ .o`.c
|
||||
+
|
||||
vasprintf.o : $(WNNETCSRC)/vasprintf.c
|
||||
$(CC) -c $(CFLAGS) $?
|
||||
|
2005
japanese/FreeWnn-lib/files/patch-Wnn-jserver-de.c
Normal file
2005
japanese/FreeWnn-lib/files/patch-Wnn-jserver-de.c
Normal file
File diff suppressed because it is too large
Load Diff
28
japanese/FreeWnn-lib/files/patch-Wnn-jserver-de_header.h
Normal file
28
japanese/FreeWnn-lib/files/patch-Wnn-jserver-de_header.h
Normal file
@ -0,0 +1,28 @@
|
||||
Index: Wnn/jserver/de_header.h
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/jserver/de_header.h,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.3
|
||||
diff -u -p -r1.1.1.1 -r1.3
|
||||
--- Wnn/jserver/de_header.h 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/jserver/de_header.h 2 Jan 2009 11:46:51 -0000 1.3
|
||||
@@ -52,6 +52,8 @@
|
||||
# endif /* KOREAN */
|
||||
#endif /* CHINESE */
|
||||
|
||||
+#include <netdb.h>
|
||||
+
|
||||
#include "jslib.h"
|
||||
#include "commonhd.h"
|
||||
#include "jdata.h"
|
||||
@@ -205,6 +207,10 @@ GLOBAL int option_flag GLOBAL_VAL(0);
|
||||
|
||||
GLOBAL char jserver_dir[MAXPATHLEN];
|
||||
GLOBAL char jserverrcfile[MAXPATHLEN];
|
||||
+
|
||||
+#define MAXLISTENADDR 256
|
||||
+GLOBAL char listenaddr[MAXLISTENADDR][NI_MAXHOST];
|
||||
+
|
||||
GLOBAL char *hinsi_file_name GLOBAL_VAL(NULL);
|
||||
GLOBAL char lang_dir[MAXPATHLEN];
|
||||
|
209
japanese/FreeWnn-lib/files/patch-Wnn-jserver-do_filecom.c
Normal file
209
japanese/FreeWnn-lib/files/patch-Wnn-jserver-do_filecom.c
Normal file
@ -0,0 +1,209 @@
|
||||
Index: Wnn/jserver/do_filecom.c
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/jserver/do_filecom.c,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/jserver/do_filecom.c 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/jserver/do_filecom.c 2 Jan 2010 11:51:24 -0000 1.2
|
||||
@@ -868,82 +868,96 @@ js_file_write (void)
|
||||
void
|
||||
js_file_receive (void)
|
||||
{
|
||||
- int env_id, fid;
|
||||
- struct wnn_file_uniq fq;
|
||||
- int mode = 1;
|
||||
- int i;
|
||||
- int error = 0;
|
||||
+ int env_id, fid;
|
||||
+ struct wnn_file_uniq fq;
|
||||
+ int mode = 1;
|
||||
+ int i;
|
||||
+ int error = 0;
|
||||
+
|
||||
+ env_id = get4_cur(); /* env_id */
|
||||
+ fid = get4_cur();
|
||||
+ if (find_fid_in_env(env_id, fid) == -1) {
|
||||
+ fprintf(stderr, "find_fid_in_env failed\n");
|
||||
+
|
||||
+ /* valid */
|
||||
+ /* dummy */
|
||||
+ puts_cur ("!");
|
||||
+ putc_purge();
|
||||
+
|
||||
+ error = 1;
|
||||
+ } else {
|
||||
+ fprintf(stderr, "find_fid_in_env success: %s\n",
|
||||
+ files[fid].name);
|
||||
+ puts_cur(files[fid].name);
|
||||
+ putc_purge();
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ fprintf(stderr, "get4\n");
|
||||
+ if (get4_cur() == -1) {
|
||||
+ /* Ack */
|
||||
+ return;
|
||||
+ }
|
||||
+ fprintf(stderr, "get4: end\n");
|
||||
+
|
||||
+ fprintf(stderr, "get4 x 3 start\n");
|
||||
+
|
||||
+ fq.time = get4_cur();
|
||||
+ fq.dev = get4_cur();
|
||||
+ fq.inode = get4_cur();
|
||||
+
|
||||
+ fprintf(stderr, "get4 x 3 end\n");
|
||||
+
|
||||
+ for (i = 0; i < WNN_HOSTLEN; i++) {
|
||||
+ fq.createhost[i] = getc_cur();
|
||||
+ }
|
||||
+
|
||||
+ if (error || files[fid].ref_count == -1) {
|
||||
+ wnn_errorno = WNN_FID_ERROR;
|
||||
+ error_ret ();
|
||||
+ putc_purge ();
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (fq.time != 0) {
|
||||
+ /* Old File Exist */
|
||||
+ mode = must_write_file (&files[fid], &fq);
|
||||
+ }
|
||||
+
|
||||
+ if (mode == -1) {
|
||||
+ wnn_errorno = WNN_FID_ERROR;
|
||||
+ error_ret ();
|
||||
+ putc_purge ();
|
||||
+ return;
|
||||
+ } else if (mode == 0) {
|
||||
+ /* need not saving */
|
||||
+ put4_cur(0);
|
||||
+ putc_purge();
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ put4_cur (mode);
|
||||
+ putc_purge ();
|
||||
+
|
||||
+ if (get4_cur () == -1)
|
||||
+ return;
|
||||
+
|
||||
+ if (rcv_file (&files[fid], mode) == -1) {
|
||||
+ /* wnn_errorno=WNN_FILE_WRITE_ERROR; */
|
||||
+ error_ret();
|
||||
+ putc_purge();
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (mode == 1 || mode == 2) {
|
||||
+ clear_dirty_bit (&files[fid]);
|
||||
+ }
|
||||
|
||||
- env_id = get4_cur (); /* env_id */
|
||||
- fid = get4_cur ();
|
||||
- /**/ if (find_fid_in_env (env_id, fid) == -1)
|
||||
- { /* valid */
|
||||
- puts_cur ("!");
|
||||
- putc_purge (); /* dummy */
|
||||
- error = 1;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- puts_cur (files[fid].name);
|
||||
- putc_purge ();
|
||||
- }
|
||||
- if (get4_cur () == -1)
|
||||
- return; /* Ack */
|
||||
-
|
||||
- fq.time = get4_cur ();
|
||||
- fq.dev = get4_cur ();
|
||||
- fq.inode = get4_cur ();
|
||||
- for (i = 0; i < WNN_HOSTLEN; i++)
|
||||
- {
|
||||
- fq.createhost[i] = getc_cur ();
|
||||
- }
|
||||
- if (error || files[fid].ref_count == -1)
|
||||
- {
|
||||
- wnn_errorno = WNN_FID_ERROR;
|
||||
- error_ret ();
|
||||
- putc_purge ();
|
||||
- return;
|
||||
- }
|
||||
- if (fq.time != 0)
|
||||
- { /* Old File Exist */
|
||||
- mode = must_write_file (&files[fid], &fq);
|
||||
- }
|
||||
-
|
||||
- if (mode == -1)
|
||||
- {
|
||||
- wnn_errorno = WNN_FID_ERROR;
|
||||
- error_ret ();
|
||||
- putc_purge ();
|
||||
- return;
|
||||
- }
|
||||
- else if (mode == 0)
|
||||
- { /* need not saving */
|
||||
- put4_cur (0);
|
||||
- putc_purge ();
|
||||
- return;
|
||||
- }
|
||||
- put4_cur (mode);
|
||||
- putc_purge ();
|
||||
-
|
||||
- if (get4_cur () == -1)
|
||||
- return;
|
||||
-
|
||||
- /**/ if (rcv_file (&files[fid], mode) == -1)
|
||||
- {
|
||||
-/* wnn_errorno=WNN_FILE_WRITE_ERROR; */ error_ret ();
|
||||
- putc_purge ();
|
||||
- return;
|
||||
- }
|
||||
- if (mode == 1 || mode == 2)
|
||||
- {
|
||||
- clear_dirty_bit (&files[fid]);
|
||||
- }
|
||||
-
|
||||
- put4_cur (0);
|
||||
+ put4_cur (0);
|
||||
/*
|
||||
- put4_cur(fid);
|
||||
+ put4_cur(fid);
|
||||
*/
|
||||
- putc_purge ();
|
||||
+ putc_purge();
|
||||
}
|
||||
|
||||
|
||||
@@ -994,18 +1008,18 @@ del_fid_from_env (int env_id, int fid)
|
||||
int
|
||||
find_fid_in_env (int env_id, int fid)
|
||||
{
|
||||
- register int i;
|
||||
- register int *file = env[env_id]->file;
|
||||
- for (i = 0; i < WNN_MAX_FILE_OF_AN_ENV; i++)
|
||||
- {
|
||||
- if ((file)[i] == -1)
|
||||
- continue;
|
||||
- if ((file)[i] == fid)
|
||||
- {
|
||||
- return i;
|
||||
- }
|
||||
- }
|
||||
- return -1;
|
||||
+ int i;
|
||||
+ int *file = env[env_id]->file;
|
||||
+
|
||||
+ for (i = 0; i < WNN_MAX_FILE_OF_AN_ENV; i++) {
|
||||
+ if ((file)[i] == -1)
|
||||
+ continue;
|
||||
+ if ((file)[i] == fid) {
|
||||
+ return i;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return -1;
|
||||
}
|
||||
|
||||
static int
|
52
japanese/FreeWnn-lib/files/patch-Wnn-jserver-initjserv.c
Normal file
52
japanese/FreeWnn-lib/files/patch-Wnn-jserver-initjserv.c
Normal file
@ -0,0 +1,52 @@
|
||||
Index: Wnn/jserver/initjserv.c
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/jserver/initjserv.c,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.3
|
||||
diff -u -p -r1.1.1.1 -r1.3
|
||||
--- Wnn/jserver/initjserv.c 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/jserver/initjserv.c 2 Jan 2009 11:46:51 -0000 1.3
|
||||
@@ -154,6 +154,7 @@ read_default (void)
|
||||
char param[EXPAND_PATH_LENGTH +1];
|
||||
char *word;
|
||||
int i, num, *v[17];
|
||||
+ int lindex = 0;
|
||||
|
||||
strcpy (jserver_dir, JSERVER_DIR);
|
||||
|
||||
@@ -215,6 +216,15 @@ read_default (void)
|
||||
}
|
||||
log_debug ("max_client=%d", max_client);
|
||||
}
|
||||
+ else if (listenaddr[lindex][0] == '\0'
|
||||
+ && strcmp(code, "listenaddr") == 0) {
|
||||
+ num = sscanf (data, "%s %s ", code, listenaddr[lindex]);
|
||||
+ if (num != 2) {
|
||||
+ log_err ("command %s invalid.", code);
|
||||
+ continue;
|
||||
+ }
|
||||
+ lindex++;
|
||||
+ }
|
||||
else if (strcmp (code, "max_sticky_env") == 0)
|
||||
{
|
||||
num = sscanf (data, "%s %d ", code, &max_sticky_env);
|
||||
@@ -305,7 +315,9 @@ read_default_files (void)
|
||||
}
|
||||
fclose (fp);
|
||||
|
||||
+ /*
|
||||
printf ("Finished Reading Files\n");
|
||||
+ */
|
||||
|
||||
return (0);
|
||||
}
|
||||
@@ -340,7 +352,9 @@ read_default_file (char* buffer, size_t
|
||||
|
||||
files[fid].localf = LOCAL;
|
||||
strcpy (files[fid].name, buffer);
|
||||
+ /*
|
||||
printf ("Reading %s\t Fid = %d\n", buffer, fid);
|
||||
+ */
|
||||
if (read_file (&files[fid]) == -1)
|
||||
{
|
||||
printf ("Error reading %s\n", buffer);
|
@ -1,11 +1,20 @@
|
||||
--- Wnn/man/Makefile.in.orig 2008-10-27 03:58:56.000000000 +0900
|
||||
+++ Wnn/man/Makefile.in 2008-10-27 04:04:21.000000000 +0900
|
||||
@@ -34,7 +34,7 @@
|
||||
Index: Wnn/man/Makefile.in
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/man/Makefile.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/man/Makefile.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/man/Makefile.in 2 Jan 2010 12:44:07 -0000 1.2
|
||||
@@ -32,9 +32,9 @@
|
||||
include @top_srcdir@/makerule.mk
|
||||
top_builddir = ../..
|
||||
|
||||
LIB_WNNMANDIR = 3.libwnn
|
||||
-LIB_WNNMANDIR = 3.libwnn
|
||||
+LIB_WNNMANDIR?= 3.libwnn
|
||||
|
||||
-SERVER_WNNMANDIR = 2.env 4.cmd 6.jutil
|
||||
+#SERVER_WNNMANDIR = 2.env 4.cmd 6.jutil
|
||||
+SERVER_WNNMANDIR?= 2.env 4.cmd 6.jutil
|
||||
|
||||
SUBDIRS = @WNNMANDIR@
|
||||
|
||||
|
17
japanese/FreeWnn-lib/files/patch-Wnn-romkan-Makefile.in
Normal file
17
japanese/FreeWnn-lib/files/patch-Wnn-romkan-Makefile.in
Normal file
@ -0,0 +1,17 @@
|
||||
Index: Wnn/romkan/Makefile.in
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/romkan/Makefile.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/romkan/Makefile.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/romkan/Makefile.in 2 Jan 2010 12:10:16 -0000 1.2
|
||||
@@ -46,7 +46,7 @@ includes::
|
||||
|
||||
.c.o:
|
||||
$(RM) $@
|
||||
- $(LIBTOOL) $(CC) -c $(CFLAGS) $(_NOOP_) $<
|
||||
+ $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) $(_NOOP_) $<
|
||||
|
||||
clean::
|
||||
$(RM) -r .libs
|
17
japanese/FreeWnn-lib/files/patch-Xwnmo-xwnmo-do_socket.c
Normal file
17
japanese/FreeWnn-lib/files/patch-Xwnmo-xwnmo-do_socket.c
Normal file
@ -0,0 +1,17 @@
|
||||
Index: Xwnmo/xwnmo/do_socket.c
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Xwnmo/xwnmo/do_socket.c,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Xwnmo/xwnmo/do_socket.c 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Xwnmo/xwnmo/do_socket.c 20 Dec 2008 07:23:12 -0000 1.2
|
||||
@@ -118,8 +118,6 @@ static int rc = 0;
|
||||
#define sock_clr(array,pos) (array[pos/BINTSIZE] &= ~(1<<(pos%BINTSIZE)))
|
||||
#define sock_tst(array,pos) (array[pos/BINTSIZE] & (1<<(pos%BINTSIZE)))
|
||||
|
||||
-extern int read (), write ();
|
||||
-
|
||||
#define _Read(fd, data, size) read((fd), (data), (size))
|
||||
#define _Write(fd, data, size) write((fd), (data), (size))
|
||||
|
17
japanese/FreeWnn-lib/files/patch-Xwnmo-xwnmo-do_xjpdrct.c
Normal file
17
japanese/FreeWnn-lib/files/patch-Xwnmo-xwnmo-do_xjpdrct.c
Normal file
@ -0,0 +1,17 @@
|
||||
Index: Xwnmo/xwnmo/do_xjpdrct.c
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Xwnmo/xwnmo/do_xjpdrct.c,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Xwnmo/xwnmo/do_xjpdrct.c 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Xwnmo/xwnmo/do_xjpdrct.c 20 Dec 2008 07:23:12 -0000 1.2
|
||||
@@ -89,8 +89,6 @@ extern int cur_sock;
|
||||
#define sock_clr(array,pos) (array[pos/BINTSIZE] &= ~(1<<(pos%BINTSIZE)))
|
||||
#define sock_tst(array,pos) (array[pos/BINTSIZE] & (1<<(pos%BINTSIZE)))
|
||||
|
||||
-extern int read (), write ();
|
||||
-
|
||||
extern XJpClientRec *xjp_clients;
|
||||
extern XJpClientRec *xjp_cur_client;
|
||||
extern XJpInputRec *xjp_inputs;
|
11633
japanese/FreeWnn-lib/files/patch-aclocal.m4
Normal file
11633
japanese/FreeWnn-lib/files/patch-aclocal.m4
Normal file
File diff suppressed because it is too large
Load Diff
@ -3,10 +3,10 @@ Index: cWnn/cd/cserverrc
|
||||
RCS file: /home/cvs/private/hrs/freewnn/cWnn/cd/cserverrc,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.3
|
||||
diff -d -u -I\$FreeBSD$ -w -r1.1.1.1 -r1.3
|
||||
diff -u -p -r1.1.1.1 -r1.3
|
||||
--- cWnn/cd/cserverrc 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ cWnn/cd/cserverrc 2 Jan 2009 21:56:38 -0000 1.3
|
||||
@@ -39,6 +39,9 @@
|
||||
@@ -39,6 +39,9 @@ readfile sys/QianMa.dic
|
||||
|
||||
readfile sys/full.con
|
||||
|
||||
|
@ -3,10 +3,10 @@ Index: cWnn/etc/Makefile.in
|
||||
RCS file: /home/cvs/private/hrs/freewnn/cWnn/etc/Makefile.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -d -u -I\$FreeBSD$ -w -r1.1.1.1 -r1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- cWnn/etc/Makefile.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ cWnn/etc/Makefile.in 2 Jan 2009 21:09:34 -0000 1.2
|
||||
@@ -36,11 +36,13 @@
|
||||
@@ -36,11 +36,13 @@ INCLUDES = -I$(CWNNINCLUDESRC) -I$(TOP)
|
||||
DEFINES = $(CWNNDEFINES) $(CWNNLANGDEF)
|
||||
|
||||
SRCS = strings.c sstrings.c bdic.c hindo.c gethinsi.c revdic.c pwd.c bcopy.c \
|
||||
@ -22,7 +22,7 @@ diff -d -u -I\$FreeBSD$ -w -r1.1.1.1 -r1.2
|
||||
OBJS2 = getopt.o getopt1.o
|
||||
|
||||
all::
|
||||
@@ -195,6 +197,14 @@
|
||||
@@ -195,6 +197,14 @@ includes:: getopt1.c
|
||||
|
||||
depend:: getopt1.c
|
||||
|
||||
|
@ -3,10 +3,10 @@ Index: cWnn/include/Makefile.in
|
||||
RCS file: /home/cvs/private/hrs/freewnn/cWnn/include/Makefile.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -d -u -I\$FreeBSD$ -w -r1.1.1.1 -r1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- cWnn/include/Makefile.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ cWnn/include/Makefile.in 2 Jan 2009 21:09:34 -0000 1.2
|
||||
@@ -36,7 +36,8 @@
|
||||
@@ -36,7 +36,8 @@ INSTALL = @INSTALL@ $(INSTALLFLAGS)
|
||||
|
||||
HEADERS = commonhd.h jllib.h jslib.h msg.h rk_spclval.h wnnerror.h cplib.h
|
||||
LINKS = wnn_config.h copyright.h demcom.h hinsi_file.h jd_sock.h \
|
||||
@ -16,7 +16,7 @@ diff -d -u -I\$FreeBSD$ -w -r1.1.1.1 -r1.2
|
||||
LINKS2 = getopt.h
|
||||
|
||||
|
||||
@@ -204,6 +205,14 @@
|
||||
@@ -204,6 +205,14 @@ includes:: getopt.h
|
||||
|
||||
depend:: getopt.h
|
||||
|
||||
|
@ -3,10 +3,10 @@ Index: cWnn/jlib/Makefile.in
|
||||
RCS file: /home/cvs/private/hrs/freewnn/cWnn/jlib/Makefile.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -d -u -I\$FreeBSD$ -w -r1.1.1.1 -r1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- cWnn/jlib/Makefile.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ cWnn/jlib/Makefile.in 2 Jan 2009 21:09:34 -0000 1.2
|
||||
@@ -57,6 +57,8 @@
|
||||
@@ -57,6 +57,8 @@ SRC7= $(CWNNETCSRC)/strings.c
|
||||
OBJ7= strings.o
|
||||
SRC8= $(CWNNETCSRC)/bcopy.c
|
||||
OBJ8= bcopy.o
|
||||
@ -15,7 +15,7 @@ diff -d -u -I\$FreeBSD$ -w -r1.1.1.1 -r1.2
|
||||
|
||||
LOCAL_RKSRCS= $(CWNNROMKANSRC)/rk_bltinfn.c $(CWNNROMKANSRC)/rk_main.c $(CWNNROMKANSRC)/rk_modread.c $(CWNNROMKANSRC)/rk_read.c $(CWNNROMKANSRC)/rk_vars.c
|
||||
|
||||
@@ -152,6 +154,9 @@
|
||||
@@ -152,6 +154,9 @@ $(OBJ7) : $(SRC7)
|
||||
$(OBJ8) : $(SRC8)
|
||||
$(LT_CC) -c $(CFLAGS) $(CWNNETCSRC)/`basename $@ .o`.c
|
||||
|
||||
|
41
japanese/FreeWnn-lib/files/patch-cWnn-jserver-Makefile.in
Normal file
41
japanese/FreeWnn-lib/files/patch-cWnn-jserver-Makefile.in
Normal file
@ -0,0 +1,41 @@
|
||||
Index: cWnn/jserver/Makefile.in
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/cWnn/jserver/Makefile.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- cWnn/jserver/Makefile.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ cWnn/jserver/Makefile.in 2 Jan 2009 21:09:35 -0000 1.2
|
||||
@@ -82,6 +82,8 @@ SRC20= $(CWNNETCSRC)/getopt.c
|
||||
OBJ20= getopt.o
|
||||
SRC21= $(CWNNETCSRC)/getopt1.c
|
||||
OBJ21= getopt1.o
|
||||
+SRC22= $(CWNNETCSRC)/fake-rfc2553.c
|
||||
+OBJ22= fake-rfc2553.o
|
||||
TSRC0= de_t.c
|
||||
TOBJ0= de_t.o
|
||||
TSRCGETHINSI= gethinsi_t.c
|
||||
@@ -90,11 +92,11 @@ OBJSUPPORT = @JS_SUPPORTOBJS@
|
||||
TSRCS= $(TSRC0) $(TSRCGETHINSI)
|
||||
SRCS= $(SRC0) $(SRC1) $(SRC3) $(SRC4) $(SRC5) $(SRC6) $(SRC7) \
|
||||
$(SRCGETHINSI) $(SRC9) $(SRC10) $(SRC11) $(SRC12) $(SRC13) $(SRC14) \
|
||||
- $(SRC20) $(SRC21) $(TSRCS)
|
||||
+ $(SRC20) $(SRC21) $(SRC22) $(TSRCS)
|
||||
|
||||
OBJS= $(OBJ0) $(OBJ1) $(OBJ3) $(OBJ4) $(OBJ5) $(OBJ6) $(OBJ7) \
|
||||
$(OBJGETHINSI) $(OBJ9) $(OBJ10) $(OBJ11) $(OBJ12) $(OBJ13) $(OBJ14) \
|
||||
- $(OBJ20) $(OBJ21) $(OBJSUPPORT)
|
||||
+ $(OBJ20) $(OBJ21) $(OBJ22) $(OBJSUPPORT)
|
||||
|
||||
TOBJS= $(TOBJ0) $(OBJ1) $(OBJ3) $(OBJ4) $(OBJ5) $(OBJ6) $(OBJ7) \
|
||||
$(TOBJGETHINSI) $(OBJ9) $(OBJ10) $(OBJ11) $(OBJ12) $(OBJ13) $(OBJ14) \
|
||||
@@ -609,6 +611,9 @@ $(OBJ20) : $(SRC20) $(CWNNINCLUDESRC)/ge
|
||||
$(OBJ21) : $(SRC21) $(CWNNINCLUDESRC)/getopt.h
|
||||
$(CC) -c $(CFLAGS) $(CWNNETCSRC)/`basename $@ .o`.c
|
||||
|
||||
+$(OBJ22) : $(SRC22)
|
||||
+ $(CC) -c $(CFLAGS) $(CWNNETCSRC)/`basename $@ .o`.c
|
||||
+
|
||||
vasprintf.o : $(WNNETCSRC)/vasprintf.c
|
||||
$(CC) -c $(CFLAGS) $?
|
||||
|
17
japanese/FreeWnn-lib/files/patch-cWnn-romkan-Makefile.in
Normal file
17
japanese/FreeWnn-lib/files/patch-cWnn-romkan-Makefile.in
Normal file
@ -0,0 +1,17 @@
|
||||
Index: cWnn/romkan/Makefile.in
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/cWnn/romkan/Makefile.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- cWnn/romkan/Makefile.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ cWnn/romkan/Makefile.in 2 Jan 2010 12:10:16 -0000 1.2
|
||||
@@ -48,7 +48,7 @@ includes::
|
||||
|
||||
.c.o:
|
||||
$(RM) $@
|
||||
- $(LIBTOOL) $(CC) -c $(CFLAGS) $(_NOOP_) $<
|
||||
+ $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) $(_NOOP_) $<
|
||||
|
||||
clean::
|
||||
$(RM) -r .libs
|
@ -3,10 +3,10 @@ Index: cWnn/td/tserverrc
|
||||
RCS file: /home/cvs/private/hrs/freewnn/cWnn/td/tserverrc,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -d -u -I\$FreeBSD$ -w -r1.1.1.1 -r1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- cWnn/td/tserverrc 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ cWnn/td/tserverrc 20 Dec 2008 07:23:12 -0000 1.2
|
||||
@@ -35,6 +35,8 @@
|
||||
@@ -35,6 +35,8 @@ readfile sys/cns_wd.dic
|
||||
|
||||
readfile sys/full.con
|
||||
|
||||
|
@ -2,10 +2,10 @@ Index: config.h.in
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/config.h.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -d -u -I\$FreeBSD$ -w -r1.1.1.1 -r1.2
|
||||
retrieving revision 1.3
|
||||
diff -u -p -r1.1.1.1 -r1.3
|
||||
--- config.h.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ config.h.in 2 Jan 2009 21:09:32 -0000 1.2
|
||||
+++ config.h.in 2 Jan 2010 11:58:36 -0000 1.3
|
||||
@@ -33,12 +33,24 @@
|
||||
/* Define to 1 if you have the `FD_SET' function. */
|
||||
#undef HAVE_FD_SET
|
||||
@ -50,3 +50,14 @@ diff -d -u -I\$FreeBSD$ -w -r1.1.1.1 -r1.2
|
||||
/* Define to 1 if you have the `syslog' function. */
|
||||
#undef HAVE_SYSLOG
|
||||
|
||||
@@ -201,6 +225,10 @@
|
||||
/* Define to 1 if you have the `wait3' function. */
|
||||
#undef HAVE_WAIT3
|
||||
|
||||
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
+ */
|
||||
+#undef LT_OBJDIR
|
||||
+
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -3,10 +3,10 @@ Index: configure.in
|
||||
RCS file: /home/cvs/private/hrs/freewnn/configure.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -d -u -I\$FreeBSD$ -w -r1.1.1.1 -r1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- configure.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ configure.in 2 Jan 2009 21:09:32 -0000 1.2
|
||||
@@ -422,6 +422,16 @@
|
||||
@@ -422,6 +422,16 @@ dnl for bcopy/index -> memcpy/strchr con
|
||||
AC_CHECK_FUNCS(bcopy bzero bcmp index rindex \
|
||||
memcpy memmove memset strchr strrchr)
|
||||
|
||||
|
@ -3,10 +3,10 @@ Index: kWnn/etc/Makefile.in
|
||||
RCS file: /home/cvs/private/hrs/freewnn/kWnn/etc/Makefile.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -d -u -I\$FreeBSD$ -w -r1.1.1.1 -r1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- kWnn/etc/Makefile.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ kWnn/etc/Makefile.in 2 Jan 2009 21:09:35 -0000 1.2
|
||||
@@ -35,10 +35,12 @@
|
||||
@@ -35,10 +35,12 @@ top_builddir = ../..
|
||||
INCLUDES = -I$(KWNNINCLUDESRC) -I$(TOP)
|
||||
DEFINES = $(KWNNDEFINES) $(KWNNLANGDEF)
|
||||
|
||||
@ -21,7 +21,7 @@ diff -d -u -I\$FreeBSD$ -w -r1.1.1.1 -r1.2
|
||||
OBJS2= getopt.o getopt1.o
|
||||
|
||||
all::
|
||||
@@ -199,6 +201,18 @@
|
||||
@@ -199,6 +201,18 @@ includes:: getopt1.c
|
||||
|
||||
depend:: getopt1.c
|
||||
|
||||
|
@ -3,10 +3,10 @@ Index: kWnn/include/Makefile.in
|
||||
RCS file: /home/cvs/private/hrs/freewnn/kWnn/include/Makefile.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -d -u -I\$FreeBSD$ -w -r1.1.1.1 -r1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- kWnn/include/Makefile.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ kWnn/include/Makefile.in 2 Jan 2009 21:09:35 -0000 1.2
|
||||
@@ -36,7 +36,8 @@
|
||||
@@ -36,7 +36,8 @@ INSTALL = @INSTALL@
|
||||
|
||||
HEADERS = jllib.h jslib.h msg.h rk_spclval.h wnnerror.h commonhd.h cplib.h
|
||||
LINKS = wnn_config.h copyright.h demcom.h hinsi_file.h jd_sock.h jdata.h \
|
||||
@ -16,7 +16,7 @@ diff -d -u -I\$FreeBSD$ -w -r1.1.1.1 -r1.2
|
||||
LINKS2 = getopt.h
|
||||
|
||||
all:: $(HEADERS) $(LINKS) $(LINKS2)
|
||||
@@ -257,6 +258,18 @@
|
||||
@@ -257,6 +258,18 @@ includes:: getopt.h
|
||||
|
||||
depend:: getopt.h
|
||||
|
||||
|
@ -3,10 +3,10 @@ Index: kWnn/jlib/Makefile.in
|
||||
RCS file: /home/cvs/private/hrs/freewnn/kWnn/jlib/Makefile.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -d -u -I\$FreeBSD$ -w -r1.1.1.1 -r1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- kWnn/jlib/Makefile.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ kWnn/jlib/Makefile.in 2 Jan 2009 21:09:35 -0000 1.2
|
||||
@@ -61,13 +61,15 @@
|
||||
@@ -61,13 +61,15 @@ SRC7= $(KWNNETCSRC)/py_table.c
|
||||
OBJ7= py_table.o
|
||||
SRC8= $(KWNNETCSRC)/zy_table.c
|
||||
OBJ8= zy_table.o
|
||||
@ -24,7 +24,7 @@ diff -d -u -I\$FreeBSD$ -w -r1.1.1.1 -r1.2
|
||||
OTHER_SRCS = $(WNNETCSRC)/mkdir.c
|
||||
OTHER_OBJS = mkdir.o
|
||||
SRCS= $(SRC1) $(SRC3) $(LOCAL_ETCSRCS) $(OTHER_SRCS)
|
||||
@@ -163,6 +165,9 @@
|
||||
@@ -163,6 +165,9 @@ $(OBJ7) : $(SRC7)
|
||||
$(OBJ8) : $(SRC8)
|
||||
$(LT_CC) -c $(CFLAGS) $(KWNNETCSRC)/`basename $@ .o`.c
|
||||
|
||||
|
37
japanese/FreeWnn-lib/files/patch-kWnn-jserver-Makefile.in
Normal file
37
japanese/FreeWnn-lib/files/patch-kWnn-jserver-Makefile.in
Normal file
@ -0,0 +1,37 @@
|
||||
Index: kWnn/jserver/Makefile.in
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/kWnn/jserver/Makefile.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- kWnn/jserver/Makefile.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ kWnn/jserver/Makefile.in 2 Jan 2009 21:09:35 -0000 1.2
|
||||
@@ -80,13 +80,17 @@ SRC20= $(KWNNETCSRC)/getopt.c
|
||||
OBJ20= getopt.o
|
||||
SRC21= $(KWNNETCSRC)/getopt1.c
|
||||
OBJ21= getopt1.o
|
||||
+SRC22= $(KWNNETCSRC)/fake-rfc2553.c
|
||||
+OBJ22= fake-rfc2553.o
|
||||
OBJSUPPORT = @JS_SUPPORTOBJS@
|
||||
|
||||
SRCS= $(SRC0) $(SRC1) $(SRC3) $(SRC4) $(SRC5) $(SRC6) $(SRC7) $(SRCGETHINSI) \
|
||||
- $(SRC9) $(SRC10) $(SRC11) $(SRC12) $(SRC13) $(SRCS14) $(SRC20) $(SRC21)
|
||||
+ $(SRC9) $(SRC10) $(SRC11) $(SRC12) $(SRC13) $(SRCS14) $(SRC20) $(SRC21) \
|
||||
+ $(SRC22)
|
||||
|
||||
OBJS= $(OBJ0) $(OBJ1) $(OBJ3) $(OBJ4) $(OBJ5) $(OBJ6) $(OBJ7) $(OBJGETHINSI) \
|
||||
$(OBJ9) $(OBJ10) $(OBJ11) $(OBJ12) $(OBJ13) $(OBJ14) $(OBJ20) $(OBJ21) \
|
||||
+ $(OBJ22) \
|
||||
$(OBJSUPPORT)
|
||||
|
||||
all:: $(HDRS) $(SRC0) $(SRC1) kserver
|
||||
@@ -572,6 +576,9 @@ $(OBJ20) : $(SRC20) $(KWNNINCLUDESRC)/ge
|
||||
$(OBJ21) : $(SRC21) $(KWNNINCLUDESRC)/getopt.h
|
||||
$(CC) -c $(CFLAGS) $(KWNNETCSRC)/`basename $@ .o`.c
|
||||
|
||||
+$(OBJ22) : $(SRC22)
|
||||
+ $(CC) -c $(CFLAGS) $(KWNNETCSRC)/`basename $@ .o`.c
|
||||
+
|
||||
mkdir.o : $(WNNETCSRC)/mkdir.c
|
||||
$(CC) -c $(CFLAGS) $?
|
||||
|
@ -3,7 +3,7 @@ Index: kWnn/kd/kserverrc
|
||||
RCS file: /home/cvs/private/hrs/freewnn/kWnn/kd/kserverrc,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.3
|
||||
diff -d -u -I\$FreeBSD$ -w -r1.1.1.1 -r1.3
|
||||
diff -u -p -r1.1.1.1 -r1.3
|
||||
--- kWnn/kd/kserverrc 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ kWnn/kd/kserverrc 2 Jan 2009 21:56:38 -0000 1.3
|
||||
@@ -29,6 +29,9 @@
|
||||
|
17
japanese/FreeWnn-lib/files/patch-kWnn-romkan-Makefile.in
Normal file
17
japanese/FreeWnn-lib/files/patch-kWnn-romkan-Makefile.in
Normal file
@ -0,0 +1,17 @@
|
||||
Index: kWnn/romkan/Makefile.in
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/kWnn/romkan/Makefile.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- kWnn/romkan/Makefile.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ kWnn/romkan/Makefile.in 2 Jan 2010 12:10:16 -0000 1.2
|
||||
@@ -48,7 +48,7 @@ includes::
|
||||
|
||||
.c.o:
|
||||
$(RM) $@
|
||||
- $(LIBTOOL) $(CC) -c $(CFLAGS) $(_NOOP_) $<
|
||||
+ $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) $(_NOOP_) $<
|
||||
|
||||
clean::
|
||||
$(RM) -r .libs
|
13815
japanese/FreeWnn-lib/files/patch-ltmain.sh
Normal file
13815
japanese/FreeWnn-lib/files/patch-ltmain.sh
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,12 @@
|
||||
--- makerule.mk.in.orig 2008-10-27 03:37:44.000000000 +0900
|
||||
+++ makerule.mk.in 2008-10-27 03:38:15.000000000 +0900
|
||||
@@ -42,8 +42,8 @@
|
||||
Index: makerule.mk.in
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/makerule.mk.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- makerule.mk.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ makerule.mk.in 20 Dec 2008 07:17:14 -0000 1.2
|
||||
@@ -42,8 +42,8 @@ all::
|
||||
# for libtool (AM_PROG_LIBTOOL)
|
||||
# top_builddir = @abs_top_srcdir@
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
PORTNAME= FreeWnn
|
||||
PORTVERSION= 1.1.1.a021
|
||||
PORTREVISION= 7
|
||||
PORTREVISION= 8
|
||||
CATEGORIES?= japanese
|
||||
MASTER_SITES= ftp://ftp.freewnn.org/pub/%SUBDIR%/ \
|
||||
${MASTER_SITE_SOURCEFORGE_JP}
|
||||
@ -24,7 +24,9 @@ GNU_CONFIGURE= yes
|
||||
USE_AUTOTOOLS= autoconf:262 libtool:22
|
||||
USE_LDCONFIG= yes
|
||||
USE_RC_SUBR= # defined below
|
||||
MAKE_ARGS= MANLANG="${MANLANG}" CDEBUGFLAGS="${CFLAGS}"
|
||||
MAKE_ARGS= MANLANG="${MANLANG}" CDEBUGFLAGS="${CFLAGS}" \
|
||||
LIBRARY_WNNMANDIR="" \
|
||||
SERVER_WNNMANDIR="2.env 4.cmd 6.jutil"
|
||||
ALL_TARGET= includes all
|
||||
INSTALL_TARGET= install install.man
|
||||
SUB_FILES= pkg-install
|
||||
@ -36,7 +38,7 @@ WNNTYPE?= WNN
|
||||
CONFIGURE_ARGS= --enable-libraries=no \
|
||||
${CONFIGURE_ARGS.${WNNTYPE}}
|
||||
.if !defined(WITHOUT_INET6)
|
||||
CONFIGURE_ARGS+=--enable-ipv6
|
||||
CONFIGURE_ARGS+=--enable-ipv6
|
||||
.endif
|
||||
|
||||
# Wnn
|
||||
|
@ -12,10 +12,15 @@ name=cwnn
|
||||
rcvar=`set_rcvar`
|
||||
command=%%PREFIX%%/bin/cWnn4/cserver
|
||||
procname=%%PREFIX%%/bin/cWnn4/cserver
|
||||
start_precmd=start_precmd
|
||||
stop_postcmd=stop_postcmd
|
||||
WTCMD=%%PREFIX%%/bin/cWnn4/cwnntouch
|
||||
|
||||
start_precmd()
|
||||
{
|
||||
rm -f /tmp/cd_sockV4
|
||||
install -d -o wnn -m 755 %%PREFIX%%/lib/wnn/zh_CN/dic/usr
|
||||
%%PREFIX%%/lib/wnn/zh_CN/dic/sys/*
|
||||
}
|
||||
|
||||
stop_postcmd()
|
||||
|
@ -12,10 +12,15 @@ name=kwnn
|
||||
rcvar=`set_rcvar`
|
||||
command=%%PREFIX%%/bin/kWnn4/kserver
|
||||
procname=%%PREFIX%%/bin/kWnn4/kserver
|
||||
start_precmd=start_precmd
|
||||
stop_postcmd=stop_postcmd
|
||||
WTCMD=%%PREFIX%%/bin/kWnn4/kwnntouch
|
||||
|
||||
start_precmd()
|
||||
{
|
||||
rm -f /tmp/kd_sockV4
|
||||
install -d -o wnn -m 755 %%PREFIX%%/lib/wnn/ko_KR/dic/usr
|
||||
${WTCMD} %%PREFIX%%/lib/wnn/ko_KR/dic/sys/*
|
||||
}
|
||||
|
||||
stop_postcmd()
|
||||
|
31
japanese/FreeWnn-server/files/patch-Wnn-conv-cvt_head.h
Normal file
31
japanese/FreeWnn-server/files/patch-Wnn-conv-cvt_head.h
Normal file
@ -0,0 +1,31 @@
|
||||
Index: Wnn/conv/cvt_head.h
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/conv/cvt_head.h,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/conv/cvt_head.h 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/conv/cvt_head.h 20 Dec 2008 15:22:37 -0000 1.2
|
||||
@@ -52,17 +52,17 @@
|
||||
|
||||
#ifdef WNNDEFAULT
|
||||
# include "wnn_config.h"
|
||||
- /* マクロCONVERT_FILENAMEの定義(のためだけ)。コンパイル時は、ヘッダファイル
|
||||
- のサーチパスに、Wnnのインクルードファイルのありかを設定しておくこと。 */
|
||||
+/* マクロCONVERT_FILENAMEの定義(のためだけ)。コンパイル時は、ヘッダファイル
|
||||
+ のサーチパスに、Wnnのインクルードファイルのありかを設定しておくこと。 */
|
||||
#else
|
||||
# define CONVERT_FILENAME "cvt_key_tbl"
|
||||
#endif
|
||||
|
||||
#define div_up(a, b) ((a + b - 1) / b)
|
||||
- /* a,bは非負整数。a/bを切り上げて整数にする */
|
||||
+/* a,bは非負整数。a/bを切り上げて整数にする */
|
||||
|
||||
struct CONVCODE
|
||||
{
|
||||
- int tokey; /* 変換されたコード */
|
||||
- char *fromkey; /* 変換するコード */
|
||||
+ int tokey; /* 変換されたコード */
|
||||
+ char *fromkey; /* 変換するコード */
|
||||
};
|
322
japanese/FreeWnn-server/files/patch-Wnn-conv-cvt_key.c
Normal file
322
japanese/FreeWnn-server/files/patch-Wnn-conv-cvt_key.c
Normal file
@ -0,0 +1,322 @@
|
||||
Index: Wnn/conv/cvt_key.c
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/conv/cvt_key.c,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/conv/cvt_key.c 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/conv/cvt_key.c 20 Dec 2008 15:22:37 -0000 1.2
|
||||
@@ -65,172 +65,165 @@
|
||||
extern struct CONVCODE tbl[];
|
||||
extern int cnv_tbl_cnt; /* convert table count */
|
||||
|
||||
-
|
||||
- /** intの配列 h をビットベクタとみなし、第iビットをチェックあるいは立てる */
|
||||
+/** intの配列 h をビットベクタとみなし、第iビットをチェックあるいは立てる */
|
||||
#define BITONP(h, i) (h[i / BITSIZ] & (1 << (i % BITSIZ)))
|
||||
#define BITOFP(h, i) (!BITONP(h, i))
|
||||
#define BIT_UP(h, i) (h[i / BITSIZ] |= (1 << (i % BITSIZ)))
|
||||
#define BITDWN(h, i) (h[i / BITSIZ] &= ~(1 << (i % BITSIZ)))
|
||||
|
||||
- /** 変換コードのチェックとコード変換 */
|
||||
+/** 変換コードのチェックとコード変換 */
|
||||
int
|
||||
-key_check (inbuf, conv_tbl, tbl_cnt, check_flg)
|
||||
- int inbuf[]; /* ソースストリング */
|
||||
- struct CONVCODE conv_tbl[]; /* コード変換テーブル */
|
||||
- int tbl_cnt;
|
||||
- int check_flg[];
|
||||
+key_check (int inbuf[], /* ソースストリング */
|
||||
+ struct CONVCODE conv_tbl[], /* コード変換テーブル */
|
||||
+ int tbl_cnt,
|
||||
+ int check_flg[])
|
||||
{
|
||||
- int dist, base;
|
||||
- char *code_p;
|
||||
- int i;
|
||||
-
|
||||
- for (base = 0; inbuf[base] != -1; base++)
|
||||
- {
|
||||
- for (dist = 0; dist < tbl_cnt; dist++)
|
||||
- {
|
||||
- if (BITONP (check_flg, dist) && conv_tbl[dist].fromkey != 0)
|
||||
- {
|
||||
- code_p = conv_tbl[dist].fromkey + base;
|
||||
- if (*code_p == (char) inbuf[base])
|
||||
- {
|
||||
- if (*(code_p + 1) == (char) 0)
|
||||
- {
|
||||
- /* マッチした */
|
||||
- for (i = 0, base++; (inbuf[i] = inbuf[base]) != -1; i++, base++);
|
||||
- return (conv_tbl[dist].tokey);
|
||||
- }
|
||||
- /* まだマッチしていない */
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- BITDWN (check_flg, dist); /* 無効 */
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- /* ビットベクタ check_flg[] の第0~tblcntビットに立ったまま残っている
|
||||
- ものがあるか調べる。 */
|
||||
- for (i = 0; i < tbl_cnt / BITSIZ; i++)
|
||||
- {
|
||||
- if (check_flg[i])
|
||||
- return (-1);
|
||||
- }
|
||||
- if ((tbl_cnt %= BITSIZ) && (check_flg[i] & ~(~0 << tbl_cnt)))
|
||||
- return (-1);
|
||||
- /* return -1 … まだ未決定の物がある */
|
||||
+ int dist, base;
|
||||
+ char *code_p;
|
||||
+ int i;
|
||||
+
|
||||
+ for (base = 0; inbuf[base] != -1; base++) {
|
||||
+ for (dist = 0; dist < tbl_cnt; dist++) {
|
||||
+ if (BITONP (check_flg, dist) && conv_tbl[dist].fromkey != 0) {
|
||||
+ code_p = conv_tbl[dist].fromkey + base;
|
||||
+
|
||||
+ if (*code_p == (char) inbuf[base]) {
|
||||
+ if (*(code_p + 1) == (char) 0) {
|
||||
+ /* マッチした */
|
||||
+ for (i = 0, base++; (inbuf[i] = inbuf[base]) != -1; i++, base++);
|
||||
+ return (conv_tbl[dist].tokey);
|
||||
+ }
|
||||
+ /* まだマッチしていない */
|
||||
+ } else {
|
||||
+ /* 無効 */
|
||||
+ BITDWN (check_flg, dist);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* ビットベクタ check_flg[] の第0~tblcntビットに立ったまま残っている
|
||||
+ ものがあるか調べる。 */
|
||||
+
|
||||
+ for (i = 0; i < tbl_cnt / BITSIZ; i++) {
|
||||
+ if (check_flg[i])
|
||||
+ return (-1);
|
||||
+ }
|
||||
+
|
||||
+ if ((tbl_cnt %= BITSIZ) && (check_flg[i] & ~(~0 << tbl_cnt)))
|
||||
+ return (-1);
|
||||
+ /* return -1 … まだ未決定の物がある */
|
||||
|
||||
- return (-2); /* 変換対象となる物はない */
|
||||
+ /* 変換対象となる物はない */
|
||||
+ return (-2);
|
||||
}
|
||||
|
||||
- /** 指定された変換テーブルに従ってコード変換する。*/
|
||||
+/** 指定された変換テーブルに従ってコード変換する。*/
|
||||
int
|
||||
-convert_key (inkey, conv_tbl, tbl_cnt, matching_flg, in_buf)
|
||||
- int (*inkey) (); /* キー入力関数 */
|
||||
- struct CONVCODE conv_tbl[]; /* 変換テーブル */
|
||||
- int tbl_cnt; /* conv_tbl[] の個数 */
|
||||
- int matching_flg; /* マッチングしなかったストリングの処理指定
|
||||
- 0 : 返値として返す
|
||||
- 1 : そのストリングは捨てる */
|
||||
- char *in_buf;
|
||||
+convert_key (int (*inkey)(), /* キー入力関数 */
|
||||
+ struct CONVCODE conv_tbl[], /* 変換テーブル */
|
||||
+ int tbl_cnt, /* conv_tbl[] の個数 */
|
||||
+ int matching_flg, /* マッチングしなかったストリングの処理指定
|
||||
+ 0 : 返値として返す
|
||||
+ 1 : そのストリングは捨てる */
|
||||
+ char *in_buf)
|
||||
{
|
||||
#define MAX 20 /* キー入力バッファの最大値 */
|
||||
|
||||
- static int inbuf[MAX]; /* キー入力バッファ */
|
||||
- /* バッファの終端は、-1 で示される。 */
|
||||
-
|
||||
- int out_cnt; /* 出力バッファの出力カウント */
|
||||
-
|
||||
- static int buf_cnt = 0; /* inbuf の入力時のカウンタ */
|
||||
-
|
||||
- int check_flg[CHANGE_MAX];
|
||||
- /* ビットベクタとして扱われ、マッチング時に対象となっているconv_tbl[]
|
||||
- を示す。1の時対象となり、0で非対象 */
|
||||
-
|
||||
- int i, c, flg = 0; /* work */
|
||||
-
|
||||
- for (i = 0; i < div_up (tbl_cnt, BITSIZ); check_flg[i++] = ~0);
|
||||
- /* 配列check_flgをビットベクタ扱いし、その第0~tbl_cnt ビットを立てる。
|
||||
- 但し、実際はその少し先まで立つ */
|
||||
-
|
||||
- for (;;)
|
||||
- {
|
||||
- if (flg != 0 || buf_cnt == 0)
|
||||
- {
|
||||
- inbuf[buf_cnt] = (*inkey) (); /* 一文字入力 */
|
||||
- in_buf[buf_cnt] = (char) (inbuf[buf_cnt] & 0xff);
|
||||
- if (inbuf[buf_cnt] == -1)
|
||||
- {
|
||||
- if (buf_cnt > 0)
|
||||
- {
|
||||
- c = -2; /* タイムアウト */
|
||||
- goto LABEL;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- continue;
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- inbuf[++buf_cnt] = -1; /* ターミネータ */
|
||||
- }
|
||||
- }
|
||||
- flg++;
|
||||
-
|
||||
- if (buf_cnt >= MAX - 1)
|
||||
- {
|
||||
- in_buf[0] = '\0';
|
||||
- return (-1); /* ERROR */
|
||||
- }
|
||||
-
|
||||
- c = key_check (inbuf, conv_tbl, tbl_cnt, check_flg);
|
||||
- LABEL:
|
||||
- switch (c)
|
||||
- {
|
||||
- case -1: /* 未決定 */
|
||||
- continue;
|
||||
-
|
||||
- case -2: /* 変換対象でないことが決定した */
|
||||
- buf_cnt--;
|
||||
- out_cnt = 0;
|
||||
- c = inbuf[out_cnt++];
|
||||
- for (i = 0; inbuf[i] != -1; inbuf[i++] = inbuf[out_cnt++]);
|
||||
- if (matching_flg != 0)
|
||||
- {
|
||||
- flg = 0;
|
||||
- continue;
|
||||
- }
|
||||
- in_buf[0] = '\0';
|
||||
- return (c);
|
||||
-
|
||||
- default: /* 変換されたコード */
|
||||
- in_buf[buf_cnt] = '\0';
|
||||
- buf_cnt = 0;
|
||||
- return (c);
|
||||
- }
|
||||
- }
|
||||
+ /* キー入力バッファ */
|
||||
+ /* バッファの終端は、-1 で示される。 */
|
||||
+ static int inbuf[MAX];
|
||||
+
|
||||
+ /* 出力バッファの出力カウント */
|
||||
+ int out_cnt;
|
||||
+
|
||||
+ /* inbuf の入力時のカウンタ */
|
||||
+ static int buf_cnt = 0;
|
||||
+
|
||||
+
|
||||
+ /* ビットベクタとして扱われ、マッチング時に対象となっているconv_tbl[]
|
||||
+ を示す。1の時対象となり、0で非対象 */
|
||||
+ int check_flg[CHANGE_MAX];
|
||||
+
|
||||
+ /* work */
|
||||
+ int i, c, flg = 0;
|
||||
+
|
||||
+ for (i = 0; i < div_up (tbl_cnt, BITSIZ); check_flg[i++] = ~0);
|
||||
+ /* 配列check_flgをビットベクタ扱いし、その第0~tbl_cnt ビットを立てる。
|
||||
+ 但し、実際はその少し先まで立つ */
|
||||
+
|
||||
+ for (;;) {
|
||||
+ if (flg != 0 || buf_cnt == 0) {
|
||||
+ inbuf[buf_cnt] = (*inkey) (); /* 一文字入力 */
|
||||
+ in_buf[buf_cnt] = (char) (inbuf[buf_cnt] & 0xff);
|
||||
+ if (inbuf[buf_cnt] == -1) {
|
||||
+ if (buf_cnt > 0) {
|
||||
+ c = -2;
|
||||
+ /* タイムアウト */
|
||||
+ goto LABEL;
|
||||
+ } else {
|
||||
+ continue;
|
||||
+ }
|
||||
+ } else {
|
||||
+ /* ターミネータ */
|
||||
+ inbuf[++buf_cnt] = -1;
|
||||
+ }
|
||||
+ }
|
||||
+ flg++;
|
||||
+
|
||||
+ if (buf_cnt >= MAX - 1) {
|
||||
+ in_buf[0] = '\0';
|
||||
+
|
||||
+ /* ERROR */
|
||||
+ return (-1);
|
||||
+ }
|
||||
+
|
||||
+ c = key_check (inbuf, conv_tbl, tbl_cnt, check_flg);
|
||||
+
|
||||
+ LABEL:
|
||||
+ switch (c) {
|
||||
+ case -1:
|
||||
+ /* 未決定 */
|
||||
+ continue;
|
||||
+
|
||||
+ case -2:
|
||||
+ /* 変換対象でないことが決定した */
|
||||
+ buf_cnt--;
|
||||
+ out_cnt = 0;
|
||||
+ c = inbuf[out_cnt++];
|
||||
+ for (i = 0; inbuf[i] != -1; inbuf[i++] = inbuf[out_cnt++]);
|
||||
+
|
||||
+ if (matching_flg != 0) {
|
||||
+ flg = 0;
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ in_buf[0] = '\0';
|
||||
+ return (c);
|
||||
+
|
||||
+ default:
|
||||
+ /* 変換されたコード */
|
||||
+ in_buf[buf_cnt] = '\0';
|
||||
+ buf_cnt = 0;
|
||||
+ return (c);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
/** コード変換を伴うキー入力関数 */
|
||||
int
|
||||
-keyin1 (get_ch, in_buf)
|
||||
- int (*get_ch) (); /* getchar() と同様の関数 */
|
||||
- char *in_buf;
|
||||
+keyin1(int (*get_ch)(), /* getchar() と同様の関数 */
|
||||
+ char *in_buf)
|
||||
{
|
||||
- int ret;
|
||||
+ int ret;
|
||||
|
||||
- for (;;)
|
||||
- {
|
||||
- if (cnv_tbl_cnt == 0)
|
||||
- {
|
||||
- ret = (*get_ch) ();
|
||||
- if (ret >= 0)
|
||||
- return (ret);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- return (convert_key (get_ch, tbl, cnv_tbl_cnt, 0, in_buf));
|
||||
- }
|
||||
- }
|
||||
+ for (;;) {
|
||||
+ if (cnv_tbl_cnt == 0) {
|
||||
+ ret = (*get_ch)();
|
||||
+ if (ret >= 0)
|
||||
+ return (ret);
|
||||
+ } else {
|
||||
+ return (convert_key(get_ch, tbl, cnv_tbl_cnt, 0, in_buf));
|
||||
+ }
|
||||
+ }
|
||||
}
|
1044
japanese/FreeWnn-server/files/patch-Wnn-conv-cvt_read.c
Normal file
1044
japanese/FreeWnn-server/files/patch-Wnn-conv-cvt_read.c
Normal file
File diff suppressed because it is too large
Load Diff
81
japanese/FreeWnn-server/files/patch-Wnn-etc-bcopy.c
Normal file
81
japanese/FreeWnn-server/files/patch-Wnn-etc-bcopy.c
Normal file
@ -0,0 +1,81 @@
|
||||
Index: Wnn/etc/bcopy.c
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/etc/bcopy.c,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/etc/bcopy.c 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/etc/bcopy.c 20 Dec 2008 15:22:40 -0000 1.2
|
||||
@@ -38,47 +38,43 @@
|
||||
|
||||
#ifndef HAVE_BCOPY
|
||||
void
|
||||
-bcopy (b1, b2, length)
|
||||
- unsigned char *b1, *b2;
|
||||
- int length;
|
||||
+bcopy(unsigned char *b1,
|
||||
+ unsigned char *b2,
|
||||
+ int length)
|
||||
{
|
||||
- if (length <= 0)
|
||||
- return;
|
||||
- if (b1 < b2 && b1 + length > b2)
|
||||
- {
|
||||
- b2 += length;
|
||||
- b1 += length;
|
||||
- while (length--)
|
||||
- {
|
||||
- *--b2 = *--b1;
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- memcpy (b2, b1, length);
|
||||
- }
|
||||
+ if (length <= 0)
|
||||
+ return;
|
||||
+
|
||||
+ if (b1 < b2 && b1 + length > b2) {
|
||||
+ b2 += length;
|
||||
+ b1 += length;
|
||||
+
|
||||
+ while (length--)
|
||||
+ *--b2 = *--b1;
|
||||
+ } else {
|
||||
+ memcpy (b2, b1, length);
|
||||
+ }
|
||||
}
|
||||
#endif /* !HAVE_BCOPY */
|
||||
|
||||
#ifndef HAVE_BZERO
|
||||
void
|
||||
-bzero (b, length)
|
||||
- unsigned char *b;
|
||||
- int length;
|
||||
+bzero(unsigned char *b,
|
||||
+ int length)
|
||||
{
|
||||
- memset (b, 0, length);
|
||||
+ memset (b, 0, length);
|
||||
}
|
||||
#endif /* !HAVE_BZERO */
|
||||
|
||||
#ifndef HAVE_BCMP
|
||||
int
|
||||
-bcmp (b1, b2, length)
|
||||
- unsigned char *b1;
|
||||
- unsigned char *b2;
|
||||
- int length;
|
||||
+bcmp(unsigned char *b1,
|
||||
+ unsigned *b2,
|
||||
+ int length)
|
||||
{
|
||||
- if (length == 0)
|
||||
- return 0;
|
||||
- return memcmp (b1, b2, length);
|
||||
+ if (length == 0)
|
||||
+ return 0;
|
||||
+
|
||||
+ return memcmp(b1, b2, length);
|
||||
}
|
||||
#endif /* !HAVE_BCMP */
|
217
japanese/FreeWnn-server/files/patch-Wnn-etc-getopt1.c
Normal file
217
japanese/FreeWnn-server/files/patch-Wnn-etc-getopt1.c
Normal file
@ -0,0 +1,217 @@
|
||||
Index: Wnn/etc/getopt1.c
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/etc/getopt1.c,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/etc/getopt1.c 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/etc/getopt1.c 20 Dec 2008 15:22:40 -0000 1.2
|
||||
@@ -66,14 +66,13 @@
|
||||
#endif
|
||||
|
||||
int
|
||||
-getopt_long (argc, argv, options, long_options, opt_index)
|
||||
- int argc;
|
||||
- char *const *argv;
|
||||
- const char *options;
|
||||
- const struct option *long_options;
|
||||
- int *opt_index;
|
||||
+getopt_long(int argc,
|
||||
+ char * const *argv,
|
||||
+ const char *options,
|
||||
+ const struct option *long_options,
|
||||
+ int *opt_index)
|
||||
{
|
||||
- return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
|
||||
+ return _getopt_internal(argc, argv, options, long_options, opt_index, 0);
|
||||
}
|
||||
|
||||
/* Like getopt_long, but '-' as well as '--' can indicate a long option.
|
||||
@@ -82,14 +81,13 @@ getopt_long (argc, argv, options, long_o
|
||||
instead. */
|
||||
|
||||
int
|
||||
-getopt_long_only (argc, argv, options, long_options, opt_index)
|
||||
- int argc;
|
||||
- char *const *argv;
|
||||
- const char *options;
|
||||
- const struct option *long_options;
|
||||
- int *opt_index;
|
||||
+getopt_long_only(int argc,
|
||||
+ char * const *argv,
|
||||
+ const char *options,
|
||||
+ const struct option *long_options,
|
||||
+ int *opt_index)
|
||||
{
|
||||
- return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
|
||||
+ return _getopt_internal(argc, argv, options, long_options, opt_index, 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -100,91 +98,87 @@ getopt_long_only (argc, argv, options, l
|
||||
#include <stdio.h>
|
||||
|
||||
int
|
||||
-main (argc, argv)
|
||||
- int argc;
|
||||
- char **argv;
|
||||
+main(int argc, char **argv)
|
||||
{
|
||||
- int c;
|
||||
- int digit_optind = 0;
|
||||
+ int c;
|
||||
+ int digit_optind = 0;
|
||||
|
||||
- while (1)
|
||||
- {
|
||||
- int this_option_optind = optind ? optind : 1;
|
||||
- int option_index = 0;
|
||||
- static struct option long_options[] =
|
||||
- {
|
||||
- {"add", 1, 0, 0},
|
||||
- {"append", 0, 0, 0},
|
||||
- {"delete", 1, 0, 0},
|
||||
- {"verbose", 0, 0, 0},
|
||||
- {"create", 0, 0, 0},
|
||||
- {"file", 1, 0, 0},
|
||||
- {0, 0, 0, 0}
|
||||
- };
|
||||
-
|
||||
- c = getopt_long (argc, argv, "abc:d:0123456789",
|
||||
- long_options, &option_index);
|
||||
- if (c == -1)
|
||||
- break;
|
||||
-
|
||||
- switch (c)
|
||||
- {
|
||||
- case 0:
|
||||
- printf ("option %s", long_options[option_index].name);
|
||||
- if (optarg)
|
||||
- printf (" with arg %s", optarg);
|
||||
- printf ("\n");
|
||||
- break;
|
||||
-
|
||||
- case '0':
|
||||
- case '1':
|
||||
- case '2':
|
||||
- case '3':
|
||||
- case '4':
|
||||
- case '5':
|
||||
- case '6':
|
||||
- case '7':
|
||||
- case '8':
|
||||
- case '9':
|
||||
- if (digit_optind != 0 && digit_optind != this_option_optind)
|
||||
- printf ("digits occur in two different argv-elements.\n");
|
||||
- digit_optind = this_option_optind;
|
||||
- printf ("option %c\n", c);
|
||||
- break;
|
||||
-
|
||||
- case 'a':
|
||||
- printf ("option a\n");
|
||||
- break;
|
||||
-
|
||||
- case 'b':
|
||||
- printf ("option b\n");
|
||||
- break;
|
||||
-
|
||||
- case 'c':
|
||||
- printf ("option c with value `%s'\n", optarg);
|
||||
- break;
|
||||
-
|
||||
- case 'd':
|
||||
- printf ("option d with value `%s'\n", optarg);
|
||||
- break;
|
||||
+ while (1) {
|
||||
+ int this_option_optind = optind ? optind : 1;
|
||||
+ int option_index = 0;
|
||||
+ static struct option long_options[] = {
|
||||
+ {"add", 1, 0, 0},
|
||||
+ {"append", 0, 0, 0},
|
||||
+ {"delete", 1, 0, 0},
|
||||
+ {"verbose", 0, 0, 0},
|
||||
+ {"create", 0, 0, 0},
|
||||
+ {"file", 1, 0, 0},
|
||||
+ {0, 0, 0, 0}
|
||||
+ };
|
||||
+
|
||||
+ c = getopt_long(argc, argv, "abc:d:0123456789",
|
||||
+ long_options, &option_index);
|
||||
+
|
||||
+ if (c == -1)
|
||||
+ break;
|
||||
+
|
||||
+ switch (c) {
|
||||
+ case 0:
|
||||
+ printf ("option %s", long_options[option_index].name);
|
||||
+ if (optarg)
|
||||
+ printf (" with arg %s", optarg);
|
||||
+
|
||||
+ printf ("\n");
|
||||
+ break;
|
||||
+ case '0':
|
||||
+ case '1':
|
||||
+ case '2':
|
||||
+ case '3':
|
||||
+ case '4':
|
||||
+ case '5':
|
||||
+ case '6':
|
||||
+ case '7':
|
||||
+ case '8':
|
||||
+ case '9':
|
||||
+ if (digit_optind != 0 && digit_optind != this_option_optind)
|
||||
+ printf ("digits occur in two different argv-elements.\n");
|
||||
+ digit_optind = this_option_optind;
|
||||
+ printf ("option %c\n", c);
|
||||
+ break;
|
||||
+
|
||||
+ case 'a':
|
||||
+ printf ("option a\n");
|
||||
+ break;
|
||||
+
|
||||
+ case 'b':
|
||||
+ printf ("option b\n");
|
||||
+ break;
|
||||
+
|
||||
+ case 'c':
|
||||
+ printf ("option c with value `%s'\n", optarg);
|
||||
+ break;
|
||||
+
|
||||
+ case 'd':
|
||||
+ printf ("option d with value `%s'\n", optarg);
|
||||
+ break;
|
||||
+
|
||||
+ case '?':
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ printf ("?? getopt returned character code 0%o ??\n", c);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
- case '?':
|
||||
- break;
|
||||
+ if (optind < argc) {
|
||||
+ printf ("non-option ARGV-elements: ");
|
||||
|
||||
- default:
|
||||
- printf ("?? getopt returned character code 0%o ??\n", c);
|
||||
+ while (optind < argc)
|
||||
+ printf ("%s ", argv[optind++]);
|
||||
+ printf ("\n");
|
||||
}
|
||||
- }
|
||||
-
|
||||
- if (optind < argc)
|
||||
- {
|
||||
- printf ("non-option ARGV-elements: ");
|
||||
- while (optind < argc)
|
||||
- printf ("%s ", argv[optind++]);
|
||||
- printf ("\n");
|
||||
- }
|
||||
|
||||
- exit (0);
|
||||
+ exit(0);
|
||||
}
|
||||
|
||||
#endif /* TEST */
|
128
japanese/FreeWnn-server/files/patch-Wnn-etc-hindo.c
Normal file
128
japanese/FreeWnn-server/files/patch-Wnn-etc-hindo.c
Normal file
@ -0,0 +1,128 @@
|
||||
Index: Wnn/etc/hindo.c
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/etc/hindo.c,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/etc/hindo.c 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/etc/hindo.c 20 Dec 2008 15:22:40 -0000 1.2
|
||||
@@ -5,7 +5,7 @@
|
||||
/*
|
||||
* FreeWnn is a network-extensible Kana-to-Kanji conversion system.
|
||||
* This file is part of FreeWnn.
|
||||
- *
|
||||
+ *
|
||||
* Copyright Kyoto University Research Institute for Mathematical Sciences
|
||||
* 1987, 1988, 1989, 1990, 1991, 1992
|
||||
* Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999
|
||||
@@ -49,8 +49,8 @@
|
||||
仮頻度がbのとき、頻度の更新の確率は 1 / ([b÷4]+1)
|
||||
但し b=0の時は、頻度更新確率 0
|
||||
|
||||
-
|
||||
- a == -1 <==> b == 0x7f = 127;
|
||||
+
|
||||
+ a == -1 <==> b == 0x7f = 127;
|
||||
この時、このエントリーは、変換に決して用いられない
|
||||
(コメントアウトされている)ことを表す。
|
||||
9/1/89 H.T.
|
||||
@@ -58,47 +58,48 @@
|
||||
|
||||
/** 整数引数の平方根関数。但し引数<0の時のエラーチェックはなし(0を返す)。*/
|
||||
static int
|
||||
-isqrt (i)
|
||||
- int i;
|
||||
+isqrt(int i)
|
||||
{
|
||||
- register int a, b;
|
||||
+ register int a, b;
|
||||
+
|
||||
+ if (i <= 0)
|
||||
+ return (0);
|
||||
+
|
||||
+ for (a = i, b = 1; b <<= 1, a >>= 2;);
|
||||
+
|
||||
+ while ((a = i / b) < b)
|
||||
+ b = (b + a) >> 1;
|
||||
|
||||
- if (i <= 0)
|
||||
- return (0);
|
||||
- for (a = i, b = 1; b <<= 1, a >>= 2;);
|
||||
- while ((a = i / b) < b)
|
||||
- b = (b + a) >> 1;
|
||||
- return (b);
|
||||
+ return (b);
|
||||
}
|
||||
|
||||
/** 実頻度a→仮頻度b */
|
||||
int
|
||||
-asshuku (hin)
|
||||
- int hin;
|
||||
+asshuku(int hin)
|
||||
{
|
||||
- register int c;
|
||||
+ register int c;
|
||||
|
||||
- if (hin == -1)
|
||||
- return (127);
|
||||
- if (hin <= 4)
|
||||
- return (hin);
|
||||
- /* 大半は頻度0と想定してのスピードアップ。motoni1,2でも同じ */
|
||||
-
|
||||
- c = (isqrt ((hin <<= 1) + 1) + 1) & ~1;
|
||||
- c += hin / c - 2;
|
||||
- return (c < 126 ? c : 126);
|
||||
+ if (hin == -1)
|
||||
+ return (127);
|
||||
+ if (hin <= 4)
|
||||
+ return (hin);
|
||||
+ /* 大半は頻度0と想定してのスピードアップ。motoni1,2でも同じ */
|
||||
+
|
||||
+ c = (isqrt((hin <<= 1) + 1) + 1) & ~1;
|
||||
+ c += hin / c - 2;
|
||||
+
|
||||
+ return (c < 126 ? c : 126);
|
||||
}
|
||||
|
||||
/** 仮頻度b→実頻度(min)a */
|
||||
/*
|
||||
int
|
||||
-motoni1(hin)
|
||||
-int hin;
|
||||
+motoni1(int hin)
|
||||
{
|
||||
register int c;
|
||||
|
||||
if(hin == 127) return(-1);
|
||||
- if(hin <= 4) return(hin);
|
||||
+ if(hin <= 4) return(hin);
|
||||
c = hin >> 2;
|
||||
return( (hin - (c << 1)) * (c + 1) );
|
||||
}
|
||||
@@ -106,15 +107,17 @@ int hin;
|
||||
|
||||
/** 仮頻度b→実頻度(mid)a */
|
||||
int
|
||||
-motoni2 (hin)
|
||||
- int hin;
|
||||
+motoni2(int hin)
|
||||
{
|
||||
- register int c;
|
||||
+ register int c;
|
||||
+
|
||||
+ if (hin == 127)
|
||||
+ return (-1);
|
||||
+
|
||||
+ if (hin <= 4)
|
||||
+ return (hin);
|
||||
+
|
||||
+ c = hin >> 2;
|
||||
|
||||
- if (hin == 127)
|
||||
- return (-1);
|
||||
- if (hin <= 4)
|
||||
- return (hin);
|
||||
- c = hin >> 2;
|
||||
- return ((hin - (c << 1)) * (c + 1) + (c >> 1));
|
||||
+ return ((hin - (c << 1)) * (c + 1) + (c >> 1));
|
||||
}
|
58
japanese/FreeWnn-server/files/patch-Wnn-etc-mkdir.c
Normal file
58
japanese/FreeWnn-server/files/patch-Wnn-etc-mkdir.c
Normal file
@ -0,0 +1,58 @@
|
||||
Index: Wnn/etc/mkdir.c
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/etc/mkdir.c,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/etc/mkdir.c 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/etc/mkdir.c 20 Dec 2008 15:22:40 -0000 1.2
|
||||
@@ -5,7 +5,7 @@
|
||||
/*
|
||||
* FreeWnn is a network-extensible Kana-to-Kanji conversion system.
|
||||
* This file is part of FreeWnn.
|
||||
- *
|
||||
+ *
|
||||
* Copyright Kyoto University Research Institute for Mathematical Sciences
|
||||
* 1987, 1988, 1989, 1990, 1991, 1992
|
||||
* Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999
|
||||
@@ -57,25 +57,24 @@
|
||||
#endif /* !WIFEXITED */
|
||||
|
||||
int
|
||||
-mkdir (path, mode)
|
||||
- const char *path;
|
||||
- mode_t mode;
|
||||
+mkdir(const char *path,
|
||||
+ mode_t mode)
|
||||
{
|
||||
- const char *args[3];
|
||||
- int status;
|
||||
+ const char *args[3];
|
||||
+ int status;
|
||||
|
||||
- if (!path)
|
||||
- return -1;
|
||||
+ if (!path)
|
||||
+ return -1;
|
||||
|
||||
- args[0] = "/bin/mkdir";
|
||||
- args[1] = path;
|
||||
- args[2] = NULL;
|
||||
-
|
||||
- if (!fork ())
|
||||
- execv (args[0], args);
|
||||
- else
|
||||
- wait (&status);
|
||||
+ args[0] = "/bin/mkdir";
|
||||
+ args[1] = path;
|
||||
+ args[2] = NULL;
|
||||
+
|
||||
+ if (!fork())
|
||||
+ execv(args[0], args);
|
||||
+ else
|
||||
+ wait(&status);
|
||||
|
||||
- return !(WIFEXITED (status));
|
||||
+ return !(WIFEXITED(status));
|
||||
}
|
||||
#endif
|
667
japanese/FreeWnn-server/files/patch-Wnn-etc-msg.c
Normal file
667
japanese/FreeWnn-server/files/patch-Wnn-etc-msg.c
Normal file
@ -0,0 +1,667 @@
|
||||
Index: Wnn/etc/msg.c
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/etc/msg.c,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/etc/msg.c 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/etc/msg.c 20 Dec 2008 15:22:40 -0000 1.2
|
||||
@@ -5,7 +5,7 @@
|
||||
/*
|
||||
* FreeWnn is a network-extensible Kana-to-Kanji conversion system.
|
||||
* This file is part of FreeWnn.
|
||||
- *
|
||||
+ *
|
||||
* Copyright Kyoto University Research Institute for Mathematical Sciences
|
||||
* 1987, 1988, 1989, 1990, 1991, 1992
|
||||
* Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999
|
||||
@@ -69,124 +69,116 @@
|
||||
#include "msg.h"
|
||||
|
||||
static char *
|
||||
-getlang (lang)
|
||||
- char *lang;
|
||||
+getlang(char *lang)
|
||||
{
|
||||
- static char tmp[32];
|
||||
- char *p;
|
||||
- int i;
|
||||
+ static char tmp[32];
|
||||
+ char *p;
|
||||
+ int i;
|
||||
|
||||
- if (lang == NULL || *lang == '\0')
|
||||
- {
|
||||
+ if (lang == NULL || *lang == '\0') {
|
||||
#ifdef HAS_SETLOCALE
|
||||
- lang = setlocale (LC_ALL, NULL);
|
||||
- if (lang == NULL || *lang == '\0')
|
||||
+ lang = setlocale(LC_ALL, NULL);
|
||||
+ if (lang == NULL || *lang == '\0')
|
||||
#endif
|
||||
- {
|
||||
- lang = getenv ("LC_MESSAGES");
|
||||
- if (lang == NULL || *lang == '\0')
|
||||
- {
|
||||
- lang = getenv ("LANG");
|
||||
- if (lang == NULL || *lang == '\0')
|
||||
- {
|
||||
- lang = DEF_LANG;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- for (i = 0, p = lang; *p && *p != '.'; i++, p++)
|
||||
- {
|
||||
- tmp[i] = *p;
|
||||
- }
|
||||
- tmp[i] = '\0';
|
||||
- return (tmp);
|
||||
- /*
|
||||
- return(lang);
|
||||
- */
|
||||
+ {
|
||||
+ lang = getenv("LC_MESSAGES");
|
||||
+ if (lang == NULL || *lang == '\0') {
|
||||
+ lang = getenv("LANG");
|
||||
+
|
||||
+ if (lang == NULL || *lang == '\0') {
|
||||
+ lang = DEF_LANG;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ for (i = 0, p = lang; *p && *p != '.'; i++, p++)
|
||||
+ tmp[i] = *p;
|
||||
+
|
||||
+ tmp[i] = '\0';
|
||||
+
|
||||
+ return (tmp);
|
||||
+ /*
|
||||
+ return(lang);
|
||||
+ */
|
||||
}
|
||||
|
||||
static int
|
||||
-_search (id, bd)
|
||||
- int *id;
|
||||
- struct msg_bd *bd;
|
||||
+_search(int *id,
|
||||
+ struct msg_bd *bd)
|
||||
{
|
||||
- return (*id - bd->msg_id);
|
||||
+ return (*id - bd->msg_id);
|
||||
}
|
||||
|
||||
static void
|
||||
-_escape (op, ip)
|
||||
- register char *op, *ip;
|
||||
+_escape(register char *op,
|
||||
+ register char *ip)
|
||||
{
|
||||
- for (; *ip != 0; ip++, op++)
|
||||
- {
|
||||
- if (*ip == '\\')
|
||||
- {
|
||||
- switch (*++ip)
|
||||
- {
|
||||
- case 'n':
|
||||
- *op = '\n';
|
||||
- break;
|
||||
- case 't':
|
||||
- *op = '\t';
|
||||
- break;
|
||||
- case 'b':
|
||||
- *op = '\b';
|
||||
- break;
|
||||
- case 'r':
|
||||
- *op = '\r';
|
||||
- break;
|
||||
- case 'f':
|
||||
- *op = '\f';
|
||||
- break;
|
||||
- case 'v':
|
||||
- *op = '\v';
|
||||
- break;
|
||||
- case '0':
|
||||
- *op = 0;
|
||||
- break;
|
||||
- /*
|
||||
- case 'a':
|
||||
- *op = '\a';
|
||||
- break;
|
||||
- case 'e':
|
||||
- case 'E':
|
||||
- case 'o':
|
||||
- case 'd':
|
||||
- case 'x':
|
||||
- break;
|
||||
- */
|
||||
- default:
|
||||
- *op = *ip;
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- if (*ip == '\n')
|
||||
- {
|
||||
- *op = '\0';
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- *op = *ip;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- *op = 0;
|
||||
+ for (; *ip != 0; ip++, op++) {
|
||||
+ if (*ip == '\\') {
|
||||
+ switch (*++ip) {
|
||||
+ case 'n':
|
||||
+ *op = '\n';
|
||||
+ break;
|
||||
+ case 't':
|
||||
+ *op = '\t';
|
||||
+ break;
|
||||
+ case 'b':
|
||||
+ *op = '\b';
|
||||
+ break;
|
||||
+ case 'r':
|
||||
+ *op = '\r';
|
||||
+ break;
|
||||
+ case 'f':
|
||||
+ *op = '\f';
|
||||
+ break;
|
||||
+ case 'v':
|
||||
+ *op = '\v';
|
||||
+ break;
|
||||
+ case '0':
|
||||
+ *op = 0;
|
||||
+ break;
|
||||
+ /*
|
||||
+ case 'a':
|
||||
+ *op = '\a';
|
||||
+ break;
|
||||
+ case 'e':
|
||||
+ case 'E':
|
||||
+ case 'o':
|
||||
+ case 'd':
|
||||
+ case 'x':
|
||||
+ break;
|
||||
+ */
|
||||
+ default:
|
||||
+ *op = *ip;
|
||||
+ break;
|
||||
+ }
|
||||
+ } else {
|
||||
+ if (*ip == '\n')
|
||||
+ *op = '\0';
|
||||
+ else
|
||||
+ *op = *ip;
|
||||
+ }
|
||||
+ }
|
||||
+ *op = 0;
|
||||
}
|
||||
|
||||
static char *
|
||||
-get_msg_bd (cd, id)
|
||||
- struct msg_cat *cd;
|
||||
- int id;
|
||||
+get_msg_bd(struct msg_cat *cd,
|
||||
+ int id)
|
||||
{
|
||||
- register struct msg_bd *bd;
|
||||
- if (cd->msg_bd == 0 || cd->msg_cnt == 0)
|
||||
- return (NULL);
|
||||
- bd = (struct msg_bd *) bsearch (&id, cd->msg_bd, cd->msg_cnt, sizeof (struct msg_bd), _search);
|
||||
- if (bd == NULL)
|
||||
- return (NULL);
|
||||
- return (bd->msg);
|
||||
+ register struct msg_bd *bd;
|
||||
+
|
||||
+ if (cd->msg_bd == 0 || cd->msg_cnt == 0)
|
||||
+ return (NULL);
|
||||
+
|
||||
+ bd = (struct msg_bd *)bsearch(&id,
|
||||
+ cd->msg_bd,
|
||||
+ cd->msg_cnt,
|
||||
+ sizeof (struct msg_bd),
|
||||
+ _search);
|
||||
+ if (bd == NULL)
|
||||
+ return (NULL);
|
||||
+ return (bd->msg);
|
||||
}
|
||||
|
||||
/* expand
|
||||
@@ -195,229 +187,236 @@ get_msg_bd (cd, id)
|
||||
%l: the language element from LANG
|
||||
%t: the territory element from LANG
|
||||
%c: the codeset element from LANG
|
||||
- %%: a single % charctor
|
||||
+ %%: a single % charctor
|
||||
*/
|
||||
static int
|
||||
-expand (op, ip, name, lang)
|
||||
- register char *op, *ip, *name, *lang;
|
||||
+expand (register char *op,
|
||||
+ register char *ip,
|
||||
+ register char *name,
|
||||
+ register char *lang)
|
||||
{
|
||||
- if (!ip || !*ip)
|
||||
- return (-1);
|
||||
- for (; *ip != 0; ip++)
|
||||
- {
|
||||
- if (*ip == '%')
|
||||
- {
|
||||
- switch (*++ip)
|
||||
- {
|
||||
- case 'N':
|
||||
- if (!name || !*name)
|
||||
- return (-1);
|
||||
- strcpy (op, name);
|
||||
- op += strlen (name);
|
||||
- break;
|
||||
- case 'L':
|
||||
- if (!lang || !*lang)
|
||||
- return (-1);
|
||||
- strcpy (op, lang);
|
||||
- op += strlen (lang);
|
||||
- break;
|
||||
- /*
|
||||
- case 'l':
|
||||
- strcpy(op, language);
|
||||
- op += strlen(language);
|
||||
- break;
|
||||
- case 't':
|
||||
- strcpy(op, terr);
|
||||
- op += strlen(terr);
|
||||
- break;
|
||||
- case 'c':
|
||||
- strcpy(op, code);
|
||||
- op += strlen(code);
|
||||
- break;
|
||||
- case '%':
|
||||
- strcpy(op, "%");
|
||||
- op += strlen("%");
|
||||
- break;
|
||||
- */
|
||||
- default:
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- *op = *ip;
|
||||
- op++;
|
||||
- }
|
||||
- }
|
||||
- *op = '\0';
|
||||
- return (0);
|
||||
+ if (!ip || !*ip)
|
||||
+ return (-1);
|
||||
+
|
||||
+ for (; *ip != 0; ip++) {
|
||||
+ if (*ip == '%') {
|
||||
+ switch (*++ip) {
|
||||
+ case 'N':
|
||||
+ if (!name || !*name)
|
||||
+ return (-1);
|
||||
+ strcpy(op, name);
|
||||
+ op += strlen(name);
|
||||
+ break;
|
||||
+ case 'L':
|
||||
+ if (!lang || !*lang)
|
||||
+ return (-1);
|
||||
+ strcpy(op, lang);
|
||||
+ op += strlen(lang);
|
||||
+ break;
|
||||
+ /*
|
||||
+ case 'l':
|
||||
+ strcpy(op, language);
|
||||
+ op += strlen(language);
|
||||
+ break;
|
||||
+ case 't':
|
||||
+ strcpy(op, terr);
|
||||
+ op += strlen(terr);
|
||||
+ break;
|
||||
+ case 'c':
|
||||
+ strcpy(op, code);
|
||||
+ op += strlen(code);
|
||||
+ break;
|
||||
+ case '%':
|
||||
+ strcpy(op, "%");
|
||||
+ op += strlen("%");
|
||||
+ break;
|
||||
+ */
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+ } else {
|
||||
+ *op = *ip;
|
||||
+ op++;
|
||||
+ }
|
||||
+ }
|
||||
+ *op = '\0';
|
||||
+
|
||||
+ return (0);
|
||||
}
|
||||
|
||||
|
||||
struct msg_cat *
|
||||
-msg_open (name, nlspath, lang)
|
||||
- char *name;
|
||||
- char *nlspath;
|
||||
- char *lang;
|
||||
+msg_open (char *name,
|
||||
+ char *nlspath,
|
||||
+ char *lang)
|
||||
{
|
||||
- struct msg_cat *cd;
|
||||
+ struct msg_cat *cd;
|
||||
|
||||
- char fn[MAXPATHLEN];
|
||||
- FILE *fp;
|
||||
- char data[1024];
|
||||
- char save[1024];
|
||||
- int msg_cnt = 0;
|
||||
- int msg_byte = 0;
|
||||
- register char *dp;
|
||||
- register struct msg_bd *bd;
|
||||
- register char *msg, *l;
|
||||
-
|
||||
- l = getlang (lang);
|
||||
- if (name && *name == '/')
|
||||
- {
|
||||
- strcpy (fn, name);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- if (expand (fn, nlspath, name, l) == -1)
|
||||
- {
|
||||
- return (NULL);
|
||||
+ char fn[MAXPATHLEN];
|
||||
+ FILE *fp;
|
||||
+ char data[1024];
|
||||
+ char save[1024];
|
||||
+ int msg_cnt = 0;
|
||||
+ int msg_byte = 0;
|
||||
+ register char *dp;
|
||||
+ register struct msg_bd *bd;
|
||||
+ register char *msg, *l;
|
||||
+
|
||||
+ l = getlang(lang);
|
||||
+
|
||||
+ if (name && *name == '/')
|
||||
+ strcpy (fn, name);
|
||||
+ else {
|
||||
+ if (expand (fn, nlspath, name, l) == -1)
|
||||
+ return (NULL);
|
||||
}
|
||||
- }
|
||||
|
||||
- if (!(cd = (struct msg_cat *) malloc (sizeof (struct msg_cat))))
|
||||
- return (NULL);
|
||||
+ if (!(cd = (struct msg_cat *) malloc (sizeof (struct msg_cat))))
|
||||
+ return (NULL);
|
||||
+
|
||||
+ strcpy (cd->name, name);
|
||||
+ strcpy (cd->lang, l);
|
||||
+ strcpy (cd->nlspath, nlspath);
|
||||
+ cd->nextp = NULL;
|
||||
+ cd->msg_cnt = 0;
|
||||
+
|
||||
+ if ((fp = fopen (fn, "r")) == NULL) {
|
||||
+ /* message file not found */
|
||||
+ cd->msg_bd = 0;
|
||||
+ return (cd);
|
||||
+ }
|
||||
+
|
||||
+ for (;;) {
|
||||
+ /* first: count bytes */
|
||||
+ if (fgets (data, 1024, fp) == NULL)
|
||||
+ break;
|
||||
+
|
||||
+ /* comment */
|
||||
+ if (*data == '#')
|
||||
+ continue;
|
||||
+
|
||||
+ for (dp = data; *dp && *dp != '\t'; dp++);
|
||||
+ /* msg_id:message\n */
|
||||
+
|
||||
+ if (*dp == '\0')
|
||||
+ continue;
|
||||
+
|
||||
+ dp++;
|
||||
+ msg_byte += strlen (dp);
|
||||
+ msg_cnt++;
|
||||
+ }
|
||||
+
|
||||
+ rewind(fp);
|
||||
+
|
||||
+ cd->msg_cnt = msg_cnt;
|
||||
+
|
||||
+ if (!(bd = cd->msg_bd =
|
||||
+ (struct msg_bd *)malloc((sizeof (struct msg_bd)) * msg_cnt + msg_byte + 1))) {
|
||||
+ fclose(fp);
|
||||
+ free(cd);
|
||||
+ return (NULL);
|
||||
+ }
|
||||
+
|
||||
+ msg = (char *) bd + (sizeof (struct msg_bd)) * msg_cnt;
|
||||
+
|
||||
+ for (;;) {
|
||||
+ /* second : get message */
|
||||
+ if (fgets(data, 1024, fp) == NULL)
|
||||
+ break;
|
||||
+
|
||||
+ if (*data == '#')
|
||||
+ /* comment */
|
||||
+ continue;
|
||||
+
|
||||
+ for (dp = data; *dp && *dp != '\t'; dp++);
|
||||
+ /* msg_id:message\n */
|
||||
+
|
||||
+ if (*dp == '\0')
|
||||
+ continue;
|
||||
+
|
||||
+ *dp = 0;
|
||||
+ dp++;
|
||||
+ bd->msg_id = atoi(data);
|
||||
+ bd->msg = msg;
|
||||
+ bd++;
|
||||
+ _escape(save, dp);
|
||||
+ strcpy(msg, save);
|
||||
+ msg += strlen(save);
|
||||
+ *msg = 0;
|
||||
+ msg++;
|
||||
+ }
|
||||
|
||||
- strcpy (cd->name, name);
|
||||
- strcpy (cd->lang, l);
|
||||
- strcpy (cd->nlspath, nlspath);
|
||||
- cd->nextp = NULL;
|
||||
- cd->msg_cnt = 0;
|
||||
-
|
||||
- if ((fp = fopen (fn, "r")) == NULL)
|
||||
- {
|
||||
- /* message file not found */
|
||||
- cd->msg_bd = 0;
|
||||
- return (cd);
|
||||
- }
|
||||
- for (;;)
|
||||
- {
|
||||
- /* first: count bytes */
|
||||
- if (fgets (data, 1024, fp) == NULL)
|
||||
- break;
|
||||
- if (*data == '#')
|
||||
- continue; /* comment */
|
||||
- for (dp = data; *dp && *dp != '\t'; dp++); /* msg_id:message\n */
|
||||
- if (*dp == '\0')
|
||||
- continue;
|
||||
- dp++;
|
||||
- msg_byte += strlen (dp);
|
||||
- msg_cnt++;
|
||||
- }
|
||||
- rewind (fp);
|
||||
-
|
||||
- cd->msg_cnt = msg_cnt;
|
||||
- if (!(bd = cd->msg_bd = (struct msg_bd *) malloc ((sizeof (struct msg_bd)) * msg_cnt + msg_byte + 1)))
|
||||
- {
|
||||
- fclose (fp);
|
||||
- free (cd);
|
||||
- return (NULL);
|
||||
- }
|
||||
- msg = (char *) bd + (sizeof (struct msg_bd)) * msg_cnt;
|
||||
-
|
||||
- for (;;)
|
||||
- {
|
||||
- /* second : get message */
|
||||
- if (fgets (data, 1024, fp) == NULL)
|
||||
- break;
|
||||
- if (*data == '#')
|
||||
- continue; /* comment */
|
||||
- for (dp = data; *dp && *dp != '\t'; dp++); /* msg_id:message\n */
|
||||
- if (*dp == '\0')
|
||||
- continue;
|
||||
- *dp = 0;
|
||||
- dp++;
|
||||
- bd->msg_id = atoi (data);
|
||||
- bd->msg = msg;
|
||||
- bd++;
|
||||
- _escape (save, dp);
|
||||
- strcpy (msg, save);
|
||||
- msg += strlen (save);
|
||||
- *msg = 0;
|
||||
- msg++;
|
||||
- }
|
||||
- fclose (fp);
|
||||
- return (cd);
|
||||
+ fclose(fp);
|
||||
+ return (cd);
|
||||
}
|
||||
|
||||
char *
|
||||
-msg_get (catd, id, msg, lang)
|
||||
- struct msg_cat *catd;
|
||||
- int id;
|
||||
- char *msg;
|
||||
- register char *lang;
|
||||
+msg_get(struct msg_cat *catd,
|
||||
+ int id,
|
||||
+ char *msg,
|
||||
+ register char *lang)
|
||||
{
|
||||
- register struct msg_cat *cd;
|
||||
- register char *msg_bd;
|
||||
+ register struct msg_cat *cd;
|
||||
+ register char *msg_bd;
|
||||
|
||||
- if (catd == 0)
|
||||
- goto error;
|
||||
- cd = catd;
|
||||
- if (lang == 0 || *lang == '\0')
|
||||
- {
|
||||
- lang = cd->lang;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- for (;; cd = cd->nextp)
|
||||
- {
|
||||
- if (strcmp (lang, cd->lang) == 0)
|
||||
- break;
|
||||
- if (cd->nextp == 0)
|
||||
- {
|
||||
- cd->nextp = msg_open (cd->name, cd->nlspath, lang);
|
||||
- cd = cd->nextp;
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
+ if (catd == 0)
|
||||
+ goto error;
|
||||
+
|
||||
+ cd = catd;
|
||||
+
|
||||
+ if (lang == 0 || *lang == '\0')
|
||||
+ lang = cd->lang;
|
||||
+ else {
|
||||
+ for (;; cd = cd->nextp) {
|
||||
+ if (strcmp(lang, cd->lang) == 0)
|
||||
+ break;
|
||||
+ if (cd->nextp == 0) {
|
||||
+ cd->nextp = msg_open(cd->name, cd->nlspath, lang);
|
||||
+ cd = cd->nextp;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
|
||||
- if (msg_bd = get_msg_bd (cd, id))
|
||||
- return (msg_bd);
|
||||
+ if (msg_bd = get_msg_bd(cd, id))
|
||||
+ return (msg_bd);
|
||||
error:
|
||||
- if (msg != 0 && *msg != '\0')
|
||||
- return (msg);
|
||||
- {
|
||||
- static char ret[128];
|
||||
- sprintf (ret, "mes_id = %d: %s", id, DEF_MSG);
|
||||
- return (ret);
|
||||
- }
|
||||
+
|
||||
+ if (msg != 0 && *msg != '\0')
|
||||
+ return (msg);
|
||||
+
|
||||
+ {
|
||||
+ static char ret[128];
|
||||
+ sprintf(ret, "mes_id = %d: %s", id, DEF_MSG);
|
||||
+ return (ret);
|
||||
+ }
|
||||
}
|
||||
|
||||
void
|
||||
-msg_close (cd)
|
||||
- register struct msg_cat *cd;
|
||||
+msg_close(register struct msg_cat *cd)
|
||||
{
|
||||
- if (cd->nextp)
|
||||
- msg_close (cd->nextp);
|
||||
- if (cd->msg_bd)
|
||||
- free (cd->msg_bd);
|
||||
- if (cd)
|
||||
- free (cd);
|
||||
+ if (cd->nextp)
|
||||
+ msg_close(cd->nextp);
|
||||
+
|
||||
+ if (cd->msg_bd)
|
||||
+ free(cd->msg_bd);
|
||||
+
|
||||
+ if (cd)
|
||||
+ free(cd);
|
||||
}
|
||||
|
||||
#ifdef not_use
|
||||
/* test */
|
||||
-main ()
|
||||
+main()
|
||||
{
|
||||
- struct msg_cat *cd;
|
||||
+ struct msg_cat *cd;
|
||||
|
||||
- cd = msg_open ("msg", "%L", "ja_JP");
|
||||
+ cd = msg_open("msg", "%L", "ja_JP");
|
||||
|
||||
- printf (msg_get (cd, 5, "message not found\n", "ja_JP"), 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, 100, "message not found\n", "zh_CN"), "abc");
|
||||
+ printf (msg_get(cd, 5, "message not found\n", "ja_JP"), 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, 100, "message not found\n", "zh_CN"), "abc");
|
||||
}
|
||||
#endif /* not_use */
|
97
japanese/FreeWnn-server/files/patch-Wnn-etc-pwd.c
Normal file
97
japanese/FreeWnn-server/files/patch-Wnn-etc-pwd.c
Normal file
@ -0,0 +1,97 @@
|
||||
Index: Wnn/etc/pwd.c
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/etc/pwd.c,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/etc/pwd.c 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/etc/pwd.c 20 Dec 2008 15:22:40 -0000 1.2
|
||||
@@ -5,7 +5,7 @@
|
||||
/*
|
||||
* FreeWnn is a network-extensible Kana-to-Kanji conversion system.
|
||||
* This file is part of FreeWnn.
|
||||
- *
|
||||
+ *
|
||||
* Copyright Kyoto University Research Institute for Mathematical Sciences
|
||||
* 1987, 1988, 1989, 1990, 1991, 1992
|
||||
* Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999
|
||||
@@ -62,41 +62,47 @@ JS_STATIC void new_pwd (char* src, char*
|
||||
JS_STATIC int check_pwd (char* src, char* encd);
|
||||
|
||||
JS_STATIC void
|
||||
-new_pwd (char* src, char* encd)
|
||||
+new_pwd(char *src, char *encd)
|
||||
{
|
||||
- int i, x, c;
|
||||
- char xx[3];
|
||||
- char *cr;
|
||||
-
|
||||
- if (encd == NULL)
|
||||
- encd = src;
|
||||
- if (strcmp (src, "") == 0)
|
||||
- {
|
||||
- bzero (encd, WNN_PASSWD_LEN);
|
||||
- return;
|
||||
- }
|
||||
- x = time (NULL);
|
||||
- xx[0] = x & 0x3f;
|
||||
- xx[1] = (x & 0x3f00) >> 8;
|
||||
- xx[2] = '\0'; /* for MD5 (that requires terminator) */
|
||||
- for (i = 0; i < 2; i++)
|
||||
- {
|
||||
- c = xx[i] + '.';
|
||||
- if (c > '9')
|
||||
- c += 7;
|
||||
- if (c > 'Z')
|
||||
- c += 6;
|
||||
- xx[i] = c;
|
||||
- }
|
||||
- cr = crypt (src, xx);
|
||||
- bzero (encd, WNN_PASSWD_LEN);
|
||||
- strncpy (encd, cr, WNN_PASSWD_LEN);
|
||||
+ int i, x, c;
|
||||
+ char xx[3];
|
||||
+ char *cr;
|
||||
+
|
||||
+ if (encd == NULL)
|
||||
+ encd = src;
|
||||
+
|
||||
+ if (strcmp (src, "") == 0) {
|
||||
+ bzero (encd, WNN_PASSWD_LEN);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ x = time (NULL);
|
||||
+ xx[0] = x & 0x3f;
|
||||
+ xx[1] = (x & 0x3f00) >> 8;
|
||||
+
|
||||
+ /* for MD5 (that requires terminator) */
|
||||
+ xx[2] = '\0';
|
||||
+
|
||||
+ for (i = 0; i < 2; i++) {
|
||||
+ c = xx[i] + '.';
|
||||
+ if (c > '9')
|
||||
+ c += 7;
|
||||
+ if (c > 'Z')
|
||||
+ c += 6;
|
||||
+ xx[i] = c;
|
||||
+ }
|
||||
+
|
||||
+ cr = crypt(src, xx);
|
||||
+ bzero(encd, WNN_PASSWD_LEN);
|
||||
+ strncpy(encd, cr, WNN_PASSWD_LEN);
|
||||
}
|
||||
|
||||
JS_STATIC int
|
||||
-check_pwd (char* src, char* encd)
|
||||
+check_pwd(char* src, char* encd)
|
||||
{
|
||||
- if (strcmp (encd, "") == 0)
|
||||
- return (1); /* No passwd */
|
||||
- return (!strncmp (encd, crypt (src, encd), WNN_PASSWD_LEN));
|
||||
+ if (strcmp (encd, "") == 0)
|
||||
+ /* No passwd */
|
||||
+ return (1);
|
||||
+
|
||||
+ return (!strncmp(encd, crypt(src, encd), WNN_PASSWD_LEN));
|
||||
}
|
173
japanese/FreeWnn-server/files/patch-Wnn-etc-py_table.c
Normal file
173
japanese/FreeWnn-server/files/patch-Wnn-etc-py_table.c
Normal file
@ -0,0 +1,173 @@
|
||||
Index: Wnn/etc/py_table.c
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/etc/py_table.c,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/etc/py_table.c 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/etc/py_table.c 20 Dec 2008 15:22:40 -0000 1.2
|
||||
@@ -5,7 +5,7 @@
|
||||
/*
|
||||
* FreeWnn is a network-extensible Kana-to-Kanji conversion system.
|
||||
* This file is part of FreeWnn.
|
||||
- *
|
||||
+ *
|
||||
* Copyright Kyoto University Research Institute for Mathematical Sciences
|
||||
* 1987, 1988, 1989, 1990, 1991, 1992
|
||||
* Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999
|
||||
@@ -39,87 +39,83 @@
|
||||
|
||||
/* pyshengmu_tbl[]: ShengMu table of Chinese PinYin */
|
||||
char *py_shengmu_tbl[PY_NUM_SHENGMU] = {
|
||||
-
|
||||
- "", "B", "C", "Ch", "D",
|
||||
- "F", "G", "H", "J", "K",
|
||||
- "L", "M", "N", "P", "Q",
|
||||
- "R", "S", "Sh", "T", "W",
|
||||
- "X", "Y", "Z", "Zh"
|
||||
+ "", "B", "C", "Ch", "D",
|
||||
+ "F", "G", "H", "J", "K",
|
||||
+ "L", "M", "N", "P", "Q",
|
||||
+ "R", "S", "Sh", "T", "W",
|
||||
+ "X", "Y", "Z", "Zh"
|
||||
};
|
||||
|
||||
/* py_yunmu_tbl[]: YunMu table of Chinese ZhuYin */
|
||||
char *py_yunmu_tbl[PY_NUM_YUNMU * 5] = {
|
||||
-
|
||||
- "ŽÀ", "ŽÀ", "ŽÀ", "ŽÀ", "ŽÀ",
|
||||
- "aŽÀ", "Ž¡ŽÀ", "Ž¢ŽÀ", "Ž£ŽÀ", "Ž¤ŽÀ",
|
||||
- "aiŽÀ", "Ž¡iŽÀ", "Ž¢iŽÀ", "Ž£iŽÀ", "Ž¤iŽÀ",
|
||||
- "anŽÀ", "Ž¡nŽÀ", "Ž¢nŽÀ", "Ž£nŽÀ", "Ž¤nŽÀ",
|
||||
- "angŽÀ", "Ž¡ngŽÀ", "Ž¢ngŽÀ", "Ž£ngŽÀ", "Ž¤ngŽÀ",
|
||||
- "aoŽÀ", "Ž¡oŽÀ", "Ž¢oŽÀ", "Ž£oŽÀ", "Ž¤oŽÀ",
|
||||
- "eŽÀ", "Ž¥ŽÀ", "Ž¦ŽÀ", "Ž§ŽÀ", "Ž¨ŽÀ",
|
||||
- "eiŽÀ", "Ž¥iŽÀ", "Ž¦iŽÀ", "Ž§iŽÀ", "Ž¨iŽÀ",
|
||||
- "enŽÀ", "Ž¥nŽÀ", "Ž¦nŽÀ", "Ž§nŽÀ", "Ž¨nŽÀ",
|
||||
- "engŽÀ", "Ž¥ngŽÀ", "Ž¦ngŽÀ", "Ž§ngŽÀ", "Ž¨ngŽÀ",
|
||||
- "erŽÀ", "Ž¥rŽÀ", "Ž¦rŽÀ", "Ž§rŽÀ", "Ž¨rŽÀ",
|
||||
- "iŽÀ", "Ž©ŽÀ", "ŽªŽÀ", "Ž«ŽÀ", "Ž¬ŽÀ",
|
||||
- "iaŽÀ", "iŽ¡ŽÀ", "iŽ¢ŽÀ", "iŽ£ŽÀ", "iŽ¤ŽÀ",
|
||||
- "ianŽÀ", "iŽ¡nŽÀ", "iŽ¢nŽÀ", "iŽ£nŽÀ", "iŽ¤nŽÀ",
|
||||
- "iangŽÀ", "iŽ¡ngŽÀ", "iŽ¢ngŽÀ", "iŽ£ngŽÀ", "iŽ¤ngŽÀ",
|
||||
- "iaoŽÀ", "iŽ¡oŽÀ", "iŽ¢oŽÀ", "iŽ£oŽÀ", "iŽ¤oŽÀ",
|
||||
- "ieŽÀ", "iŽ¥ŽÀ", "iŽ¦ŽÀ", "iŽ§ŽÀ", "iŽ¨ŽÀ",
|
||||
- "inŽÀ", "Ž©nŽÀ", "ŽªnŽÀ", "Ž«nŽÀ", "Ž¬nŽÀ",
|
||||
- "ingŽÀ", "Ž©ngŽÀ", "ŽªngŽÀ", "Ž«ngŽÀ", "Ž¬ngŽÀ",
|
||||
- "iongŽÀ", "iŽngŽÀ", "iŽ®ngŽÀ", "iŽ¯ngŽÀ", "iŽ°ngŽÀ",
|
||||
- "iuŽÀ", "iŽ±ŽÀ", "iŽ²ŽÀ", "iŽ³ŽÀ", "iŽ´ŽÀ",
|
||||
- "mŽÀ", "mŽÀ", "mŽÀ", "mŽÀ", "mŽÀ",
|
||||
- "nŽÀ", "nŽÀ", "Ž½ŽÀ", "Ž¾ŽÀ", "Ž¿ŽÀ",
|
||||
- "ngŽÀ", "ngŽÀ", "ngŽÀ", "ngŽÀ", "ngŽÀ",
|
||||
- "oŽÀ", "ŽŽÀ", "Ž®ŽÀ", "Ž¯ŽÀ", "Ž°ŽÀ",
|
||||
- "ongŽÀ", "ŽngŽÀ", "Ž®ngŽÀ", "Ž¯ngŽÀ", "Ž°ngŽÀ",
|
||||
- "ouŽÀ", "ŽuŽÀ", "Ž®uŽÀ", "Ž¯uŽÀ", "Ž°uŽÀ",
|
||||
- "uŽÀ", "Ž±ŽÀ", "Ž²ŽÀ", "Ž³ŽÀ", "Ž´ŽÀ",
|
||||
- "uaŽÀ", "uŽ¡ŽÀ", "uŽ¢ŽÀ", "uŽ£ŽÀ", "uŽ¤ŽÀ",
|
||||
- "uaiŽÀ", "uŽ¡iŽÀ", "uŽ¢iŽÀ", "uŽ£iŽÀ", "uŽ¤iŽÀ",
|
||||
- "uanŽÀ", "uŽ¡nŽÀ", "uŽ¢nŽÀ", "uŽ£nŽÀ", "uŽ¤nŽÀ",
|
||||
- "uangŽÀ", "uŽ¡ngŽÀ", "uŽ¢ngŽÀ", "uŽ£ngŽÀ", "uŽ¤ngŽÀ",
|
||||
- "ueŽÀ", "uŽ¥ŽÀ", "uŽ¦ŽÀ", "uŽ§ŽÀ", "uŽ¨ŽÀ",
|
||||
- "uiŽÀ", "uŽ©ŽÀ", "uŽªŽÀ", "uŽ«ŽÀ", "uŽ¬ŽÀ",
|
||||
- "unŽÀ", "Ž±nŽÀ", "Ž²nŽÀ", "Ž³nŽÀ", "Ž´nŽÀ",
|
||||
- "uoŽÀ", "uŽŽÀ", "uŽ®ŽÀ", "uŽ¯ŽÀ", "uŽ°ŽÀ",
|
||||
- "Ž¹ŽÀ", "ŽµŽÀ", "Ž¶ŽÀ", "Ž·ŽÀ", "Ž¸ŽÀ",
|
||||
- "Ž¹eŽÀ", "Ž¹Ž¥ŽÀ", "Ž¹Ž¦ŽÀ", "Ž¹Ž§ŽÀ", "Ž¹Ž¨ŽÀ",
|
||||
- "0ŽÀ", "1ŽÀ", "2ŽÀ", "3ŽÀ", "4ŽÀ", /* for undefinited YunMu */
|
||||
+ "ŽÀ", "ŽÀ", "ŽÀ", "ŽÀ", "ŽÀ",
|
||||
+ "aŽÀ", "Ž¡ŽÀ", "Ž¢ŽÀ", "Ž£ŽÀ", "Ž¤ŽÀ",
|
||||
+ "aiŽÀ", "Ž¡iŽÀ", "Ž¢iŽÀ", "Ž£iŽÀ", "Ž¤iŽÀ",
|
||||
+ "anŽÀ", "Ž¡nŽÀ", "Ž¢nŽÀ", "Ž£nŽÀ", "Ž¤nŽÀ",
|
||||
+ "angŽÀ", "Ž¡ngŽÀ", "Ž¢ngŽÀ", "Ž£ngŽÀ", "Ž¤ngŽÀ",
|
||||
+ "aoŽÀ", "Ž¡oŽÀ", "Ž¢oŽÀ", "Ž£oŽÀ", "Ž¤oŽÀ",
|
||||
+ "eŽÀ", "Ž¥ŽÀ", "Ž¦ŽÀ", "Ž§ŽÀ", "Ž¨ŽÀ",
|
||||
+ "eiŽÀ", "Ž¥iŽÀ", "Ž¦iŽÀ", "Ž§iŽÀ", "Ž¨iŽÀ",
|
||||
+ "enŽÀ", "Ž¥nŽÀ", "Ž¦nŽÀ", "Ž§nŽÀ", "Ž¨nŽÀ",
|
||||
+ "engŽÀ", "Ž¥ngŽÀ", "Ž¦ngŽÀ", "Ž§ngŽÀ", "Ž¨ngŽÀ",
|
||||
+ "erŽÀ", "Ž¥rŽÀ", "Ž¦rŽÀ", "Ž§rŽÀ", "Ž¨rŽÀ",
|
||||
+ "iŽÀ", "Ž©ŽÀ", "ŽªŽÀ", "Ž«ŽÀ", "Ž¬ŽÀ",
|
||||
+ "iaŽÀ", "iŽ¡ŽÀ", "iŽ¢ŽÀ", "iŽ£ŽÀ", "iŽ¤ŽÀ",
|
||||
+ "ianŽÀ", "iŽ¡nŽÀ", "iŽ¢nŽÀ", "iŽ£nŽÀ", "iŽ¤nŽÀ",
|
||||
+ "iangŽÀ", "iŽ¡ngŽÀ", "iŽ¢ngŽÀ", "iŽ£ngŽÀ", "iŽ¤ngŽÀ",
|
||||
+ "iaoŽÀ", "iŽ¡oŽÀ", "iŽ¢oŽÀ", "iŽ£oŽÀ", "iŽ¤oŽÀ",
|
||||
+ "ieŽÀ", "iŽ¥ŽÀ", "iŽ¦ŽÀ", "iŽ§ŽÀ", "iŽ¨ŽÀ",
|
||||
+ "inŽÀ", "Ž©nŽÀ", "ŽªnŽÀ", "Ž«nŽÀ", "Ž¬nŽÀ",
|
||||
+ "ingŽÀ", "Ž©ngŽÀ", "ŽªngŽÀ", "Ž«ngŽÀ", "Ž¬ngŽÀ",
|
||||
+ "iongŽÀ", "iŽngŽÀ", "iŽ®ngŽÀ", "iŽ¯ngŽÀ", "iŽ°ngŽÀ",
|
||||
+ "iuŽÀ", "iŽ±ŽÀ", "iŽ²ŽÀ", "iŽ³ŽÀ", "iŽ´ŽÀ",
|
||||
+ "mŽÀ", "mŽÀ", "mŽÀ", "mŽÀ", "mŽÀ",
|
||||
+ "nŽÀ", "nŽÀ", "Ž½ŽÀ", "Ž¾ŽÀ", "Ž¿ŽÀ",
|
||||
+ "ngŽÀ", "ngŽÀ", "ngŽÀ", "ngŽÀ", "ngŽÀ",
|
||||
+ "oŽÀ", "ŽŽÀ", "Ž®ŽÀ", "Ž¯ŽÀ", "Ž°ŽÀ",
|
||||
+ "ongŽÀ", "ŽngŽÀ", "Ž®ngŽÀ", "Ž¯ngŽÀ", "Ž°ngŽÀ",
|
||||
+ "ouŽÀ", "ŽuŽÀ", "Ž®uŽÀ", "Ž¯uŽÀ", "Ž°uŽÀ",
|
||||
+ "uŽÀ", "Ž±ŽÀ", "Ž²ŽÀ", "Ž³ŽÀ", "Ž´ŽÀ",
|
||||
+ "uaŽÀ", "uŽ¡ŽÀ", "uŽ¢ŽÀ", "uŽ£ŽÀ", "uŽ¤ŽÀ",
|
||||
+ "uaiŽÀ", "uŽ¡iŽÀ", "uŽ¢iŽÀ", "uŽ£iŽÀ", "uŽ¤iŽÀ",
|
||||
+ "uanŽÀ", "uŽ¡nŽÀ", "uŽ¢nŽÀ", "uŽ£nŽÀ", "uŽ¤nŽÀ",
|
||||
+ "uangŽÀ", "uŽ¡ngŽÀ", "uŽ¢ngŽÀ", "uŽ£ngŽÀ", "uŽ¤ngŽÀ",
|
||||
+ "ueŽÀ", "uŽ¥ŽÀ", "uŽ¦ŽÀ", "uŽ§ŽÀ", "uŽ¨ŽÀ",
|
||||
+ "uiŽÀ", "uŽ©ŽÀ", "uŽªŽÀ", "uŽ«ŽÀ", "uŽ¬ŽÀ",
|
||||
+ "unŽÀ", "Ž±nŽÀ", "Ž²nŽÀ", "Ž³nŽÀ", "Ž´nŽÀ",
|
||||
+ "uoŽÀ", "uŽŽÀ", "uŽ®ŽÀ", "uŽ¯ŽÀ", "uŽ°ŽÀ",
|
||||
+ "Ž¹ŽÀ", "ŽµŽÀ", "Ž¶ŽÀ", "Ž·ŽÀ", "Ž¸ŽÀ",
|
||||
+ "Ž¹eŽÀ", "Ž¹Ž¥ŽÀ", "Ž¹Ž¦ŽÀ", "Ž¹Ž§ŽÀ", "Ž¹Ž¨ŽÀ",
|
||||
+ "0ŽÀ", "1ŽÀ", "2ŽÀ", "3ŽÀ", "4ŽÀ", /* for undefinited YunMu */
|
||||
};
|
||||
|
||||
-
|
||||
/* pinyin_tbl: size is NUM_SHENGMU*NUM_YUNMU, including empty ShengMu */
|
||||
/* and empty YunMu , and undefinited YunMu'-' */
|
||||
|
||||
int pinyin_tbl[PY_NUM_SHENGMU * PY_NUM_YUNMU] = {
|
||||
-
|
||||
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
- 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
|
||||
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1,
|
||||
- 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1,
|
||||
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1,
|
||||
- 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
|
||||
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1,
|
||||
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1,
|
||||
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1,
|
||||
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1,
|
||||
- 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1,
|
||||
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
|
||||
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1,
|
||||
- 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
|
||||
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1,
|
||||
- 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1,
|
||||
- 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1,
|
||||
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1,
|
||||
- 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1,
|
||||
- 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
|
||||
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1,
|
||||
- 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1,
|
||||
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1,
|
||||
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
+ 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1,
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1,
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1,
|
||||
+ 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1,
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1,
|
||||
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1,
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1,
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1,
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1,
|
||||
+ 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
|
||||
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1,
|
||||
+ 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1,
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1,
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1,
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1,
|
||||
+ 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
|
||||
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1,
|
||||
+ 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1,
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1,
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1
|
||||
};
|
||||
#endif /* CHINESE */
|
687
japanese/FreeWnn-server/files/patch-Wnn-etc-revdic.c
Normal file
687
japanese/FreeWnn-server/files/patch-Wnn-etc-revdic.c
Normal file
@ -0,0 +1,687 @@
|
||||
Index: Wnn/etc/revdic.c
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/etc/revdic.c,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/etc/revdic.c 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/etc/revdic.c 20 Dec 2008 15:22:40 -0000 1.2
|
||||
@@ -5,7 +5,7 @@
|
||||
/*
|
||||
* FreeWnn is a network-extensible Kana-to-Kanji conversion system.
|
||||
* This file is part of FreeWnn.
|
||||
- *
|
||||
+ *
|
||||
* Copyright Kyoto University Research Institute for Mathematical Sciences
|
||||
* 1987, 1988, 1989, 1990, 1991, 1992
|
||||
* Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999
|
||||
@@ -35,13 +35,11 @@
|
||||
#include "jh.h"
|
||||
#include "jdata.h"
|
||||
|
||||
-
|
||||
#ifndef min
|
||||
#define min(a, b) ((a > b)? b:a)
|
||||
#define max(a, b) ((a < b)? b:a)
|
||||
#endif
|
||||
|
||||
-
|
||||
/*
|
||||
* rev_ud_hontai(hostart, maxhontai)
|
||||
* rev_ud_table(tary, maxtable)
|
||||
@@ -51,96 +49,81 @@
|
||||
|
||||
static int tmptmp;
|
||||
|
||||
-#define rev_int(x) (tmptmp = *(x), *(x) = ((tmptmp >> 24) & 0xff) | \
|
||||
- (((tmptmp >> 16) & 0xff) << 8) | \
|
||||
- (((tmptmp >> 8) & 0xff) << 16) | \
|
||||
- (((tmptmp & 0xff) << 24)))
|
||||
+#define rev_int(x) (tmptmp = *(x), *(x) = ((tmptmp >> 24) & 0xff) | \
|
||||
+ (((tmptmp >> 16) & 0xff) << 8) | \
|
||||
+ (((tmptmp >> 8) & 0xff) << 16) | \
|
||||
+ (((tmptmp & 0xff) << 24)))
|
||||
|
||||
#define rev_short(x) (tmptmp = *(x), *(x) = ((tmptmp >> 8) & 0xff) | \
|
||||
- ((tmptmp & 0xff) << 8))
|
||||
+ ((tmptmp & 0xff) << 8))
|
||||
|
||||
#define rev_int_org(x) (tmptmp = *(x), *(x) = ((tmptmp >> 24) & 0xff) | \
|
||||
- (((tmptmp >> 16) & 0xff) << 8) | \
|
||||
- (((tmptmp >> 8) & 0xff) << 16) | \
|
||||
- ((tmptmp & 0xff) << 24), tmptmp)
|
||||
+ (((tmptmp >> 16) & 0xff) << 8) | \
|
||||
+ (((tmptmp >> 8) & 0xff) << 16) | \
|
||||
+ ((tmptmp & 0xff) << 24), tmptmp)
|
||||
|
||||
#define rev_short_org(x) (tmptmp = *(x), *(x) = ((tmptmp >> 8) & 0xff) | \
|
||||
- ((tmptmp & 0xff) << 8), tmptmp)
|
||||
+ ((tmptmp & 0xff) << 8), tmptmp)
|
||||
|
||||
+void
|
||||
+rev_ud_hontai(UCHAR *hostart,
|
||||
+ int maxhontai,
|
||||
+ int match /* whether the cpu type match the dictionary */
|
||||
+ )
|
||||
+{
|
||||
+ UCHAR *hoend = hostart + maxhontai;
|
||||
+ struct uind2 *hop, *hop1;
|
||||
+ int k;
|
||||
+ int len;
|
||||
+
|
||||
+ /* Skip first 4 bytes for some reason. (cf. ujistoud() in atod.c) */
|
||||
+ for (hop = (struct uind2 *)((int *) hostart + 1); (UCHAR *) hop < hoend;) {
|
||||
+ rev_int(&(hop->next));
|
||||
+ rev_int(&(hop->serial));
|
||||
+ rev_int(&(hop->kanjipter));
|
||||
+ rev_short(&(hop->kosuu));
|
||||
+
|
||||
+ if (match) {
|
||||
+ len = hop->yomi[0];
|
||||
+ hop1 = (struct uind2 *)(AL_INT (&(hop->yomi[0]) + 1 + max((len - 4), 0)));
|
||||
+ rev_short(&(hop->yomi[0]));
|
||||
+ for (k = 0; k < len - 4; k++)
|
||||
+ rev_short(&(hop->yomi[k + 1]));
|
||||
+ hop = hop1;
|
||||
+ } else {
|
||||
+ rev_short(&(hop->yomi[0]));
|
||||
+ len = hop->yomi[0];
|
||||
+ for (k = 0; k < len - 4; k++)
|
||||
+ rev_short(&(hop->yomi[k + 1]));
|
||||
+ hop = (struct uind2 *)(AL_INT (&(hop->yomi[0]) + 1 + max((len - 4), 0)));
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
|
||||
+void
|
||||
+rev_ud_table(struct uind1 *tary,
|
||||
+ int maxtable,
|
||||
+ int match)
|
||||
+{
|
||||
+ int k;
|
||||
+
|
||||
+ for (k = 0; k < maxtable; k++) {
|
||||
+ rev_int(&(tary[k].pter1));
|
||||
+ rev_int(&(tary[k].pter));
|
||||
+ rev_int(&(tary[k].yomi1));
|
||||
+ rev_int(&(tary[k].yomi2));
|
||||
+ }
|
||||
+}
|
||||
|
||||
void
|
||||
-rev_ud_hontai (hostart, maxhontai, match)
|
||||
- UCHAR *hostart;
|
||||
- int maxhontai;
|
||||
- int match; /* whether the cpu type match the dictionary */
|
||||
-{
|
||||
- UCHAR *hoend = hostart + maxhontai;
|
||||
- struct uind2 *hop, *hop1;
|
||||
- int k;
|
||||
- int len;
|
||||
-
|
||||
- /* Skip first 4 bytes for some reason. (cf. ujistoud() in atod.c) */
|
||||
- for (hop = (struct uind2 *)((int *) hostart + 1); (UCHAR *) hop < hoend;)
|
||||
- {
|
||||
- rev_int (&(hop->next));
|
||||
- rev_int (&(hop->serial));
|
||||
- rev_int (&(hop->kanjipter));
|
||||
- rev_short (&(hop->kosuu));
|
||||
- if (match)
|
||||
- {
|
||||
- len = hop->yomi[0];
|
||||
- hop1 = (struct uind2 *) (AL_INT (&(hop->yomi[0]) + 1 + max ((len - 4), 0)));
|
||||
- rev_short (&(hop->yomi[0]));
|
||||
- for (k = 0; k < len - 4; k++)
|
||||
- {
|
||||
- rev_short (&(hop->yomi[k + 1]));
|
||||
- }
|
||||
- hop = hop1;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- rev_short (&(hop->yomi[0]));
|
||||
- len = hop->yomi[0];
|
||||
- for (k = 0; k < len - 4; k++)
|
||||
- {
|
||||
- rev_short (&(hop->yomi[k + 1]));
|
||||
- }
|
||||
- hop = (struct uind2 *) (AL_INT (&(hop->yomi[0]) + 1 + max ((len - 4), 0)));
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-
|
||||
-void
|
||||
-rev_ud_table (tary, maxtable, match)
|
||||
- struct uind1 *tary;
|
||||
- int maxtable;
|
||||
- int match;
|
||||
-{
|
||||
- int k;
|
||||
-
|
||||
- for (k = 0; k < maxtable; k++)
|
||||
- {
|
||||
- rev_int (&(tary[k].pter1));
|
||||
- rev_int (&(tary[k].pter));
|
||||
- rev_int (&(tary[k].yomi1));
|
||||
- rev_int (&(tary[k].yomi2));
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-void
|
||||
-rev_hinsi (hinsi, maxserial, match)
|
||||
- unsigned short *hinsi;
|
||||
- int maxserial;
|
||||
- int match;
|
||||
-{
|
||||
- int k;
|
||||
-
|
||||
- for (k = 0; k < maxserial; k++)
|
||||
- {
|
||||
- rev_short (&(hinsi[k]));
|
||||
- }
|
||||
+rev_hinsi(unsigned short *hinsi,
|
||||
+ int maxserial,
|
||||
+ int match)
|
||||
+{
|
||||
+ int k;
|
||||
+
|
||||
+ for (k = 0; k < maxserial; k++)
|
||||
+ rev_short(&(hinsi[k]));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -154,200 +137,183 @@ void travel_next_nodes ();
|
||||
void rev_sd_node ();
|
||||
|
||||
void
|
||||
-rev_sd_hontai0 (hopter, hostart, match)
|
||||
- UCHAR *hostart;
|
||||
- UCHAR *hopter;
|
||||
- int match;
|
||||
-{
|
||||
- if (match)
|
||||
- {
|
||||
- travel_next_nodes (hopter, hostart, match);
|
||||
- rev_sd_node (hopter, hostart, match);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- rev_sd_node (hopter, hostart, match);
|
||||
- travel_next_nodes (hopter, hostart, match);
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-void
|
||||
-rev_sd_hontai (hostart, match)
|
||||
- UCHAR *hostart;
|
||||
- int match;
|
||||
-{
|
||||
- rev_sd_hontai0 (hostart, hostart, match);
|
||||
-}
|
||||
-
|
||||
-void
|
||||
-travel_next_nodes (hopter, hostart, match)
|
||||
- UCHAR *hostart, *hopter;
|
||||
- int match;
|
||||
-{
|
||||
- int k;
|
||||
- int tsize;
|
||||
- w_char *charst;
|
||||
- w_char *sumst;
|
||||
- int *ptrst;
|
||||
-
|
||||
- switch (*(unsigned short *) hopter)
|
||||
- {
|
||||
- case ST_NORMAL:
|
||||
- tsize = *(w_char *) (hopter + 2);
|
||||
- charst = (w_char *) (hopter + 12);
|
||||
- sumst = ((w_char *) charst + tsize + 2); /* + 2 keeps two zero words */
|
||||
- ptrst = (int *) ((w_char *) sumst + tsize);
|
||||
- for (k = 0; k < tsize; k++)
|
||||
- {
|
||||
- if (ptrst[k] != ENDPTR)
|
||||
- {
|
||||
- rev_sd_hontai0 (hostart + ptrst[k], hostart, match);
|
||||
- }
|
||||
- }
|
||||
- break;
|
||||
- case ST_NOPTER:
|
||||
- break;
|
||||
- case ST_NOENT:
|
||||
- tsize = *(w_char *) (hopter + 2);
|
||||
- charst = (w_char *) (hopter + 4);
|
||||
- ptrst = (int *) AL_INT ((w_char *) charst + tsize);
|
||||
- for (k = 0; k < tsize; k++)
|
||||
- {
|
||||
- rev_sd_hontai0 (hostart + ptrst[k], hostart, match);
|
||||
- }
|
||||
- break;
|
||||
- case ST_SMALL:
|
||||
- rev_sd_hontai0 (hopter + 4, hostart, match);
|
||||
- break;
|
||||
- }
|
||||
+rev_sd_hontai0(UCHAR *hopter,
|
||||
+ UCHAR *hostart,
|
||||
+ int match)
|
||||
+{
|
||||
+ if (match) {
|
||||
+ travel_next_nodes(hopter, hostart, match);
|
||||
+ rev_sd_node(hopter, hostart, match);
|
||||
+ } else {
|
||||
+ rev_sd_node(hopter, hostart, match);
|
||||
+ travel_next_nodes(hopter, hostart, match);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+rev_sd_hontai(UCHAR *hostart,
|
||||
+ int match)
|
||||
+{
|
||||
+ rev_sd_hontai0(hostart, hostart, match);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+travel_next_nodes(UCHAR *hopter,
|
||||
+ UCHAR *hostart,
|
||||
+ int match)
|
||||
+{
|
||||
+ int k;
|
||||
+ int tsize;
|
||||
+ w_char *charst;
|
||||
+ w_char *sumst;
|
||||
+ int *ptrst;
|
||||
+
|
||||
+ switch (*(unsigned short *)hopter) {
|
||||
+ case ST_NORMAL:
|
||||
+ tsize = *(w_char *)(hopter + 2);
|
||||
+ charst = (w_char *)(hopter + 12);
|
||||
+ sumst = ((w_char *)charst + tsize + 2); /* + 2 keeps two zero words */
|
||||
+ ptrst = (int *)((w_char *)sumst + tsize);
|
||||
+
|
||||
+ for (k = 0; k < tsize; k++) {
|
||||
+ if (ptrst[k] != ENDPTR)
|
||||
+ rev_sd_hontai0(hostart + ptrst[k], hostart, match);
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ case ST_NOPTER:
|
||||
+ break;
|
||||
+ case ST_NOENT:
|
||||
+ tsize = *(w_char *)(hopter + 2);
|
||||
+ charst = (w_char *)(hopter + 4);
|
||||
+ ptrst = (int *)AL_INT((w_char *)charst + tsize);
|
||||
+
|
||||
+ for (k = 0; k < tsize; k++)
|
||||
+ rev_sd_hontai0(hostart + ptrst[k], hostart, match);
|
||||
+ break;
|
||||
+ case ST_SMALL:
|
||||
+ rev_sd_hontai0(hopter + 4, hostart, match);
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
|
||||
#define rev_if_short(x) (match? rev_short_org(x): rev_short(x))
|
||||
#define rev_if_int(x) (match? rev_int_org(x): rev_int(x))
|
||||
|
||||
void
|
||||
-rev_sd_node (hopter, hostart, match)
|
||||
- UCHAR *hostart, *hopter;
|
||||
- int match;
|
||||
-{
|
||||
- /* whether current state of dict matches the cpu type of the machine */
|
||||
- int k;
|
||||
- int tsize;
|
||||
- w_char *charst;
|
||||
- w_char *sumst;
|
||||
- int *ptrst;
|
||||
- int state;
|
||||
-
|
||||
- state = rev_if_short ((unsigned short *) hopter);
|
||||
- switch (state)
|
||||
- {
|
||||
- case ST_NORMAL:
|
||||
- case ST_NOPTER:
|
||||
- tsize = rev_if_short ((w_char *) (hopter + 2));
|
||||
- rev_int ((int *) (hopter + 4));
|
||||
- rev_int ((int *) (hopter + 8));
|
||||
- charst = (w_char *) (hopter + 12);
|
||||
- sumst = ((w_char *) charst + tsize + 2); /* + 2 keeps two zero words */
|
||||
- ptrst = (int *) ((w_char *) sumst + tsize);
|
||||
- for (k = 0; k < tsize; k++)
|
||||
- {
|
||||
- rev_short (charst + k);
|
||||
- rev_short (sumst + k);
|
||||
- }
|
||||
- if (state == ST_NORMAL)
|
||||
- {
|
||||
- for (k = 0; k < tsize; k++)
|
||||
- {
|
||||
- rev_int (ptrst + k);
|
||||
- }
|
||||
- }
|
||||
- break;
|
||||
- case ST_NOENT:
|
||||
- tsize = rev_if_short ((w_char *) (hopter + 2));
|
||||
- charst = (w_char *) (hopter + 4);
|
||||
- ptrst = (int *) AL_INT ((w_char *) charst + tsize);
|
||||
- for (k = 0; k < tsize; k++)
|
||||
- {
|
||||
- rev_short (charst + k);
|
||||
- rev_int (ptrst + k);
|
||||
- }
|
||||
- break;
|
||||
- case ST_SMALL:
|
||||
- rev_short ((unsigned short *) (hopter + 2));
|
||||
- break;
|
||||
- }
|
||||
+rev_sd_node(UCHAR *hopter,
|
||||
+ UCHAR *hostart,
|
||||
+ int match)
|
||||
+{
|
||||
+ /* whether current state of dict matches the cpu type of the machine */
|
||||
+ int k;
|
||||
+ int tsize;
|
||||
+ w_char *charst;
|
||||
+ w_char *sumst;
|
||||
+ int *ptrst;
|
||||
+ int state;
|
||||
+
|
||||
+ state = rev_if_short((unsigned short *) hopter);
|
||||
+
|
||||
+ switch (state) {
|
||||
+ case ST_NORMAL:
|
||||
+ case ST_NOPTER:
|
||||
+ tsize = rev_if_short((w_char *)(hopter + 2));
|
||||
+ rev_int((int *)(hopter + 4));
|
||||
+ rev_int((int *)(hopter + 8));
|
||||
+ charst = (w_char *)(hopter + 12);
|
||||
+ sumst = ((w_char *)charst + tsize + 2); /* + 2 keeps two zero words */
|
||||
+ ptrst = (int *)((w_char *)sumst + tsize);
|
||||
+
|
||||
+ for (k = 0; k < tsize; k++) {
|
||||
+ rev_short(charst + k);
|
||||
+ rev_short(sumst + k);
|
||||
+ }
|
||||
+
|
||||
+ if (state == ST_NORMAL) {
|
||||
+ for (k = 0; k < tsize; k++)
|
||||
+ rev_int (ptrst + k);
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ case ST_NOENT:
|
||||
+ tsize = rev_if_short((w_char *)(hopter + 2));
|
||||
+ charst = (w_char *)(hopter + 4);
|
||||
+ ptrst = (int *)AL_INT((w_char *)charst + tsize);
|
||||
+
|
||||
+ for (k = 0; k < tsize; k++) {
|
||||
+ rev_short(charst + k);
|
||||
+ rev_int(ptrst + k);
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ case ST_SMALL:
|
||||
+ rev_short((unsigned short *)(hopter + 2));
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
|
||||
-
|
||||
int
|
||||
-little_endian ()
|
||||
+little_endian()
|
||||
{
|
||||
- int a = 1;
|
||||
+ int a = 1;
|
||||
#ifdef BYTE_SWAP
|
||||
- return (1);
|
||||
+ return (1);
|
||||
#else
|
||||
- return (*(char *) &a == 1);
|
||||
+ return (*(char *) &a == 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
-rev_rd_rind1 (ri1, maxri1, match)
|
||||
- struct rind1 *ri1;
|
||||
- int maxri1;
|
||||
- int match;
|
||||
-{
|
||||
- int k;
|
||||
-
|
||||
- for (k = 0; k < maxri1; k++)
|
||||
- {
|
||||
- rev_int (&(ri1[k].pter1));
|
||||
- rev_int (&(ri1[k].pter));
|
||||
- }
|
||||
+rev_rd_rind1(struct rind1 *ri1,
|
||||
+ int maxri1,
|
||||
+ int match)
|
||||
+{
|
||||
+ int k;
|
||||
+
|
||||
+ for (k = 0; k < maxri1; k++) {
|
||||
+ rev_int(&(ri1[k].pter1));
|
||||
+ rev_int(&(ri1[k].pter));
|
||||
+ }
|
||||
}
|
||||
|
||||
void
|
||||
-rev_rd_rind2 (ri2, maxri2, match)
|
||||
- struct rind2 *ri2;
|
||||
- int maxri2;
|
||||
- int match;
|
||||
-{
|
||||
- int k;
|
||||
-
|
||||
- for (k = 0; k < maxri2; k++)
|
||||
- {
|
||||
- rev_int (&(ri2[k].kanjipter));
|
||||
- rev_int (&(ri2[k].next[D_YOMI]));
|
||||
- rev_int (&(ri2[k].next[D_KANJI]));
|
||||
- }
|
||||
+rev_rd_rind2(struct rind2 *ri2,
|
||||
+ int maxri2,
|
||||
+ int match)
|
||||
+{
|
||||
+ int k;
|
||||
+
|
||||
+ for (k = 0; k < maxri2; k++) {
|
||||
+ rev_int(&(ri2[k].kanjipter));
|
||||
+ rev_int(&(ri2[k].next[D_YOMI]));
|
||||
+ rev_int(&(ri2[k].next[D_KANJI]));
|
||||
+ }
|
||||
}
|
||||
|
||||
void rev_w_char ();
|
||||
|
||||
void
|
||||
-rev_kanji (kpter, maxk, match)
|
||||
- UCHAR *kpter;
|
||||
- int maxk;
|
||||
- int match;
|
||||
-{
|
||||
- UCHAR *kend = kpter + maxk;
|
||||
-
|
||||
- while (kpter < kend && *kpter)
|
||||
- {
|
||||
- rev_w_char ((w_char *) (kpter + 2), *kpter / 2 - 1);
|
||||
- kpter += *kpter;
|
||||
- }
|
||||
+rev_kanji(UCHAR *kpter,
|
||||
+ int maxk,
|
||||
+ int match)
|
||||
+{
|
||||
+ UCHAR *kend = kpter + maxk;
|
||||
+
|
||||
+ while (kpter < kend && *kpter) {
|
||||
+ rev_w_char((w_char *)(kpter + 2), *kpter / 2 - 1);
|
||||
+ kpter += *kpter;
|
||||
+ }
|
||||
}
|
||||
|
||||
void
|
||||
-rev_w_char (p, maxp)
|
||||
- w_char *p;
|
||||
- int maxp;
|
||||
-{
|
||||
- for (; maxp > 0; maxp--)
|
||||
- {
|
||||
- rev_short (p);
|
||||
- p++;
|
||||
- }
|
||||
+rev_w_char(w_char *p,
|
||||
+ int maxp)
|
||||
+{
|
||||
+ for (; maxp > 0; maxp--) {
|
||||
+ rev_short(p);
|
||||
+ p++;
|
||||
+ }
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -357,87 +323,78 @@ rev_w_char (p, maxp)
|
||||
*/
|
||||
|
||||
int
|
||||
-revdic (jtl, match)
|
||||
- struct JT *jtl;
|
||||
- int match;
|
||||
-{
|
||||
- extern int rev_ud (), rev_rd (), rev_sd ();
|
||||
- int syurui = jtl->syurui;
|
||||
-
|
||||
- syurui = jtl->syurui & 0xff;
|
||||
-
|
||||
- if (syurui == WNN_UD_DICT)
|
||||
- {
|
||||
- if (rev_ud (jtl, match) == -1)
|
||||
- return (-1);
|
||||
- }
|
||||
- else if (syurui == WNN_REV_DICT)
|
||||
- {
|
||||
- if (rev_rd (jtl, match) == -1)
|
||||
- return (-1);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- if (rev_sd (jtl, match) == -1)
|
||||
- return (-1);
|
||||
- }
|
||||
- return (0);
|
||||
+revdic(struct JT *jtl,
|
||||
+ int match)
|
||||
+{
|
||||
+ extern int rev_ud(), rev_rd(), rev_sd();
|
||||
+ int syurui = jtl->syurui;
|
||||
+
|
||||
+ syurui = jtl->syurui & 0xff;
|
||||
+
|
||||
+ if (syurui == WNN_UD_DICT) {
|
||||
+ if (rev_ud (jtl, match) == -1)
|
||||
+ return (-1);
|
||||
+ } else if (syurui == WNN_REV_DICT) {
|
||||
+ if (rev_rd (jtl, match) == -1)
|
||||
+ return (-1);
|
||||
+ } else {
|
||||
+ if (rev_sd (jtl, match) == -1)
|
||||
+ return (-1);
|
||||
+ }
|
||||
+
|
||||
+ return (0);
|
||||
}
|
||||
|
||||
void rev_common ();
|
||||
|
||||
int
|
||||
-rev_ud (jtl, match)
|
||||
- struct JT *jtl;
|
||||
- int match;
|
||||
-{
|
||||
- rev_common (jtl, match);
|
||||
- rev_ud_hontai (jtl->hontai, jtl->maxhontai, match);
|
||||
- rev_ud_table (jtl->table, jtl->maxtable, match);
|
||||
- return (0);
|
||||
+rev_ud(struct JT *jtl,
|
||||
+ int match)
|
||||
+{
|
||||
+ rev_common(jtl, match);
|
||||
+ rev_ud_hontai(jtl->hontai, jtl->maxhontai, match);
|
||||
+ rev_ud_table(jtl->table, jtl->maxtable, match);
|
||||
+
|
||||
+ return (0);
|
||||
}
|
||||
|
||||
int
|
||||
-rev_sd (jtl, match)
|
||||
- struct JT *jtl;
|
||||
- int match;
|
||||
-{
|
||||
- rev_common (jtl, match);
|
||||
- rev_sd_hontai (jtl->hontai, match);
|
||||
- return (0);
|
||||
+rev_sd(struct JT *jtl,
|
||||
+ int match)
|
||||
+{
|
||||
+ rev_common(jtl, match);
|
||||
+ rev_sd_hontai(jtl->hontai, match);
|
||||
+ return (0);
|
||||
}
|
||||
|
||||
int
|
||||
-rev_rd (jtl, match)
|
||||
- struct JT *jtl;
|
||||
- int match;
|
||||
-{
|
||||
- rev_common (jtl, match);
|
||||
- rev_rd_rind1 (jtl->ri1[D_YOMI], jtl->maxri1[D_YOMI], match);
|
||||
- rev_rd_rind1 (jtl->ri1[D_KANJI], jtl->maxri1[D_KANJI], match);
|
||||
- rev_rd_rind2 (jtl->ri2, jtl->maxri2, match);
|
||||
- return (0);
|
||||
+rev_rd(struct JT *jtl,
|
||||
+ int match)
|
||||
+{
|
||||
+ rev_common(jtl, match);
|
||||
+ rev_rd_rind1(jtl->ri1[D_YOMI], jtl->maxri1[D_YOMI], match);
|
||||
+ rev_rd_rind1(jtl->ri1[D_KANJI], jtl->maxri1[D_KANJI], match);
|
||||
+ rev_rd_rind2(jtl->ri2, jtl->maxri2, match);
|
||||
+ return (0);
|
||||
}
|
||||
|
||||
void
|
||||
-rev_common (jtl, match)
|
||||
- struct JT *jtl;
|
||||
- int match;
|
||||
-{
|
||||
- if (jtl->hinsi)
|
||||
- rev_hinsi (jtl->hinsi, jtl->maxserial, match);
|
||||
- if (jtl->kanji)
|
||||
- rev_kanji (jtl->kanji, jtl->maxkanji, match);
|
||||
- if (jtl->comment)
|
||||
- rev_w_char (jtl->comment, jtl->maxcomment);
|
||||
- if (jtl->hinsi_list)
|
||||
- rev_w_char (jtl->hinsi_list, jtl->maxhinsi_list);
|
||||
+rev_common(struct JT *jtl,
|
||||
+ int match)
|
||||
+{
|
||||
+ if (jtl->hinsi)
|
||||
+ rev_hinsi(jtl->hinsi, jtl->maxserial, match);
|
||||
+ if (jtl->kanji)
|
||||
+ rev_kanji(jtl->kanji, jtl->maxkanji, match);
|
||||
+ if (jtl->comment)
|
||||
+ rev_w_char(jtl->comment, jtl->maxcomment);
|
||||
+ if (jtl->hinsi_list)
|
||||
+ rev_w_char(jtl->hinsi_list, jtl->maxhinsi_list);
|
||||
}
|
||||
|
||||
/* rev_short is called from atod.c.... kanapiiii */
|
||||
void
|
||||
-rev_short_fun (sp)
|
||||
- w_char *sp;
|
||||
+rev_short_fun(w_char *sp)
|
||||
{
|
||||
- rev_short (sp);
|
||||
+ rev_short (sp);
|
||||
}
|
73
japanese/FreeWnn-server/files/patch-Wnn-etc-server_env.c
Normal file
73
japanese/FreeWnn-server/files/patch-Wnn-etc-server_env.c
Normal file
@ -0,0 +1,73 @@
|
||||
Index: Wnn/etc/server_env.c
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/etc/server_env.c,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/etc/server_env.c 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/etc/server_env.c 20 Dec 2008 15:22:40 -0000 1.2
|
||||
@@ -5,7 +5,7 @@
|
||||
/*
|
||||
* FreeWnn is a network-extensible Kana-to-Kanji conversion system.
|
||||
* This file is part of FreeWnn.
|
||||
- *
|
||||
+ *
|
||||
* Copyright Kyoto University Research Institute for Mathematical Sciences
|
||||
* 1987, 1988, 1989, 1990, 1991, 1992
|
||||
* Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999
|
||||
@@ -44,36 +44,31 @@
|
||||
#include "wnn_config.h"
|
||||
#include "wnn_os.h"
|
||||
|
||||
-typedef struct _server_env_struct
|
||||
-{
|
||||
- char *lang;
|
||||
- char *env;
|
||||
-}
|
||||
-server_env_struct;
|
||||
+typedef struct _server_env_struct {
|
||||
+ char *lang;
|
||||
+ char *env;
|
||||
+} server_env_struct;
|
||||
|
||||
static server_env_struct server_env[] = {
|
||||
- {WNN_J_LANG, WNN_JSERVER_ENV},
|
||||
- {WNN_C_LANG, WNN_CSERVER_ENV},
|
||||
- {WNN_K_LANG, WNN_KSERVER_ENV},
|
||||
- {WNN_T_LANG, WNN_TSERVER_ENV},
|
||||
- {NULL, NULL}
|
||||
+ {WNN_J_LANG, WNN_JSERVER_ENV},
|
||||
+ {WNN_C_LANG, WNN_CSERVER_ENV},
|
||||
+ {WNN_K_LANG, WNN_KSERVER_ENV},
|
||||
+ {WNN_T_LANG, WNN_TSERVER_ENV},
|
||||
+ {NULL, NULL}
|
||||
};
|
||||
|
||||
char *
|
||||
-get_server_env (lang)
|
||||
- register char *lang;
|
||||
+get_server_env(register char *lang)
|
||||
{
|
||||
- register server_env_struct *p;
|
||||
+ register server_env_struct *p;
|
||||
+
|
||||
+ if (!lang || !*lang)
|
||||
+ return (NULL);
|
||||
|
||||
- if (!lang || !*lang)
|
||||
- return (NULL);
|
||||
+ for (p = server_env; p->lang; p++) {
|
||||
+ if (!strncmp(lang, p->lang, strlen(lang)))
|
||||
+ return (p->env);
|
||||
+ }
|
||||
|
||||
- for (p = server_env; p->lang; p++)
|
||||
- {
|
||||
- if (!strncmp (lang, p->lang, strlen (lang)))
|
||||
- {
|
||||
- return (p->env);
|
||||
- }
|
||||
- }
|
||||
- return (NULL);
|
||||
+ return (NULL);
|
||||
}
|
142
japanese/FreeWnn-server/files/patch-Wnn-etc-sstrings.c
Normal file
142
japanese/FreeWnn-server/files/patch-Wnn-etc-sstrings.c
Normal file
@ -0,0 +1,142 @@
|
||||
Index: Wnn/etc/sstrings.c
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/etc/sstrings.c,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/etc/sstrings.c 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/etc/sstrings.c 20 Dec 2008 15:22:40 -0000 1.2
|
||||
@@ -5,7 +5,7 @@
|
||||
/*
|
||||
* FreeWnn is a network-extensible Kana-to-Kanji conversion system.
|
||||
* This file is part of FreeWnn.
|
||||
- *
|
||||
+ *
|
||||
* Copyright Kyoto University Research Institute for Mathematical Sciences
|
||||
* 1987, 1988, 1989, 1990, 1991, 1992
|
||||
* Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999
|
||||
@@ -49,77 +49,75 @@ extern int eeuc_to_ieuc ();
|
||||
extern int ieuc_to_eeuc ();
|
||||
|
||||
int
|
||||
-wnn_sStrcpy (c, w)
|
||||
- register char *c;
|
||||
- register w_char *w;
|
||||
+wnn_sStrcpy(register char *c,
|
||||
+ register w_char *w)
|
||||
{
|
||||
- register int ret;
|
||||
+ register int ret;
|
||||
|
||||
- ret = ieuc_to_eeuc (c, w, -1);
|
||||
- c[ret] = '\0';
|
||||
- return (ret);
|
||||
-}
|
||||
+ ret = ieuc_to_eeuc(c, w, -1);
|
||||
+ c[ret] = '\0';
|
||||
|
||||
+ return (ret);
|
||||
+}
|
||||
|
||||
int
|
||||
-wnn_Sstrcpy (w, c)
|
||||
- w_char *w;
|
||||
- unsigned char *c;
|
||||
+wnn_Sstrcpy(w_char *w,
|
||||
+ unsigned char *c)
|
||||
{
|
||||
- register int ret;
|
||||
+ register int ret;
|
||||
|
||||
- ret = eeuc_to_ieuc (w, c, -1) / sizeof (w_char);
|
||||
- w[ret] = (w_char) 0;
|
||||
- return (ret);
|
||||
+ ret = eeuc_to_ieuc(w, c, -1) / sizeof(w_char);
|
||||
+ w[ret] = (w_char)0;
|
||||
+
|
||||
+ return (ret);
|
||||
}
|
||||
|
||||
#ifdef nodef
|
||||
char *
|
||||
-wnn_Stos (c)
|
||||
- w_char *c;
|
||||
+wnn_Stos(cw_char *c)
|
||||
{
|
||||
- char *c1 = (char *) c;
|
||||
- for (; *c; c++)
|
||||
- {
|
||||
- if (ASCIIP (*c))
|
||||
- {
|
||||
- *c1++ = *c;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- *c1++ = (*c << 8);
|
||||
- *c1++ = *c;
|
||||
- }
|
||||
- }
|
||||
- return ((char *) c);
|
||||
+ char *c1 = (char *)c;
|
||||
+
|
||||
+ for (; *c; c++) {
|
||||
+ if (ASCIIP(*c))
|
||||
+ *c1++ = *c;
|
||||
+ else {
|
||||
+ *c1++ = (*c << 8);
|
||||
+ *c1++ = *c;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return ((char *) c);
|
||||
}
|
||||
#endif
|
||||
|
||||
char *
|
||||
-wnn_sStrncpy (s1, s2, n)
|
||||
- register char *s1;
|
||||
- register w_char *s2;
|
||||
- register int n;
|
||||
+wnn_sStrncpy(register char *s1,
|
||||
+ register char *s2,
|
||||
+ register int n)
|
||||
{
|
||||
- eeuc_to_ieuc (s1, s2, n / sizeof (w_char));
|
||||
- return s1;
|
||||
+ eeuc_to_ieuc(s1, s2, n / sizeof(w_char));
|
||||
+
|
||||
+ return s1;
|
||||
}
|
||||
|
||||
#ifdef CHINESE
|
||||
int
|
||||
-wnn_Sstrcat (w, c)
|
||||
- w_char *w;
|
||||
- unsigned char *c;
|
||||
+wnn_Sstrcat(w_char *w,
|
||||
+ unsigned char *c)
|
||||
{
|
||||
- w_char *w0 = w;
|
||||
- register int ret;
|
||||
+ w_char *w0 = w;
|
||||
+ register int ret;
|
||||
+
|
||||
+ if (!c || !*c)
|
||||
+ return (0);
|
||||
+
|
||||
+ for (; *w; w++);
|
||||
+
|
||||
+ ret = eeuc_to_ieuc(w, c, strlen (c)) / sizeof(w_char);
|
||||
+ w[ret] = (w_char)0;
|
||||
+ ret += (w - w0);
|
||||
|
||||
- if (!c || !*c)
|
||||
- return (0);
|
||||
- for (; *w; w++);
|
||||
- ret = eeuc_to_ieuc (w, c, strlen (c)) / sizeof (w_char);
|
||||
- w[ret] = (w_char) 0;
|
||||
- ret += (w - w0);
|
||||
- return (ret);
|
||||
+ return (ret);
|
||||
}
|
||||
#endif
|
@ -6,7 +6,7 @@ diff -N Wnn/include/fake-rfc2553.h
|
||||
+++ Wnn/include/fake-rfc2553.h 2 Jan 2009 21:09:34 -0000 1.1
|
||||
@@ -0,0 +1,173 @@
|
||||
+/* $Id: fake-rfc2553.h,v 1.13 2006/07/24 03:51:52 djm Exp $ */
|
||||
+/* $FreeBSD: /tmp/pcvs/ports/japanese/FreeWnn-server/files/patch-Wnn-include-fake-rfc2553.h,v 1.1 2009-01-02 23:08:15 hrs Exp $ */
|
||||
+/* $FreeBSD: /tmp/pcvs/ports/japanese/FreeWnn-server/files/patch-Wnn-include-fake-rfc2553.h,v 1.2 2010-01-02 14:47:19 hrs Exp $ */
|
||||
+
|
||||
+/*
|
||||
+ * Copyright (C) 2000-2003 Damien Miller. All rights reserved.
|
||||
|
@ -3,10 +3,10 @@ Index: Wnn/include/wnn_os.h
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/include/wnn_os.h,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -d -u -I\$FreeBSD: /tmp/pcvs/ports/japanese/FreeWnn-server/files/patch-Wnn-include-wnn_os.h,v 1.1 2009-01-02 23:08:15 hrs Exp $ -I\$NetBSD:.*\$ -I\$OpenBSD:.*\$ -I\$DragonFly:.*\$ -I\$Id:.*\$ -I\$Translation:.*\$ -I\$hrs:.*\$ -w -r1.1.1.1 -r1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/include/wnn_os.h 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/include/wnn_os.h 2 Jan 2009 21:09:34 -0000 1.2
|
||||
@@ -154,4 +154,5 @@
|
||||
@@ -154,4 +154,5 @@ int euksc_to_ksc (unsigned char *ksc,
|
||||
unsigned char *euksc,
|
||||
int eusiz); /* xutoj.c */
|
||||
|
||||
|
18
japanese/FreeWnn-server/files/patch-Wnn-jd-jserverrc
Normal file
18
japanese/FreeWnn-server/files/patch-Wnn-jd-jserverrc
Normal file
@ -0,0 +1,18 @@
|
||||
Index: Wnn/jd/jserverrc
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/jd/jserverrc,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.3
|
||||
diff -u -p -r1.1.1.1 -r1.3
|
||||
--- Wnn/jd/jserverrc 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/jd/jserverrc 2 Jan 2009 21:56:36 -0000 1.3
|
||||
@@ -29,6 +29,9 @@
|
||||
; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
;
|
||||
|
||||
+listenaddr 127.0.0.1
|
||||
+listenaddr ::1
|
||||
+
|
||||
max_client 64
|
||||
jserver_dir @LIBDIR/@LANG/dic
|
||||
readfile pubdic/kihon.dic
|
30
japanese/FreeWnn-server/files/patch-Wnn-jd-serverdefs
Normal file
30
japanese/FreeWnn-server/files/patch-Wnn-jd-serverdefs
Normal file
@ -0,0 +1,30 @@
|
||||
Index: Wnn/jd/serverdefs
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/jd/serverdefs,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/jd/serverdefs 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/jd/serverdefs 20 Dec 2008 07:23:09 -0000 1.2
|
||||
@@ -30,12 +30,12 @@
|
||||
;
|
||||
|
||||
;lang_name machine_name unix_domain_socket_name service_name port_num
|
||||
-ja_JP 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
|
||||
-zhongwen cserver /tmp/cd_sockV4 wnn4_Cn 22289
|
||||
-zh_TW tserver /tmp/td_sockV4 wnn4_Tw 22321
|
||||
-taiwanese tserver /tmp/td_sockV4 wnn4_Tw 22321
|
||||
-ko_KR kserver /tmp/kd_sockV4 wnn4_Kr 22305
|
||||
-korean kserver /tmp/kd_sockV4 wnn4_Kr 22305
|
||||
+ja_JP localhost /tmp/jd_sockV4 wnn4 22273
|
||||
+japanese localhost /tmp/jd_sockV4 wnn4 22273
|
||||
+nihongo localhost /tmp/jd_sockV4 wnn4 22273
|
||||
+zh_CN localhost /tmp/cd_sockV4 wnn4_Cn 22289
|
||||
+zhongwen localhost /tmp/cd_sockV4 wnn4_Cn 22289
|
||||
+zh_TW localhost /tmp/td_sockV4 wnn4_Tw 22321
|
||||
+taiwanese localhost /tmp/td_sockV4 wnn4_Tw 22321
|
||||
+ko_KR localhost /tmp/kd_sockV4 wnn4_Kr 22305
|
||||
+korean localhost /tmp/kd_sockV4 wnn4_Kr 22305
|
36
japanese/FreeWnn-server/files/patch-Wnn-jlib-Makefile.in
Normal file
36
japanese/FreeWnn-server/files/patch-Wnn-jlib-Makefile.in
Normal file
@ -0,0 +1,36 @@
|
||||
Index: Wnn/jlib/Makefile.in
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/jlib/Makefile.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/jlib/Makefile.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/jlib/Makefile.in 2 Jan 2009 21:09:34 -0000 1.2
|
||||
@@ -62,13 +62,15 @@ SRC8= $(WNNETCSRC)/bcopy.c
|
||||
OBJ8= bcopy.o
|
||||
SRC9= $(WNNETCSRC)/mkdir.c
|
||||
OBJ9= mkdir.o
|
||||
+SRC10= $(WNNETCSRC)/fake-rfc2553.c
|
||||
+OBJ10= fake-rfc2553.o
|
||||
|
||||
LOCAL_RKSRCS= $(WNNROMKANSRC)/rk_bltinfn.c $(WNNROMKANSRC)/rk_main.c $(WNNROMKANSRC)/rk_modread.c $(WNNROMKANSRC)/rk_read.c $(WNNROMKANSRC)/rk_vars.c
|
||||
|
||||
LOCAL_RKOBJS= $(WNNROMKANOBJ)/rk_bltinfn.o $(WNNROMKANOBJ)/rk_main.o $(WNNROMKANOBJ)/rk_modread.o $(WNNROMKANOBJ)/rk_read.o $(WNNROMKANOBJ)/rk_vars.o
|
||||
|
||||
-LOCAL_ETCSRCS = $(SRC3) $(SRC4) $(SRC5) $(SRC6) $(SRC7) $(SRC8) $(SRC9)
|
||||
-LOCAL_ETCOBJS = $(OBJ3) $(OBJ4) $(OBJ5) $(OBJ6) $(OBJ7) $(OBJ8) $(OBJ9)
|
||||
+LOCAL_ETCSRCS = $(SRC3) $(SRC4) $(SRC5) $(SRC6) $(SRC7) $(SRC8) $(SRC9) $(SRC10)
|
||||
+LOCAL_ETCOBJS = $(OBJ3) $(OBJ4) $(OBJ5) $(OBJ6) $(OBJ7) $(OBJ8) $(OBJ9) $(OBJ10)
|
||||
SRCS= $(SRC1) $(LOCAL_ETCSRCS)
|
||||
OBJS= $(OBJ1) $(LOCAL_ETCOBJS) $(LOCAL_RKOBJS)
|
||||
|
||||
@@ -137,6 +139,9 @@ $(OBJ8) : $(SRC8)
|
||||
$(OBJ9) : $(SRC9)
|
||||
$(LT_CC) -c $(CFLAGS) $(WNNETCSRC)/`basename $@ .o`.c
|
||||
|
||||
+$(OBJ10) : $(SRC10)
|
||||
+ $(LT_CC) -c $(CFLAGS) $(WNNETCSRC)/`basename $@ .o`.c
|
||||
+
|
||||
$(LOCAL_RKOBJS) : $(LOCAL_RKSRCS)
|
||||
@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
|
||||
cd $(WNNROMKANOBJ); \
|
1132
japanese/FreeWnn-server/files/patch-Wnn-jlib-js.c
Normal file
1132
japanese/FreeWnn-server/files/patch-Wnn-jlib-js.c
Normal file
File diff suppressed because it is too large
Load Diff
49
japanese/FreeWnn-server/files/patch-Wnn-jlib.V3-Makefile.in
Normal file
49
japanese/FreeWnn-server/files/patch-Wnn-jlib.V3-Makefile.in
Normal file
@ -0,0 +1,49 @@
|
||||
Index: Wnn/jlib.V3/Makefile.in
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/jlib.V3/Makefile.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/jlib.V3/Makefile.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/jlib.V3/Makefile.in 2 Jan 2010 12:10:14 -0000 1.2
|
||||
@@ -71,12 +71,12 @@ includes::
|
||||
|
||||
.c.o:
|
||||
$(RM) $@
|
||||
- $(LIBTOOL) $(CC) -c $(CFLAGS) $(_NOOP_) $*.c
|
||||
+ $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) $(_NOOP_) $*.c
|
||||
|
||||
all:: libjd.la
|
||||
|
||||
libjd.la: $(OBJS) $(EXTRALIBRARYDEPS)
|
||||
- $(LIBTOOL) $(CC) -o $@ $(OBJS:.o=.lo) -rpath $(WNNLIBDIR) -version-info $(WNNJLIBVERSION)
|
||||
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(OBJS:.o=.lo) -rpath $(WNNLIBDIR) -version-info $(WNNJLIBVERSION)
|
||||
|
||||
lintlib:: llib-ljd.ln
|
||||
|
||||
@@ -87,7 +87,7 @@ llib-ljd.ln: $(SRCS) $(EXTRALIBRARYDEPS)
|
||||
install:: libjd.la
|
||||
@if [ -d $(DESTDIR)$(WNNLIBDIR) ]; then set +x; \
|
||||
else (set -x; $(MKDIRHIER) $(DESTDIR)$(WNNLIBDIR)); fi
|
||||
- $(LIBTOOL) $(INSTALL) $(INSTLIBFLAGS) libjd.la $(DESTDIR)$(WNNLIBDIR)
|
||||
+ $(LIBTOOL) --mode=install $(INSTALL) $(INSTLIBFLAGS) libjd.la $(DESTDIR)$(WNNLIBDIR)
|
||||
|
||||
install:: jlib.h
|
||||
@if [ -d $(DESTDIR)$(JWNNINCDIR) ]; then set +x; \
|
||||
@@ -109,13 +109,13 @@ $(WNNJLIB)::
|
||||
done
|
||||
|
||||
$(OBJ2) : $(SRC2)
|
||||
- $(LIBTOOL) $(CC) -c $(CFLAGS) $(WNNETCSRC)/`basename $@ .o`.c
|
||||
+ $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) $(WNNETCSRC)/`basename $@ .o`.c
|
||||
|
||||
$(OBJ3) : $(SRC3)
|
||||
- $(LIBTOOL) $(CC) -c $(CFLAGS) $(WNNETCSRC)/`basename $@ .o`.c
|
||||
+ $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) $(WNNETCSRC)/`basename $@ .o`.c
|
||||
|
||||
$(OBJ4) : $(SRC4)
|
||||
- $(LIBTOOL) $(CC) -c $(CFLAGS) $(WNNETCSRC)/`basename $@ .o`.c
|
||||
+ $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) $(WNNETCSRC)/`basename $@ .o`.c
|
||||
|
||||
depend:: .depend
|
||||
|
@ -3,10 +3,10 @@ Index: Wnn/jserver/Makefile.in
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/jserver/Makefile.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -d -u -I\$FreeBSD: /tmp/pcvs/ports/japanese/FreeWnn-server/files/patch-Wnn-jserver-Makefile.in,v 1.1 2009-01-02 23:08:15 hrs Exp $ -I\$NetBSD:.*\$ -I\$OpenBSD:.*\$ -I\$DragonFly:.*\$ -I\$Id:.*\$ -I\$Translation:.*\$ -I\$hrs:.*\$ -w -r1.1.1.1 -r1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/jserver/Makefile.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/jserver/Makefile.in 2 Jan 2009 21:09:34 -0000 1.2
|
||||
@@ -80,13 +80,15 @@
|
||||
@@ -80,13 +80,15 @@ SRC20= $(WNNETCSRC)/getopt.c
|
||||
OBJ20= getopt.o
|
||||
SRC21= $(WNNETCSRC)/getopt1.c
|
||||
OBJ21= getopt1.o
|
||||
@ -24,7 +24,7 @@ diff -d -u -I\$FreeBSD: /tmp/pcvs/ports/japanese/FreeWnn-server/files/patch-Wnn-
|
||||
|
||||
all:: jserver
|
||||
|
||||
@@ -151,6 +153,9 @@
|
||||
@@ -151,6 +153,9 @@ $(OBJ20) : $(SRC20) $(WNNINCLUDESRC)/get
|
||||
$(OBJ21) : $(SRC21) $(WNNINCLUDESRC)/getopt.h
|
||||
$(CC) -c $(CFLAGS) $(WNNETCSRC)/`basename $@ .o`.c
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@ Index: Wnn/jserver/de_header.h
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/jserver/de_header.h,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.3
|
||||
diff -d -u -I\$FreeBSD: /tmp/pcvs/ports/japanese/FreeWnn-server/files/patch-Wnn-jserver-de_header.h,v 1.3 2009-01-02 23:08:15 hrs Exp $ -I\$NetBSD:.*\$ -I\$OpenBSD:.*\$ -I\$DragonFly:.*\$ -I\$Id:.*\$ -I\$Translation:.*\$ -I\$hrs:.*\$ -w -r1.1.1.1 -r1.3
|
||||
diff -u -p -r1.1.1.1 -r1.3
|
||||
--- Wnn/jserver/de_header.h 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/jserver/de_header.h 2 Jan 2009 11:46:51 -0000 1.3
|
||||
@@ -52,6 +52,8 @@
|
||||
@ -15,7 +15,7 @@ diff -d -u -I\$FreeBSD: /tmp/pcvs/ports/japanese/FreeWnn-server/files/patch-Wnn-
|
||||
#include "jslib.h"
|
||||
#include "commonhd.h"
|
||||
#include "jdata.h"
|
||||
@@ -205,6 +207,10 @@
|
||||
@@ -205,6 +207,10 @@ GLOBAL int option_flag GLOBAL_VAL(0);
|
||||
|
||||
GLOBAL char jserver_dir[MAXPATHLEN];
|
||||
GLOBAL char jserverrcfile[MAXPATHLEN];
|
||||
|
209
japanese/FreeWnn-server/files/patch-Wnn-jserver-do_filecom.c
Normal file
209
japanese/FreeWnn-server/files/patch-Wnn-jserver-do_filecom.c
Normal file
@ -0,0 +1,209 @@
|
||||
Index: Wnn/jserver/do_filecom.c
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/jserver/do_filecom.c,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/jserver/do_filecom.c 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/jserver/do_filecom.c 2 Jan 2010 11:51:24 -0000 1.2
|
||||
@@ -868,82 +868,96 @@ js_file_write (void)
|
||||
void
|
||||
js_file_receive (void)
|
||||
{
|
||||
- int env_id, fid;
|
||||
- struct wnn_file_uniq fq;
|
||||
- int mode = 1;
|
||||
- int i;
|
||||
- int error = 0;
|
||||
+ int env_id, fid;
|
||||
+ struct wnn_file_uniq fq;
|
||||
+ int mode = 1;
|
||||
+ int i;
|
||||
+ int error = 0;
|
||||
+
|
||||
+ env_id = get4_cur(); /* env_id */
|
||||
+ fid = get4_cur();
|
||||
+ if (find_fid_in_env(env_id, fid) == -1) {
|
||||
+ fprintf(stderr, "find_fid_in_env failed\n");
|
||||
+
|
||||
+ /* valid */
|
||||
+ /* dummy */
|
||||
+ puts_cur ("!");
|
||||
+ putc_purge();
|
||||
+
|
||||
+ error = 1;
|
||||
+ } else {
|
||||
+ fprintf(stderr, "find_fid_in_env success: %s\n",
|
||||
+ files[fid].name);
|
||||
+ puts_cur(files[fid].name);
|
||||
+ putc_purge();
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ fprintf(stderr, "get4\n");
|
||||
+ if (get4_cur() == -1) {
|
||||
+ /* Ack */
|
||||
+ return;
|
||||
+ }
|
||||
+ fprintf(stderr, "get4: end\n");
|
||||
+
|
||||
+ fprintf(stderr, "get4 x 3 start\n");
|
||||
+
|
||||
+ fq.time = get4_cur();
|
||||
+ fq.dev = get4_cur();
|
||||
+ fq.inode = get4_cur();
|
||||
+
|
||||
+ fprintf(stderr, "get4 x 3 end\n");
|
||||
+
|
||||
+ for (i = 0; i < WNN_HOSTLEN; i++) {
|
||||
+ fq.createhost[i] = getc_cur();
|
||||
+ }
|
||||
+
|
||||
+ if (error || files[fid].ref_count == -1) {
|
||||
+ wnn_errorno = WNN_FID_ERROR;
|
||||
+ error_ret ();
|
||||
+ putc_purge ();
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (fq.time != 0) {
|
||||
+ /* Old File Exist */
|
||||
+ mode = must_write_file (&files[fid], &fq);
|
||||
+ }
|
||||
+
|
||||
+ if (mode == -1) {
|
||||
+ wnn_errorno = WNN_FID_ERROR;
|
||||
+ error_ret ();
|
||||
+ putc_purge ();
|
||||
+ return;
|
||||
+ } else if (mode == 0) {
|
||||
+ /* need not saving */
|
||||
+ put4_cur(0);
|
||||
+ putc_purge();
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ put4_cur (mode);
|
||||
+ putc_purge ();
|
||||
+
|
||||
+ if (get4_cur () == -1)
|
||||
+ return;
|
||||
+
|
||||
+ if (rcv_file (&files[fid], mode) == -1) {
|
||||
+ /* wnn_errorno=WNN_FILE_WRITE_ERROR; */
|
||||
+ error_ret();
|
||||
+ putc_purge();
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (mode == 1 || mode == 2) {
|
||||
+ clear_dirty_bit (&files[fid]);
|
||||
+ }
|
||||
|
||||
- env_id = get4_cur (); /* env_id */
|
||||
- fid = get4_cur ();
|
||||
- /**/ if (find_fid_in_env (env_id, fid) == -1)
|
||||
- { /* valid */
|
||||
- puts_cur ("!");
|
||||
- putc_purge (); /* dummy */
|
||||
- error = 1;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- puts_cur (files[fid].name);
|
||||
- putc_purge ();
|
||||
- }
|
||||
- if (get4_cur () == -1)
|
||||
- return; /* Ack */
|
||||
-
|
||||
- fq.time = get4_cur ();
|
||||
- fq.dev = get4_cur ();
|
||||
- fq.inode = get4_cur ();
|
||||
- for (i = 0; i < WNN_HOSTLEN; i++)
|
||||
- {
|
||||
- fq.createhost[i] = getc_cur ();
|
||||
- }
|
||||
- if (error || files[fid].ref_count == -1)
|
||||
- {
|
||||
- wnn_errorno = WNN_FID_ERROR;
|
||||
- error_ret ();
|
||||
- putc_purge ();
|
||||
- return;
|
||||
- }
|
||||
- if (fq.time != 0)
|
||||
- { /* Old File Exist */
|
||||
- mode = must_write_file (&files[fid], &fq);
|
||||
- }
|
||||
-
|
||||
- if (mode == -1)
|
||||
- {
|
||||
- wnn_errorno = WNN_FID_ERROR;
|
||||
- error_ret ();
|
||||
- putc_purge ();
|
||||
- return;
|
||||
- }
|
||||
- else if (mode == 0)
|
||||
- { /* need not saving */
|
||||
- put4_cur (0);
|
||||
- putc_purge ();
|
||||
- return;
|
||||
- }
|
||||
- put4_cur (mode);
|
||||
- putc_purge ();
|
||||
-
|
||||
- if (get4_cur () == -1)
|
||||
- return;
|
||||
-
|
||||
- /**/ if (rcv_file (&files[fid], mode) == -1)
|
||||
- {
|
||||
-/* wnn_errorno=WNN_FILE_WRITE_ERROR; */ error_ret ();
|
||||
- putc_purge ();
|
||||
- return;
|
||||
- }
|
||||
- if (mode == 1 || mode == 2)
|
||||
- {
|
||||
- clear_dirty_bit (&files[fid]);
|
||||
- }
|
||||
-
|
||||
- put4_cur (0);
|
||||
+ put4_cur (0);
|
||||
/*
|
||||
- put4_cur(fid);
|
||||
+ put4_cur(fid);
|
||||
*/
|
||||
- putc_purge ();
|
||||
+ putc_purge();
|
||||
}
|
||||
|
||||
|
||||
@@ -994,18 +1008,18 @@ del_fid_from_env (int env_id, int fid)
|
||||
int
|
||||
find_fid_in_env (int env_id, int fid)
|
||||
{
|
||||
- register int i;
|
||||
- register int *file = env[env_id]->file;
|
||||
- for (i = 0; i < WNN_MAX_FILE_OF_AN_ENV; i++)
|
||||
- {
|
||||
- if ((file)[i] == -1)
|
||||
- continue;
|
||||
- if ((file)[i] == fid)
|
||||
- {
|
||||
- return i;
|
||||
- }
|
||||
- }
|
||||
- return -1;
|
||||
+ int i;
|
||||
+ int *file = env[env_id]->file;
|
||||
+
|
||||
+ for (i = 0; i < WNN_MAX_FILE_OF_AN_ENV; i++) {
|
||||
+ if ((file)[i] == -1)
|
||||
+ continue;
|
||||
+ if ((file)[i] == fid) {
|
||||
+ return i;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return -1;
|
||||
}
|
||||
|
||||
static int
|
@ -3,10 +3,10 @@ Index: Wnn/jserver/initjserv.c
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/jserver/initjserv.c,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.3
|
||||
diff -d -u -I\$FreeBSD: /tmp/pcvs/ports/japanese/FreeWnn-server/files/patch-Wnn-jserver-initjserv.c,v 1.4 2009-01-02 23:08:15 hrs Exp $ -I\$NetBSD:.*\$ -I\$OpenBSD:.*\$ -I\$DragonFly:.*\$ -I\$Id:.*\$ -I\$Translation:.*\$ -I\$hrs:.*\$ -w -r1.1.1.1 -r1.3
|
||||
diff -u -p -r1.1.1.1 -r1.3
|
||||
--- Wnn/jserver/initjserv.c 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/jserver/initjserv.c 2 Jan 2009 11:46:51 -0000 1.3
|
||||
@@ -154,6 +154,7 @@
|
||||
@@ -154,6 +154,7 @@ read_default (void)
|
||||
char param[EXPAND_PATH_LENGTH +1];
|
||||
char *word;
|
||||
int i, num, *v[17];
|
||||
@ -14,7 +14,7 @@ diff -d -u -I\$FreeBSD: /tmp/pcvs/ports/japanese/FreeWnn-server/files/patch-Wnn-
|
||||
|
||||
strcpy (jserver_dir, JSERVER_DIR);
|
||||
|
||||
@@ -215,6 +216,15 @@
|
||||
@@ -215,6 +216,15 @@ read_default (void)
|
||||
}
|
||||
log_debug ("max_client=%d", max_client);
|
||||
}
|
||||
@ -30,7 +30,7 @@ diff -d -u -I\$FreeBSD: /tmp/pcvs/ports/japanese/FreeWnn-server/files/patch-Wnn-
|
||||
else if (strcmp (code, "max_sticky_env") == 0)
|
||||
{
|
||||
num = sscanf (data, "%s %d ", code, &max_sticky_env);
|
||||
@@ -305,7 +315,9 @@
|
||||
@@ -305,7 +315,9 @@ read_default_files (void)
|
||||
}
|
||||
fclose (fp);
|
||||
|
||||
@ -40,7 +40,7 @@ diff -d -u -I\$FreeBSD: /tmp/pcvs/ports/japanese/FreeWnn-server/files/patch-Wnn-
|
||||
|
||||
return (0);
|
||||
}
|
||||
@@ -340,7 +352,9 @@
|
||||
@@ -340,7 +352,9 @@ read_default_file (char* buffer, size_t
|
||||
|
||||
files[fid].localf = LOCAL;
|
||||
strcpy (files[fid].name, buffer);
|
||||
|
@ -1,11 +1,20 @@
|
||||
--- Wnn/man/Makefile.in.orig 2008-10-27 03:58:56.000000000 +0900
|
||||
+++ Wnn/man/Makefile.in 2008-10-27 04:04:06.000000000 +0900
|
||||
@@ -32,7 +32,7 @@
|
||||
Index: Wnn/man/Makefile.in
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/man/Makefile.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/man/Makefile.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/man/Makefile.in 2 Jan 2010 12:44:07 -0000 1.2
|
||||
@@ -32,9 +32,9 @@
|
||||
include @top_srcdir@/makerule.mk
|
||||
top_builddir = ../..
|
||||
|
||||
-LIB_WNNMANDIR = 3.libwnn
|
||||
+#LIB_WNNMANDIR = 3.libwnn
|
||||
+LIB_WNNMANDIR?= 3.libwnn
|
||||
|
||||
SERVER_WNNMANDIR = 2.env 4.cmd 6.jutil
|
||||
-SERVER_WNNMANDIR = 2.env 4.cmd 6.jutil
|
||||
+SERVER_WNNMANDIR?= 2.env 4.cmd 6.jutil
|
||||
|
||||
SUBDIRS = @WNNMANDIR@
|
||||
|
||||
|
17
japanese/FreeWnn-server/files/patch-Wnn-romkan-Makefile.in
Normal file
17
japanese/FreeWnn-server/files/patch-Wnn-romkan-Makefile.in
Normal file
@ -0,0 +1,17 @@
|
||||
Index: Wnn/romkan/Makefile.in
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Wnn/romkan/Makefile.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Wnn/romkan/Makefile.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Wnn/romkan/Makefile.in 2 Jan 2010 12:10:16 -0000 1.2
|
||||
@@ -46,7 +46,7 @@ includes::
|
||||
|
||||
.c.o:
|
||||
$(RM) $@
|
||||
- $(LIBTOOL) $(CC) -c $(CFLAGS) $(_NOOP_) $<
|
||||
+ $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) $(_NOOP_) $<
|
||||
|
||||
clean::
|
||||
$(RM) -r .libs
|
17
japanese/FreeWnn-server/files/patch-Xwnmo-xwnmo-do_socket.c
Normal file
17
japanese/FreeWnn-server/files/patch-Xwnmo-xwnmo-do_socket.c
Normal file
@ -0,0 +1,17 @@
|
||||
Index: Xwnmo/xwnmo/do_socket.c
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Xwnmo/xwnmo/do_socket.c,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Xwnmo/xwnmo/do_socket.c 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Xwnmo/xwnmo/do_socket.c 20 Dec 2008 07:23:12 -0000 1.2
|
||||
@@ -118,8 +118,6 @@ static int rc = 0;
|
||||
#define sock_clr(array,pos) (array[pos/BINTSIZE] &= ~(1<<(pos%BINTSIZE)))
|
||||
#define sock_tst(array,pos) (array[pos/BINTSIZE] & (1<<(pos%BINTSIZE)))
|
||||
|
||||
-extern int read (), write ();
|
||||
-
|
||||
#define _Read(fd, data, size) read((fd), (data), (size))
|
||||
#define _Write(fd, data, size) write((fd), (data), (size))
|
||||
|
17
japanese/FreeWnn-server/files/patch-Xwnmo-xwnmo-do_xjpdrct.c
Normal file
17
japanese/FreeWnn-server/files/patch-Xwnmo-xwnmo-do_xjpdrct.c
Normal file
@ -0,0 +1,17 @@
|
||||
Index: Xwnmo/xwnmo/do_xjpdrct.c
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/Xwnmo/xwnmo/do_xjpdrct.c,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- Xwnmo/xwnmo/do_xjpdrct.c 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ Xwnmo/xwnmo/do_xjpdrct.c 20 Dec 2008 07:23:12 -0000 1.2
|
||||
@@ -89,8 +89,6 @@ extern int cur_sock;
|
||||
#define sock_clr(array,pos) (array[pos/BINTSIZE] &= ~(1<<(pos%BINTSIZE)))
|
||||
#define sock_tst(array,pos) (array[pos/BINTSIZE] & (1<<(pos%BINTSIZE)))
|
||||
|
||||
-extern int read (), write ();
|
||||
-
|
||||
extern XJpClientRec *xjp_clients;
|
||||
extern XJpClientRec *xjp_cur_client;
|
||||
extern XJpInputRec *xjp_inputs;
|
11633
japanese/FreeWnn-server/files/patch-aclocal.m4
Normal file
11633
japanese/FreeWnn-server/files/patch-aclocal.m4
Normal file
File diff suppressed because it is too large
Load Diff
18
japanese/FreeWnn-server/files/patch-cWnn-cd-cserverrc
Normal file
18
japanese/FreeWnn-server/files/patch-cWnn-cd-cserverrc
Normal file
@ -0,0 +1,18 @@
|
||||
Index: cWnn/cd/cserverrc
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/cWnn/cd/cserverrc,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.3
|
||||
diff -u -p -r1.1.1.1 -r1.3
|
||||
--- cWnn/cd/cserverrc 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ cWnn/cd/cserverrc 2 Jan 2009 21:56:38 -0000 1.3
|
||||
@@ -39,6 +39,9 @@ readfile sys/QianMa.dic
|
||||
|
||||
readfile sys/full.con
|
||||
|
||||
+listenaddr 127.0.0.1
|
||||
+listenaddr ::1
|
||||
+
|
||||
max_client 32
|
||||
max_sticky_env 10
|
||||
|
@ -3,10 +3,10 @@ Index: cWnn/etc/Makefile.in
|
||||
RCS file: /home/cvs/private/hrs/freewnn/cWnn/etc/Makefile.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -d -u -I\$FreeBSD: /tmp/pcvs/ports/japanese/FreeWnn-server/files/patch-cWnn-etc-Makefile.in,v 1.1 2009-01-02 23:08:15 hrs Exp $ -I\$NetBSD:.*\$ -I\$OpenBSD:.*\$ -I\$DragonFly:.*\$ -I\$Id:.*\$ -I\$Translation:.*\$ -I\$hrs:.*\$ -w -r1.1.1.1 -r1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- cWnn/etc/Makefile.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ cWnn/etc/Makefile.in 2 Jan 2009 21:09:34 -0000 1.2
|
||||
@@ -36,11 +36,13 @@
|
||||
@@ -36,11 +36,13 @@ INCLUDES = -I$(CWNNINCLUDESRC) -I$(TOP)
|
||||
DEFINES = $(CWNNDEFINES) $(CWNNLANGDEF)
|
||||
|
||||
SRCS = strings.c sstrings.c bdic.c hindo.c gethinsi.c revdic.c pwd.c bcopy.c \
|
||||
@ -22,7 +22,7 @@ diff -d -u -I\$FreeBSD: /tmp/pcvs/ports/japanese/FreeWnn-server/files/patch-cWnn
|
||||
OBJS2 = getopt.o getopt1.o
|
||||
|
||||
all::
|
||||
@@ -195,6 +197,14 @@
|
||||
@@ -195,6 +197,14 @@ includes:: getopt1.c
|
||||
|
||||
depend:: getopt1.c
|
||||
|
||||
|
@ -3,10 +3,10 @@ Index: cWnn/include/Makefile.in
|
||||
RCS file: /home/cvs/private/hrs/freewnn/cWnn/include/Makefile.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -d -u -I\$FreeBSD: /tmp/pcvs/ports/japanese/FreeWnn-server/files/patch-cWnn-include-Makefile.in,v 1.1 2009-01-02 23:08:15 hrs Exp $ -I\$NetBSD:.*\$ -I\$OpenBSD:.*\$ -I\$DragonFly:.*\$ -I\$Id:.*\$ -I\$Translation:.*\$ -I\$hrs:.*\$ -w -r1.1.1.1 -r1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- cWnn/include/Makefile.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ cWnn/include/Makefile.in 2 Jan 2009 21:09:34 -0000 1.2
|
||||
@@ -36,7 +36,8 @@
|
||||
@@ -36,7 +36,8 @@ INSTALL = @INSTALL@ $(INSTALLFLAGS)
|
||||
|
||||
HEADERS = commonhd.h jllib.h jslib.h msg.h rk_spclval.h wnnerror.h cplib.h
|
||||
LINKS = wnn_config.h copyright.h demcom.h hinsi_file.h jd_sock.h \
|
||||
@ -16,7 +16,7 @@ diff -d -u -I\$FreeBSD: /tmp/pcvs/ports/japanese/FreeWnn-server/files/patch-cWnn
|
||||
LINKS2 = getopt.h
|
||||
|
||||
|
||||
@@ -204,6 +205,14 @@
|
||||
@@ -204,6 +205,14 @@ includes:: getopt.h
|
||||
|
||||
depend:: getopt.h
|
||||
|
||||
|
27
japanese/FreeWnn-server/files/patch-cWnn-jlib-Makefile.in
Normal file
27
japanese/FreeWnn-server/files/patch-cWnn-jlib-Makefile.in
Normal file
@ -0,0 +1,27 @@
|
||||
Index: cWnn/jlib/Makefile.in
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/cWnn/jlib/Makefile.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- cWnn/jlib/Makefile.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ cWnn/jlib/Makefile.in 2 Jan 2009 21:09:34 -0000 1.2
|
||||
@@ -57,6 +57,8 @@ SRC7= $(CWNNETCSRC)/strings.c
|
||||
OBJ7= strings.o
|
||||
SRC8= $(CWNNETCSRC)/bcopy.c
|
||||
OBJ8= bcopy.o
|
||||
+SRC9= $(CWNNETCSRC)/fake-rfc2553.c
|
||||
+OBJ9= fake-rfc2553.o
|
||||
|
||||
LOCAL_RKSRCS= $(CWNNROMKANSRC)/rk_bltinfn.c $(CWNNROMKANSRC)/rk_main.c $(CWNNROMKANSRC)/rk_modread.c $(CWNNROMKANSRC)/rk_read.c $(CWNNROMKANSRC)/rk_vars.c
|
||||
|
||||
@@ -152,6 +154,9 @@ $(OBJ7) : $(SRC7)
|
||||
$(OBJ8) : $(SRC8)
|
||||
$(LT_CC) -c $(CFLAGS) $(CWNNETCSRC)/`basename $@ .o`.c
|
||||
|
||||
+$(OBJ9) : $(SRC9)
|
||||
+ $(LT_CC) -c $(CFLAGS) $(CWNNETCSRC)/`basename $@ .o`.c
|
||||
+
|
||||
mkdir.o : $(WNNETCSRC)/mkdir.c
|
||||
$(LT_CC) -c $(CFLAGS) $@
|
||||
|
@ -3,10 +3,10 @@ Index: cWnn/jserver/Makefile.in
|
||||
RCS file: /home/cvs/private/hrs/freewnn/cWnn/jserver/Makefile.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -d -u -I\$FreeBSD: /tmp/pcvs/ports/japanese/FreeWnn-server/files/patch-cWnn-jserver-Makefile.in,v 1.1 2009-01-02 23:08:15 hrs Exp $ -I\$NetBSD:.*\$ -I\$OpenBSD:.*\$ -I\$DragonFly:.*\$ -I\$Id:.*\$ -I\$Translation:.*\$ -I\$hrs:.*\$ -w -r1.1.1.1 -r1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- cWnn/jserver/Makefile.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ cWnn/jserver/Makefile.in 2 Jan 2009 21:09:35 -0000 1.2
|
||||
@@ -82,6 +82,8 @@
|
||||
@@ -82,6 +82,8 @@ SRC20= $(CWNNETCSRC)/getopt.c
|
||||
OBJ20= getopt.o
|
||||
SRC21= $(CWNNETCSRC)/getopt1.c
|
||||
OBJ21= getopt1.o
|
||||
@ -15,7 +15,7 @@ diff -d -u -I\$FreeBSD: /tmp/pcvs/ports/japanese/FreeWnn-server/files/patch-cWnn
|
||||
TSRC0= de_t.c
|
||||
TOBJ0= de_t.o
|
||||
TSRCGETHINSI= gethinsi_t.c
|
||||
@@ -90,11 +92,11 @@
|
||||
@@ -90,11 +92,11 @@ OBJSUPPORT = @JS_SUPPORTOBJS@
|
||||
TSRCS= $(TSRC0) $(TSRCGETHINSI)
|
||||
SRCS= $(SRC0) $(SRC1) $(SRC3) $(SRC4) $(SRC5) $(SRC6) $(SRC7) \
|
||||
$(SRCGETHINSI) $(SRC9) $(SRC10) $(SRC11) $(SRC12) $(SRC13) $(SRC14) \
|
||||
@ -29,7 +29,7 @@ diff -d -u -I\$FreeBSD: /tmp/pcvs/ports/japanese/FreeWnn-server/files/patch-cWnn
|
||||
|
||||
TOBJS= $(TOBJ0) $(OBJ1) $(OBJ3) $(OBJ4) $(OBJ5) $(OBJ6) $(OBJ7) \
|
||||
$(TOBJGETHINSI) $(OBJ9) $(OBJ10) $(OBJ11) $(OBJ12) $(OBJ13) $(OBJ14) \
|
||||
@@ -609,6 +611,9 @@
|
||||
@@ -609,6 +611,9 @@ $(OBJ20) : $(SRC20) $(CWNNINCLUDESRC)/ge
|
||||
$(OBJ21) : $(SRC21) $(CWNNINCLUDESRC)/getopt.h
|
||||
$(CC) -c $(CFLAGS) $(CWNNETCSRC)/`basename $@ .o`.c
|
||||
|
||||
|
17
japanese/FreeWnn-server/files/patch-cWnn-romkan-Makefile.in
Normal file
17
japanese/FreeWnn-server/files/patch-cWnn-romkan-Makefile.in
Normal file
@ -0,0 +1,17 @@
|
||||
Index: cWnn/romkan/Makefile.in
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/cWnn/romkan/Makefile.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- cWnn/romkan/Makefile.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ cWnn/romkan/Makefile.in 2 Jan 2010 12:10:16 -0000 1.2
|
||||
@@ -48,7 +48,7 @@ includes::
|
||||
|
||||
.c.o:
|
||||
$(RM) $@
|
||||
- $(LIBTOOL) $(CC) -c $(CFLAGS) $(_NOOP_) $<
|
||||
+ $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) $(_NOOP_) $<
|
||||
|
||||
clean::
|
||||
$(RM) -r .libs
|
17
japanese/FreeWnn-server/files/patch-cWnn-td-tserverrc
Normal file
17
japanese/FreeWnn-server/files/patch-cWnn-td-tserverrc
Normal file
@ -0,0 +1,17 @@
|
||||
Index: cWnn/td/tserverrc
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/cWnn/td/tserverrc,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- cWnn/td/tserverrc 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ cWnn/td/tserverrc 20 Dec 2008 07:23:12 -0000 1.2
|
||||
@@ -35,6 +35,8 @@ readfile sys/cns_wd.dic
|
||||
|
||||
readfile sys/full.con
|
||||
|
||||
+listenaddr 127.0.0.1
|
||||
+
|
||||
max_client 32
|
||||
max_sticky_env 10
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- Xwnmo/xwnmo/do_socket.c.orig Fri Jun 15 03:16:14 2001
|
||||
+++ Xwnmo/xwnmo/do_socket.c Wed Dec 7 18:53:42 2005
|
||||
@@ -118,8 +118,6 @@
|
||||
#define sock_clr(array,pos) (array[pos/BINTSIZE] &= ~(1<<(pos%BINTSIZE)))
|
||||
#define sock_tst(array,pos) (array[pos/BINTSIZE] & (1<<(pos%BINTSIZE)))
|
||||
|
||||
-extern int read (), write ();
|
||||
-
|
||||
#define _Read(fd, data, size) read((fd), (data), (size))
|
||||
#define _Write(fd, data, size) write((fd), (data), (size))
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- Xwnmo/xwnmo/do_xjpdrct.c.orig Wed Dec 7 18:55:11 2005
|
||||
+++ Xwnmo/xwnmo/do_xjpdrct.c Wed Dec 7 18:55:19 2005
|
||||
@@ -89,8 +89,6 @@
|
||||
#define sock_clr(array,pos) (array[pos/BINTSIZE] &= ~(1<<(pos%BINTSIZE)))
|
||||
#define sock_tst(array,pos) (array[pos/BINTSIZE] & (1<<(pos%BINTSIZE)))
|
||||
|
||||
-extern int read (), write ();
|
||||
-
|
||||
extern XJpClientRec *xjp_clients;
|
||||
extern XJpClientRec *xjp_cur_client;
|
||||
extern XJpInputRec *xjp_inputs;
|
@ -2,10 +2,10 @@ Index: config.h.in
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/config.h.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -d -u -I\$FreeBSD: /tmp/pcvs/ports/japanese/FreeWnn-server/files/patch-config.h.in,v 1.1 2009-01-02 23:08:15 hrs Exp $ -I\$NetBSD:.*\$ -I\$OpenBSD:.*\$ -I\$DragonFly:.*\$ -I\$Id:.*\$ -I\$Translation:.*\$ -I\$hrs:.*\$ -w -r1.1.1.1 -r1.2
|
||||
retrieving revision 1.3
|
||||
diff -u -p -r1.1.1.1 -r1.3
|
||||
--- config.h.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ config.h.in 2 Jan 2009 21:09:32 -0000 1.2
|
||||
+++ config.h.in 2 Jan 2010 11:58:36 -0000 1.3
|
||||
@@ -33,12 +33,24 @@
|
||||
/* Define to 1 if you have the `FD_SET' function. */
|
||||
#undef HAVE_FD_SET
|
||||
@ -50,3 +50,14 @@ diff -d -u -I\$FreeBSD: /tmp/pcvs/ports/japanese/FreeWnn-server/files/patch-conf
|
||||
/* Define to 1 if you have the `syslog' function. */
|
||||
#undef HAVE_SYSLOG
|
||||
|
||||
@@ -201,6 +225,10 @@
|
||||
/* Define to 1 if you have the `wait3' function. */
|
||||
#undef HAVE_WAIT3
|
||||
|
||||
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
+ */
|
||||
+#undef LT_OBJDIR
|
||||
+
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -3,10 +3,10 @@ Index: configure.in
|
||||
RCS file: /home/cvs/private/hrs/freewnn/configure.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -d -u -I\$FreeBSD: /tmp/pcvs/ports/japanese/FreeWnn-server/files/patch-configure.in,v 1.1 2009-01-02 23:08:15 hrs Exp $ -I\$NetBSD:.*\$ -I\$OpenBSD:.*\$ -I\$DragonFly:.*\$ -I\$Id:.*\$ -I\$Translation:.*\$ -I\$hrs:.*\$ -w -r1.1.1.1 -r1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- configure.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ configure.in 2 Jan 2009 21:09:32 -0000 1.2
|
||||
@@ -422,6 +422,16 @@
|
||||
@@ -422,6 +422,16 @@ dnl for bcopy/index -> memcpy/strchr con
|
||||
AC_CHECK_FUNCS(bcopy bzero bcmp index rindex \
|
||||
memcpy memmove memset strchr strrchr)
|
||||
|
||||
|
@ -3,10 +3,10 @@ Index: kWnn/etc/Makefile.in
|
||||
RCS file: /home/cvs/private/hrs/freewnn/kWnn/etc/Makefile.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -d -u -I\$FreeBSD: /tmp/pcvs/ports/japanese/FreeWnn-server/files/patch-kWnn-etc-Makefile.in,v 1.1 2009-01-02 23:08:15 hrs Exp $ -I\$NetBSD:.*\$ -I\$OpenBSD:.*\$ -I\$DragonFly:.*\$ -I\$Id:.*\$ -I\$Translation:.*\$ -I\$hrs:.*\$ -w -r1.1.1.1 -r1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- kWnn/etc/Makefile.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ kWnn/etc/Makefile.in 2 Jan 2009 21:09:35 -0000 1.2
|
||||
@@ -35,10 +35,12 @@
|
||||
@@ -35,10 +35,12 @@ top_builddir = ../..
|
||||
INCLUDES = -I$(KWNNINCLUDESRC) -I$(TOP)
|
||||
DEFINES = $(KWNNDEFINES) $(KWNNLANGDEF)
|
||||
|
||||
@ -21,7 +21,7 @@ diff -d -u -I\$FreeBSD: /tmp/pcvs/ports/japanese/FreeWnn-server/files/patch-kWnn
|
||||
OBJS2= getopt.o getopt1.o
|
||||
|
||||
all::
|
||||
@@ -199,6 +201,18 @@
|
||||
@@ -199,6 +201,18 @@ includes:: getopt1.c
|
||||
|
||||
depend:: getopt1.c
|
||||
|
||||
|
@ -3,10 +3,10 @@ Index: kWnn/include/Makefile.in
|
||||
RCS file: /home/cvs/private/hrs/freewnn/kWnn/include/Makefile.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -d -u -I\$FreeBSD: /tmp/pcvs/ports/japanese/FreeWnn-server/files/patch-kWnn-include-Makefile.in,v 1.1 2009-01-02 23:08:15 hrs Exp $ -I\$NetBSD:.*\$ -I\$OpenBSD:.*\$ -I\$DragonFly:.*\$ -I\$Id:.*\$ -I\$Translation:.*\$ -I\$hrs:.*\$ -w -r1.1.1.1 -r1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- kWnn/include/Makefile.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ kWnn/include/Makefile.in 2 Jan 2009 21:09:35 -0000 1.2
|
||||
@@ -36,7 +36,8 @@
|
||||
@@ -36,7 +36,8 @@ INSTALL = @INSTALL@
|
||||
|
||||
HEADERS = jllib.h jslib.h msg.h rk_spclval.h wnnerror.h commonhd.h cplib.h
|
||||
LINKS = wnn_config.h copyright.h demcom.h hinsi_file.h jd_sock.h jdata.h \
|
||||
@ -16,7 +16,7 @@ diff -d -u -I\$FreeBSD: /tmp/pcvs/ports/japanese/FreeWnn-server/files/patch-kWnn
|
||||
LINKS2 = getopt.h
|
||||
|
||||
all:: $(HEADERS) $(LINKS) $(LINKS2)
|
||||
@@ -257,6 +258,18 @@
|
||||
@@ -257,6 +258,18 @@ includes:: getopt.h
|
||||
|
||||
depend:: getopt.h
|
||||
|
||||
|
36
japanese/FreeWnn-server/files/patch-kWnn-jlib-Makefile.in
Normal file
36
japanese/FreeWnn-server/files/patch-kWnn-jlib-Makefile.in
Normal file
@ -0,0 +1,36 @@
|
||||
Index: kWnn/jlib/Makefile.in
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/kWnn/jlib/Makefile.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- kWnn/jlib/Makefile.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ kWnn/jlib/Makefile.in 2 Jan 2009 21:09:35 -0000 1.2
|
||||
@@ -61,13 +61,15 @@ SRC7= $(KWNNETCSRC)/py_table.c
|
||||
OBJ7= py_table.o
|
||||
SRC8= $(KWNNETCSRC)/zy_table.c
|
||||
OBJ8= zy_table.o
|
||||
+SRC9= $(KWNNETCSRC)/fake-rfc2553.c
|
||||
+OBJ9= fake-rfc2553.o
|
||||
|
||||
LOCAL_RKSRCS= $(KWNNROMKANSRC)/rk_bltinfn.c $(KWNNROMKANSRC)/rk_main.c $(KWNNROMKANSRC)/rk_modread.c $(KWNNROMKANSRC)/rk_read.c $(KWNNROMKANSRC)/rk_vars.c
|
||||
|
||||
LOCAL_RKOBJS= $(KWNNROMKANSRC)/rk_bltinfn.o $(KWNNROMKANSRC)/rk_main.o $(KWNNROMKANSRC)/rk_modread.o $(KWNNROMKANSRC)/rk_read.o $(KWNNROMKANSRC)/rk_vars.o
|
||||
|
||||
-LOCAL_ETCSRCS = $(SRC4) $(SRC5) $(SRC6) $(SRC7) $(SRC8)
|
||||
-LOCAL_ETCOBJS = $(OBJ4) $(OBJ5) $(OBJ6) $(OBJ7) $(OBJ8)
|
||||
+LOCAL_ETCSRCS = $(SRC4) $(SRC5) $(SRC6) $(SRC7) $(SRC8) $(SRC9)
|
||||
+LOCAL_ETCOBJS = $(OBJ4) $(OBJ5) $(OBJ6) $(OBJ7) $(OBJ8) $(SRC9)
|
||||
OTHER_SRCS = $(WNNETCSRC)/mkdir.c
|
||||
OTHER_OBJS = mkdir.o
|
||||
SRCS= $(SRC1) $(SRC3) $(LOCAL_ETCSRCS) $(OTHER_SRCS)
|
||||
@@ -163,6 +165,9 @@ $(OBJ7) : $(SRC7)
|
||||
$(OBJ8) : $(SRC8)
|
||||
$(LT_CC) -c $(CFLAGS) $(KWNNETCSRC)/`basename $@ .o`.c
|
||||
|
||||
+$(OBJ9) : $(SRC9)
|
||||
+ $(LT_CC) -c $(CFLAGS) $(KWNNETCSRC)/`basename $@ .o`.c
|
||||
+
|
||||
mkdir.o : $(WNNETCSRC)/mkdir.c
|
||||
$(LT_CC) -c $(CFLAGS) $?
|
||||
|
@ -3,10 +3,10 @@ Index: kWnn/jserver/Makefile.in
|
||||
RCS file: /home/cvs/private/hrs/freewnn/kWnn/jserver/Makefile.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -d -u -I\$FreeBSD: /tmp/pcvs/ports/japanese/FreeWnn-server/files/patch-kWnn-jserver-Makefile.in,v 1.1 2009-01-02 23:08:15 hrs Exp $ -I\$NetBSD:.*\$ -I\$OpenBSD:.*\$ -I\$DragonFly:.*\$ -I\$Id:.*\$ -I\$Translation:.*\$ -I\$hrs:.*\$ -w -r1.1.1.1 -r1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- kWnn/jserver/Makefile.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ kWnn/jserver/Makefile.in 2 Jan 2009 21:09:35 -0000 1.2
|
||||
@@ -80,13 +80,17 @@
|
||||
@@ -80,13 +80,17 @@ SRC20= $(KWNNETCSRC)/getopt.c
|
||||
OBJ20= getopt.o
|
||||
SRC21= $(KWNNETCSRC)/getopt1.c
|
||||
OBJ21= getopt1.o
|
||||
@ -25,7 +25,7 @@ diff -d -u -I\$FreeBSD: /tmp/pcvs/ports/japanese/FreeWnn-server/files/patch-kWnn
|
||||
$(OBJSUPPORT)
|
||||
|
||||
all:: $(HDRS) $(SRC0) $(SRC1) kserver
|
||||
@@ -572,6 +576,9 @@
|
||||
@@ -572,6 +576,9 @@ $(OBJ20) : $(SRC20) $(KWNNINCLUDESRC)/ge
|
||||
$(OBJ21) : $(SRC21) $(KWNNINCLUDESRC)/getopt.h
|
||||
$(CC) -c $(CFLAGS) $(KWNNETCSRC)/`basename $@ .o`.c
|
||||
|
||||
|
18
japanese/FreeWnn-server/files/patch-kWnn-kd-kserverrc
Normal file
18
japanese/FreeWnn-server/files/patch-kWnn-kd-kserverrc
Normal file
@ -0,0 +1,18 @@
|
||||
Index: kWnn/kd/kserverrc
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/kWnn/kd/kserverrc,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.3
|
||||
diff -u -p -r1.1.1.1 -r1.3
|
||||
--- kWnn/kd/kserverrc 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ kWnn/kd/kserverrc 2 Jan 2009 21:56:38 -0000 1.3
|
||||
@@ -29,6 +29,9 @@
|
||||
; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
;
|
||||
|
||||
+listenaddr 127.0.0.1
|
||||
+listenaddr ::1
|
||||
+
|
||||
max_client 64
|
||||
|
||||
jserver_dir @LIBDIR/@LANG/dic
|
17
japanese/FreeWnn-server/files/patch-kWnn-romkan-Makefile.in
Normal file
17
japanese/FreeWnn-server/files/patch-kWnn-romkan-Makefile.in
Normal file
@ -0,0 +1,17 @@
|
||||
Index: kWnn/romkan/Makefile.in
|
||||
===================================================================
|
||||
RCS file: /home/cvs/private/hrs/freewnn/kWnn/romkan/Makefile.in,v
|
||||
retrieving revision 1.1.1.1
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.1.1.1 -r1.2
|
||||
--- kWnn/romkan/Makefile.in 20 Dec 2008 07:13:30 -0000 1.1.1.1
|
||||
+++ kWnn/romkan/Makefile.in 2 Jan 2010 12:10:16 -0000 1.2
|
||||
@@ -48,7 +48,7 @@ includes::
|
||||
|
||||
.c.o:
|
||||
$(RM) $@
|
||||
- $(LIBTOOL) $(CC) -c $(CFLAGS) $(_NOOP_) $<
|
||||
+ $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) $(_NOOP_) $<
|
||||
|
||||
clean::
|
||||
$(RM) -r .libs
|
13815
japanese/FreeWnn-server/files/patch-ltmain.sh
Normal file
13815
japanese/FreeWnn-server/files/patch-ltmain.sh
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user