typedef struct _HanjaTable HanjaTable;
HanjaTable* hanja_table_load(const char *filename);
+HanjaList* hanja_table_match_exact(const HanjaTable* table, const char *key);
HanjaList* hanja_table_match_prefix(const HanjaTable* table, const char *key);
HanjaList* hanja_table_match_suffix(const HanjaTable* table, const char *key);
void hanja_table_delete(HanjaTable *table);
}
HanjaList*
+hanja_table_match_exact(const HanjaTable* table, const char *key)
+{
+ HanjaList* ret = NULL;
+
+ if (key == NULL || key[0] == '\0')
+ return NULL;
+
+ if (table == NULL)
+ return NULL;
+
+ table->match(table, key, &ret);
+
+ return ret;
+}
+
+HanjaList*
hanja_table_match_prefix(const HanjaTable* table, const char *key)
{
char* p;