7 extern const unsigned char chise_db_dir[];
8 extern const unsigned char chise_system_db_dir[];
10 typedef enum CHISE_DS_Type
16 typedef struct CHISE_DS CHISE_DS;
19 CHISE_DS_open (CHISE_DS_Type type, const unsigned char *location,
20 int subtype, int modemask);
22 int CHISE_DS_close (CHISE_DS *ds);
25 chise_ds_foreach_char_feature_name (CHISE_DS *ds,
26 int (*func) (CHISE_DS *ds,
27 unsigned char *name));
30 typedef int CHISE_Char_ID;
33 typedef DBT CHISE_Value;
36 chise_value_size (const CHISE_Value *s)
42 chise_value_data (const CHISE_Value *s)
48 chise_value_to_c_string (const CHISE_Value *s)
54 typedef struct CHISE_Feature_Table CHISE_Feature_Table;
55 typedef CHISE_Feature_Table* CHISE_Feature;
58 chise_ds_get_feature (CHISE_DS *ds, const unsigned char *name);
61 chise_ds_load_char_feature_value (CHISE_DS *ds,
63 const unsigned char *name,
64 CHISE_Value *valdatum);
66 int chise_feature_setup_db (CHISE_Feature feature, int writable);
68 int chise_feature_sync (CHISE_Feature feature);
70 int chise_char_set_feature_value (CHISE_Char_ID cid,
71 CHISE_Feature feature,
72 unsigned char *value);
74 int chise_char_load_feature_value (CHISE_Char_ID cid,
75 CHISE_Feature feature,
76 CHISE_Value *valdatum);
79 chise_ds_load_char_feature_value (CHISE_DS *ds,
81 const unsigned char *name,
82 CHISE_Value *valdatum)
85 chise_char_load_feature_value (cid, chise_ds_get_feature (ds, name),
90 chise_char_gets_feature_value (CHISE_Char_ID cid,
91 CHISE_Feature feature,
92 unsigned char *dst, size_t size);
95 chise_feature_foreach_char_with_value (CHISE_Feature feature,
96 int (*func) (CHISE_Char_ID cid,
97 CHISE_Feature feature,
98 CHISE_Value *valdatum));
102 chise_feature_foreach_char_with_str (CHISE_Feature feature,
103 int (*func) (CHISE_Char_ID cid,
104 CHISE_Feature feature,
105 unsigned char *str));
109 typedef struct CHISE_CCS_Table CHISE_CCS_Table;
110 typedef CHISE_CCS_Table* CHISE_CCS;
113 chise_ds_get_ccs (CHISE_DS *ds, const unsigned char *name);
115 static inline CHISE_Char_ID
116 chise_ds_decode_char (CHISE_DS *ds,
117 const unsigned char *ccs, int code_point);
119 int chise_ccs_setup_db (CHISE_CCS ccs, int writable);
121 int chise_ccs_sync (CHISE_CCS ccs);
123 int chise_ccs_set_decoded_char (CHISE_CCS ccs,
124 int code_point, CHISE_Char_ID cid);
126 CHISE_Char_ID chise_ccs_decode (CHISE_CCS ccs, int code_point);
128 static inline CHISE_Char_ID
129 chise_ds_decode_char (CHISE_DS *ds,
130 const unsigned char *name, int code_point)
133 chise_ccs_decode (chise_ds_get_ccs (ds, name), code_point);
136 #endif /* !_CHISE_H */