Mercurial > freewnn
changeset 1:790205f476c0
applied wnn_dec12.diff
author | Yoshiki Yazawa <yaz@cc.rim.or.jp> |
---|---|
date | Thu, 13 Dec 2007 04:47:24 +0900 |
parents | bbc77ca4def5 |
children | b605a0e60f5b |
files | Wnn/etc/xutoj.c Wnn/include/jdata.h Wnn/jlib/jl.c Wnn/jlib/js.c Wnn/jserver/b_index.c Wnn/jserver/daibn_kai.c Wnn/jserver/de.c Wnn/jserver/de_header.h Wnn/jserver/do_filecom.c Wnn/jserver/do_henkan.c Wnn/jserver/do_henkan1.c Wnn/jserver/fzk.c Wnn/jserver/get_kaiarea.c Wnn/jserver/jbiki.c Wnn/jserver/jishoop.c Wnn/jserver/jishosub.c Wnn/jserver/rd_jishoop.c Wnn/jserver/readfile.c Wnn/jutil/atod.c |
diffstat | 19 files changed, 73 insertions(+), 73 deletions(-) [+] |
line wrap: on
line diff
--- a/Wnn/etc/xutoj.c Thu Dec 13 04:30:14 2007 +0900 +++ b/Wnn/etc/xutoj.c Thu Dec 13 04:47:24 2007 +0900 @@ -346,7 +346,7 @@ { /* GL */ LorR = GL; } - else if (*ec >= 0xa0 && *ec <= 0xff) + else if (*ec >= 0xa0)// && *ec <= 0xff) { /* GR */ LorR = GR; }
--- a/Wnn/include/jdata.h Thu Dec 13 04:30:14 2007 +0900 +++ b/Wnn/include/jdata.h Thu Dec 13 04:47:24 2007 +0900 @@ -36,7 +36,7 @@ #ifndef JS struct jdata { - int kanji1; + UCHAR *kanji1; short kanji2; /* */ short which; /* gyaku henkan? */ int serial; /* index is a serial number of the first @@ -86,7 +86,7 @@ #endif unsigned short *hinsi; /* bunpou data is stored here */ UCHAR *kanji; /* kanji data is stored here */ - struct uind1 *table; /* anothe tablefile for user jisho */ + struct uind1 *table; /* another tablefile for user jisho */ UCHAR *hontai; /* the tablefile (index-file) */ struct rind1 *ri1[2]; /* For Rev Dic */ struct rind2 *ri2; /* For Rev Dic */ @@ -148,7 +148,7 @@ { int next; /* pointer to uind2 */ int serial; - int kanjipter; + long kanjipter; w_char kosuu; w_char yomi[1]; /* actually it is variable length */ }; @@ -174,7 +174,7 @@ struct rind2 { int next[2]; /* pointer to rind2 */ - int kanjipter; + long kanjipter; }; /*
--- a/Wnn/jlib/jl.c Thu Dec 13 04:30:14 2007 +0900 +++ b/Wnn/jlib/jl.c Thu Dec 13 04:47:24 2007 +0900 @@ -1519,7 +1519,7 @@ jl_disconnect (env); return (-1); } - if ((int) error_handler == WNN_NO_CREATE || (rw == WNN_DIC_RDONLY)) + if (error_handler == (void *)WNN_NO_CREATE || (rw == WNN_DIC_RDONLY)) { sprintf (tmp, "%s \"%s\" %s", msg_get (wnn_msg_cat, 200, NULL, env->lang), dic_name, msg_get (wnn_msg_cat, 201, NULL, env->lang)); /* @@ -1533,7 +1533,7 @@ /* "辞書ファイル \"%s\" が無いよ。作る?(Y/N)", */ - if ((int) error_handler == WNN_CREATE || call_error_handler (error_handler, tmp)) + if (error_handler == (void *)WNN_CREATE || call_error_handler (error_handler, tmp)) { if (create_file (env, dic_name, JISHO, -1, /* -1 is dummy */ pwd_dic, (hindo_name && *hindo_name) ? "" : pwd_hindo, error_handler, message_handler) == -1) @@ -1558,7 +1558,7 @@ jl_disconnect (env); return (-1); } - if ((int) error_handler == WNN_NO_CREATE || (hrw == WNN_DIC_RDONLY)) + if (error_handler == (void *)WNN_NO_CREATE || (hrw == WNN_DIC_RDONLY)) { sprintf (tmp, "%s \"%s\" %s", msg_get (wnn_msg_cat, 203, NULL, env->lang), hindo_name, msg_get (wnn_msg_cat, 201, NULL, env->lang)); /* @@ -1572,7 +1572,7 @@ /* "頻度ファイル \"%s\" が無いよ。作る?(Y/N)", */ - if ((int) error_handler == WNN_CREATE || call_error_handler (error_handler, tmp)) + if (error_handler == (void *)WNN_CREATE || call_error_handler (error_handler, tmp)) { if (create_file (env, hindo_name, HINDO, fid, "", pwd_hindo, error_handler, message_handler) == -1) return (-1); @@ -1601,7 +1601,7 @@ } else if (wnn_errorno == WNN_HINDO_NO_MATCH) { - if ((int) error_handler == WNN_NO_CREATE) + if (error_handler == (void *)WNN_NO_CREATE) { return (-1); } @@ -1609,7 +1609,7 @@ /* "辞書と頻度 \"%s\" の整合性が無いよ。作り直す?(Y/N)", */ - if (!((int) error_handler == WNN_CREATE || call_error_handler (error_handler, tmp))) + if (!(error_handler == (void *)WNN_CREATE || call_error_handler (error_handler, tmp))) { return (-1); } @@ -2755,11 +2755,11 @@ int level = 0; int x; wnn_errorno = 0; - if ((int) error_handler == WNN_CREATE) + if (error_handler == (void *)WNN_CREATE) { confirm_state = CREATE_WITHOUT_CONFIRM; } - else if ((int) error_handler == WNN_NO_CREATE) + else if (error_handler == (void *)WNN_NO_CREATE) { confirm_state = NO_CREATE; } @@ -3076,7 +3076,7 @@ total = 0; flag = 0; - while (*st != NULL) + while (*st != '\0') { if (isdigit (*st)) { @@ -3287,7 +3287,7 @@ return (0); /* dir already exists */ } } - if ((int) error_handler != WNN_CREATE) + if (error_handler != (void *)WNN_CREATE) { sprintf (gomi, "%s \"%s\" %s%s", msg_get (wnn_msg_cat, 210, NULL, env->lang), dirname, msg_get (wnn_msg_cat, 201, NULL, env->lang), msg_get (wnn_msg_cat, 202, NULL, env->lang)); /*
--- a/Wnn/jlib/js.c Thu Dec 13 04:30:14 2007 +0900 +++ b/Wnn/jlib/js.c Thu Dec 13 04:47:24 2007 +0900 @@ -979,7 +979,7 @@ free((char *)env); */ set_current_js (env->js_id); - handler_of_jserver_dead (NULL); + handler_of_jserver_dead (0); snd_env_head (&tmp_env, JS_DISCONNECT); snd_flush (); x = get4com ();
--- a/Wnn/jserver/b_index.c Thu Dec 13 04:30:14 2007 +0900 +++ b/Wnn/jserver/b_index.c Thu Dec 13 04:47:24 2007 +0900 @@ -314,7 +314,7 @@ return (i); } if (b_cnt++ >= jt->bufsize_bnode) /* Use new b_nodes */ - if (rd_realloc_bind (jt) == NULL) /* realloc jt->bind */ + if (rd_realloc_bind (jt) == 0) /* realloc jt->bind */ return (-1); return (jt->bufsize_bnode = b_cnt); /* Not re-alloc */ }
--- a/Wnn/jserver/daibn_kai.c Thu Dec 13 04:30:14 2007 +0900 +++ b/Wnn/jserver/daibn_kai.c Thu Dec 13 04:47:24 2007 +0900 @@ -258,7 +258,7 @@ { if ( #ifndef NO_FZK - (fzkchar == NULL || *fzkchar == NULL) && + (fzkchar == NULL || *fzkchar == '\0') && #endif /* NO_FZK */ beginvect == sentou_no) { @@ -324,7 +324,7 @@ #ifndef NO_FZK else { - if (fzkchar == NULL || *fzkchar == NULL) + if (fzkchar == NULL || *fzkchar == '\0') { if ((ll = wnn_get_fukugou_component_body (hinsi, &buf)) == 0) {
--- a/Wnn/jserver/de.c Thu Dec 13 04:30:14 2007 +0900 +++ b/Wnn/jserver/de.c Thu Dec 13 04:47:24 2007 +0900 @@ -280,12 +280,12 @@ daemon_init (); env_init (); - if (file_init () == NULL) + if (!file_init ()) { exit (1); } dic_init (); - if (NULL == get_kaiseki_area (LENGTHCONV + 1)) /* 変換可能文字数 */ + if (!get_kaiseki_area (LENGTHCONV + 1)) /* 変換可能文字数 */ { log_err ("get_kaiseki_area failed."); exit (1);
--- a/Wnn/jserver/de_header.h Thu Dec 13 04:30:14 2007 +0900 +++ b/Wnn/jserver/de_header.h Thu Dec 13 04:47:24 2007 +0900 @@ -60,7 +60,7 @@ #define FILENAME 128 #define SUCCESS 1 -#define FAILURE NULL +#define FAILURE 0 #define CL_MAX 32 #define ST_MAX 10
--- a/Wnn/jserver/do_filecom.c Thu Dec 13 04:30:14 2007 +0900 +++ b/Wnn/jserver/do_filecom.c Thu Dec 13 04:47:24 2007 +0900 @@ -85,7 +85,7 @@ if ( files == NULL ) { log_err ("file_init: malloc faild."); - return (NULL); + return (FAILURE); } for (i = 0; i < MAX_FILES; i++) { @@ -518,7 +518,7 @@ wnn_errorno = WNN_RDONLY; goto ERR_RET; } - if (file_comment_set (&files[fid], comment) == NULL) + if (!file_comment_set (&files[fid], comment)) { goto ERR_RET; }
--- a/Wnn/jserver/do_henkan.c Thu Dec 13 04:30:14 2007 +0900 +++ b/Wnn/jserver/do_henkan.c Thu Dec 13 04:47:24 2007 +0900 @@ -207,7 +207,7 @@ put4_cur (sho_list->jentptr->serial + sho_list->t_jc); /* entry + t_jc */ /* Internally, we use "kasou-hindo" - * so return kasou-hindo as hindo-value"*/ + * so return kasou-hindo as hindo-value */ hindo = *(sho_list->jentptr->hindo + sho_list->t_jc) & 0x7F; if (sho_list->jentptr->hindo_in) {
--- a/Wnn/jserver/do_henkan1.c Thu Dec 13 04:30:14 2007 +0900 +++ b/Wnn/jserver/do_henkan1.c Thu Dec 13 04:47:24 2007 +0900 @@ -435,7 +435,7 @@ register struct JT *jtl; jtl = (struct JT *) (files[dic_table[jentptr->jishono].body].area); - kptr = jtl->kanji + jentptr->kanji1; + kptr = (long)jtl->kanji + jentptr->kanji1; // xxx which one is the offset?? --yaz 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 = jtl->kanji + jentptr->kanji1; + kptr = (long)jtl->kanji + jentptr->kanji1; Get_knj2 (kptr, jentptr->kanji2 + u, kouho, NULL, com); }
--- a/Wnn/jserver/fzk.c Thu Dec 13 04:30:14 2007 +0900 +++ b/Wnn/jserver/fzk.c Thu Dec 13 04:47:24 2007 +0900 @@ -627,7 +627,7 @@ for (yomicnt = 0; (yomicnt < YOMI_L) && (start < end); key[yomicnt++] = *start++) ; key[yomicnt] = 0; - for (; yomicnt > 0; key[--yomicnt] = NULL) + for (; yomicnt > 0; key[--yomicnt] = '\0') { search_ptr = (struct fzkentry *) bsrch (key); if (search_ptr != NULL)
--- a/Wnn/jserver/get_kaiarea.c Thu Dec 13 04:30:14 2007 +0900 +++ b/Wnn/jserver/get_kaiarea.c Thu Dec 13 04:47:24 2007 +0900 @@ -60,28 +60,28 @@ { wnn_errorno = WNN_MALLOC_INITIALIZE; log_debug ("malloc failed in maxj."); - return (NULL); + return (0); } if (NULL == (jmtp = (struct jdata ***) calloc (kana_len, sizeof (struct jdata **)))) { wnn_errorno = WNN_MALLOC_INITIALIZE; log_debug ("malloc failed in jmtp."); - return (NULL); + return (0); } if (NULL == (jmt_ = (struct jdata **) calloc (SIZE_JISHOTABLE, sizeof (struct jdata *)))) { wnn_errorno = WNN_MALLOC_INITIALIZE; log_debug ("malloc failed in jmt_."); - return (NULL); + return (0); } if (NULL == (jmtw_ = (struct jdata *) calloc (SIZE_JISHOHEAP, sizeof (struct jdata)))) { wnn_errorno = WNN_MALLOC_INITIALIZE; log_debug ("malloc failed in jmtw_."); - return (NULL); + return (0); } jmt_end = jmt_ + SIZE_JISHOTABLE; @@ -92,7 +92,7 @@ { wnn_errorno = WNN_MALLOC_INITIALIZE; log_debug ("malloc failed in bun."); - return (NULL); + return (0); } maxchg = kana_len;
--- a/Wnn/jserver/jbiki.c Thu Dec 13 04:30:14 2007 +0900 +++ b/Wnn/jserver/jbiki.c Thu Dec 13 04:47:24 2007 +0900 @@ -185,7 +185,7 @@ maxlevel = max (maxlevel, len); if (j_e_p >= jmtw_end) return (-1); - j_e_p->kanji1 = p->kanjipter; + j_e_p->kanji1 = (UCHAR *)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); + j_e_p->kanji1 = (UCHAR *) (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; + j_e_p->kanji1 = (UCHAR *)p->kanjipter; //xxx this may result in failure --yaz j_e_p->kanji2 = 0; j_e_p->serial = serial; j_e_p->kosuu = 1;
--- a/Wnn/jserver/jishoop.c Thu Dec 13 04:30:14 2007 +0900 +++ b/Wnn/jserver/jishoop.c Thu Dec 13 04:47:24 2007 +0900 @@ -304,22 +304,22 @@ Sreverse (yomi, pyomi); if ((jtl->bufsize_hontai <= jtl->maxhontai + sizeof (struct uind2) + Strlen (yomi)) - && (ud_realloc_hontai (jtl) == NULL)) + && (!ud_realloc_hontai (jtl))) { return (-1); } if ((jtl->bufsize_kanji <= jtl->maxkanji + (Strlen (kanji) + Strlen (comment) + Strlen (yomi) + 3) * sizeof (w_char) + 1) - && (ud_realloc_kanji (jtl) == NULL)) + && (!ud_realloc_kanji (jtl))) { return (-1); } if (jtl->bufsize_serial <= jtl->maxserial + 4 - && ud_realloc_serial (jtl) == NULL) + && !ud_realloc_serial (jtl)) { return (-1); } if (jtl->bufsize_table <= jtl->maxtable + sizeof (struct uind1) - && ud_realloc_table (jtl) == NULL) + && !ud_realloc_table (jtl)) { return (-1); } @@ -333,7 +333,7 @@ key += 1; for (key0 = key - 1; key0 >= 0; key0 = tary[key0].pter1) { - hop = (struct uind2 *) (jtl->hontai + tary[key0].pter); + hop = (struct uind2 *) (jtl->hontai + tary[key0].pter); if (Substrud (&tary[key0], yomi, hop->yomi[0], jtl)) { break; @@ -386,7 +386,7 @@ } if (hopter1->next == 0) break; - hopter1 = (struct uind2 *) (hopter1->next + (char *) (jtl->hontai)); + hopter1 = (struct uind2 *) (hopter1->next + (char *) (jtl->hontai)); } } hopter->next = tary[key].pter; @@ -411,7 +411,7 @@ w_char *kanji, *comment, *yomi; { register UCHAR *dest = jtl->kanji + jtl->maxkanji; - int len; + long len; #if defined(CONVERT_by_STROKE) || defined(CONVERT_with_SiSheng) if ((jtl->syurui & 0xff) != WNN_REV_DICT) @@ -422,7 +422,7 @@ #endif /* CONVERT_by_STROKE || CONVERT_with_SiSheng */ yomi = NULL; } - len = (int) kanjiaddr (dest, kanji, yomi, comment); + len = (long) kanjiaddr (dest, kanji, yomi, comment); jtl->maxkanji += len; } @@ -523,7 +523,7 @@ if (p->kosuu == 1) { *next_pter = p->next; - if (tary[ind1].pter == NULL) + if (tary[ind1].pter == 0) remove_space (tary, ind1, jtl, tary[ind1].pter1); if (p->serial == jtl->maxserial - 1) { @@ -556,7 +556,7 @@ if (jtl->bufsize_hontai <= jtl->maxhontai + sizeof (struct uind2) + Strlen (yomi)) { tmp = (char *) p - (char *) jtl->hontai; - if (ud_realloc_hontai (jtl) == NULL) + if (ud_realloc_hontai (jtl) == 0) { return (-1); } @@ -647,7 +647,7 @@ { if (jtl->bufsize_kanji <= jtl->maxkanji + (Strlen (kanji) + Strlen (comment) + Strlen (yomi1) + 4) * 2) { - if (ud_realloc_kanji (jtl) == NULL) + if (ud_realloc_kanji (jtl) == 0) { return (-1); } @@ -667,7 +667,7 @@ /* We need to spend one serial_no to ensure that the entry before this and after this are not connected */ if (jtl->bufsize_serial <= jtl->maxserial + 4 - && ud_realloc_serial (jtl) == NULL) + && ud_realloc_serial (jtl) == 0) { return (-1); } @@ -762,7 +762,7 @@ { while (hjtp->bufsize_serial <= jtp->maxserial) { - if (hindo_file_realloc (hjtp) == NULL) + if (hindo_file_realloc (hjtp) == 0) return (-1); } error1 ("Dic file size is bigger than that of Hindo file!");
--- a/Wnn/jserver/jishosub.c Thu Dec 13 04:30:14 2007 +0900 +++ b/Wnn/jserver/jishosub.c Thu Dec 13 04:47:24 2007 +0900 @@ -139,7 +139,7 @@ int sdiff; int last; int serialst; - int kanji1; + UCHAR *kanji1; yomi[0] = 0; @@ -166,7 +166,7 @@ case ST_NOPTER: tsize = *(w_char *) (hopter + 2); serialst = *(int *) (hopter + 4); - kanji1 = *(int *) (hopter + 8); + kanji1 = (UCHAR *) (hopter + 8); charst = (w_char *) (hopter + 12); sumst = ((w_char *) charst + tsize + 2); /* + 2 keeps two zero words */ @@ -353,7 +353,7 @@ Strncpy (yomi + 4, (p->yomi) + 1, len - 4); yomi[len] = 0; - jd->kanji1 = p->kanjipter; + jd->kanji1 = (UCHAR *)p->kanjipter; jd->kanji2 = serial - p->serial; jd->serial = serial; jd->kosuu = 1;
--- a/Wnn/jserver/rd_jishoop.c Thu Dec 13 04:30:14 2007 +0900 +++ b/Wnn/jserver/rd_jishoop.c Thu Dec 13 04:47:24 2007 +0900 @@ -86,22 +86,22 @@ #endif /* CONVERT_with_SiSheng */ if ((jtl->bufsize_kanji <= jtl->maxkanji + (Strlen (kanji) + Strlen (comment) + Strlen (yomi) + 3) * sizeof (w_char) + 1) - && (ud_realloc_kanji (jtl) == NULL)) + && (ud_realloc_kanji (jtl) == 0)) { return (-1); } if (jtl->bufsize_ri1[D_YOMI] <= jtl->maxri1[D_YOMI] + 2 - && rd_realloc_ri1 (jtl, D_YOMI) == NULL) + && rd_realloc_ri1 (jtl, D_YOMI) == 0) { return (-1); } if (jtl->bufsize_ri1[D_KANJI] <= jtl->maxri1[D_KANJI] + 2 - && rd_realloc_ri1 (jtl, D_KANJI) == NULL) + && rd_realloc_ri1 (jtl, D_KANJI) == 0) { return (-1); } if (jtl->bufsize_serial <= jtl->maxserial + 4 - && ud_realloc_serial (jtl) == NULL) + && ud_realloc_serial (jtl) == 0) { return (-1); } @@ -289,7 +289,7 @@ p = jtl->ri2 + serial; get_kanji_str (jtl->kanji + p->kanjipter, NULL, yomi, NULL); - jd->kanji1 = p->kanjipter; + jd->kanji1 = (UCHAR *)p->kanjipter; jd->kanji2 = 0; jd->serial = serial; jd->kosuu = 1;
--- a/Wnn/jserver/readfile.c Thu Dec 13 04:30:14 2007 +0900 +++ b/Wnn/jserver/readfile.c Thu Dec 13 04:47:24 2007 +0900 @@ -101,7 +101,7 @@ struct wnn_file_head fh; if (wf->localf == REMOTE) { - if (fopen_read_cur (wf->name) == NULL) + if (!fopen_read_cur (wf->name)) { wnn_errorno = WNN_FILE_READ_ERROR; log_err ("read_file:could not open file %s.", wf->name); @@ -114,7 +114,7 @@ #ifdef WRITE_CHECK check_backup (wf->name); #endif - if ((fp = fopen (wf->name, "r")) == NULL) + if (!(fp = fopen (wf->name, "r"))) { wnn_errorno = WNN_FILE_READ_ERROR; log_err("read_file:could not open file %s.", wf->name); @@ -341,7 +341,7 @@ { wnn_errorno = WNN_MALLOC_ERR; log_err ("could not make the jisho area bigger."); - return (NULL); + return (FAILURE); } jt->bufsize_hontai = new_bufsize; jt->hontai = tp; @@ -360,7 +360,7 @@ { wnn_errorno = WNN_MALLOC_ERR; log_err ("could not make the jisho area bigger."); - return (NULL); + return (FAILURE); } jt->bufsize_kanji = new_bufsize; jt->kanji = tp; @@ -403,7 +403,7 @@ wnn_errorno = WNN_MALLOC_ERR; log_err ("could notmake the jisho area bigger."); - return (NULL); + return (FAILURE); } jt->bufsize_serial = new_bufsize; jt->hindo = tp_hindo; @@ -425,7 +425,7 @@ { wnn_errorno = WNN_MALLOC_ERR; log_err ("could not make the jisho area bigger."); - return (NULL); + return (FAILURE); } jt->ri2 = tp_ri2; } @@ -446,7 +446,7 @@ { wnn_errorno = WNN_MALLOC_ERR; log_err ("could not make the jisho area bigger."); - return (NULL); + return (FAILURE); } jt->bufsize_table = new_bufsize; jt->table = tp; @@ -467,7 +467,7 @@ { wnn_errorno = WNN_MALLOC_ERR; log_err ("could not make the jisho area bigger."); - return (NULL); + return (FAILURE); } jt->bufsize_ri1[which] = new_bufsize; jt->ri1[which] = tp; @@ -488,7 +488,7 @@ { wnn_errorno = WNN_MALLOC_ERR; log_err ("could not make the hindo file area bigger."); - return (NULL); + return (FAILURE); } hjt->bufsize_serial = new_bufsize; hjt->hindo = tp; @@ -509,7 +509,7 @@ { wnn_errorno = WNN_MALLOC_ERR; log_err ("could not make the jisho area bigger."); - return (NULL); + return (FAILURE); } jt->bufsize_bnode = new_bufsize; jt->bind = tp; @@ -613,7 +613,7 @@ /* if(wf->localf == REMOTE){ } */ - if (fopen_write_cur (wf->name) == NULL) + if (!fopen_write_cur (wf->name)) { log_err ("receive_file:No file %s.", wf->name); wnn_errorno = WNN_FILE_WRITE_ERROR; @@ -1051,7 +1051,7 @@ new_size = Strlen (com) + 1; if ((tp = (w_char *) realloc (jt->comment, jt->maxcomment * sizeof (w_char))) == NULL) { - return (NULL); + return (FAILURE); } jt->maxcomment = new_size; jt->comment = tp; @@ -1063,7 +1063,7 @@ new_size = Strlen (com) + 1; if ((tp = (w_char *) realloc (hjt->comment, new_size * sizeof (w_char))) == NULL) { - return (NULL); + return (FAILURE); } hjt->maxcomment = new_size; hjt->comment = tp; @@ -1072,7 +1072,7 @@ break; case WNN_FT_FUZOKUGO_FILE: wnn_errorno = NOT_SUPPORTED_OPERATION; - return (NULL); + return (FAILURE); } return (SUCCESS); }
--- a/Wnn/jutil/atod.c Thu Dec 13 04:30:14 2007 +0900 +++ b/Wnn/jutil/atod.c Thu Dec 13 04:47:24 2007 +0900 @@ -221,8 +221,8 @@ } } -extern int sort_func_sdic (); extern int sort_func_je (); +int sort_func_sdic (const char* a, const char* b); FILE *ofpter; int @@ -545,7 +545,7 @@ } int -sort_func_sdic (char* a, char* b) +sort_func_sdic (const char* a, const char* b) { int tmp; struct je *pa, *pb;