update.
[chise/libchise.git] / ChangeLog
1 2003-10-03  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
2
3         * sample.c (main): Use `chise_ds_decode_char' instead of
4         `chise_ds_get_ccs' and `chise_ccs_decode'.
5
6         * chise.c (chise_ccs_decode): Return -1 when argument `ccs' is
7         NULL.
8         (chise_ccs_set_decoded_char): Likewise.
9
10         * chise.h (chise_ds_decode_char): New inline function.
11
12 2003-10-02  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
13
14         * sample.c:
15         - `chise_open_data_source' is renamed to `CHISE_DS_open'.
16         - `chise_ds_close' is renamed to `CHISE_DS_close'.
17
18         * name.c: Modify to avoid warning.
19
20         * chise-name.h (chise_make_name_table): Modify to avoid warning.
21
22         * chise.c (strnlen): Separated to sysdep.h; include sysdep.h
23         instead.
24         (CHISE_Attribute_Table_open): Renamed from
25         `chise_open_attribute_table'.
26         (CHISE_Attribute_Table_close): Renamed from
27         `chise_close_attribute_table'.
28         (chise_attribute_table_get): Renamed from
29         `chise_get_attribute_table'.
30         (chise_attribute_table_put): Renamed from
31         `chise_put_attribute_table'.
32         (CHISE_DS_open): Renamed from `chise_open_data_source'.
33         (CHISE_DS_close): Renamed from `chise_ds_close'.
34         (chise_feature_setup_db): New function.
35         (chise_char_load_feature_value): Use `chise_feature_setup_db'.
36         (chise_char_gets_feature_value): Likewise.
37         (chise_char_feature_value_iterate): Likewise.
38
39         * Makefile.in (CFLAGS): Add -Wall and -Wmissing-prototypes.
40         (chise.lo): Add dependency on sysdep.h.
41
42         * chise.h (CHISE_DS_open): Renamed from `chise_open_data_source'.
43         (CHISE_DS_close): Renamed from `chise_ds_close'.
44
45         * sysdep.h: New file [separate from chise.c].
46
47 2003-10-02  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
48
49         * chise.h (chise_ds_open_feature_table): Abolished.
50         (chise_ft_close): Likewise.
51
52 2003-10-02  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
53
54         * sample.c: Update for the latest API.
55
56         * chise.c (struct CHISE_DS): Add new member `subtype' and
57         `modemask'.
58         (chise_open_data_source): Add new arguments `subtype' and
59         `modemask'.
60         (chise_ds_get_feature): Delete arguments `real_subtype',
61         `accessmask', `modemask'.
62         (chise_ds_get_ccs): Likewise.
63         (struct CHISE_Feature_Table): Add new member `name' and `access'.
64         (chise_ds_open_feature_table): Delete arguments `real_subtype',
65         `accessmask', `modemask'.
66         (chise_ft_close): Release `table->name'.
67         (chise_char_load_feature_value): Setup `table->db'.
68         (chise_char_gets_feature_value): Likewise.
69         (chise_char_feature_value_iterate): Return an integer value; setup
70         `feature->db'.
71         (struct CHISE_CCS_Table): Add new member `name' and `access'.
72         (chise_ds_open_ccs_table): Delete arguments `real_subtype',
73         `accessmask', `modemask'.
74         (chise_ccst_close): Release `table->name'.
75         (chise_ccs_sync): New function.
76         (chise_ccs_decode): Setup `ccs->db'.
77         (chise_ccs_set_decoded_char): Renamed from `chise_ccst_put_char';
78         setup `ccs->db'.
79
80         * chise.h (chise_open_data_source): Add new arguments `subtype'
81         and `modemask'.
82         (chise_ds_get_feature): Delete arguments `real_subtype',
83         `accessmask', `modemask'.
84         (chise_char_feature_value_iterate): Return an integer value.
85         (chise_char_feature_str_iterate): Comment out.
86         (chise_ds_open_feature_table): Delete arguments `real_subtype',
87         `accessmask', `modemask'.
88         (chise_ds_get_ccs): Delete arguments `real_subtype', `accessmask',
89         `modemask'.
90         (chise_ccs_set_decoded_char): Renamed from `chise_ccst_put_char'.
91         (chise_ccs_sync): New prototype.
92         (chise_ds_open_ccs_table): Abolished.
93         (int chise_ccst_close): Abolished.
94
95 2003-08-28  MORIOKA Tomohiko  <tomo@mousai.as.wakwak.ne.jp>
96
97         * sample.c (test_map_func): Modify for
98         chise_char_feature_value_iterate.
99         (main): Rename `dt_*' to `ccs_*'; use `chise_ds_get_ccs' instead
100         of `chise_ds_open_decoding_table'; use `chise_ccs_decode' instead
101         of `chise_dt_get_char'; don't use `chise_dt_close'; use `use
102         `chise_ds_get_feature' instead of `chise_ds_open_feature_table';
103         use `chise_char_gets_feature_value' instead of
104         `chise_ft_get_value'; use `chise_char_feature_value_iterate'
105         instead of `chise_ft_iterate'; don't use `chise_ft_close'.
106
107 2003-08-26  MORIOKA Tomohiko  <tomo@mousai.as.wakwak.ne.jp>
108
109         * chise.c: Include "chise-name.h".
110         (CHISE_DS): Add new members `feature_names' and `ccs_names'.
111         (chise_open_data_source): Setup ds->feature_names and
112         ds->ccs_names.
113         (chise_ds_close): Release ds->feature_names and ds->ccs_names.
114         (chise_ds_get_feature): New function.
115         (chise_ds_get_ccs): New function.
116         (chise_char_load_feature_value): Renamed from
117         `chise_ft_get_value'; modify interface.
118         (chise_char_gets_feature_value): New function.
119         (chise_char_feature_value_iterate): Renamed from
120         `chise_ft_iterate'; modify interface.
121         (CHISE_CCS_Table): Renamed from `CHISE_Decoding_Table'.
122         (chise_ds_open_ccs_table): Renamed from
123         `chise_ds_open_decoding_table'.
124         (chise_ccst_close): Renamed from `chise_dt_close'.
125         (chise_ccs_decode): Renamed from `chise_dt_get_char'.
126         (chise_ccst_put_char): Renamed from `chise_dt_put_char'.
127
128         * chise.h (CHISE_Feature): New type.
129         (chise_ds_get_feature): New prototype.
130         (chise_char_load_feature_value): Renamed from
131         `chise_ft_get_value'; modify interface.
132         (chise_char_gets_feature_value): New prototype.
133         (chise_char_feature_value_iterate): Renamed from
134         `chise_ft_iterate'; modify interface.
135         (chise_char_feature_str_iterate): New prototype.
136         (CHISE_CCS_Table): Renamed from `CHISE_Decoding_Table'.
137         (CHISE_CCS): New type.
138         (chise_ds_get_ccs): New prototype.
139         (chise_ccs_decode): Renamed from `chise_dt_get_char'.
140         (chise_ds_open_ccs_table): Renamed from
141         `chise_ds_open_decoding_table'.
142         (chise_ccst_close): Renamed from `chise_dt_close'.
143         (chise_ccst_put_char): Renamed from `chise_dt_put_char'.
144         (chise_decode_char): Deleted.
145         (chise_get_feature): Deleted.
146
147 2003-08-20  MORIOKA Tomohiko  <tomo@mousai.as.wakwak.ne.jp>
148
149         * name.c: Include "chise-name.h".
150         (chise_name_table_put): Use <const unsigned char*> instead of
151         <unsigned char*> for key.
152         (chise_name_table_get): Likewise.
153
154         * chise-name.h (chise_name_table_put): Use <const unsigned char*>
155         instead of <unsigned char*> for key.
156         (chise_name_table_get): Likewise.
157
158 2003-08-16  MORIOKA Tomohiko  <tomo@mousai.as.wakwak.ne.jp>
159
160         * Makefile.in (HEADERS): New variable.
161         (OBJS): New variable.
162         (libchise.la): Refer $(OBJS); add --mode=link for libtool.
163         (chise.lo): Depends on config.h.
164         (name.lo): New target.
165         (install.h): Refer $(HEADERS).
166
167 2003-08-15  MORIOKA Tomohiko  <tomo@mousai.as.wakwak.ne.jp>
168
169         * chise-name.h, name.c: New files.
170
171 2003-08-17  MORIOKA Tomohiko  <tomo@mousai.as.wakwak.ne.jp>
172
173         * chise.c (CHISE_Attribute_Table): Use <DB> instead of <struct
174         CHISE_Attribute_Table>.
175         (chise_put_attribute_table): New prototype.
176         (struct CHISE_Decoding_Table): Use <CHISE_Attribute_Table*>
177         instead of <DB*> as the type of member `db'.
178         (chise_ds_open_decoding_table): New implementation.
179         (chise_dt_close): Likewise.
180         (chise_dt_get_char): Modify for new implementation of <struct
181         CHISE_Decoding_Table>.
182         (chise_dt_put_char): Likewise.
183         (struct CHISE_Feature_Table): Use <CHISE_Attribute_Table*> instead
184         of <DB*> as the type of member `db'.
185         (chise_ds_open_feature_table): New implementation.
186         (chise_ft_close): Likewise.
187         (chise_ft_get_value): Modify for new implementation of <struct
188         CHISE_Feature_Table>.
189         (chise_open_attribute_table): Use db_dir instead of ds as the
190         first argument; modify for new implementation of
191         <CHISE_Attribute_Table>.
192         (chise_close_attribute_table): Modify for new implementation of
193         <CHISE_Attribute_Table>.
194         (chise_get_attribute_table): Likewise.
195         (chise_put_attribute_table): Likewise.
196
197 2003-08-17  MORIOKA Tomohiko  <tomo@mousai.as.wakwak.ne.jp>
198
199         * chise.c (CHISE_Attribute_Table): Moved from chise.h.
200         (struct CHISE_Decoding_Table): New structure.
201         (chise_ds_open_decoding_table): Cast the return value to
202         <CHISE_Decoding_Table*>.
203         (chise_dt_close): Cast back to <CHISE_Attribute_Table*>.
204         (chise_dt_get_char): Likewise.
205         (struct CHISE_Feature_Table): New structure.
206         (chise_ds_open_feature_table): Cast the return value to
207         <CHISE_Feature_Table*>.
208         (chise_ft_close): Cast back to <CHISE_Attribute_Table*>.
209         (chise_ft_get_value): Likewise.
210
211         * chise.h (CHISE_Attribute_Table): Deleted.
212         (CHISE_Decoding_Table): Use <struct CHISE_Decoding_Table> instead
213         of <CHISE_Attribute_Table>.
214         (CHISE_Feature_Table): Use <struct CHISE_Feature_Table> instead of
215         <CHISE_Attribute_Table>.
216
217 2003-08-17  MORIOKA Tomohiko  <tomo@mousai.as.wakwak.ne.jp>
218
219         * chise.c (chise_open_attribute_table): New prototype.
220         (chise_close_attribute_table): New prototype.
221         (chise_get_attribute_table): New prototype.
222
223         * chise.h (chise_open_attribute_table): Deleted.
224         (chise_close_attribute_table): Deleted.
225         (chise_get_attribute_table): Deleted.
226
227 2003-08-17  MORIOKA Tomohiko  <tomo@mousai.as.wakwak.ne.jp>
228
229         * chise.c (struct CHISE_DS): Definition of members are moved from
230         chise.h.
231
232         * chise.h (struct CHISE_DS): Omit definition of members.
233
234 2003-08-17  MORIOKA Tomohiko  <tomo@mousai.as.wakwak.ne.jp>
235
236         * sample.c (main): Modify for new API.
237
238         * chise.c (chise_open_data_source): Interface change; allocate a
239         CHISE_DS object and return it.
240         (chise_ds_close): Renamed from `chise_close_data_source'; destroy
241         the specified CHISE_DS object.
242         (chise_ds_open_decoding_table): Renamed from
243         `chise_open_decoding_table' and changed the interface.
244         (chise_dt_close): Renamed from `chise_close_decoding_table'.
245         (chise_ds_open_feature_table): Renamed from
246         `chise_open_feature_table' and changed the interface.
247         (chise_ft_close): Renamed from `chise_close_feature_table'.
248         (chise_open_attribute_table): Interface change; allocate a
249         CHISE_Attribute_Table object and return it; require pointer for
250         data source object instead of db_dir.
251         (chise_close_attribute_table): Destroy the specified
252         CHISE_Attribute_Table object.
253
254         * chise.h (struct CHISE_DS): Change type of location from <char*>
255         to <unsigned char*>.
256         (chise_open_data_source): Change interface.
257         (chise_ds_close): Renamed from `chise_close_data_source'.
258         (struct CHISE_Attribute_Table): Add new member `ds'; rename `dbp'
259         to `db'.
260         (chise_ds_open_decoding_table): Renamed from
261         `chise_open_decoding_table' and changed the interface.
262         (chise_dt_close): Renamed from `chise_close_decoding_table'.
263         (chise_ds_open_feature_table): Renamed from
264         `chise_open_feature_table' and changed the interface.
265         (chise_ft_close): Renamed from `chise_close_feature_table'.
266         (chise_open_attribute_table): Change interface.
267
268 2003-08-12  MORIOKA Tomohiko  <tomo@mousai.as.wakwak.ne.jp>
269
270         * configure.in: Update version to 0.2.0.
271
272         * Makefile.in (ABI_VERSION): New variable.
273         (libchise.la): Specify $(ABI_VERSION) as -version-info of libtool.
274
275 2003-08-12  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
276
277         * sample.c (main): Use <CHISE_Decoding_Table> instead of
278         <CHISE_Decoding_Table*> to define `dt_daikanwa'; use
279         <CHISE_Feature_Table> instead of <CHISE_Feature_Table*> to define
280         `ft_ideographic_structure' and `ft_ascii'.
281
282         * chise.c (chise_open_decoding_table): Use <CHISE_Decoding_Table*>
283         instead of <CHISE_Decoding_Table**> as the type of the first
284         argument.
285         (chise_open_feature_table): Use <CHISE_Feature_Table*> instead of
286         <CHISE_Feature_Table**> as the type of the first argument.
287         (chise_ft_iterate): Modify for the structure
288         `CHISE_Feature_Table'.
289         (chise_open_attribute_table): Use <CHISE_Attribute_Table*> instead
290         of <CHISE_Attribute_Table **> as the type of the first argument;
291         modify for the structure <CHISE_Feature_Table>.
292         (chise_close_attribute_table): Modify for the structure
293         <CHISE_Feature_Table>.
294         (chise_get_attribute_table): Likewise.
295         (chise_put_attribute_table): Likewise.
296
297         * chise.h (CHISE_Attribute_Table): Define as a structure.
298         (chise_open_decoding_table): Use <CHISE_Decoding_Table*> instead
299         of <CHISE_Decoding_Table**> as the type of the first argument.
300         (chise_open_feature_table): Use <CHISE_Feature_Table*> instead of
301         <CHISE_Feature_Table**> as the type of the first argument.
302         (chise_open_attribute_table): Use <CHISE_Attribute_Table*> instead
303         of <CHISE_Attribute_Table**> as the type of the first argument.
304
305 2003-08-11  MORIOKA Tomohiko  <tomo@mousai.as.wakwak.ne.jp>
306
307         * chise.h (chise_dt_put_char): New prototype.
308
309 2003-08-10  MORIOKA Tomohiko  <tomo@mousai.as.wakwak.ne.jp>
310
311         * chise.c (chise_dt_put_char): New function.
312         (chise_put_attribute_table): New function.
313
314 2003-08-10  MORIOKA Tomohiko  <tomo@mousai.as.wakwak.ne.jp>
315
316         * chise.c (chise_format_char_id): New function.
317         (chise_ft_get_value): Use `chise_format_char_id'.
318
319 2003-08-09  MORIOKA Tomohiko  <tomo@mousai.as.wakwak.ne.jp>
320
321         * chise.h: Define `_CHISE_H'.
322
323 2003-08-09  MORIOKA Tomohiko  <tomo@mousai.as.wakwak.ne.jp>
324
325         * sample.c (test_map_func): New function.
326         (main): Add sample of `chise_ft_iterate'.
327
328         * chise.c (chise_char_id_parse_c_string): New function.
329         (chise_dt_get_char): Use `chise_char_id_parse_c_string'.
330         (chise_ft_iterate): New function.
331
332         * chise.h (chise_ft_iterate): New function.
333
334 2003-08-06  MORIOKA Tomohiko  <tomo@mousai.as.wakwak.ne.jp>
335
336         * chise.c (chise_ft_get_value): Use escape forms for some special
337         characters.
338
339 2003-08-06  MORIOKA Tomohiko  <tomo@mousai.as.wakwak.ne.jp>
340
341         * sample.c (main): Rename "ideograph-daikanwa" to "=daikanwa".
342
343         * chise.c (chise_open_attribute_table): Encode '/' and '%' in
344         argument `feature' for file name.
345
346 2003-07-12  MORIOKA Tomohiko  <tomo@mousai.as.wakwak.ne.jp>
347
348         * chise.c, chise.h: Move strnlen related code from chise.h to
349         chise.c.
350
351 2003-07-08  MORIOKA Tomohiko  <tomo@mousai.as.wakwak.ne.jp>
352
353         * Makefile.in (CFLAGS): Refer @CFLAGS@.
354
355         * configure.in: Add check code for Fink.
356
357 2003-07-08  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
358
359         * Makefile.in (LIBTOOL): New variable.
360         (distclean): New target.
361
362         * configure.in: Check about libtool.
363
364 2003-07-08  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
365
366         * Makefile.in: Use libtool.
367
368 2003-07-07  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
369
370         * chise.c: Include "config.h" when HAVE_CONFIG_H is defined.
371
372         * chise.h (strnlen): New inline function when HAVE_STRNLEN is not
373         defined [based on Izumi MIYAZAKI <imiyazaki@bun.kyoto-u.ac.jp>'s
374         patch].
375
376         * Makefile: Deleted.
377
378         * configure: New file.
379
380         * Makefile.in, config.h.in, configure.in: New files.
381
382 2003-03-12  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
383
384         * chise.c (chise_dt_get_char): Use `chise_value_data' instead of
385         `chise_value_to_c_string'; use `strnlen' and `chise_value_size'
386         instead of `strlen'; fix problem about control characters.
387
388         * chise.h (chise_value_data): New inline function.
389
390 2003-03-10  MORIOKA Tomohiko  <tomo@mousai.as.wakwak.ne.jp>
391
392         * chise.c (chise_dt_get_char): Fix problem about `?\CHAR'.
393
394 2003-03-06  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
395
396         * sample.c: Add comments.
397
398 2003-03-06  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
399
400         * sample.c: Use <chise.h>.
401         (db_dir): Use "/usr/local/lib/chise/char-db".
402
403         * Makefile: Install chise.h; setup /usr/local/lib/chise/char-db/.
404
405 2003-03-05  MORIOKA Tomohiko  <tomo@mousai.as.wakwak.ne.jp>
406
407         * Makefile, chise.c, chise.h, sample.c: New files.
408