세벌식 옛글 처리 수정 (#304728)
authorChoe Hwanjin <choe.hwanjin@gmail.com>
Tue, 5 Feb 2008 16:00:21 +0000 (01:00 +0900)
committerChoe Hwanjin <choe.hwanjin@gmail.com>
Tue, 5 Feb 2008 16:00:21 +0000 (01:00 +0900)
 * 옛글 자판에서는 자모(첫가끝)로 출력
 * hangul_ic_flush() 함수에서도 output mode에 따른 처리
 * 나비버그 #304727 참고:
   http://kldp.net/tracker/?func=detail&atid=100275&aid=304727&group_id=275

git-svn-id: http://kldp.net/svn/hangul/libhangul/trunk@156 8f00fcd2-89fc-0310-932e-b01be5b65e01

hangul/hangulinputcontext.c

index 0f92957..cab91de 100644 (file)
@@ -875,8 +875,14 @@ hangul_ic_flush(HangulInputContext *hic)
     hic->preedit_string[0] = 0;
     hic->commit_string[0] = 0;
     hic->flushed_string[0] = 0;
-    hangul_buffer_get_string(&hic->buffer, hic->flushed_string,
-                            N_ELEMENTS(hic->flushed_string));
+
+    if (hic->output_mode == HANGUL_OUTPUT_JAMO) {
+       hangul_buffer_get_jamo_string(&hic->buffer, hic->flushed_string,
+                                N_ELEMENTS(hic->flushed_string));
+    } else {
+       hangul_buffer_get_string(&hic->buffer, hic->flushed_string,
+                                N_ELEMENTS(hic->flushed_string));
+    }
 
     hangul_buffer_clear(&hic->buffer);
 
@@ -1112,6 +1118,7 @@ hangul_ic_select_keyboard(HangulInputContext *hic, const char* id)
     } else if (strcmp(id, "3y") == 0) {
        hic->keyboard = &hangul_keyboard_3yet;
        hic->combination = &hangul_combination_full;
+       hic->output_mode = HANGUL_OUTPUT_JAMO;
     } else {
        hic->keyboard = &hangul_keyboard_2;
        hic->combination = &hangul_combination_default;