#include "chise.h"
+typedef struct CHISE_Attribute_Table
+{
+ CHISE_DS *ds;
+ DB *db;
+} CHISE_Attribute_Table;
+
CHISE_Attribute_Table*
chise_open_attribute_table (CHISE_DS *ds,
const char *encoding, const char *feature,
}
+struct CHISE_Decoding_Table
+{
+ CHISE_DS *ds;
+ DB *db;
+};
+
CHISE_Decoding_Table*
chise_ds_open_decoding_table (CHISE_DS *ds, const char *ccs,
DBTYPE real_subtype,
u_int32_t accessmask, int modemask)
{
return
+ (CHISE_Decoding_Table*)
chise_open_attribute_table (ds,
ccs, "system-char-id",
real_subtype, accessmask, modemask);
chise_dt_close (CHISE_Decoding_Table *table)
{
if (table)
- return chise_close_attribute_table (table);
+ return chise_close_attribute_table ((CHISE_Attribute_Table*)table);
return -1;
}
char key_buf[16];
sprintf(key_buf, "%d", code_point);
- status = chise_get_attribute_table (table, key_buf, &valdatum);
+ status = chise_get_attribute_table ((CHISE_Attribute_Table*)table,
+ key_buf, &valdatum);
if (!status)
{
unsigned char *str
}
+struct CHISE_Feature_Table
+{
+ CHISE_DS *ds;
+ DB *db;
+};
CHISE_Feature_Table*
chise_ds_open_feature_table (CHISE_DS *ds, const char *feature,
u_int32_t accessmask, int modemask)
{
return
+ (CHISE_Feature_Table*)
chise_open_attribute_table (ds,
"system-char-id", feature,
real_subtype, accessmask, modemask);
chise_ft_close (CHISE_Feature_Table *table)
{
if (table)
- return chise_close_attribute_table (table);
+ return chise_close_attribute_table ((CHISE_Attribute_Table*)table);
return -1;
}
unsigned char key_buf[8];
chise_format_char_id (cid, key_buf, 8);
- return chise_get_attribute_table (table, key_buf, valdatum);
+ return chise_get_attribute_table ((CHISE_Attribute_Table*)table,
+ key_buf, valdatum);
}
void