From: tomo Date: Thu, 23 Jun 2005 23:38:42 +0000 (+0000) Subject: Don't include and . X-Git-Tag: chise-base-0_23~12 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7aa0746836dcbbc8d7e13047594e71ef8297bbc;p=chise%2Flibchise.git Don't include and . (CHISE_DS_Type): Use `CONCORD_Backend_Type' instead of `enum CONCORD_Backend_Type'. --- diff --git a/chise.h b/chise.h index dfb3c68..867bf02 100644 --- a/chise.h +++ b/chise.h @@ -26,30 +26,28 @@ extern "C" { } #endif -#include -#include #include extern const unsigned char chise_db_dir[]; extern const unsigned char chise_system_db_dir[]; -typedef enum CONCORD_Backend_Type CHISE_DS_Type; +typedef CONCORD_Backend_Type CHISE_DS_Type; #define CHISE_DS_Berkeley_DB CONCORD_Backend_Berkeley_DB typedef CONCORD_Genre_Table CHISE_DS; CHISE_DS* -CHISE_DS_open (CHISE_DS_Type type, const unsigned char *location, +CHISE_DS_open (CHISE_DS_Type type, const unsigned char* location, int subtype, int modemask); -int CHISE_DS_close (CHISE_DS *ds); +int CHISE_DS_close (CHISE_DS* ds); -unsigned char* chise_ds_location (CHISE_DS *ds); +unsigned char* chise_ds_location (CHISE_DS* ds); int -chise_ds_foreach_char_feature_name (CHISE_DS *ds, - int (*func) (CHISE_DS *ds, - unsigned char *name)); +chise_ds_foreach_char_feature_name (CHISE_DS* ds, + int (*func) (CHISE_DS* ds, + unsigned char* name)); typedef int CHISE_Char_ID; @@ -61,21 +59,16 @@ unsigned char* chise_value_data (const CHISE_Value* s); unsigned char* chise_value_to_c_string (const CHISE_Value* s); -#if 0 -typedef struct CHISE_Feature_Table CHISE_Feature_Table; -typedef CHISE_Feature_Table* CHISE_Feature; -#else typedef CONCORD_Feature CHISE_Feature; -#endif CHISE_Feature chise_ds_get_feature (CHISE_DS* ds, const unsigned char* name); static inline int -chise_ds_load_char_feature_value (CHISE_DS *ds, +chise_ds_load_char_feature_value (CHISE_DS* ds, CHISE_Char_ID cid, - const unsigned char *name, - CHISE_Value *valdatum); + const unsigned char* name, + CHISE_Value* valdatum); int chise_feature_setup_db (CHISE_Feature feature, int writable); @@ -83,17 +76,17 @@ int chise_feature_sync (CHISE_Feature feature); int chise_char_set_feature_value (CHISE_Char_ID cid, CHISE_Feature feature, - unsigned char *value); + unsigned char* value); int chise_char_load_feature_value (CHISE_Char_ID cid, CHISE_Feature feature, - CHISE_Value *valdatum); + CHISE_Value* valdatum); static inline int -chise_ds_load_char_feature_value (CHISE_DS *ds, +chise_ds_load_char_feature_value (CHISE_DS* ds, CHISE_Char_ID cid, - const unsigned char *name, - CHISE_Value *valdatum) + const unsigned char* name, + CHISE_Value* valdatum) { return chise_char_load_feature_value (cid, chise_ds_get_feature (ds, name), @@ -103,36 +96,22 @@ chise_ds_load_char_feature_value (CHISE_DS *ds, unsigned char* chise_char_gets_feature_value (CHISE_Char_ID cid, CHISE_Feature feature, - unsigned char *dst, size_t size); + unsigned char* dst, size_t size); int chise_feature_foreach_char_with_value (CHISE_Feature feature, int (*func) (CHISE_Char_ID cid, CHISE_Feature feature, - CHISE_Value *valdatum)); - -#if 0 -int -chise_feature_foreach_char_with_str (CHISE_Feature feature, - int (*func) (CHISE_Char_ID cid, - CHISE_Feature feature, - unsigned char *str)); -#endif + CHISE_Value* valdatum)); -#if 0 -typedef struct CHISE_CCS_Table CHISE_CCS_Table; -typedef CHISE_CCS_Table* CHISE_CCS; -#else typedef CONCORD_INDEX CHISE_CCS; -#endif -CHISE_CCS -chise_ds_get_ccs (CHISE_DS *ds, const unsigned char *name); +CHISE_CCS chise_ds_get_ccs (CHISE_DS* ds, const unsigned char* name); static inline CHISE_Char_ID -chise_ds_decode_char (CHISE_DS *ds, - const unsigned char *ccs, int code_point); +chise_ds_decode_char (CHISE_DS* ds, + const unsigned char* ccs, int code_point); int chise_ccs_setup_db (CHISE_CCS ccs, int writable); @@ -144,20 +123,15 @@ int chise_ccs_set_decoded_char (CHISE_CCS ccs, CHISE_Char_ID chise_ccs_decode (CHISE_CCS ccs, int code_point); static inline CHISE_Char_ID -chise_ds_decode_char (CHISE_DS *ds, - const unsigned char *name, int code_point) +chise_ds_decode_char (CHISE_DS* ds, + const unsigned char* name, int code_point) { return chise_ccs_decode (chise_ds_get_ccs (ds, name), code_point); } -#if 0 -typedef struct CHISE_Property_Table CHISE_Property_Table; -typedef CHISE_Property_Table* CHISE_Property; -#else typedef CONCORD_Feature CHISE_Property; -#endif CHISE_Property chise_ds_get_property (CHISE_DS* ds, const unsigned char* name);