comparison Wnn/jutil/utilbdic.c @ 0:bbc77ca4def5

initial import
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Thu, 13 Dec 2007 04:30:14 +0900
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:bbc77ca4def5
1 /*
2 * $Id: utilbdic.c,v 1.4 2004/07/19 18:24:26 hiroo Exp $
3 */
4
5 /*
6 * FreeWnn is a network-extensible Kana-to-Kanji conversion system.
7 * This file is part of FreeWnn.
8 *
9 * Copyright Kyoto University Research Institute for Mathematical Sciences
10 * 1987, 1988, 1989, 1990, 1991, 1992
11 * Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999
12 * Copyright ASTEC, Inc. 1987, 1988, 1989, 1990, 1991, 1992
13 * Copyright FreeWnn Project 1999, 2000, 2004
14 *
15 * Maintainer: FreeWnn Project <freewnn@tomo.gr.jp>
16 *
17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License as published by
19 * the Free Software Foundation; either version 2 of the License, or
20 * (at your option) any later version.
21 *
22 * This program is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
26 *
27 * You should have received a copy of the GNU General Public License
28 * along with this program; if not, write to the Free Software
29 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30 */
31
32 /*
33 Binary (Updatable, Stable) dictionary common routine.
34 */
35
36 /* extern functions are
37 output_header(ofpter)
38 output_hindo(ofpter)
39 output_hinsi(ofpter)
40 */
41
42 #include <stdio.h>
43 #include "commonhd.h"
44 #include "jslib.h"
45 #include "jh.h"
46 #include "jdata.h"
47
48 int wnnerror;
49
50 struct JT jt;
51 struct wnn_file_head file_head;
52
53 extern char *passwd;
54
55 output_hinsi (FILE* ofpter)
56 {
57 int i;
58
59 for (i = 0; i < jt.maxserial; i++)
60 {
61 put_short (ofpter, jeary[i]->hinsi);
62 }
63 /*
64 if(i & 0x1){
65 put_short(ofpter,0);
66 }
67 */
68 }
69
70 input_hinsi (FILE* ifpter)
71 {
72 int i;
73 unsigned short s;
74
75 for (i = 0; i < jt.maxserial; i++)
76 {
77 if (get_short (&s, ifpter) == -1)
78 return (-1);
79 jeary[i]->hinsi = s;
80 }
81 /*
82 if(i & 0x1){
83 get_short(ifpter);
84 }
85 */
86 return (0);
87 }
88
89 #ifdef nodef
90 revdic_jt (struct JT* jtp, int match, char* hostart, struct uind1* tary)
91 {
92 /* Must reverse hinsi?????? */
93
94 if (jtp->syurui == WNN_UD_DICT)
95 {
96 rev_ud_hontai (hostart, jtp->maxhontai, match);
97 rev_ud_table (tary, jtp->maxtable, match);
98 }
99 else
100 {
101 rev_sd_hontai (hostart, match);
102 }
103 return (0);
104 }
105 #endif