hanja_table_match_exact() 구현
authorChoe Hwanjin <choe.hwanjin@gmail.com>
Sun, 4 May 2008 14:28:05 +0000 (23:28 +0900)
committerChoe Hwanjin <choe.hwanjin@gmail.com>
Sun, 4 May 2008 14:28:05 +0000 (23:28 +0900)
git-svn-id: http://kldp.net/svn/hangul/libhangul/trunk@182 8f00fcd2-89fc-0310-932e-b01be5b65e01

hangul/hangul.h
hangul/hanja.c

index 2a8b336..edd1761 100644 (file)
@@ -128,6 +128,7 @@ typedef struct _HanjaList HanjaList;
 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);
index 9eeabbd..f02ee86 100644 (file)
@@ -996,6 +996,22 @@ 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;