I compiled and tested the upstream new version uim-0.4.8 from
<http://uim.freedesktop.org/wiki/UimDownload>. The upstream new version
has the same bug.

The following patch fix the bug both on the Debian version
uim_0.4.6final1.orig.tar.gz and the upstream version uim-0.4.8.tar.gz.

Please review the patch before apply because I don't know the code and I
am not sure it is the right thing to do ;-)

Description of the problem:

xim/main.cpp, line 387:
>    locales = strdup(compose_localenames_from_im_lang("*"));

compose_localenames_from_im_lang() returned NULL because of:

xim/locale.cpp, line 424:
>    name = all_locales();

all_locales() returned NULL. I don't know why. The patch add this:
>    if (name == NULL) name = "";
so compose_localenames_from_im_lang() does not return NULL anymore.


------->8------------>8----------->8------------>8------------->8------------>8-----
--- uim-0.4.6/xim/locale.cpp    2005-02-19 05:21:08.000000000 +0100
+++ uim-0.4.6/xim/locale.cpp.new        2005-09-11 19:41:21.000000000 +0200
@@ -420,7 +420,10 @@ compose_localenames_from_im_lang(const c
        // No lang in locale_map.
        if (!strcmp(im_lang, "*")) // im with lang "*" will be enabled for
                                   // all locales
+         {
            name = all_locales();
+           if (name == NULL) name = "";
+         }
        else if (!strcmp(im_lang, ""))
            name = "";  // im with lang "" will be only enabled in UTF-8
                        // clients

------->8------------>8----------->8------------>8------------->8------------>8-----

Before the patch:

$ xim/.libs/uim-xim
UIM-XIM bridge. Now supporting multiple locales.
Using full-synchronous XIM event flow
Erreur de segmentation

After the patch:

$ xim/.libs/uim-xim
UIM-XIM bridge. Now supporting multiple locales.
Using full-synchronous XIM event flow
Supported conversion engines:
  py (zh_CN)
  pyunihan (zh_CN)
  pinyin-big5 (zh_TW:zh_HK)
  anthy (ja)
  tcode (ja)
  tutcode (ja)
  hangul2 (ko)
  hangul3 (ko)
  romaja (ko)
  viqr (vi)
  ipa-x-sampa ()
  latin ()
  direct (*)
[EMAIL PROTECTED] registered, selecting anthy (ja) as default conversion engine



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to