# HG changeset patch # User Yoshiki Yazawa # Date 1267885493 -32400 # Node ID a7ccf412ba02322c7ac05867bf12afaad785b25c # Parent 6bfa7ea3b75b995ed0e89f18e46d0505b83622a4 more warning suppression diff -r 6bfa7ea3b75b -r a7ccf412ba02 PubdicPlus/pod.c --- a/PubdicPlus/pod.c Sat Mar 06 18:29:27 2010 +0900 +++ b/PubdicPlus/pod.c Sat Mar 06 23:24:53 2010 +0900 @@ -20,10 +20,6 @@ * PERFORMANCE OF THIS SOFTWARE. */ -#ifndef lint -static char rcsid[] = "$Id: pod.c,v 1.7 2005/12/10 18:50:43 aonoto Exp $"; -#endif - #ifdef HAVE_CONFIG_H # include #endif @@ -295,7 +291,7 @@ { register Wchar *p = d, ch; - while (ch = *s++) + while ((ch = *s++)) { *p++ = ch; } @@ -452,7 +448,7 @@ for (s = str; *s; s++) key += (int) *s; key = ((unsigned) key & HINSHIBUFINDEXMASK); - for (pp = partsofspeech + key; p = *pp; pp = &(p->next)) + for (pp = partsofspeech + key; (p = *pp); pp = &(p->next)) { if (!Wscmp (p->hinshi, str)) { @@ -496,7 +492,7 @@ (void) fprintf (stderr, "%s: can not open the table file of parts of speech \"%s\".\n", program, hinshi_table); exit (1); } - while (s = Fgetws (readbuf, READBUFSIZE, f)) + while ((s = Fgetws (readbuf, READBUFSIZE, f))) { from = extstr (s, &s, 0); to = extstr (s, &s, 0); @@ -657,7 +653,7 @@ for (s = hin; *s; s++) key += (int) *s; key = ((unsigned) key & HINSHIBUFINDEXMASK); - for (pp = description + key; p = *pp; pp = &(p->next)) + for (pp = description + key; (p = *pp); pp = &(p->next)) { if (!Wscmp (p->hinshi, hin)) { @@ -716,7 +712,7 @@ for (s = hin; *s; s++) key += (int) *s; key = ((unsigned) key & HINSHIBUFINDEXMASK); - for (pp = description + key; p = *pp; pp = &(p->next)) + for (pp = description + key; (p = *pp); pp = &(p->next)) { if (!Wscmp (p->hinshi, hin)) { @@ -743,7 +739,7 @@ (void) fprintf (stderr, "%s: can not open the table file of parts of speech \"%s\".\n", program, description_table); exit (1); } - while (s = Fgetws (readbuf, READBUFSIZE, f)) + while ((s = Fgetws (readbuf, READBUFSIZE, f))) { Wchar nl[1]; @@ -920,7 +916,7 @@ } key = ((unsigned) key & DICBUFINDEXMASK); - for (pp = dic + key; p = *pp; pp = &(p->next)) + for (pp = dic + key; (p = *pp); pp = &(p->next)) { if (!Wscmp (p->yomi, yomi) && !Wscmp (p->tango, kouho) && ((flags & IGNORE_HINSHI) || !Wscmp (p->hinshi->hinshi, hinshi)) && ((flags & IGNORE_KIND) || ((p->kind & kind) == kind))) { @@ -979,7 +975,7 @@ } /* 登録されているエントリに対して fn を実行する */ - +#if 0 static void for_all_interned (fn) void (*fn) (); @@ -995,6 +991,7 @@ } } } +#endif static void storepd (file) @@ -1005,7 +1002,7 @@ long kindbit; struct dicpack *dicentry; - while (p = Fgetws (readbuf, READBUFSIZE, file)) + while ((p = Fgetws (readbuf, READBUFSIZE, file))) { key = 0; yomi = extstr (p, &p, &tkey); @@ -1043,7 +1040,7 @@ struct dicpack *dicentry; long kindbit, flags = 0L; - while (p = Fgetws (readbuf, READBUFSIZE, file)) + while ((p = Fgetws (readbuf, READBUFSIZE, file))) { key = 0; yomi = extstr (p, &p, &tkey); @@ -1263,6 +1260,7 @@ } } +#if 0 static void showdeleted (p) struct dicpack *p; @@ -1273,6 +1271,7 @@ printentry (stdout, p); } } +#endif static void showentry (pd, n) @@ -1374,15 +1373,15 @@ p2 = (struct dicpack **)pp2; int n; - if (n = Wscmp ((*p1)->yomi, (*p2)->yomi)) + if ((n = Wscmp ((*p1)->yomi, (*p2)->yomi))) { return n; } - else if (n = Wscmp ((*p1)->tango, (*p2)->tango)) + else if ((n = Wscmp ((*p1)->tango, (*p2)->tango))) { return n; } - else if (n = Wscmp ((*p1)->hinshi->hinshi, (*p2)->hinshi->hinshi)) + else if ((n = Wscmp ((*p1)->hinshi->hinshi, (*p2)->hinshi->hinshi))) { return n; } @@ -1400,19 +1399,19 @@ p2 = (struct dicpack **)pp2; int n; - if (n = Wscmp ((*p1)->yomi, (*p2)->yomi)) + if ((n = Wscmp ((*p1)->yomi, (*p2)->yomi))) { return n; } - else if (n = ((*p2)->hindo - (*p1)->hindo)) + else if ((n = ((*p2)->hindo - (*p1)->hindo))) { return n; } - else if (n = Wscmp ((*p1)->tango, (*p2)->tango)) + else if ((n = Wscmp ((*p1)->tango, (*p2)->tango))) { return n; } - else if (n = Wscmp ((*p1)->hinshi->hinshi, (*p2)->hinshi->hinshi)) + else if ((n = Wscmp ((*p1)->hinshi->hinshi, (*p2)->hinshi->hinshi))) { return n; } diff -r 6bfa7ea3b75b -r a7ccf412ba02 Wnn/etc/bdic.c --- a/Wnn/etc/bdic.c Sat Mar 06 18:29:27 2010 +0900 +++ b/Wnn/etc/bdic.c Sat Mar 06 23:24:53 2010 +0900 @@ -794,7 +794,7 @@ UCHAR tmp[LENGTHYOMI * 3]; n = wnn_sStrcpy (tmp, w); - vputs (tmp, fp); + vputs ((char *)tmp, fp); return (n); } #endif /* !JS && !JSERVER */ diff -r 6bfa7ea3b75b -r a7ccf412ba02 Wnn/etc/yincoding.c --- a/Wnn/etc/yincoding.c Sat Mar 06 18:29:27 2010 +0900 +++ b/Wnn/etc/yincoding.c Sat Mar 06 23:24:53 2010 +0900 @@ -447,14 +447,14 @@ *len = 0; /* for Pinyin */ - if (ret = pzy_get_sheng_yun (one_yuyin, ss, sheng_raw, yun_raw, CWNN_PINYIN)) + if ((ret = pzy_get_sheng_yun (one_yuyin, ss, sheng_raw, yun_raw, CWNN_PINYIN))) if (is_pinyin (sheng_raw[0], yun_raw[0]) != -1) { *len = ret; return (create_yincod (sheng_raw[0], yun_raw[0], ss[0])); } /* for Zhuyin */ - if (ret = pzy_get_sheng_yun (one_yuyin, ss, sheng_raw, yun_raw, CWNN_ZHUYIN)) + if ((ret = pzy_get_sheng_yun (one_yuyin, ss, sheng_raw, yun_raw, CWNN_ZHUYIN))) { zytmp = zhuyin_tbl[sheng_raw[0] * ZY_NUM_YUNMU + yun_raw[0]]; if (is_zhuyin (sheng_raw[0], yun_raw[0]) != -1) diff -r 6bfa7ea3b75b -r a7ccf412ba02 Wnn/jlib/jl.c --- a/Wnn/jlib/jl.c Sat Mar 06 18:29:27 2010 +0900 +++ b/Wnn/jlib/jl.c Sat Mar 06 23:24:53 2010 +0900 @@ -396,7 +396,7 @@ return (NULL); } -static int +static int delete_file_from_env (struct wnn_env *env, register int id) { struct wnn_file_name_id *f; @@ -406,7 +406,7 @@ jl_env_p = find_jl_env (env); if (!jl_env_p->file) return (0); - for (prev = &jl_env_p->file; f = *prev; prev = &f->next) + for (prev = &jl_env_p->file; (f = *prev); prev = &f->next) { if (f->id == id) { @@ -457,7 +457,7 @@ if (!server_n || !*server_n) { /* find server machine name from table by lang */ - if (server_n = _wnn_get_machine_of_serv_defs (p_lang)) + if ((server_n = _wnn_get_machine_of_serv_defs (p_lang))) { if ((js = find_same_server (server_n, p_lang)) == NULL) { diff -r 6bfa7ea3b75b -r a7ccf412ba02 Wnn/jlib/js.c --- a/Wnn/jlib/js.c Sat Mar 06 18:29:27 2010 +0900 +++ b/Wnn/jlib/js.c Sat Mar 06 23:24:53 2010 +0900 @@ -1440,7 +1440,7 @@ struct wnn_file_head fh; int i; #ifdef WRITE_CHECK - char *tmp, *backup = NULL, tmp_x; + char *tmp = NULL, *backup = NULL, tmp_x; int tmp_err = 0; #endif /* WRITE_CHECK */ diff -r 6bfa7ea3b75b -r a7ccf412ba02 Wnn/jserver/b_index.c --- a/Wnn/jserver/b_index.c Sat Mar 06 18:29:27 2010 +0900 +++ b/Wnn/jserver/b_index.c Sat Mar 06 23:24:53 2010 +0900 @@ -24,7 +24,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -static char rcs_id[] = "$Id: b_index.c,v 1.8 2003/06/07 02:23:58 hiroo Exp $"; #ifdef HAVE_CONFIG_H # include diff -r 6bfa7ea3b75b -r a7ccf412ba02 Wnn/jserver/do_dic_no.c --- a/Wnn/jserver/do_dic_no.c Sat Mar 06 18:29:27 2010 +0900 +++ b/Wnn/jserver/do_dic_no.c Sat Mar 06 23:24:53 2010 +0900 @@ -489,7 +489,7 @@ js_hinsi_dicts () { int envi; - w_char *name; + w_char *name = NULL; register int k; int cnt; struct JT *jtl; diff -r 6bfa7ea3b75b -r a7ccf412ba02 Wnn/jserver/fzk.c --- a/Wnn/jserver/fzk.c Sat Mar 06 18:29:27 2010 +0900 +++ b/Wnn/jserver/fzk.c Sat Mar 06 23:24:53 2010 +0900 @@ -29,8 +29,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -static char rcs_id[] = "$Id: fzk.c,v 1.7 2003/05/11 19:01:06 hiroo Exp $"; - #ifdef HAVE_CONFIG_H # include #endif diff -r 6bfa7ea3b75b -r a7ccf412ba02 Wnn/jserver/initjserv.c --- a/Wnn/jserver/initjserv.c Sat Mar 06 18:29:27 2010 +0900 +++ b/Wnn/jserver/initjserv.c Sat Mar 06 23:24:53 2010 +0900 @@ -25,8 +25,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -static char rcs_id[] = "$Id: initjserv.c,v 1.16 2003/05/11 18:43:15 hiroo Exp $"; - #if defined(HAVE_CONFIG_H) #include #endif diff -r 6bfa7ea3b75b -r a7ccf412ba02 Wnn/jserver/readfile.c --- a/Wnn/jserver/readfile.c Sat Mar 06 18:29:27 2010 +0900 +++ b/Wnn/jserver/readfile.c Sat Mar 06 23:24:53 2010 +0900 @@ -28,7 +28,6 @@ /* (Updatable, Stable) dictionary read routine. */ -static char rcs_id[] = "$Id: readfile.c,v 1.9 2003/06/07 02:23:58 hiroo Exp $"; #if defined(HAVE_CONFIG_H) #include diff -r 6bfa7ea3b75b -r a7ccf412ba02 Wnn/jutil/atod.c --- a/Wnn/jutil/atod.c Sat Mar 06 18:29:27 2010 +0900 +++ b/Wnn/jutil/atod.c Sat Mar 06 23:24:53 2010 +0900 @@ -33,10 +33,6 @@ UJIS 形式を、辞書登録可能形式, 及び固定形式辞書に変換するプログラム。 */ -#ifndef lint -static char *rcs_id = "$Id: atod.c,v 1.13 2004/08/12 09:03:19 aono Exp $"; -#endif /* lint */ - #ifdef HAVE_CONFIG_H # include #endif @@ -228,7 +224,7 @@ } strncpy (outfile, argv[1], LINE_SIZE-1); outfile[LINE_SIZE-1] = '\0'; - if (wnn_loadhinsi (hinsi_file_name) != 0) + if (wnn_loadhinsi ((unsigned char *)hinsi_file_name) != 0) { fprintf (stderr, "Can't Open hinsi_file.\n"); exit (1); @@ -277,7 +273,7 @@ com_name = argv[0]; init (argc, argv); - if (cswidth_name = get_cswidth_name (WNN_DEFAULT_LANG)) + if ((cswidth_name = get_cswidth_name (WNN_DEFAULT_LANG))) set_cswidth (create_cswidth (cswidth_name)); #ifdef CHINESE diff -r 6bfa7ea3b75b -r a7ccf412ba02 Wnn/jutil/atof.c --- a/Wnn/jutil/atof.c Sat Mar 06 18:29:27 2010 +0900 +++ b/Wnn/jutil/atof.c Sat Mar 06 23:24:53 2010 +0900 @@ -35,10 +35,6 @@ Standard output jserver format. */ -#ifndef lint -static char *rcs_id = "$Id: atof.c,v 1.7 2002/07/14 04:26:57 hiroo Exp $"; -#endif /* lint */ - /* UJIS FORMAT @@ -509,7 +505,7 @@ error_format ("Cannot open hinsi.data\n"); for (idn = 0; idn < mhinsi; idn++) { - if (d = wnn_get_hinsi_name (idn)) + if ((d = wnn_get_hinsi_name (idn))) { set_heap (&id[id_num].str, d); id[id_num++].bit = idn; diff -r 6bfa7ea3b75b -r a7ccf412ba02 Wnn/jutil/dtoa.c --- a/Wnn/jutil/dtoa.c Sat Mar 06 18:29:27 2010 +0900 +++ b/Wnn/jutil/dtoa.c Sat Mar 06 23:24:53 2010 +0900 @@ -33,10 +33,6 @@ 辞書を ASCII 形式の辞書に変換するプログラム。 */ -#ifndef lint -static char *rcs_id = "$Id: dtoa.c,v 1.9 2005/06/12 17:14:23 aonoto Exp $"; -#endif /* lint */ - #ifdef HAVE_CONFIG_H # include #endif @@ -133,7 +129,7 @@ com_name = argv[0]; - if (cswidth_name = get_cswidth_name (WNN_DEFAULT_LANG)) + if ((cswidth_name = get_cswidth_name (WNN_DEFAULT_LANG))) set_cswidth (create_cswidth (cswidth_name)); parse_options (&argc, &argv); @@ -158,7 +154,7 @@ if (which_dict == WNN_STATIC_DICT) { kset (); - sdtoujis (jt.hontai, 0); + sdtoujis ((char *)jt.hontai, 0); #ifdef CHINESE } else if ((which_dict & 0x00ff) == WNN_REV_DICT) @@ -235,7 +231,7 @@ usage (); } strcpy (infile, (*argv)[1]); - if (wnn_loadhinsi (hinsi_file_name) != 0) + if (wnn_loadhinsi ((unsigned char *)hinsi_file_name) != 0) { fprintf (stderr, "Can't Open hinsi_file.\n"); exit (1); diff -r 6bfa7ea3b75b -r a7ccf412ba02 Wnn/jutil/oldatonewa.c --- a/Wnn/jutil/oldatonewa.c Sat Mar 06 18:29:27 2010 +0900 +++ b/Wnn/jutil/oldatonewa.c Sat Mar 06 23:24:53 2010 +0900 @@ -29,10 +29,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef lint -static char *rcs_id = "$Id: oldatonewa.c,v 1.6 2004/07/19 18:24:26 hiroo Exp $"; -#endif /* lint */ - #ifdef HAVE_CONFIG_H # include #endif diff -r 6bfa7ea3b75b -r a7ccf412ba02 Wnn/jutil/ujisf.c --- a/Wnn/jutil/ujisf.c Sat Mar 06 18:29:27 2010 +0900 +++ b/Wnn/jutil/ujisf.c Sat Mar 06 23:24:53 2010 +0900 @@ -276,7 +276,7 @@ if ((c = get_string (tmp, c)) == NULL) return (-1); - bunpou_num (tmp, &((*jep)->hinsi)); + bunpou_num (tmp, (int *)&((*jep)->hinsi)); if ((c = get_string (tmp, c)) == NULL) return (-1); diff -r 6bfa7ea3b75b -r a7ccf412ba02 Wnn/jutil/wddel.c --- a/Wnn/jutil/wddel.c Sat Mar 06 18:29:27 2010 +0900 +++ b/Wnn/jutil/wddel.c Sat Mar 06 23:24:53 2010 +0900 @@ -33,10 +33,6 @@ * UJIS ファイルを読みとって、単語登録を行なう。 */ -#ifndef lint -static char *rcs_id = "$Id: wddel.c,v 1.8 2002/05/12 22:51:17 hiroo Exp $"; -#endif /* lint */ - #ifdef HAVE_CONFIG_H # include #endif @@ -126,7 +122,7 @@ } server_n = def_server; - if (cswidth_name = get_cswidth_name (WNN_DEFAULT_LANG)) + if ((cswidth_name = get_cswidth_name (WNN_DEFAULT_LANG))) set_cswidth (create_cswidth (cswidth_name)); while ((c = getopt (argc, argv, "D:n:d:CHEL")) != EOF) { diff -r 6bfa7ea3b75b -r a7ccf412ba02 Wnn/jutil/wdreg.c --- a/Wnn/jutil/wdreg.c Sat Mar 06 18:29:27 2010 +0900 +++ b/Wnn/jutil/wdreg.c Sat Mar 06 23:24:53 2010 +0900 @@ -33,10 +33,6 @@ * UJIS ファイルを読みとって、単語登録を行なう。 */ -#ifndef lint -static char *rcs_id = "$Id: wdreg.c,v 1.8 2002/05/12 22:51:17 hiroo Exp $"; -#endif /* lint */ - #ifdef HAVE_CONFIG_H # include #endif @@ -126,7 +122,7 @@ } server_n = def_server; - if (cswidth_name = get_cswidth_name (WNN_DEFAULT_LANG)) + if ((cswidth_name = get_cswidth_name (WNN_DEFAULT_LANG))) set_cswidth (create_cswidth (cswidth_name)); while ((c = getopt (argc, argv, "D:n:d:L")) != EOF) { diff -r 6bfa7ea3b75b -r a7ccf412ba02 Wnn/jutil/wnnkill.c --- a/Wnn/jutil/wnnkill.c Sat Mar 06 18:29:27 2010 +0900 +++ b/Wnn/jutil/wnnkill.c Sat Mar 06 23:24:53 2010 +0900 @@ -29,10 +29,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef lint -static char *rcs_id = "$Id: wnnkill.c,v 1.10 2005/01/30 17:14:20 aonoto Exp $"; -#endif /* lint */ - #ifdef HAVE_CONFIG_H # include #endif @@ -173,7 +169,7 @@ if (!*serv) { - if (serv = _wnn_get_machine_of_serv_defs (lang)) + if ((serv = _wnn_get_machine_of_serv_defs (lang))) { if ((js = js_open_lang (serv, lang, WNN_TIMEOUT)) == NULL) { diff -r 6bfa7ea3b75b -r a7ccf412ba02 Wnn/jutil/wnnstat.c --- a/Wnn/jutil/wnnstat.c Sat Mar 06 18:29:27 2010 +0900 +++ b/Wnn/jutil/wnnstat.c Sat Mar 06 23:24:53 2010 +0900 @@ -29,10 +29,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef lint -static char *rcs_id = "$Id: wnnstat.c,v 1.10 2002/05/12 22:51:17 hiroo Exp $"; -#endif /* lint */ - #ifdef HAVE_CONFIG_H # include #endif @@ -234,7 +230,7 @@ if (!*serv) { - if (serv = _wnn_get_machine_of_serv_defs (lang)) + if ((serv = _wnn_get_machine_of_serv_defs (lang))) { if ((js = js_open_lang (serv, lang, WNN_TIMEOUT)) == NULL) { diff -r 6bfa7ea3b75b -r a7ccf412ba02 Wnn/jutil/wnntouch.c --- a/Wnn/jutil/wnntouch.c Sat Mar 06 18:29:27 2010 +0900 +++ b/Wnn/jutil/wnntouch.c Sat Mar 06 23:24:53 2010 +0900 @@ -33,10 +33,6 @@ * 辞書のヘッダを書き換えて、辞書の inode と合わせるプログラム。 */ -#ifndef lint -static char *rcs_id = "$Id: wnntouch.c,v 1.8 2004/07/19 18:24:26 hiroo Exp $"; -#endif /* lint */ - #ifdef HAVE_CONFIG_H # include #endif diff -r 6bfa7ea3b75b -r a7ccf412ba02 Wnn/romkan/rk_bltinfn.c --- a/Wnn/romkan/rk_bltinfn.c Sat Mar 06 18:29:27 2010 +0900 +++ b/Wnn/romkan/rk_bltinfn.c Sat Mar 06 23:24:53 2010 +0900 @@ -217,12 +217,12 @@ default: if (is_kata (in)) { - for (p = (uns_chr *) hankdata[in - KATBGN]; c = *p; p++) + for (p = (uns_chr *) hankdata[in - KATBGN]; (c = *p); p++) *out++ = (c << 8) + *++p; } else if (is_hira (in)) { - for (p = (uns_chr *) hankdata[in - HIRBGN]; c = *p; p++) + for (p = (uns_chr *) hankdata[in - HIRBGN]; (c = *p); p++) *out++ = (c << 8) + *++p; } else diff -r 6bfa7ea3b75b -r a7ccf412ba02 Wnn/romkan/rk_main.c --- a/Wnn/romkan/rk_main.c Sat Mar 06 18:29:27 2010 +0900 +++ b/Wnn/romkan/rk_main.c Sat Mar 06 23:24:53 2010 +0900 @@ -87,7 +87,7 @@ 処理中はeofflgは2。 */ letter evalbuf[2][2][OUTSIZ]; -char ebf_sw = 0; +int ebf_sw = 0; letter saishu_out[OUTSIZ]; letter delchr, delchr2 = EOLTTR, nisedl; /* DELのキャラクタは二個まで持てる */ diff -r 6bfa7ea3b75b -r a7ccf412ba02 Wnn/romkan/rk_modread.c --- a/Wnn/romkan/rk_modread.c Sat Mar 06 18:29:27 2010 +0900 +++ b/Wnn/romkan/rk_modread.c Sat Mar 06 23:24:53 2010 +0900 @@ -75,36 +75,45 @@ extern void ERRMOD (), ERMOPN (), BUGreport (); extern int filnamchk (); -struct kwdpair -{ +struct kwdpair { /* キーワードとその内部表現の対応を与える構造体。内部表現を 持たないものに対しては0が与えられている。 */ char *name; int code; -} -modfn[] = -{ - "defmode", 0, - "if", XY2INT (2, 0), "when", XY2INT (2, 1), "path", 0, "search", 0, "on_dispmode", XY2INT (5, 0), "off_dispmode", XY2INT (5, 1), "on_unchg", XY2INT (6, 0), "off_unchg", XY2INT (6, 1), NULL}; /* 下を見よ キーワード定義表はまだあと二つあるのだ */ +}; + +struct kwdpair modfn[] = { + {"defmode", 0}, + {"if", XY2INT (2, 0)}, + {"when", XY2INT (2, 1)}, + {"path", 0}, + {"search", 0}, + {"on_dispmode", XY2INT (5, 0)}, + {"off_dispmode", XY2INT (5, 1)}, + {"on_unchg", XY2INT (6, 0)}, + {"off_unchg", XY2INT (6, 1)}, + {NULL, 0}, +}; /* 下を見よ キーワード定義表はまだあと二つあるのだ */ struct kwdpair modcond[] = { - "not", XY2INT (3, 0), - "and", XY2INT (3, 1), - "or", XY2INT (3, 2), - "true", XY2INT (3, 3), - "false", XY2INT (3, 4), - "=", XY2INT (3, 5), - "!=", XY2INT (3, 6), - "<", XY2INT (3, 7), - ">", XY2INT (3, 8), - NULL + {"not", XY2INT (3, 0)}, + {"and", XY2INT (3, 1)}, + {"or", XY2INT (3, 2)}, + {"true", XY2INT (3, 3)}, + {"false", XY2INT (3, 4)}, + {"=", XY2INT (3, 5)}, + {"!=", XY2INT (3, 6)}, + {"<", XY2INT (3, 7)}, + {">", XY2INT (3, 8)}, + {NULL, 0} }; + int condarg[] = { 1, 2, 2, 0, 0, 2, 2, 2, 2 }; /* 条件判断関数の引数個数 */ struct kwdpair swstat[] = { - "on", 0, - "off", 0, - NULL + {"on", 0}, + {"off", 0}, + {NULL, 0} }; /* 1×2^24代はモード名、4×2^24代はモード表示文字列、7×2^24代はモード状態定 数の内部表現に使っている */ @@ -121,7 +130,8 @@ if (!mystrcmp (hyo[i].name, wd)) return (i); ERRMOD (9); - /*NOTREACHED*/ + /*NOTREACHED*/ + return -1; /* dummy */ } /** モード表の読み込み */ @@ -1280,7 +1290,7 @@ mystrcpy (s1, s2) char *s1, *s2; { - while (*s1++ = codeeval (&s2)); + while ((*s1++ = codeeval(&s2))); } /** 一文字の解釈を行う。普通の文字はそのまま、'\(8進);'は実際のコードに diff -r 6bfa7ea3b75b -r a7ccf412ba02 Wnn/romkan/rk_vars.c --- a/Wnn/romkan/rk_vars.c Sat Mar 06 18:29:27 2010 +0900 +++ b/Wnn/romkan/rk_vars.c Sat Mar 06 23:24:53 2010 +0900 @@ -86,7 +86,7 @@ char **dspnamptr, *dspnambgn[DMDMAX]; /* モード表示文字列に対する同様のデータ */ char *dspcod, dspcod_[DMDCHR]; /* 〃 */ -char *dspmod[2][2] = { NULL, NULL, NULL, NULL }; +char *dspmod[2][2] = { {NULL, NULL}, {NULL, NULL} }; /* 現在及び一つ前の、romkanをそれぞれon・offしている時のモード表示 文字列へのポインタ。romkan_dispmode()で返る値はdspmod[0][0]。 */ @@ -128,52 +128,52 @@ /* 引数の数(-1…この値未使用) 名 出現 | タイプ…0:文字関数 1:文字列関数 ↓ ↓ ↓ ↓ 2:特殊関数 3:機能 4:宣言 */ - "defvar", bit3 (1, 0, 0), -1, 4, /* 0 */ - "include", bit3 (1, 0, 0), -1, 4, - "toupper", bit3 (1, 1, 1), 1, 0, - "tolower", bit3 (1, 1, 1), 1, 0, - "off", bit3 (0, 1, 0), -1, 2, - "on", bit3 (0, 1, 0), -1, 2, /* 5 */ - "switch", bit3 (0, 1, 0), -1, 2, - "toupdown", bit3 (1, 1, 1), 1, 0, - "tozenalpha", bit3 (1, 1, 1), 1, 0, - "tohira", bit3 (1, 1, 1), 1, 0, - "tokata", bit3 (1, 1, 1), 1, 0, /* 10 */ - "tohankata", bit3 (1, 1, 1), 1, 1, - "tozenhira", bit3 (1, 1, 1), 1, 0, - "tozenkata", bit3 (1, 1, 1), 1, 0, - "+", bit3 (1, 1, 1), 2, 0, - "-", bit3 (1, 1, 1), 2, 0, /* 15 */ - "*", bit3 (1, 1, 1), 2, 0, - "/", bit3 (1, 1, 1), 2, 0, - "%", bit3 (1, 1, 1), 2, 0, - "last=", bit3 (1, 0, 0), 1, 2, /* 直前のマッチコード==引数か? */ - "if", bit3 (1, 0, 0), -1, 2, /* 20 */ - "unless", bit3 (1, 0, 0), -1, 2, - "restart", bit3 (0, 1, 0), 0, 3, - "delchr", bit3 (1, 1, 1), 0, 0, /* delchrを返す。隠しコマンド */ - "alloff", bit3 (0, 1, 0), 0, 2, /* 全モードをいっぺんにOFF */ - "allon", bit3 (0, 1, 0), 0, 2, /* 25 */ - "bitand", bit3 (1, 1, 1), 2, 0, - "bitor", bit3 (1, 1, 1), 2, 0, - "bitnot", bit3 (1, 1, 1), 1, 0, - "!", bit3 (0, 1, 0), 0, 2, /* 裏バッファの明示的クリア */ - "atEOF", bit3 (1, 0, 0), 0, 2, /* 30 */ - "todigit", bit3 (1, 1, 1), 2, 1, - "dakuadd", bit3 (1, 1, 1), 1, 1, /* 濁点の付加 */ - "handakuadd", bit3 (1, 1, 1), 1, 1, /* 半濁点の付加 */ - "value", bit3 (1, 1, 1), 1, 0, - "error", bit3 (0, 1, 0), 0, 3, /* 35 */ - "defconst", bit3 (1, 0, 0), -1, 4, - "setmode", bit3 (0, 1, 0), -1, 2, - "mode+", bit3 (0, 1, 0), -1, 2, - "mode-", bit3 (0, 1, 0), -1, 2, - "mode=", bit3 (1, 0, 0), -1, 2, /* 40 */ - "mode!=", bit3 (1, 0, 0), -1, 2, - "mode<", bit3 (1, 0, 0), -1, 2, - "mode>", bit3 (1, 0, 0), -1, 2, - "send", bit3 (0, 1, 0), 1, 1, /* 試作 */ - NULL + {"defvar", bit3 (1, 0, 0), -1, 4}, /* 0 */ + {"include", bit3 (1, 0, 0), -1, 4}, + {"toupper", bit3 (1, 1, 1), 1, 0}, + {"tolower", bit3 (1, 1, 1), 1, 0}, + {"off", bit3 (0, 1, 0), -1, 2}, + {"on", bit3 (0, 1, 0), -1, 2}, /* 5 */ + {"switch", bit3 (0, 1, 0), -1, 2}, + {"toupdown", bit3 (1, 1, 1), 1, 0}, + {"tozenalpha", bit3 (1, 1, 1), 1, 0}, + {"tohira", bit3 (1, 1, 1), 1, 0}, + {"tokata", bit3 (1, 1, 1), 1, 0}, /* 10 */ + {"tohankata", bit3 (1, 1, 1), 1, 1}, + {"tozenhira", bit3 (1, 1, 1), 1, 0}, + {"tozenkata", bit3 (1, 1, 1), 1, 0}, + {"+", bit3 (1, 1, 1), 2, 0}, + {"-", bit3 (1, 1, 1), 2, 0}, /* 15 */ + {"*", bit3 (1, 1, 1), 2, 0}, + {"/", bit3 (1, 1, 1), 2, 0}, + {"%", bit3 (1, 1, 1), 2, 0}, + {"last=", bit3 (1, 0, 0), 1, 2}, /* 直前のマッチコード==引数か? */ + {"if", bit3 (1, 0, 0), -1, 2}, /* 20 */ + {"unless", bit3 (1, 0, 0), -1, 2}, + {"restart", bit3 (0, 1, 0), 0, 3}, + {"delchr", bit3 (1, 1, 1), 0, 0}, /* delchrを返す。隠しコマンド */ + {"alloff", bit3 (0, 1, 0), 0, 2}, /* 全モードをいっぺんにOFF */ + {"allon", bit3 (0, 1, 0), 0, 2}, /* 25 */ + {"bitand", bit3 (1, 1, 1), 2, 0}, + {"bitor", bit3 (1, 1, 1), 2, 0}, + {"bitnot", bit3 (1, 1, 1), 1, 0}, + {"!", bit3 (0, 1, 0), 0, 2}, /* 裏バッファの明示的クリア */ + {"atEOF", bit3 (1, 0, 0), 0, 2}, /* 30 */ + {"todigit", bit3 (1, 1, 1), 2, 1}, + {"dakuadd", bit3 (1, 1, 1), 1, 1}, /* 濁点の付加 */ + {"handakuadd", bit3 (1, 1, 1), 1, 1}, /* 半濁点の付加 */ + {"value", bit3 (1, 1, 1), 1, 0}, + {"error", bit3 (0, 1, 0), 0, 3}, /* 35 */ + {"defconst", bit3 (1, 0, 0), -1, 4}, + {"setmode", bit3 (0, 1, 0), -1, 2}, + {"mode+", bit3 (0, 1, 0), -1, 2}, + {"mode-", bit3 (0, 1, 0), -1, 2}, + {"mode=", bit3 (1, 0, 0), -1, 2}, /* 40 */ + {"mode!=", bit3 (1, 0, 0), -1, 2}, + {"mode<", bit3 (1, 0, 0), -1, 2}, + {"mode>", bit3 (1, 0, 0), -1, 2}, + {"send", bit3 (0, 1, 0), 1, 1}, /* 試作 */ + {NULL, 0, 0, 0} }; /* last=〜unless… 入力コードの位置にしか置けず、文字列関数扱いなので 本処理表にしか書けない。 */