From: Choe Hwanjin Date: Sat, 23 Feb 2008 17:30:34 +0000 (+0900) Subject: 테스트 코드 수정: X-Git-Tag: libhangul-0.0.8~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e5b60181cdb8a1966fcb081667314c3ce5a2b9d9;p=platform%2Fcore%2Fuifw%2Flibhangul.git 테스트 코드 수정: * hanja.c에서 검색 결과 출력 포맷 수정 git-svn-id: http://kldp.net/svn/hangul/libhangul/trunk@159 8f00fcd2-89fc-0310-932e-b01be5b65e01 --- 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);