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