diff options
author | Choe Hwanjin <choe.hwanjin@gmail.com> | 2008-02-24 02:30:34 +0900 |
---|---|---|
committer | Choe Hwanjin <choe.hwanjin@gmail.com> | 2008-02-24 02:30:34 +0900 |
commit | e5b60181cdb8a1966fcb081667314c3ce5a2b9d9 (patch) | |
tree | 9077e314da6f641089550f279a97ad0c9c4c71d2 /test/hanja.c | |
parent | 234795cf54ad7ab9376d204720e4f9ab3a851e99 (diff) | |
download | libhangul-e5b60181cdb8a1966fcb081667314c3ce5a2b9d9.tar.gz |
테스트 코드 수정:
* hanja.c에서 검색 결과 출력 포맷 수정
git-svn-id: http://kldp.net/svn/hangul/libhangul/trunk@159 8f00fcd2-89fc-0310-932e-b01be5b65e01
Diffstat (limited to 'test/hanja.c')
-rw-r--r-- | test/hanja.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/hanja.c b/test/hanja.c index 88ce15d..78f231f 100644 --- a/test/hanja.c +++ b/test/hanja.c @@ -12,8 +12,9 @@ main(int argc, char *argv[]) if (argc > 1) hanja_table_file = argv[1]; - HanjaTable *table = hanja_table_load(hanja_table_file); - + HanjaTable *table; + table = hanja_table_load(hanja_table_file); + while (fgets(buf, sizeof(buf), stdin) != NULL) { char* p = strchr(buf, '\n'); if (p != NULL) @@ -24,8 +25,10 @@ main(int argc, char *argv[]) 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); + const char* key = hanja_list_get_nth_key(list, i); + const char* value = hanja_list_get_nth_value(list, i); + const char* comment = hanja_list_get_nth_comment(list, i); + printf("%s:%s:%s\n", key, value, comment); } hanja_list_delete(list); |