diff --git a/scim-wnn/src/romkan_table.h b/scim-wnn/src/romkan_table.h index 3a153dc..f816b02 100644 --- a/scim-wnn/src/romkan_table.h +++ b/scim-wnn/src/romkan_table.h @@ -185,5 +185,7 @@ "-", "��", "[", "��", "]", "��", + ".", "��", + ",", "��", "" }; diff --git a/scim-wnn/src/scim_wnn_imengine.cpp b/scim-wnn/src/scim_wnn_imengine.cpp index c8fd0c4..9c06b2d 100644 --- a/scim-wnn/src/scim_wnn_imengine.cpp +++ b/scim-wnn/src/scim_wnn_imengine.cpp @@ -166,7 +166,7 @@ : IMEngineInstanceBase (factory, encoding, id) { // �Ȥꤢ������ᤦ���Ǥ����ޤ��� - jl_open_lang("test","localhost","jp_JP","/usr/lib/wnn7/ja_JP/wnnenvrc",wnn_message,wnn_message,10); + wnn = jl_open_lang("test","localhost","jp_JP","/usr/lib/wnn7/ja_JP/wnnenvrc",wnn_message,wnn_message,10); m_converter.set_encoding ("EUC-JP"); } @@ -186,6 +186,8 @@ */ bool WnnInstance::process_preedit_key_event(const KeyEvent &key) { + // ���������ɤ�ľ����äƥ�������͡��ɡ��������ޤ����Ȥꤢ�������Τޤޤǡ� + if (key.code == SCIM_KEY_Return) { if (!m_rk.getTextLength()) { return(false); diff --git a/scim-wnn/src/scim_wnn_imengine.h b/scim-wnn/src/scim_wnn_imengine.h index 9d7e39e..995324c 100644 --- a/scim-wnn/src/scim_wnn_imengine.h +++ b/scim-wnn/src/scim_wnn_imengine.h @@ -75,6 +75,7 @@ IConvert m_converter; CommonLookupTable m_lookup_table; Romkan m_rk; + struct wnn_buf *wnn; protected: bool process_preedit_key_event(const KeyEvent &key); }; diff --git a/scim-wnn/src/wnnproto.h b/scim-wnn/src/wnnproto.h index 2be7e17..8bffa3e 100644 --- a/scim-wnn/src/wnnproto.h +++ b/scim-wnn/src/wnnproto.h @@ -30,29 +30,48 @@ /* �Ѵ��˴ؤ��뤽�� */ int jl_ren_conv(struct wnn_buf*,w_char*,int,int,int); /*jl_fi_ren_conv�Ȥ��⤢�ä��ʤ� */ int wnn_get_area(struct wnn_buf*,int,int,w_char*,int); + int jl_zenkouho_dai(struct wnn_buf*,int,int,int,int); + int jl_zenkouho_suu(struct wnn_buf*); + void jl_get_zenkouho_kanji(struct wnn_buf*,int ,w_char *); + + #define WNN_NO_USE 0 + #define WNN_USE_MAE 1 + #define WNN_USE_ATO 2 + #define WNN_USE_ZENGO (WNN_USE_MAE | WNN_USE_ATO) + + #define WNN_UNIQ_KNJ 2 + #define WNN_UNIQ 1 + #define WNN_NO_UNIQ 0 + + #define WNN_NO_CREATE 0 + #define WNN_CREATE (-1) + #define jl_get_kanji(buf,bun1,bun2,area) wnn_get_area(buf,bun1,bun2,area,1) #define jl_get_yomi(buf,bun1,bun2,area) wnn_get_area(buf,bun1,bun2,area,0) /* w_char����EUC���Ѵ����륢�� */ - void wstostr(char *e,w_char *u) { - int x; + void wstostr(unsigned char *e,w_char *u) { + w_char x; for(;*u;) { x = *u ++; - *e ++ = x >> 8; - *e ++ = x; + if (x & 0x8000) { + *e ++ = x >> 8; + *e ++ = x; + } else + *e++ = x; } *e ++ = 0; } + /* EUC����w_char���Ѵ�����ʥ� */ - void strtows(w_char *u,char *e) { - int x; + void strtows(w_char *u,unsigned char *e) { + w_char x; for(;*e;) { x = *e ++; if(x & 0x80) - x = (x << 8) | *e ++; + x = ((x << 8) & 0xff00) | *e ++; *u ++ = x; } *u = 0; } - }