comparison Wnn/jserver/bnsetu_kai.c @ 25:466fe6732d8d

- fixed more NULL pointer related errata - suppress warnings
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sat, 06 Mar 2010 04:37:31 +0900
parents ed4bb01eb317
children
comparison
equal deleted inserted replaced
24:becc60787557 25:466fe6732d8d
57 register int i, /* 幹語の終わりのインデックス */ 57 register int i, /* 幹語の終わりのインデックス */
58 j, /* 文節始めのインデックス */ 58 j, /* 文節始めのインデックス */
59 t, ii; 59 t, ii;
60 struct jdata *jentptr; 60 struct jdata *jentptr;
61 register struct SYO_BNSETSU *sbnptr = NULL; 61 register struct SYO_BNSETSU *sbnptr = NULL;
62 struct SYO_BNSETSU *sbnptr_top = 0; 62 struct SYO_BNSETSU *sbnptr_top = NULL;
63 struct ICHBNP *ichbnpbp; 63 struct ICHBNP *ichbnpbp;
64 int k, ll; 64 int k, ll;
65 struct SYO_BNSETSU *kanptr; 65 struct SYO_BNSETSU *kanptr;
66 struct SYO_BNSETSU *kanptr_tmp = NULL; 66 struct SYO_BNSETSU *kanptr_tmp = NULL;
67 struct SYO_BNSETSU *kanptr_before; 67 struct SYO_BNSETSU *kanptr_before;
157 #else 157 #else
158 hyokaval = hyoka1 (jentptr->hindo[t], (jentptr->hindo_in == 0 ? 0 : jentptr->hindo_in[t]), j - i + 1, j - yomi_sno + 1, dic_table[jentptr->jishono].nice); 158 hyokaval = hyoka1 (jentptr->hindo[t], (jentptr->hindo_in == 0 ? 0 : jentptr->hindo_in[t]), j - i + 1, j - yomi_sno + 1, dic_table[jentptr->jishono].nice);
159 #endif /* CONVERT_with_SiSheng */ 159 #endif /* CONVERT_with_SiSheng */
160 if (bnst_num != 1) 160 if (bnst_num != 1)
161 { 161 {
162 if (parent != 0 && parent->status_bkwd == NO) 162 if (parent != NULL && parent->status_bkwd == NO)
163 /* 前の文節が endvect に接続できないものは、 163 /* 前の文節が endvect に接続できないものは、
164 評価値を下げる */ 164 評価値を下げる */
165 hyokaval0 = _DIVID (hyokaval, 2); 165 hyokaval0 = _DIVID (hyokaval, 2);
166 else 166 else
167 hyokaval0 = hyokaval; 167 hyokaval0 = hyokaval;
311 } 311 }
312 else 312 else
313 { 313 {
314 freesbn (sbnptr); 314 freesbn (sbnptr);
315 sbncnt = 0; 315 sbncnt = 0;
316 sbnptr_top = 0; 316 sbnptr_top = NULL;
317 } 317 }
318 } 318 }
319 else 319 else
320 { 320 {
321 sbncnt = 1; 321 sbncnt = 1;
514 else 514 else
515 { 515 {
516 sbnptr->t_jc = -1; 516 sbnptr->t_jc = -1;
517 } 517 }
518 sbnptr->hinsi_fk = giji_hinsi; 518 sbnptr->hinsi_fk = giji_hinsi;
519 sbnptr->jentptr = 0; 519 sbnptr->jentptr = NULL;
520 sbnptr->kangovect = ft->kango_hinsi_area[giji_hinsi]; 520 sbnptr->kangovect = ft->kango_hinsi_area[giji_hinsi];
521 sbnptr->j_c = j_end + len - 1; 521 sbnptr->j_c = j_end + len - 1;
522 return (len); 522 return (len);
523 } 523 }
524 #else /* !KOREAN */ 524 #else /* !KOREAN */
746 else 746 else
747 { 747 {
748 sbnptr->t_jc = -1; 748 sbnptr->t_jc = -1;
749 } 749 }
750 sbnptr->hinsi_fk = giji_hinsi; 750 sbnptr->hinsi_fk = giji_hinsi;
751 sbnptr->jentptr = 0; 751 sbnptr->jentptr = NULL;
752 sbnptr->kangovect = ft->kango_hinsi_area[giji_hinsi]; 752 sbnptr->kangovect = ft->kango_hinsi_area[giji_hinsi];
753 sbnptr->j_c = j_end + len - 1; 753 sbnptr->j_c = j_end + len - 1;
754 return (len); 754 return (len);
755 } 755 }
756 #endif /* KOREAN */ 756 #endif /* KOREAN */
785 { 785 {
786 sbnptr->v_jc = HYOKAVAL (0, 1, 1); 786 sbnptr->v_jc = HYOKAVAL (0, 1, 1);
787 sbnptr->i_jc = yomi_sno; 787 sbnptr->i_jc = yomi_sno;
788 sbnptr->t_jc = -1; 788 sbnptr->t_jc = -1;
789 sbnptr->hinsi_fk = giji_no; 789 sbnptr->hinsi_fk = giji_no;
790 sbnptr->jentptr = 0; 790 sbnptr->jentptr = NULL;
791 sbnptr->kangovect = ft->kango_hinsi_area[kigou_no]; 791 sbnptr->kangovect = ft->kango_hinsi_area[kigou_no];
792 sbnptr->j_c = yomi_sno; 792 sbnptr->j_c = yomi_sno;
793 793
794 return (1); 794 return (1);
795 } 795 }