Mercurial > freewnn
comparison Xwnmo/xjutil/xheader.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: xheader.c,v 1.2 2001/06/14 18:16:13 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 1991, 1992 by Massachusetts Institute of Technology | |
14 * | |
15 * Author: OMRON SOFTWARE Co., Ltd. <freewnn@rd.kyoto.omronsoft.co.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, or (at your option) | |
20 * 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 GNU Emacs; see the file COPYING. If not, write to the | |
29 * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |
30 * | |
31 * Commentary: | |
32 * | |
33 * Change log: | |
34 * | |
35 * Last modified date: 8,Feb.1999 | |
36 * | |
37 * Code: | |
38 * | |
39 */ | |
40 /* Version 4.0 | |
41 */ | |
42 #include <stdio.h> | |
43 #include "config.h" | |
44 #include "commonhd.h" | |
45 #include "sdefine.h" | |
46 #include "xjutil.h" | |
47 #include "sxheader.h" | |
48 #include "xext.h" | |
49 | |
50 int max_env = 0; | |
51 WnnEnv *normal_env = NULL; | |
52 WnnEnv *reverse_env = NULL; | |
53 WnnEnv *cur_normal_env = NULL; | |
54 WnnEnv *cur_reverse_env = NULL; | |
55 | |
56 int save_env_id[32]; | |
57 int save_env_reverse_id[32]; | |
58 int env_is_reverse = 0; | |
59 | |
60 w_char *input_buffer; | |
61 w_char *return_buf; /* return you mojiretsu buffer */ | |
62 | |
63 int cur_bnst_ = 0; /* current bunsetsu pointer */ | |
64 | |
65 int rubout_code = 127; | |
66 | |
67 int (*main_table[TBL_CNT][TBL_SIZE]) (); | |
68 char romkan_clear_tbl[TBL_CNT][TBL_SIZE]; | |
69 char jishopath[256]; | |
70 char hindopath[256]; | |
71 char fuzokugopath[256]; | |
72 | |
73 ClientBuf *c_b; | |
74 | |
75 int excellent_delete = 1; | |
76 | |
77 int *bunsetsu; | |
78 int *bunsetsuend; | |
79 int *touroku_bnst; | |
80 int touroku_bnst_cnt; | |
81 w_char *kill_buffer; | |
82 w_char *remember_buf; | |
83 int kill_buffer_offset = 0; | |
84 | |
85 int touroku_comment = 0; | |
86 | |
87 char *uumrc_name = NULL; | |
88 char *envrc_name = NULL; | |
89 char *uumkey_name = NULL; | |
90 char *cvt_key_file = NULL; | |
91 char *cvt_fun_file = NULL; | |
92 char *cvt_meta_file = NULL; | |
93 char *rkfile_name = NULL; | |
94 | |
95 char *jserver_name = NULL; | |
96 char *display_name = NULL; | |
97 char *username = NULL; | |
98 | |
99 int maxbunsetsu; | |
100 int max_ichiran_kosu; | |
101 int maxchg; | |
102 int maxlength; | |
103 | |
104 WNN_DIC_INFO *dicinfo; | |
105 int dic_list_size; | |
106 | |
107 char *prgname; /* argv[0] */ | |
108 | |
109 struct wnn_ret_buf rb = { 0, NULL }; | |
110 struct wnn_ret_buf dicrb = { 0, NULL }; | |
111 struct wnn_ret_buf wordrb = { 0, NULL }; | |
112 | |
113 Xjutil *xjutil = NULL; | |
114 XIMRootRec *cur_root = NULL; | |
115 JutilTextRec *cur_text = NULL; | |
116 | |
117 Romkan *cur_rk = NULL; | |
118 RomkanTable *cur_rk_table = NULL; | |
119 | |
120 BoxRec *box_list = NULL; | |
121 | |
122 XjutilFSList font_set_list = NULL; | |
123 XjutilFSRec *cur_fs = NULL; | |
124 | |
125 struct msg_cat *cd; | |
126 | |
127 wchar *wc_buf = NULL; | |
128 unsigned char *ct_buf = NULL; | |
129 unsigned char *c_buf = NULL; | |
130 int wc_buf_max = 0; | |
131 int ct_buf_max = 0; | |
132 int c_buf_max = 0; | |
133 #ifndef X_WCHAR | |
134 wchar_t *wt_buf = NULL; | |
135 int wt_buf_max = 0; | |
136 #endif /* !X_WCHAR */ | |
137 | |
138 ConvCode cvt_key_tbl[MAX_CVT_ENTRY_CNT]; | |
139 int cvt_key_tbl_cnt = 0; /* convert table count */ | |
140 | |
141 FunctionTable *f_table = NULL; | |
142 | |
143 FunctionTable function_db[] = { | |
144 {"Normal", | |
145 NULL, NULL, call_t_redraw_move_normal, | |
146 call_t_redraw_move_1_normal, call_t_redraw_move_2_normal, | |
147 call_t_print_l_normal, NULL, char_len_normal, char_q_len_normal, | |
148 t_redraw_move_normal, t_print_l_normal, c_top_normal, c_end_normal, | |
149 c_end_normal, hani_settei_normal, NULL, NULL}, | |
150 #ifdef CHINESE | |
151 {"Yincoding", | |
152 print_out_yincod, input_yincod, call_t_redraw_move_yincod, | |
153 call_t_redraw_move_1_yincod, call_t_redraw_move_2_yincod, | |
154 call_t_print_l_yincod, redraw_when_chmsig_yincod, char_len_yincod, | |
155 char_q_len_yincod, t_redraw_move_yincod, | |
156 t_print_l_yincod, c_top_yincod, c_end_yincod, c_end_nobi_yincod, | |
157 hani_settei_yincod, NULL, NULL}, | |
158 #endif /* CHINESE */ | |
159 {NULL, | |
160 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | |
161 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} | |
162 }; |