2000-04-16 17:53:26 -04:00
|
|
|
$OpenBSD: patch-Wnn_jserver_b_index_c,v 1.1 2000/04/16 21:53:31 espie Exp $
|
|
|
|
--- Wnn/jserver/b_index.c.orig Tue Jun 28 04:06:49 1994
|
|
|
|
+++ Wnn/jserver/b_index.c Thu Apr 13 20:41:39 2000
|
|
|
|
@@ -99,8 +99,8 @@ struct JT *jt;
|
1998-07-28 21:31:02 -04:00
|
|
|
|
|
|
|
/** For each tuple in ri1[0] create b_nodes */
|
|
|
|
for (i=0; i<jt->maxri1[0]; i++){
|
|
|
|
- serial = (jt->ri1[0]+i)->pter;
|
|
|
|
- yomi = KANJI_str(jt->ri2[serial].kanjipter + jt->kanji, 0);
|
|
|
|
+ serial = ntohs((jt->ri1[0]+i)->pter);
|
|
|
|
+ yomi = KANJI_str(ntohs(jt->ri2[serial].kanjipter) + jt->kanji, 0);
|
|
|
|
b_index_add(jt, yomi, serial);
|
|
|
|
}
|
|
|
|
return(b_cnt);
|
2000-04-16 17:53:26 -04:00
|
|
|
@@ -133,7 +133,7 @@ struct JT *jt;
|
1998-07-28 21:31:02 -04:00
|
|
|
int serial;
|
|
|
|
{
|
|
|
|
w_char *yomi;
|
|
|
|
- yomi = KANJI_str(jt->ri2[serial].kanjipter + jt->kanji, 0);
|
|
|
|
+ yomi = KANJI_str(ntohs(jt->ri2[serial].kanjipter) + jt->kanji, 0);
|
|
|
|
delete_b_node(jt, yomi, 0, 0 );
|
|
|
|
}
|
|
|
|
|
2000-04-16 17:53:26 -04:00
|
|
|
@@ -160,7 +160,7 @@ int p_node;
|
1998-07-28 21:31:02 -04:00
|
|
|
tmp_node = jt->bind[tmp_node].pter_son;
|
|
|
|
}
|
|
|
|
yo_kanji = KANJI_str(
|
|
|
|
- jt->ri2[jt->bind[tmp_node].pter].kanjipter+jt->kanji, 0);
|
|
|
|
+ ntohs(jt->ri2[jt->bind[tmp_node].pter].kanjipter)+jt->kanji, 0);
|
|
|
|
if ( yomi[level] > yo_kanji[level] ) {
|
|
|
|
buf_node1 = buf_node2;
|
|
|
|
buf_node2 = jt->bind[buf_node2].pter_next ;
|
2000-04-16 17:53:26 -04:00
|
|
|
@@ -216,7 +216,7 @@ int p_node; /* cureent b_node */
|
1998-07-28 21:31:02 -04:00
|
|
|
tmp_node = jt->bind[tmp_node].pter_son;
|
|
|
|
}
|
|
|
|
yo_kanji = KANJI_str(
|
|
|
|
- jt->ri2[jt->bind[tmp_node].pter].kanjipter+jt->kanji, 0);
|
|
|
|
+ ntohs(jt->ri2[jt->bind[tmp_node].pter].kanjipter)+jt->kanji, 0);
|
|
|
|
|
|
|
|
if ( yomi[level] > yo_kanji[level] ) {
|
|
|
|
buf_node1 = buf_node2;
|