# HG changeset patch # User Yoshiki Yazawa # Date 1267867767 -32400 # Node ID 6bfa7ea3b75b995ed0e89f18e46d0505b83622a4 # Parent 6dcfbd28e8077e3370d35bb33ca2d5e3fb2aff29 - resolved conflict between pointer and int - more warning suppression diff -r 6dcfbd28e807 -r 6bfa7ea3b75b Wnn/etc/gethinsi.c --- a/Wnn/etc/gethinsi.c Sat Mar 06 07:58:49 2010 +0900 +++ b/Wnn/etc/gethinsi.c Sat Mar 06 18:29:27 2010 +0900 @@ -245,9 +245,9 @@ } static int -stradd (w_char **cp, char *str) +stradd (w_char **cp, UCHAR *str) { - int len = strlen (str); + int len = strlen ((char *)str); if (hp + len + 1 >= heap + HEAP_LEN) { diff -r 6dcfbd28e807 -r 6bfa7ea3b75b Wnn/include/jdata.h --- a/Wnn/include/jdata.h Sat Mar 06 07:58:49 2010 +0900 +++ b/Wnn/include/jdata.h Sat Mar 06 18:29:27 2010 +0900 @@ -36,8 +36,8 @@ #ifndef JS struct jdata { - int kanji1; - short kanji2; /* */ + int kanji1; /* index */ + short kanji2; /* index */ short which; /* gyaku henkan? */ int serial; /* index is a serial number of the first entry which is stored in this entry */ @@ -138,17 +138,17 @@ struct uind1 { - int pter1; /* pointer to uind1 */ - int pter; /* pinter to uind2 */ + int pter1; /* pointer to uind1 (index?) */ + int pter; /* pinter to uind2 (index?) */ unsigned int yomi1; unsigned int yomi2; }; struct uind2 { - int next; /* pointer to uind2 */ + int next; /* pointer to uind2 (index?) */ int serial; - int kanjipter; + int kanjipter; /* index maybe */ w_char kosuu; w_char yomi[1]; /* actually it is variable length */ }; diff -r 6dcfbd28e807 -r 6bfa7ea3b75b Wnn/jserver/de.c --- a/Wnn/jserver/de.c Sat Mar 06 07:58:49 2010 +0900 +++ b/Wnn/jserver/de.c Sat Mar 06 18:29:27 2010 +0900 @@ -28,7 +28,6 @@ /* Jserver (Nihongo Daemon) */ -static char rcs_id[] = "$Id: de.c,v 1.36 2004/06/18 16:32:41 hiroo Exp $"; #if defined(HAVE_CONFIG_H) # include @@ -216,7 +215,6 @@ int main (int argc, char *argv[]) { - int tmpttyfd; char *cswidth_name; extern char *get_cswidth_name (); extern void set_cswidth (); @@ -323,7 +321,8 @@ # define TIOCNOTTY _IO('t', 113) # endif /* !defined(TIOCNOTTY) && defined(SVR4) */ #ifndef HITACHI - if ((tmpttyfd = open ("/dev/tty", O_RDWR)) >= 0) + int tmpttyfd; + if ((tmpttyfd = open ("/dev/tty", O_RDWR)) >= 0) { ioctl (tmpttyfd, TIOCNOTTY, 0); close (tmpttyfd); @@ -1178,14 +1177,12 @@ get_options (int argc, char **argv) { int c; - int digit_optind = 0; strcpy (jserverrcfile, LIBDIR); /* usr/local/lib/wnn */ strcat (jserverrcfile, SERVER_INIT_FILE); /* ja_JP/jserverrc */ while (1) { - int this_option_optind = optind ? optind : 1; int option_index = 0; static struct option long_options[] = { diff -r 6dcfbd28e807 -r 6bfa7ea3b75b Wnn/jserver/do_henkan1.c --- a/Wnn/jserver/do_henkan1.c Sat Mar 06 07:58:49 2010 +0900 +++ b/Wnn/jserver/do_henkan1.c Sat Mar 06 18:29:27 2010 +0900 @@ -435,7 +435,7 @@ register struct JT *jtl; jtl = (struct JT *) (files[dic_table[jentptr->jishono].body].area); - kptr = (UCHAR *)(jtl->kanji + jentptr->kanji1); // xxx which one is the offset?? --yaz + kptr = jtl->kanji + jentptr->kanji1; if (jentptr->which == D_YOMI) { Get_knj1 (kptr, oy, oyl, jentptr->kanji2 + u, kouho, NULL, NULL); @@ -474,6 +474,6 @@ struct JT *jtl; jtl = (struct JT *) (files[dic_table[jentptr->jishono].body].area); - kptr = (UCHAR *)(jtl->kanji + jentptr->kanji1); // xxx may result in failure --yaz + kptr = jtl->kanji + jentptr->kanji1; Get_knj2 (kptr, jentptr->kanji2 + u, kouho, NULL, com); } diff -r 6dcfbd28e807 -r 6bfa7ea3b75b Wnn/jserver/jbiki.c --- a/Wnn/jserver/jbiki.c Sat Mar 06 07:58:49 2010 +0900 +++ b/Wnn/jserver/jbiki.c Sat Mar 06 18:29:27 2010 +0900 @@ -185,7 +185,7 @@ maxlevel = max (maxlevel, len); if (j_e_p >= jmtw_end) return (-1); - j_e_p->kanji1 = p->kanjipter; //xxx is this an offset? may result in failure --yaz + j_e_p->kanji1 = p->kanjipter; j_e_p->kanji2 = 0; j_e_p->serial = p->serial; j_e_p->kosuu = p->kosuu; @@ -445,7 +445,7 @@ maxlevel = max (maxlevel, level + 1); if (j_e_p >= jmtw_end) return (-1); - j_e_p->kanji1 = *(int *) (hopter + 8); //xxx what's? --yaz + j_e_p->kanji1 = *(int *) (hopter + 8); j_e_p->kanji2 = sumst[index - 1]; j_e_p->serial = serial = *(int *) (hopter + 4) + sumst[index - 1]; j_e_p->kosuu = cnt; @@ -607,7 +607,7 @@ *jepp = j_e_p; if (j_e_p >= jmtw_end) return (-1); - j_e_p->kanji1 = p->kanjipter; //xxx this may result in failure --yaz + j_e_p->kanji1 = p->kanjipter; j_e_p->kanji2 = 0; j_e_p->serial = serial; j_e_p->kosuu = 1; diff -r 6dcfbd28e807 -r 6bfa7ea3b75b Wnn/jserver/jishosub.c --- a/Wnn/jserver/jishosub.c Sat Mar 06 07:58:49 2010 +0900 +++ b/Wnn/jserver/jishosub.c Sat Mar 06 18:29:27 2010 +0900 @@ -139,7 +139,7 @@ int sdiff; int last; int serialst; - UCHAR *kanji1; + int kanji1; yomi[0] = 0; @@ -166,7 +166,7 @@ case ST_NOPTER: tsize = *(w_char *) (hopter + 2); serialst = *(int *) (hopter + 4); - kanji1 = (UCHAR *) (hopter + 8); + kanji1 = *(int *) (hopter + 8); charst = (w_char *) (hopter + 12); sumst = ((w_char *) charst + tsize + 2); /* + 2 keeps two zero words */ @@ -187,7 +187,7 @@ yomi[len] = charst[key]; yomi[len + 1] = 0; - jd->kanji1 = (int)kanji1; // xxx this may result in failure --yaz + jd->kanji1 = kanji1; jd->kanji2 = serial - serialst; jd->serial = serial; jd->kosuu = 1; @@ -353,7 +353,7 @@ Strncpy (yomi + 4, (p->yomi) + 1, len - 4); yomi[len] = 0; - jd->kanji1 = p->kanjipter; // xxx this may result in failure --yaz + jd->kanji1 = p->kanjipter; jd->kanji2 = serial - p->serial; jd->serial = serial; jd->kosuu = 1; diff -r 6dcfbd28e807 -r 6bfa7ea3b75b Wnn/jserver/rd_jishoop.c --- a/Wnn/jserver/rd_jishoop.c Sat Mar 06 07:58:49 2010 +0900 +++ b/Wnn/jserver/rd_jishoop.c Sat Mar 06 18:29:27 2010 +0900 @@ -289,7 +289,7 @@ p = jtl->ri2 + serial; get_kanji_str (jtl->kanji + p->kanjipter, NULL, yomi, NULL); - jd->kanji1 = p->kanjipter; // xxx this may result in failure --yaz + jd->kanji1 = p->kanjipter; jd->kanji2 = 0; jd->serial = serial; jd->kosuu = 1;