diff -ur /home/chuoi/xvnkb-0.2.7/menu.c xvnkb/menu.c --- /home/chuoi/xvnkb-0.2.7/menu.c 2003-02-19 17:13:18.000000000 +0700 +++ xvnkb/menu.c 2003-02-26 23:05:11.000000000 +0700 @@ -187,6 +187,7 @@ /*----------------------------------------------------------------------------*/ void VKCreateMenuWindow() { + int h = 1, w; char *s = menu.name; vk_menu_item *citem = NULL; vk_menu_item *item = vk_menu_data[vk_interface]; @@ -197,7 +198,7 @@ XRectangle fi; XmbTextExtents(vk_fontset, s, strlen(s), 0, &fi); #endif - int h = 1, w = fi.width; + w = fi.width; while( item && item->name ) { switch( item->type ) { diff -ur /home/chuoi/xvnkb-0.2.7/visckey.c xvnkb/visckey.c --- /home/chuoi/xvnkb-0.2.7/visckey.c 2003-02-11 05:27:42.000000000 +0700 +++ xvnkb/visckey.c 2003-02-26 23:04:29.000000000 +0700 @@ -22,6 +22,8 @@ #include #include /*----------------------------------------------------------------------------*/ +#include "debug.h" +/*----------------------------------------------------------------------------*/ #include "visckey.h" #include "utf.h" #include "viqr.h" @@ -115,13 +117,6 @@ register int i = -1, j = -1; register ushort *v = V; - /* - i = j = 0; - while( v[i]>0 && v[i]!=u1 ) i++; - if( v[i]==0 ) i = -1; - while( v[j]>0 && v[j]!=u2 ) j++; - if( v[j]==0 ) j = -1; - */ VKLookupChar(v, u1); if( *v ) i = v - V; v = V; @@ -211,7 +206,7 @@ static inline void VKAppend(ushort lastkey, char key) { static char *spchk = "AIUEOYaiueoy|BDFJKLQSVWXZbdfjklqsvwxz|'`~?.^*+="; - static char *vwchk = "|ia|ua|oa|ai|ui|oi|au|iu|eu|ie|ue|oe|ye|ao|uo|eo|ay|uy|uu|ou|"; + static char *vwchk = "|ia|ua|oa|ai|ui|oi|au|iu|eu|ie|ue|oe|ye|ao|uo|eo|ay|uy|uu|ou|io|"; if( !tempoff ) { int kp = strchr(spchk, key) - spchk; diff -ur /home/chuoi/xvnkb-0.2.7/xresource.c xvnkb/xresource.c --- /home/chuoi/xvnkb-0.2.7/xresource.c 2003-02-18 14:50:12.000000000 +0700 +++ xvnkb/xresource.c 2003-02-26 23:15:24.000000000 +0700 @@ -27,8 +27,12 @@ if( !strstr(lang, ".UTF-8") ) { char *p = strchr(lang, '.'); if( p ) *p = 0; - p = (char *)malloc(strlen(lang)+8); - sprintf(p, "%s%s", lang, ".UTF-8"); + if( !strcmp(lang, "C") ) + p = strdup("vi_VN.UTF-8"); + else { + p = (char *)malloc(strlen(lang)+8); + sprintf(p, "%s%s", lang, ".UTF-8"); + } setenv("LANG", p, 1); free(lang); lang = p; @@ -159,7 +163,9 @@ /*----------------------------------------------------------------------------*/ void VKLoadXResource() { +#ifndef USE_XFT VKLocaleInit(); +#endif VKLoadPalette(); if( !vk_font_name )