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