From 746ea9a4c49e062117f2f52184ad4a0832988696 Mon Sep 17 00:00:00 2001 From: tomo Date: Sun, 17 Aug 2003 13:31:49 +0000 Subject: [PATCH] (struct CHISE_DS): Change type of location from to . (chise_open_data_source): Change interface. (chise_ds_close): Renamed from `chise_close_data_source'. (struct CHISE_Attribute_Table): Add new member `ds'; rename `dbp' to `db'. (chise_ds_open_decoding_table): Renamed from `chise_open_decoding_table' and changed the interface. (chise_dt_close): Renamed from `chise_close_decoding_table'. (chise_ds_open_feature_table): Renamed from `chise_open_feature_table' and changed the interface. (chise_ft_close): Renamed from `chise_close_feature_table'. (chise_open_attribute_table): Change interface. --- chise.h | 55 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/chise.h b/chise.h index 29fbcd7..8bd4d05 100644 --- a/chise.h +++ b/chise.h @@ -13,13 +13,12 @@ typedef enum CHISE_DS_Type typedef struct CHISE_DS { CHISE_DS_Type type; - char *location; + unsigned char *location; } CHISE_DS; -int chise_open_data_source (CHISE_DS *ds, CHISE_DS_Type type, - char *location); +CHISE_DS* chise_open_data_source (CHISE_DS_Type type, char *location); -int chise_close_data_source (CHISE_DS *ds); +int chise_ds_close (CHISE_DS *ds); typedef int CHISE_Char_ID; @@ -48,39 +47,41 @@ chise_value_to_c_string (const CHISE_Value *s) typedef struct CHISE_Attribute_Table { - DB *dbp; + CHISE_DS *ds; + DB *db; } CHISE_Attribute_Table; typedef CHISE_Attribute_Table CHISE_Decoding_Table; -int chise_open_decoding_table (CHISE_Decoding_Table *db, - CHISE_DS *ds, const char *ccs, - DBTYPE real_subtype, - u_int32_t accessmask, int modemask); +CHISE_Decoding_Table* +chise_ds_open_decoding_table (CHISE_DS *ds, const char *ccs, + DBTYPE real_subtype, + u_int32_t accessmask, int modemask); -int chise_close_decoding_table (CHISE_Decoding_Table *db); +int chise_dt_close (CHISE_Decoding_Table *table); -CHISE_Char_ID chise_dt_get_char (CHISE_Decoding_Table *db, int code_point); +CHISE_Char_ID chise_dt_get_char (CHISE_Decoding_Table *table, int code_point); -int chise_dt_put_char (CHISE_Decoding_Table *db, +int chise_dt_put_char (CHISE_Decoding_Table *table, int code_point, CHISE_Char_ID cid); + typedef CHISE_Attribute_Table CHISE_Feature_Table; -int chise_open_feature_table (CHISE_Feature_Table *db, - CHISE_DS *ds, const char *feature, - DBTYPE real_subtype, - u_int32_t accessmask, int modemask); +CHISE_Feature_Table* +chise_ds_open_feature_table (CHISE_DS *ds, const char *feature, + DBTYPE real_subtype, + u_int32_t accessmask, int modemask); -int chise_close_feature_table (CHISE_Feature_Table *db); +int chise_ft_close (CHISE_Feature_Table *table); -int chise_ft_get_value (CHISE_Feature_Table *db, +int chise_ft_get_value (CHISE_Feature_Table *table, CHISE_Char_ID cid, CHISE_Value *valdatum); void -chise_ft_iterate (CHISE_Feature_Table *dbp, - int (*func) (CHISE_Feature_Table *db, +chise_ft_iterate (CHISE_Feature_Table *table, + int (*func) (CHISE_Feature_Table *table, CHISE_Char_ID cid, CHISE_Value *valdatum)); @@ -90,15 +91,15 @@ int chise_get_feature (CHISE_DS *ds, CHISE_Char_ID cid, char *key, CHISE_Value *valdatum); -int chise_open_attribute_table (CHISE_Attribute_Table *db, - const char *db_dir, - const char *encoding, const char *feature, - DBTYPE real_subtype, - u_int32_t accessmask, int modemask); +CHISE_Attribute_Table* +chise_open_attribute_table (CHISE_DS *ds, + const char *encoding, const char *feature, + DBTYPE real_subtype, + u_int32_t accessmask, int modemask); -int chise_close_attribute_table (CHISE_Attribute_Table *db); +int chise_close_attribute_table (CHISE_Attribute_Table *at); -int chise_get_attribute_table (CHISE_Attribute_Table *db, +int chise_get_attribute_table (CHISE_Attribute_Table *at, char *key, CHISE_Value *valdatum); #endif /* !_CHISE_H */ -- 1.7.10.4