[Uim] Suggestion: implement uim_get_language_name_from_locale() by Scheme

YamaKen yamaken at bp.iij4u.or.jp
Sun Oct 3 19:34:03 EEST 2004


Hiroyuki, I also suggest another API change for upcoming 0.4.4
release.

I had already written an alternative implementation of
uim_get_language_name_from_locale() in Scheme originally written
in C.

I think that we should implement such functionalities by Scheme
to acquire flexibility. In this case, we can also perform
langcode -> langname translation in Scheme world by the
alternative implementation.

I had already committed the alternative implementation into
uim-util.c by r1368 and original C implementation is disabled by
#if 0.  But the alternative requires a change of return type.

The C implementation returns gettext()'ed string, so the return
type is defined as 'const char *'. But the alternative returns
dynamically allocated string since the string is converted from
a Scheme string. So the implementation must return 'char *' to
be free()'ed by caller.

How do you think about it?

-------------------------------
YamaKen  yamaken at bp.iij4u.or.jp



More information about the uim mailing list