diff options
author | Choe Hwanjin <choe.hwanjin@gmail.com> | 2006-10-01 17:08:19 +0900 |
---|---|---|
committer | Choe Hwanjin <choe.hwanjin@gmail.com> | 2006-10-01 17:08:19 +0900 |
commit | 06d29636af5f421ddcfbf160e43f7ca9ef05a7f1 (patch) | |
tree | 026b0febc93e85fbbf2f5357380df8ace1e6034d /test | |
parent | f65009a9734a6d37c59c80d30241465afc328543 (diff) | |
download | libhangul-06d29636af5f421ddcfbf160e43f7ca9ef05a7f1.tar.gz |
hangul/hangul.h,hangul/hangulinputcontext.c:
* add hangul_ic_flush() function which flushes the current buffer and
return it. returned pointer is not need to freed, but it is available
until other HangulInputContext function is called.
git-svn-id: http://kldp.net/svn/hangul/libhangul/trunk@76 8f00fcd2-89fc-0310-932e-b01be5b65e01
Diffstat (limited to 'test')
-rw-r--r-- | test/test.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test.c b/test/test.c index c39b5bb..1e9d879 100644 --- a/test/test.c +++ b/test/test.c @@ -48,10 +48,10 @@ main(int argc, char *argv[]) printf("%c", ascii); } } + if (!hangul_ic_is_empty(hic)) { - hangul_ic_flush(hic); - commit_string = (wchar_t*)hangul_ic_get_commit_string(hic); - n = wcstombs(commit, commit_string, sizeof(commit)); + const wchar_t *flushed = (wchar_t*)hangul_ic_flush(hic); + n = wcstombs(commit, flushed, sizeof(commit)); commit[n] = '\0'; if (strlen(commit) > 0) { printf("%s", commit); |