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