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