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