#ifdef __cplusplus
extern "C" {
#endif
+#if 0
+}
+#endif
#include <db.h>
#include <errno.h>
+#include <concord.h>
extern const unsigned char chise_db_dir[];
extern const unsigned char chise_system_db_dir[];
-typedef enum CHISE_DS_Type
-{
- CHISE_DS_NONE,
- CHISE_DS_Berkeley_DB
-} CHISE_DS_Type;
+typedef enum CONCORD_Backend_Type CHISE_DS_Type;
+#define CHISE_DS_Berkeley_DB CONCORD_Backend_Berkeley_DB
-typedef struct CHISE_DS CHISE_DS;
+typedef CONCORD_Genre_Table CHISE_DS;
CHISE_DS*
CHISE_DS_open (CHISE_DS_Type type, const unsigned char *location,
typedef int CHISE_Char_ID;
-typedef DBT CHISE_Value;
-
-static inline int
-chise_value_size (const CHISE_Value *s)
-{
- return s->size;
-}
-
-static inline char *
-chise_value_data (const CHISE_Value *s)
-{
- return (char *)s->data;
-}
-
-static inline char *
-chise_value_to_c_string (const CHISE_Value *s)
-{
- return (char *)s->data;
-}
+typedef CONCORD_String_Tank CHISE_Value;
+int chise_value_size (const CHISE_Value* s);
+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);
+chise_ds_get_feature (CHISE_DS* ds, const unsigned char* name);
static inline int
chise_ds_load_char_feature_value (CHISE_DS *ds,
#endif
+#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);
}
+#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_Table*
-chise_ds_get_property (CHISE_DS *ds, const unsigned char *property);
+CHISE_Property
+chise_ds_get_property (CHISE_DS* ds, const unsigned char* name);
int chise_property_setup_db (CHISE_Property property, int writable);
int chise_feature_set_property_value (CHISE_Feature feature,
CHISE_Property property,
- unsigned char *value);
+ unsigned char* value);
int chise_feature_load_property_value (CHISE_Feature feature,
- CHISE_Property_Table *table,
- CHISE_Value *valdatum);
+ CHISE_Property property,
+ CHISE_Value* valdatum);
unsigned char*
chise_feature_gets_property_value (CHISE_Feature feature,
- CHISE_Property_Table *table,
- unsigned char *buf, size_t size);
+ CHISE_Property property,
+ unsigned char* buf, size_t size);
+#if 0
+{
+#endif
#ifdef __cplusplus
}
#endif