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