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