(cos_string_ent_composition): New variable.
[chise/concord.git] / ChangeLog
1 2013-04-20  MORIOKA Tomohiko  <tomo.git@chise.org>
2
3         * symbol.c (cos_release_symbol): Add check for builtin symbols.
4
5 2013-04-19  MORIOKA Tomohiko  <tomo.git@chise.org>
6
7         * concord.h (CONCORD_Genre_Table): Revived as an alias of
8         `COS_Genre_ent'.
9
10 2013-04-18  MORIOKA Tomohiko  <tomo.git@chise.org>
11
12         * symbol.c (cos_retain_symbol): Don't use `cos_retain_object'
13         recursively.
14         (cos_symbol_p): New function.
15         (cos_symbol_table_intern): Check type of each entry of the hash;
16         use `cos_retain_object' for the returned symbol.
17         (cos_print_symbol_table): New function.
18
19         * cos.c (cos_char_id): Fixed.
20         (cos_release_object): Fixed.
21         (cos_retain_cons): Don't use `cos_retain_object' recursively.
22         (cos_assoc): New function.
23         (cos_alist_get): New function.
24
25 2013-04-18  MORIOKA Tomohiko  <tomo.git@chise.org>
26
27         * read.c (is_delimiter): New function.
28         (cos_read_int): Use `is_delimiter'.
29         (cos_read_string): Fixed.
30         (cos_read_symbol): New function.
31         (cos_read_object): Use `cos_read_symbol' to support symbol.
32
33         * cos.h (cos_symbol_p): New prototype.
34         (cos_assoc): New prototype.
35         (cos_alist_get): New prototype.
36
37         * cos-read.h (cos_read_symbol): New prototype.
38
39 2013-04-17  MORIOKA Tomohiko  <tomo.git@chise.org>
40
41         * read.c (cos_skip_space): New function.
42         (cos_read_int): Fix to support separator.
43         (cos_read_list0): New function.
44         (cos_read_list): New function.
45         (cos_read_object): New function.
46
47         * print.c (cos_print_object): Fix duplicated `?' when printing a
48         character.
49
50         * cos.h (cos_cons_p): New prototype.
51
52         * cos.c (cos_cons_p): New function.
53         (concord_object_get_feature_value): Use `cos_read_object'.
54
55         * cos-read.h (cos_read_list): New prototype.
56         (cos_read_object): New prototype.
57
58 2013-04-16  MORIOKA Tomohiko  <tomo.git@chise.org>
59
60         * symbol.c (cos_make_symbol): Use `cos_retain_object' for
61         `obj->name'.
62         (cos_retain_symbol): New function.
63
64         * cos.c (COS_Object_retain_function_table): New variable.
65         (cos_retain_object): Call a retain-function in
66         `COS_Object_retain_function_table'.
67         (cos_retain_string): New function.
68         (cos_retain_cons): New function.
69         (cos_retain_container): New function.
70         (cos_retain_sexp): New function.
71         (cos_retain_binary): New function.
72         (cos_retain_ds): New function.
73         (cos_retain_genre): New function.
74         (cos_retain_feature): New function.
75         (cos_retain_index): New function.
76         (cos_retain_db_object): New function.
77
78         * cos-i.h (COS_Object_retain_function_table): New variable.
79         (cos_retain_string): New prototype.
80         (cos_retain_symbol): New prototype.
81         (cos_retain_cons): New prototype.
82         (cos_retain_container): New prototype.
83         (cos_retain_sexp): New prototype.
84         (cos_retain_binary): New prototype.
85         (cos_retain_ds): New prototype.
86         (cos_retain_genre): New prototype.
87         (cos_retain_feature): New prototype.
88         (cos_retain_index): New prototype.
89         (cos_retain_db_object): New prototype.
90
91 2013-04-16  MORIOKA Tomohiko  <tomo.git@chise.org>
92
93         * Makefile.in (symbol-test): New target.
94
95 2013-04-16  MORIOKA Tomohiko  <tomo.git@chise.org>
96
97         * name.c (concord_name_table_grow): Release old `table->data'.
98
99         * cos.h: Include <stdlib.h>.
100         (cos_Qnil): New variable.
101         (cos_Qt): New variable.
102         (cos_print_object): New prototype.
103
104         * symbol.c (cos_string_ent_nil): New variable.
105         (cos_symbol_ent_nil): New variable.
106         (cos_Qnil): New variable.
107         (cos_string_ent_t): New variable.
108         (cos_symbol_ent_t): New variable.
109         (cos_Qt): New variable.
110         (cos_intern): Setup `nil' and `t'.
111         (cos_symbol_table_grow): Release old `table->data'.
112
113         * print.c (cos_print_object): New function.
114
115 2013-04-16  MORIOKA Tomohiko  <tomo.git@chise.org>
116
117         * cos.c (COS_Object_release_function_table): Add
118         `cos_release_cons'.
119         (cos_retain_object): Use `COS_OBJECT_P' to check `obj' is a fat
120         object.
121         (cos_release_object): Likewise.
122         (cos_cons): New function.
123         (cos_release_cons): New function.
124         (cos_car): New function.
125         (cos_cdr): New function.
126
127         * cos-i.h (enum COS_Object_Type): Add COS_Object_Type_Cons.
128         (COS_OBJECT_CONS_P): New macro.
129         (struct COS_Cons_ent): New structure.
130         (COS_CAR): New macro.
131         (COS_CDR): New macro.
132         (cos_release_cons): New prototype.
133
134         * cos.h (struct COS_Cons_ent): New structure.
135         (COS_Cons): New type.
136         (cos_cons): New prototype.
137         (cos_car): New prototype.
138         (cos_cdr): New prototype.
139
140 2013-04-15  MORIOKA Tomohiko  <tomo.git@chise.org>
141
142         * cos.c (concord_object_get_feature_value): Use `cos_read_int' to
143         parse integer.
144
145         * read.c: Include <ctype.h>.
146         (cos_read_int): New function.
147
148         * cos-read.h (cos_read_int): New prototype.
149
150 2013-04-14  MORIOKA Tomohiko  <tomo.git@chise.org>
151
152         * cos.c (cos_string_p): New function.
153         (concord_object_get_feature_value): Use `cos_read_char' and
154         `cos_read_string' to parse character and string.
155
156         * read.c (cos_read_string): New function.
157
158         * cos.h (cos_string_p): New prototype.
159
160         * cos-read.h: Include "cos.h".
161         (cos_read_string): New prototype.
162
163 2013-04-06  MORIOKA Tomohiko  <tomo.git@chise.org>
164
165         * cos.c: Include "cos-print.h".
166         (concord_current_env): New variable.
167         (concord_open_env): Setup `concord_current_env'.
168         (concord_object_get_feature_value): New function.
169
170 2013-04-04  MORIOKA Tomohiko  <tomo.git@chise.org>
171
172         * print.c:
173         - Don't include <stdlib.h>.
174         - Include "cos-i.h".
175         (cos_utf8_encode_char): Renamed from `cos_encode_char_as_utf8'.
176         (cos_utf8_print_char): New function.
177
178         * cos-print.h: Include stdlib.h and cos.h.
179         (cos_utf8_encode_char): Renamed from `cos_encode_char_as_utf8'.
180         (cos_utf8_print_char): New prototype.
181
182         * concord.h (concord_object_get_feature_value): New prototype.
183
184 2013-04-02  MORIOKA Tomohiko  <tomo.git@chise.org>
185
186         * print.c: New file.
187
188         * cos-print.h: New file.
189
190         * Makefile.in (OBJS): Add print.lo.
191         (print.lo): New target.
192
193 2013-04-01  MORIOKA Tomohiko  <tomo.git@chise.org>
194
195         * concord.c (struct COS_DS_ent): Delete member `symbol_names'.
196         (concord_open_ds): Delete code to initialize `ds->symbol_names'.
197         (concord_close_ds): Delete code to destroy `ds->symbol_names'.
198
199 2013-03-30  MORIOKA Tomohiko  <tomo.git@chise.org>
200
201         * cos-read.h: New file.
202
203         * cos.h: New file.
204
205         * symbol.c: New file.
206
207         * cos-i.h: New file.
208
209         * cos.c: New file.
210
211         * concord-bdb.c: Move code to include "config.h" into sysdep.h.
212
213         * concord.c:
214         - Move code to include "config.h" into sysdep.h.
215         - Include "cos-i.h".
216         (concord_close_genre): Move prototype into cos-i.h.
217         (concord_close_feature): Likewise.
218         (concord_close_index): Likewise.
219         (struct CONCORD_Object_Header): Renamed to `COS_Object_Header';
220         moved to cos-i.h; add new member `reference_count'.
221         (CONCORD_OBJECT_TYPE_NULL): Renamed to `COS_Object_Type_NULL';
222         moved to cos-i.h; use `enum COS_Object_Type'.
223         (CONCORD_OBJECT_TYPE_C_STRING): Renamed to
224         `COS_Object_Type_C_String'; moved to cos-i.h; use `enum
225         COS_Object_Type'.
226         (CONCORD_OBJECT_TYPE_INT): Renamed to `COS_Object_Type_int'; moved
227         to cos-i.h; use `enum COS_Object_Type'.
228         (CONCORD_OBJECT_TYPE_DS): Renamed to `COS_Object_Type_DS'; moved
229         to cos-i.h; use `enum COS_Object_Type'.
230         (CONCORD_OBJECT_TYPE_GENRE): Renamed to `COS_Object_Type_Genre';
231         moved to cos-i.h; use `enum COS_Object_Type'.
232         (CONCORD_OBJECT_TYPE_FEATURE): Renamed to
233         `COS_Object_Type_Feature'; moved to cos-i.h; use `enum
234         COS_Object_Type'.
235         (CONCORD_OBJECT_TYPE_INDEX): Renamed to
236         `COS_Object_Type_Feature_INDEX'; moved to cos-i.h; use `enum
237         COS_Object_Type'.
238         (CONCORD_OBJECT_TYPE_OBJECT): Renamed to
239         `COS_Object_Type_DB_Object'; moved to cos-i.h; use `enum
240         COS_Object_Type'.
241         (struct CONCORD_DS_Table): Renamed to `struct COS_DS_ent'; add new
242         member `symbol_names'.
243         (concord_open_ds): Use `COS_ALLOCATE_OBJECT'; initialize
244         `ds->symbol_names'.
245         (concord_close_ds): Destroy `ds->symbol_names'.
246         (struct CONCORD_Genre_Table): Renamed to `struct COS_Genre_ent'.
247         (concord_ds_open_genre): Use `COS_ALLOCATE_OBJECT'.
248         (struct CONCORD_Feature_Table): Renamed to `struct
249         COS_Feature_ent'.
250         (concord_genre_open_feature): Use `COS_ALLOCATE_OBJECT'.
251         (struct CONCORD_INDEX_Table): Renamed to `struct
252         COS_Feature_INDEX_ent'.
253         (concord_genre_open_index): Use `COS_ALLOCATE_OBJECT'.
254         (concord_index_get_name): New function.
255         (concord_index_get_genre): New function.
256
257         * concord.h: Include <cos.h>.
258         (CONCORD_Object): Use `COS_Object' instead of `void*' as the type.
259         (COS_DS_ent): Renamed from `CONCORD_DS_Table'.
260         (COS_DS): New type.
261         (CONCORD_DS): Use `COS_DS' instead of `CONCORD_DS_Table*' as the
262         type.
263         (concord_open_env): New prototype.
264         (COS_Genre_ent): Renamed from `CONCORD_Genre_Table'.
265         (COS_Genre): New type.
266         (CONCORD_Genre): Use `COS_Genre' instead of `CONCORD_Genre_Table*'
267         as the type.
268         (concord_get_genre): New prototype.
269         (COS_Feature_ent): Renamed from `CONCORD_Feature_Table'.
270         (COS_Feature): New type.
271         (CONCORD_Feature): Use `COS_Feature' instead of
272         `CONCORD_Feature_Table*' as the type.
273         (concord_get_feature): New prototype.
274         (COS_Feature_INDEX_ent): Renamed from `CONCORD_INDEX_Table'.
275         (COS_Feature_INDEX): New type.
276         (CONCORD_INDEX): Use `COS_Feature_INDEX' instead of
277         `CONCORD_INDEX_Table*' as the type.
278         (concord_get_feature_index): New prototype.
279         (concord_index_get_name): New prototype.
280         (concord_index_get_genre): New prototype.
281         (concord_decode_object): New prototype.
282
283         * sysdep.h: Include "config.h" if `HAVE_CONFIG_H' is defined.
284
285 2013-03-30  MORIOKA Tomohiko  <tomo.git@chise.org>
286
287         * read.c: New file.
288
289 2013-03-29  MORIOKA Tomohiko  <tomo.git@chise.org>
290
291         * Makefile.in (localstatedir): New variable.
292         (CONCORD_DB_PREFIX): New variable.
293         (CONCORD_DB_FORMAT_VERSION): New variable.
294         (CONCORD_DB_DIR): New variable.
295         (CONCORD_SI_DB_DIR): New variable.
296         (CONCORD_CFLAGS): New variable.
297         (HEADERS): Add cos.h.
298         (OBJS): Add cos.lo, symbol.lo and read.lo.
299         (cos.lo): New target.
300         (symbol.lo): New target.
301         (read.lo): New target.
302         (concord.lo): Depend on cos-i.h and cos.h.
303
304 2013-03-22  MORIOKA Tomohiko  <tomo.git@chise.org>
305
306         * name.c (concord_hash_c_string): Use `unsigned long' instead of
307         int' as the type of return value.
308
309 2013-03-21  MORIOKA Tomohiko  <tomo.git@chise.org>
310
311         * config.h.in (SIZEOF_INT): New macro.
312         (SIZEOF_LONG): New macro.
313         (SIZEOF_LONG_LONG): New macro.
314         (SIZEOF_VOID_P): New macro.
315         (BITS_PER_CHAR): New macro.
316
317         * configure.in: Add `AC_CHECK_SIZEOF(int)',
318         `AC_CHECK_SIZEOF(long)', `AC_CHECK_SIZEOF(long long)' and
319         `AC_CHECK_SIZEOF(void *)'.
320
321 2011-10-31  MORIOKA Tomohiko  <tomo.git@chise.org>
322
323         * Makefile.in (ABI_VERSION): Update to 1:0:1.
324
325         * concord.c (struct CONCORD_Object_Header): New structure.
326         (CONCORD_OBJECT_TYPE_NULL): New macro.
327         (CONCORD_OBJECT_TYPE_C_STRING): New macro.
328         (CONCORD_OBJECT_TYPE_INT): New macro.
329         (CONCORD_OBJECT_TYPE_DS): New macro.
330         (CONCORD_OBJECT_TYPE_GENRE): New macro.
331         (CONCORD_OBJECT_TYPE_FEATURE): New macro.
332         (CONCORD_OBJECT_TYPE_INDEX): New macro.
333         (CONCORD_OBJECT_TYPE_OBJECT): New macro.
334         (struct CONCORD_DS_Table): Add new member `header'.
335         (concord_open_ds): Setup ds->header.
336         (struct CONCORD_Genre_Table): Add new member `header'.
337         (concord_ds_open_genre): Setup ds->header.
338         (struct CONCORD_Feature_Table): Add new member `header'.
339         (concord_genre_open_feature): Setup ds->header.
340         (struct CONCORD_INDEX_Table): Add new member `header'.
341         (concord_genre_open_index): Setup ds->header.
342
343 2012-07-07  MORIOKA Tomohiko  <tomo.git@chise.org>
344
345         * configure.in: Support db5 in Fink.
346
347 2012-04-25  MORIOKA Tomohiko  <tomo.git@chise.org>
348
349         * README.en (Reporting Bugs): Modify for
350         chise-{en|ja}@lists.chise.org.
351
352 2012-04-09  MORIOKA Tomohiko  <tomo.git@chise.org>
353
354         * README.en: Remove descriptions about CVS and add description
355         about the new Git repository.
356
357 2012-02-08  MORIOKA Tomohiko  <tomo@zinbun.kyoto-u.ac.jp>
358
359         * configure.in:
360         - Don't use "AC_CHECK_FUNCS(strnlen)".
361         - When $ac_cv_func_strnlen_working = "yes", define HAVE_STRNLEN.
362
363 2011-08-24  MORIOKA Tomohiko  <tomo@zinbun.kyoto-u.ac.jp>
364
365         * Makefile.in (CFLAGS): Add $(DEFS).
366
367 \f
368 2010-06-10  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
369
370         * Concord 0.0.2 released.
371
372         * configure.in: Update version to 0.0.2.
373
374 2008-07-21  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
375
376         * configure.in: Add settings for --with-site-includes=PATH and
377         --with-site-libraries=PATH.
378
379 \f
380 2008-05-27  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
381
382         * Concord 0.0.1 released.
383
384 2008-01-12  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
385
386         * Makefile.in (MKDIR): New variable.
387         (install.h): Make $(INCLUDE_INSTALLDIR).
388         (install.libs): Make $(LIB_INSTALLDIR).
389
390 2006-12-22  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
391
392         * configure.in: Update version to 0.0.1.
393
394         * Makefile.in (libconcord.la): Specify `-no-undefined' to avoid
395         error on Cygwin [suggested by KAMICHI Koichi <kamichi@fonts.jp>].
396         (concord.lo): Specify `--mode=compile'.
397         (concord-bdb.lo): ditto.
398         (name.lo): ditto.
399         (install.libs): Specify `--mode=install'.
400
401 \f
402 2006-05-11  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
403
404         * Concord 0.0.0 released.
405
406         * Makefile.in (tar): Fixed.
407
408 2006-04-14  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
409
410         * concord.c (concord_ds_open_genre): Use <char*> instead of
411         <unsigned char*> for genre-name.
412         (concord_genre_open_feature): Likewise.
413         (concord_genre_open_index): Use <char*> instead of <unsigned
414         char*> for index-name.
415         (concord_genre_get_feature_0): Use <char*> instead of <unsigned
416         char*> for feature-name.
417         (struct CONCORD_DS_Table): Use <char*> instead of <unsigned char*>
418         for member `location'.
419         (concord_default_read_object): Cast to avoid warning.
420         (concord_open_ds): Use <char*> instead of <unsigned char*> for
421         ds->location.
422         (concord_ds_foreach_genre_name): Use <char*> instead of <unsigned
423         char*> for ds->location; cast to avoid warning.
424         (struct CONCORD_Genre_Table): Use <char*> instead of <unsigned
425         char*> for member `name'.
426         (concord_ds_open_genre): Use <char*> instead of <unsigned char*>
427         for genre-name.
428         (concord_genre_foreach_feature_name): Use <char*> instead of
429         <unsigned char*> for ds->location.
430         (concord_genre_get_feature_0): Use <char*> instead of <unsigned
431         char*> for genre-name.
432         (concord_genre_get_feature): Use <char*> instead of <unsigned
433         char*> for t_name.
434         (struct CONCORD_Feature_Table): Use <char*> instead of <unsigned
435         char*> for member `name'.
436         (concord_genre_open_feature): Use <char*> instead of <unsigned
437         char*> for feature-name.
438         (concord_obj_gets_feature_value): Cast to avoid warning.
439         (struct CONCORD_INDEX_Table): Use <char*> instead of <unsigned
440         char*> for member `name'.
441         (concord_genre_open_index): Use <char*> instead of <unsigned
442         char*> for index-name.
443         (concord_index_strid_put_obj): Cast to avoid warning.
444
445         * name.c, concord-name.h (concord_name_table_put): Use <char*>
446         instead of <unsigned char*> for key.
447         (concord_name_table_get): Likewise.
448
449 2006-04-14  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
450
451         * concord-bdb.c, concord-bdb.h (CONCORD_BDB_open): Use <char*>
452         instead of <unsigned char*> for db_dir, genre, key_type and name.
453         (CONCORD_BDB_get): Use <char*> instead of <unsigned char*> for
454         key.
455         (CONCORD_BDB_put): Likewise.
456
457         * concord.c, concord.h (concord_open_ds): Use <char*> instead of
458         <unsigned char*> for location.
459         (concord_ds_location): Likewise.
460         (concord_ds_foreach_genre_name): Use <char*> instead of <unsigned
461         char*> for genre-name.
462         (concord_ds_get_genre): Likewise.
463         (concord_genre_get_name): Likewise.
464         (concord_genre_foreach_feature_name): Likewise.
465         (concord_genre_get_feature): Use <char*> instead of <unsigned
466         char*> for feature-name.
467         (concord_feature_get_name): Likewise.
468         (concord_obj_put_feature_value_str): Use <char*> instead of
469         <unsigned char*> for object-id.
470         (concord_obj_get_feature_value): Likewise.
471         (concord_obj_get_feature_value_string): Likewise.
472         (concord_obj_gets_feature_value): Likewise.
473         (concord_genre_get_index): Use <char*> instead of <unsigned char*>
474         for index-name.
475         (concord_index_strid_put_obj): Use <char*> instead of <unsigned
476         char*> for indexer and object-id.
477         (concord_index_strid_get_obj_string): Use <char*> instead of
478         <unsigned char*> for indexer.
479
480 2006-02-24  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
481
482         * README.en: New file.
483
484 2005-12-04  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
485
486         * concord.h (concord_genre_get_name): New prototype.
487         (concord_feature_get_genre): New prototype.
488
489         * concord.c (concord_genre_get_name): New function.
490         (concord_feature_get_genre): New function.
491
492 2005-06-30  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
493
494         * concord.c (concord_ds_set_object_failure): Renamed from
495         `concord_ds_set_object_nil'.
496         (concord_genre_get_feature_0): New function.
497         (concord_genre_get_feature): New implementation; use
498         `concord_genre_get_feature_0'; support feature alias.
499
500 2005-06-24  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
501
502         * concord.h (concord_ds_set_object_failure): Renamed from
503         `concord_ds_set_object_nil'.
504
505 2005-06-24  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
506
507         * concord.c, concord.h (concord_obj_put_feature_value_str):
508         Renamed from `concord_stroid_set_feature_str'.
509         (concord_obj_get_feature_value): Renamed from
510         `concord_stroid_get_feature_object'.
511         (concord_obj_get_feature_value_string): Renamed from
512         `concord_stroid_get_feature_string'.
513         (concord_obj_gets_feature_value): Renamed from
514         `concord_stroid_gets_feature'.
515         (concord_feature_foreach_obj_string): Renamed from
516         `concord_feature_foreach_object_string'.
517         (concord_index_strid_get_obj_string): Renamed from
518         `concord_index_strid_get_object_string'.
519         (concord_index_strid_put_obj): Renamed from
520         `concord_index_strid_set_object_str'.
521
522 2005-06-24  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
523
524         * concord.c, concord.h (concord_close_ds): Renamed from
525         `CONCORD_DS_close'.
526
527 2005-06-22  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
528
529         * concord-bdb.c, concord-bdb.h, concord.c, concord.h: New files.
530
531 2005-06-21  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
532
533         * Makefile.in: New file.
534
535 2005-06-20  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
536
537         * sysdep.h: New file.
538
539 2005-06-18  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
540
541         * aclocal.m4, concord-name.h, config.h.in, configure.in,
542         config.guess, config.sub, install-sh, ltmain.sh, name.c: New
543         files.