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: Struct.h,v $ 32 * $SonyRevision: 1.3 $ 33 * $SonyDate: 1994/10/21 05:13:34 $ 34 */ 35 36 #ifndef STRUCT_H 37 #define STRUCT_H 38 39 40 typedef struct global { 41 42 43 44 JREC *Jmaxjptr; 45 CLREC *Jmaxclptr; 46 JREC *Jjrt1st; 47 CLREC *Jclt1st; 48 JREC *Jjrt2nd; 49 CLREC *Jclt2nd; 50 CLREC *Jselcl; 51 52 53 54 Short Jselectid; 55 Short Jtrank; 56 Short Jnrank; 57 58 59 60 Uchar *Jinputyomi; 61 Uchar *Jcnvstart; 62 Short Jcnvlen; 63 Uchar *Jystart; 64 Uchar Jhyomi[MaxPhInputLen+1]; 65 Uchar Jorgyomi[MaxClInputLen*2+1]; 66 67 68 69 70 Uchar Jkanjibuf[MinPhOutputLen]; 71 Uchar *Jkanjipos; 72 Uchar *Jkanjitmp; 73 Short Jkanjilen; 74 75 76 77 78 Uchar Jdicinl; 79 Uchar Jdicsaml; 80 TypeDicSeg Jprevseg; 81 82 83 84 85 Uchar Jfzkcount; 86 Uchar Jfzk_ka_flg; 87 FREC Jfzktbl[MAXFREC]; 88 89 90 91 92 Uchar Jheadcode; 93 Uchar Jheadlen; 94 95 96 97 98 Uchar Jgobilen; 99 100 101 102 103 TypeGram Jprevclgrm; 104 TypeCnct Jprevclrow; 105 Uchar Jnextcllen; 106 107 108 109 110 Short Jkhcount; 111 Short Jnkhcount; 112 KHREC Jkouhotbl[MaxKouhoNumber]; 113 STDYIN *Jstdytop; 114 115 116 117 118 DICT *Jcurdict; 119 DICTL *Jdictlist; 120 Uchar *Jdicbuf; 121 Uchar *Jidxbuf; 122 TypeIdxOfs *Jidxofs; 123 Uchar *Jaskknj[MaxKnjAskNumber]; 124 Uchar *Jaskknj_k[MaxKnjAskNumber]; 125 126 STDY *Jcurstdy; 127 128 129 130 Ushort Jsuuji_wbuf[NumWordBuf]; 131 Uchar Jsuuji_ubuf[NumKetaLength]; 132 TypeClass Jsuuji_class; 133 Uchar Jsuuji_comma; 134 Uchar Jsuuji_keta; 135 Uchar *Jsuuji_yptr; 136 Uchar Jsuuji_len; 137 Uchar Jsuuji_exit; 138 Ushort *Jsuuji_wkeep; 139 Uchar *Jsuuji_ukeep; 140 141 142 143 144 Uchar Jpeepyomi[MaxWdYomiLen * 2 + 1]; 145 Uchar Jpeepknj[MaxWdKanjiLen + 1]; 146 TypeGram Jpeepgrm; 147 Uchar *Jpeepdptr; 148 Uchar *Jpeephptr; 149 Uchar *Jpeepkptr; 150 TypeDicSeg Jpeepidx; 151 152 } Global; 153 154 155 156 157 typedef struct dictfile { 158 DICT dict; 159 int refcnt; 160 fd_set lock; 161 FILE *fp; 162 int fd; 163 164 Uchar *buffer; 165 long bufsiz; 166 167 long idxstrt; 168 long segstrt; 169 170 TypeIdxOfs *ofsptr; 171 172 struct dictfile *link; 173 } DictFile; 174 175 176 177 178 typedef struct stdyfile { 179 STDY stdy; 180 int refcnt; 181 ino_t inode; 182 FILE *fp; 183 int fd; 184 185 Uchar *header; 186 187 struct stdyfile *link; 188 } StdyFile; 189 190 191 192 193 typedef struct workarea { 194 int refcnt; 195 int lock; 196 197 struct workarea *link; 198 199 Global global; 200 } WorkArea; 201 202 203 204 205 typedef struct client { 206 int fd; 207 char host[HostNameLen]; 208 char user[UserNameLen]; 209 char prog[ProgNameLen]; 210 211 WorkArea *work; 212 StdyFile *stdy; 213 short version; 214 unsigned char def_char[2]; 215 #if (defined(TLI) && defined(SOCK_UNIX)) 216 int unix_flag; 217 #endif 218 uid_t uid; 219 struct client *next; 220 } Client; 221 222 #endif 223 224