1 /*
2  * Copyright (c) 1991-1994  Sony Corporation
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining
5  * a copy of this software and associated documentation files (the
6  * "Software"), to deal in the Software without restriction, including
7  * without limitation the rights to use, copy, modify, merge, publish,
8  * distribute, sublicense, and/or sell copies of the Software, and to
9  * permit persons to whom the Software is furnished to do so, subject to
10  * the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be
13  * included in all copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18  * IN NO EVENT SHALL SONY CORPORATION BE LIABLE FOR ANY CLAIM,
19  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
20  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
21  * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22  *
23  * Except as contained in this notice, the name of Sony Corporation
24  * shall not be used in advertising or otherwise to promote the sale, use
25  * or other dealings in this Software without prior written authorization
26  * from Sony Corporation.
27  *
28  */
29 
30 /*
31  * $SonyRCSfile: sj_struct.h,v $
32  * $SonyRevision: 1.1 $
33  * $SonyDate: 1994/06/03 08:01:16 $
34  */
35 
36 
37 
38 
39 
40 #ifndef	_SJ_STRUCT
41 
42 #define	_SJ_STRUCT
43 
44 
45 
46 typedef	struct	jiritu {
47 	struct jiritu	*jsort;
48 	TypeDicSeg	jseg;
49 	TypeDicOfs	jofsst;
50 	TypeDicOfs	jofsed;
51 	Ushort		flags;
52 	TypeClass	class;
53 	TypeDicID	dicid;
54 	Uchar		jlen;
55 	TypeGram	hinsi;
56 	Uchar		sttofs;
57 	Uchar		stbofs;
58 	Uchar		count;
59 	Uchar		numlen;
60 } JREC;
61 
62 
63 
64 
65 typedef struct bunsetu {
66 	JREC	*jnode;
67 	struct	bunsetu	*clsort;
68 	Uchar		gobiln;
69 	Uchar		cllen;
70 
71 	TypeCnct	right;
72 	Uchar		cl2len;
73 	Uchar		kubun;
74 #if __STDC__
75 	unsigned	fzk_ka : 1;
76 #else
77 	Uchar		fzk_ka : 1;
78 #endif
79 } CLREC;
80 
81 
82 
83 
84 typedef	struct	kouho {
85 	CLREC		*clrec;
86 	TypeDicOfs	offs;
87 	TypeStyNum	styno;
88 	Uchar		rank;
89 #if __STDC__
90 	unsigned	sttfg  :  1;
91 	unsigned	sttkj  :  1;
92 	unsigned	ka_fg  :  1;
93 	unsigned	ka_kj  :  1;
94 	unsigned	mode   :  4;
95 #else
96 	Uchar		sttfg  :  1;
97 	Uchar		sttkj  :  1;
98 	Uchar		ka_fg  :  1;
99 	Uchar		ka_kj  :  1;
100 	Uchar		mode   :  4;
101 #endif
102 } KHREC;
103 
104 
105 
106 
107 typedef	struct	conj {
108 	Uchar		len;
109 	TypeCnct	right;
110 } CREC;
111 
112 
113 
114 
115 typedef	struct	fuzoku {
116 	Uchar		*yomip;
117 	Uchar	TFar	*fzkp;
118 
119 } FREC;
120 
121 
122 
123 typedef struct study_in {
124 	TypeDicOfs	offset;
125 	TypeDicSeg	seg;
126 	TypeStyNum	styno;
127 	TypeDicID	dicid;
128 #if __STDC__
129 	unsigned	sttkj  :  1;
130 	unsigned	ka_kj  :  1;
131 	unsigned	nmflg  :  1;
132 #else
133 	Uchar		sttkj  :  1;
134 	Uchar		ka_kj  :  1;
135 	Uchar		nmflg  :  1;
136 #endif
137 } STDYIN;
138 
139 
140 
141 
142 typedef struct study_out {
143 	STDYIN		stdy1;
144 	TypeGram	hinshi;
145 	Uchar		len;
146 #if __STDC__
147 	unsigned	sttlen :  2;
148 	unsigned	sttfg  :  1;
149 	unsigned	ka_fg  :  1;
150 #else
151 	Uchar		sttlen :  2;
152 	Uchar		sttfg  :  1;
153 	Uchar		ka_fg  :  1;
154 #endif
155 } STDYOUT;
156 
157 
158 
159 
160 typedef	struct	dict {
161 	TypeDicID	dicid;
162 
163 	TypeIdxOfs	idxlen;
164 
165 	TypeDicOfs	seglen;
166 	TypeDicSeg	segunit;
167 	TypeDicSeg	maxunit;
168 
169 	IFunc		getofs;
170 	IFunc		getidx;
171 	IFunc		getdic;
172 	IFunc		putidx;
173 	IFunc		putdic;
174         IFunc           rszdic;
175 } DICT;
176 
177 
178 
179 
180 typedef	struct	dictl {
181 	DICT		*dict;
182 	struct dictl	*next;
183 } DICTL;
184 
185 
186 
187 
188 typedef struct	stdy {
189 	Short	stdycnt;
190 	Short	stdymax;
191 	STDYIN	*stdydic;
192 
193 	Short	clstdystep;
194 	Ushort	*clstdyidx;
195 
196 	Short	clstdylen;
197 	Uchar	*clstdydic;
198 } STDY;
199 
200 #endif
201