summaryrefslogtreecommitdiff
path: root/test/hanja.c
diff options
context:
space:
mode:
authorChoe Hwanjin <choe.hwanjin@gmail.com>2006-10-27 14:33:24 +0900
committerChoe Hwanjin <choe.hwanjin@gmail.com>2006-10-27 14:33:24 +0900
commitd9f695999d86c4e6f31f9d844617a50d30062d2a (patch)
tree98bf0e3687775078f2afda77ddafecf9ac8b8e27 /test/hanja.c
parentcfef1788a5a714d72a387f3eceeef5e7a38f082d (diff)
downloadlibhangul-d9f695999d86c4e6f31f9d844617a50d30062d2a.tar.gz
hanja test 코드 추가
git-svn-id: http://kldp.net/svn/hangul/libhangul/trunk@82 8f00fcd2-89fc-0310-932e-b01be5b65e01
Diffstat (limited to 'test/hanja.c')
-rw-r--r--test/hanja.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/hanja.c b/test/hanja.c
new file mode 100644
index 0000000..62c0821
--- /dev/null
+++ b/test/hanja.c
@@ -0,0 +1,24 @@
+#include <stdio.h>
+
+#include "../hangul/hangul.h"
+
+int
+main(int argc, char *argv[])
+{
+ HanjaTable *table = hanja_table_load(NULL);
+
+ HanjaList *list = hanja_table_match_prefix(table, argv[1]);
+
+ int i, n;
+ n = hanja_list_get_size(list);
+ for (i = 0; i < n; i++) {
+ const char* value = hanja_list_get_nth_value(list, i);
+ printf("%s\n", value);
+ }
+
+ hanja_list_destroy(list);
+
+ hanja_table_destroy(table);
+
+ return 0;
+}