7 extern const unsigned char chise_db_dir[];
9 typedef enum CHISE_DS_Type
15 typedef struct CHISE_DS CHISE_DS;
18 CHISE_DS_open (CHISE_DS_Type type, const unsigned char *location,
19 int subtype, int modemask);
21 int CHISE_DS_close (CHISE_DS *ds);
24 chise_ds_foreach_char_feature_name (CHISE_DS *ds,
25 int (*func) (CHISE_DS *ds,
26 unsigned char *name));
29 typedef int CHISE_Char_ID;
32 typedef DBT CHISE_Value;
35 chise_value_size (const CHISE_Value *s)
41 chise_value_data (const CHISE_Value *s)
47 chise_value_to_c_string (const CHISE_Value *s)
53 typedef struct CHISE_Feature_Table CHISE_Feature_Table;
54 typedef CHISE_Feature_Table* CHISE_Feature;
57 chise_ds_get_feature (CHISE_DS *ds, const unsigned char *name);
60 chise_ds_load_char_feature_value (CHISE_DS *ds,
62 const unsigned char *name,
63 CHISE_Value *valdatum);
65 int chise_feature_setup_db (CHISE_Feature feature, int writable);
67 int chise_feature_sync (CHISE_Feature feature);
69 int chise_char_set_feature_value (CHISE_Char_ID cid,
70 CHISE_Feature feature,
71 unsigned char *value);
73 int chise_char_load_feature_value (CHISE_Char_ID cid,
74 CHISE_Feature feature,
75 CHISE_Value *valdatum);
78 chise_ds_load_char_feature_value (CHISE_DS *ds,
80 const unsigned char *name,
81 CHISE_Value *valdatum)
84 chise_char_load_feature_value (cid, chise_ds_get_feature (ds, name),
89 chise_char_gets_feature_value (CHISE_Char_ID cid,
90 CHISE_Feature feature,
91 unsigned char *dst, size_t size);
94 chise_feature_foreach_char_with_value (CHISE_Feature feature,
95 int (*func) (CHISE_Char_ID cid,
96 CHISE_Feature feature,
97 CHISE_Value *valdatum));
101 chise_feature_foreach_char_with_str (CHISE_Feature feature,
102 int (*func) (CHISE_Char_ID cid,
103 CHISE_Feature feature,
104 unsigned char *str));
108 typedef struct CHISE_CCS_Table CHISE_CCS_Table;
109 typedef CHISE_CCS_Table* CHISE_CCS;
112 chise_ds_get_ccs (CHISE_DS *ds, const unsigned char *name);
114 static inline CHISE_Char_ID
115 chise_ds_decode_char (CHISE_DS *ds,
116 const unsigned char *ccs, int code_point);
118 int chise_ccs_setup_db (CHISE_CCS ccs, int writable);
120 int chise_ccs_sync (CHISE_CCS ccs);
122 int chise_ccs_set_decoded_char (CHISE_CCS ccs,
123 int code_point, CHISE_Char_ID cid);
125 CHISE_Char_ID chise_ccs_decode (CHISE_CCS ccs, int code_point);
127 static inline CHISE_Char_ID
128 chise_ds_decode_char (CHISE_DS *ds,
129 const unsigned char *name, int code_point)
132 chise_ccs_decode (chise_ds_get_ccs (ds, name), code_point);
135 #endif /* !_CHISE_H */