Hi,
        Moi release la thay loi tu`m lum :)
        Anyway, day la quick fix truoc khi co version moi.
Version moi co le se sau 
mot khoang thoi gian nua moi co duoc.

        Changes:
        - Use Fixed font instead of Arial.
        - Fix bad accent position because of not resetting
buffer after 
non-alphabetic characters.
        - Fix bug: could not add accent to the vowel when it
is at the beginning of 
word.

        How to apply:
        - O trong thu muc chu+'a thu muc yavim-0.1.6, type
'patch -p0 < 
yavim-0.1.6a.patch' (bo? dau ' du`m).

        Notes: neu van bi. lo^~i XLoadQueryFont fail thi
please su+?a do`ng 23 trong 
tap tin main.c. Font id string ta.i vi. tri' do' la
chuo^~i hien thi. trong 
chuong tri`nh xfontsel (chuo^~i co' format -*-*-* ....
). Tui ko ro~ default 
font di kem voi X la gi de co the hard code chuo^~i
do'. Any suggestion ?
        Hy vong version sau se~ cho^m code fontconfig cua
ba'c La^m va giai quyet 
triet de van de nay.

        Tung.

PS: to Quy: :) hope to hear feed back from you soon.
Thanks a lot.



                
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 
Only in yavim-0.1.6/doc: CVS
diff -c -r yavim-0.1.6/yavim/main.c yavim/yavim/main.c
*** yavim-0.1.6/yavim/main.c    2004-08-16 16:21:11.000000000 +1000
--- yavim/yavim/main.c  2004-08-19 23:32:11.000000000 +1000
***************
*** 20,26 ****
  
  XFontStruct* im_font_info=NULL;       /* Font structure, used for drawing text.    */
  //const char* im_font_name = "-*-arial-medium-r-normal-*-12-*-*-*-*-*-*-*"; /* font 
to use for drawing text.   */
! const char* im_font_name = "-*-arial-*-*-*-*-*-*-*-*-*-*-*-*"; /* font to use for 
drawing text.   */
  XIMS im_ims;
  
  Bool im_enable = False;
--- 20,26 ----
  
  XFontStruct* im_font_info=NULL;       /* Font structure, used for drawing text.    */
  //const char* im_font_name = "-*-arial-medium-r-normal-*-12-*-*-*-*-*-*-*"; /* font 
to use for drawing text.   */
! const char* im_font_name = "-*-fixed-medium-r-normal-*-12-*-*-*-*-*-*-1"; /* font to 
use for drawing text.   */
  XIMS im_ims;
  
  Bool im_enable = False;
diff -c -r yavim-0.1.6/yavim/testclient.c yavim/yavim/testclient.c
*** yavim-0.1.6/yavim/testclient.c      2003-12-23 12:53:35.000000000 +1100
--- yavim/yavim/testclient.c    2004-08-16 16:08:44.000000000 +1000
***************
*** 42,48 ****
  
          if ((t=recv(s, str, 100, 0)) > 0) {
              str[t] = '\0';
!             printf("echo> %s", str);
          } else {
              if (t < 0) perror("recv");
              else printf("Server closed connection\n");
--- 42,48 ----
  
          if ((t=recv(s, str, 100, 0)) > 0) {
              str[t] = '\0';
!             printf("echo> %s\n", str);
          } else {
              if (t < 0) perror("recv");
              else printf("Server closed connection\n");
diff -c -r yavim-0.1.6/yavim/vietBuff.c yavim/yavim/vietBuff.c
*** yavim-0.1.6/yavim/vietBuff.c        2004-08-17 02:36:11.000000000 +1000
--- yavim/yavim/vietBuff.c      2004-08-17 13:49:56.000000000 +1000
***************
*** 108,114 ****
                               (key !='W'))
                      )
                  {
!                     fprintf(stderr,"\n@@@ skipp this char %d, at %d, flag %d", 
found, j);
                      skippedTransChar = found;
                      skippedPosition = j;
                      continue;
--- 108,114 ----
                               (key !='W'))
                      )
                  {
!                     fprintf(stderr,"\n@@@ skipp this char %d, at %d", found, j);
                      skippedTransChar = found;
                      skippedPosition = j;
                      continue;
***************
*** 158,170 ****
          if (j==-1) {
              // no available transition
              // check for skipped vowel
!             if ((skippedTransChar>0)&&(skippedPosition>0)) {
                  // restore skipped stuffs
                  found = skippedTransChar;
                  j = skippedPosition;
                  // can conversion happened ?
                  setStartState(&vietAutomateState,found);
                  vietAutomateNextState = nextState(&vietAutomateState, tolower(key), 
telex_keys);
                  if (vietAutomateNextState==1) {
                      // no transition
                      // search next possible transition
--- 158,172 ----
          if (j==-1) {
              // no available transition
              // check for skipped vowel
!             if ((skippedTransChar>0)) {
                  // restore skipped stuffs
+                 fprintf(stderr, "\n@@@ restore the skipped char");
                  found = skippedTransChar;
                  j = skippedPosition;
                  // can conversion happened ?
                  setStartState(&vietAutomateState,found);
                  vietAutomateNextState = nextState(&vietAutomateState, tolower(key), 
telex_keys);
+                 fprintf(stderr, "\n@@@ next state = %d; state = %d, key = %c", 
vietAutomateNextState, vietAutomateState, key);
                  if (vietAutomateNextState==1) {
                      // no transition
                      // search next possible transition
diff -c -r yavim-0.1.6/yavim/yavim.c yavim/yavim/yavim.c
*** yavim-0.1.6/yavim/yavim.c   2004-08-17 02:36:41.000000000 +1000
--- yavim/yavim/yavim.c 2004-08-20 00:53:12.000000000 +1000
***************
*** 32,37 ****
--- 32,38 ----
      a shameless modified version of sampleIM IMdkit example, by Tung.
   */
  #include <wchar.h>
+ #include <ctype.h>
  //#include <keysymdef.h>
  #include "global.h"
  #include "Xi18n.h"
***************
*** 262,271 ****
      IMForwardEvent(ims, (XPointer)&forward_ev);
  
      // now separate ascii key and other...
!     if ((count == 1) && (( strbuf[0]>31)&&( strbuf[0] <127))) {
          // yes, we've got ascii key
          key = strbuf[0];
!         if ((key == ' ') || (key == KEY_ENTER) || (key == KEY_TAB)) {
              // reset internal buffer
              resetBuffer(current_ic->word_buffer, IC_MAX_WCHAR_BUF);
          }
--- 263,272 ----
      IMForwardEvent(ims, (XPointer)&forward_ev);
  
      // now separate ascii key and other...
!     if ((count == 1) && (strbuf[0]>31)&&(strbuf[0]<127)) {
          // yes, we've got ascii key
          key = strbuf[0];
!         if ((key == ' ') || (key == KEY_ENTER) || (key == KEY_TAB) || 
(!isalpha(strbuf[0]))) {
              // reset internal buffer
              resetBuffer(current_ic->word_buffer, IC_MAX_WCHAR_BUF);
          }

Trả lời cho