1 /* 2 * $Id: jlib.h,v 1.4 2001/06/18 09:09:33 ura 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 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 Nihongo Henkan Library Header File 34 35 08/Jul/1987 (wnn_errorno) 36 24/Apr/1987 37 09/Mar/1987 (update server_dead) 38 25/Feb/1987 (update wchar_t) 39 18/Feb/1987 (update Comment) 40 28/Nov/1986 41 23/Oct/1986 42 */ 43 44 #ifndef WNN_JLIB_H 45 #define WNN_JLIB_H 46 47 #include <setjmp.h> 48 49 #ifndef w_char 50 #define w_char unsigned short 51 #endif /* w_char */ 52 #ifndef WCHAR_T 53 #define wchar_t w_char 54 #define wchar w_char 55 #define WCHAR_T 56 #endif /* WCHAR_T */ 57 58 #define JLIB 59 60 #define S_BUF_SIZ 1024 /* NEVER change this */ 61 #define R_BUF_SIZ 1024 /* NEVER change this */ 62 63 64 65 struct kouho_entry 66 { 67 int s_ichi; /* ���ʥХåե��ؤΥ��ե��å� */ 68 int jl; /* ��Ω���Ĺ�� */ 69 int fl; /* ��°���Ĺ�� */ 70 int pl; /* �ǥ����ץ쥤����Ĺ�� */ 71 int jishono; /* ��Ω��μ����ֹ� */ 72 int serial; /* ��Ω����ֹ� */ 73 w_char *k_data; /* �����Хåե��ؤΥݥ��� */ 74 }; 75 #define KOUHO_ENT struct kouho_entry 76 77 78 struct jikouho_entry 79 { 80 int jl; /* ��Ω���Ĺ�� */ 81 int jishono; /* ��Ω��μ����ֹ� */ 82 int serial; /* ��Ω����ֹ� */ 83 w_char *k_data; /* �����Хåե��ؤΥݥ��� */ 84 }; 85 #define JIKOUHO_ENT struct jikouho_entry 86 87 88 struct bunjoho 89 { 90 w_char *kana_buf; /* ���ʥХåե� */ 91 int kana_size; /* ���ʥХåե���Ĺ�� */ 92 KOUHO_ENT *klist; /* ����ꥹ�ȡ��Хåե� */ 93 int klist_size; /* ����ꥹ�ȡ��Хåե���Ĺ�� */ 94 w_char *kanji_buf; /* �����Хåե� */ 95 int kanji_buf_size; /* �����Хåե� ��Ĺ�� */ 96 }; 97 98 99 struct jikouhojoho 100 { 101 JIKOUHO_ENT *jlist; /* ������Хåե� */ 102 int jlist_size; /* ������Хåե���Ĺ�� */ 103 w_char *kanji_buf; /* �����Хåե� */ 104 int kanji_buf_size; /* �����Хåե���Ĺ�� */ 105 }; 106 #define JIKOUHOJOHO struct jikouhojoho 107 108 109 struct jishojoho 110 { 111 w_char *k_data; /* �����Хåե��ؤΥݥ��� */ 112 int bumpo; /* ʸˡ���� */ 113 int hindo; /* ���� */ 114 int jisho; /* �����ֹ� */ 115 int serial; /* �����ֹ� */ 116 }; 117 #define JISHOJOHO struct jishojoho 118 119 120 struct dicinfo 121 { 122 int dic_no; /* �����ֹ� */ 123 int dic_size; /* ñ��� */ 124 int ttl_hindo; /* ������� */ 125 int dic_type; /* 1:�桼��,2:�����ƥ� */ 126 int udp; /* 0:������Ǥʤ�,1:������ */ 127 int prio; /* ����ץ饤����ƥ� */ 128 int rdonly; /* 0:�饤�Ȳ�ǽ,1:��ɥ��� */ 129 char *file_name; /* ����ե�����̾ */ 130 char *h_file_name; /* ���٥ե�����̾ */ 131 }; 132 #define DICINFO struct dicinfo 133 134 extern jmp_buf jd_server_dead_env; /* �����Ф�������������Ǥ���env */ 135 extern int jd_server_dead_env_flg; /* jd_server_dead_env��ͭ�����ݤ� */ 136 extern int wnn_errorno; /* Wnn�Υ��顼�Ϥ����ѿ������� */ 137 138 /* header file for dic_syurui */ 139 #define NO_EXIST -1 140 #define NOT_A_JISHO 0 141 #define USER_DIC 1 142 #define SYSTEM_DIC 3 143 144 struct jwho 145 { 146 int sd; /* socket discripter in jserver */ 147 char *user_name; /* user name */ 148 char *host_name; /* host name */ 149 }; 150 151 #define JWHO struct jwho 152 153 154 #endif /* WNN_JLIB_H */ 155