[uim-commit] r1307 - trunk/uim
tkng at freedesktop.org
tkng at freedesktop.org
Wed Aug 24 13:19:06 PDT 2005
Author: tkng
Date: 2005-08-24 13:19:02 -0700 (Wed, 24 Aug 2005)
New Revision: 1307
Modified:
trunk/uim/m17nlib.c
Log:
* uim/m17nlib.c:
-(remap_lang_name): This function is removed because it's no longer used.
-(pushback_input_method): Call uim_get_language_code_from_language_name instead of
remap_lang_name.
Modified: trunk/uim/m17nlib.c
===================================================================
--- trunk/uim/m17nlib.c 2005-08-24 20:16:42 UTC (rev 1306)
+++ trunk/uim/m17nlib.c 2005-08-24 20:19:02 UTC (rev 1307)
@@ -36,6 +36,7 @@
#include <string.h>
#include <m17n.h>
#include "uim-scm.h"
+#include "uim-util.h"
#include "context.h"
#include "plugin.h"
@@ -78,58 +79,11 @@
return max_input_contexts - 1;
}
-static char *
-remap_lang_name(char *lang)
-{
- static struct lang_map_ {
- char *lib_lang;
- char *lang;
- } lang_map[] = {
- {"Japanese", "ja"},
- {"Amharic", "am"},
- {"Assamese", "as"},
- {"Bengali", "bn"},
- {"Tibetan", "bo"},
- {"Greek", "el"},
- {"Arabic", "ar"},
- /* {"Farsi", ""},*/
- {"Gujarati", "gu"},
- {"Hebrew", "he"},
- {"Hindi", "hi"},
- {"Croatian", "hr"},
- {"Kazakh", "kk"},
- /* {"Caombodia", ""},*/
- {"Kannada", "kn"},
- {"Korean", "ko"},
- {"Laothian", "lo"},
- {"Malayalam", "ml"},
- {"Oriya", "or"},
- {"Punjabi", "pa"},/* Panjabi ? */
- {"Russian", "ru"},
- {"Slovak", "sl"},/* Slovenia ? */
- {"Serbian", "sr"},
- {"Tamil", "ta"},
- {"Telugu", "te"},
- {"Thai", "th"},
- {"Vietnamese", "vi"},
- {"Chinese", "zh"},
- {NULL, NULL}
- };
-
- struct lang_map_ *l;
- for (l = lang_map; l->lib_lang; l++) {
- if (!strcmp(lang, l->lib_lang)) {
- return l->lang;
- }
- }
- return NULL;
-}
-
static void
pushback_input_method(MInputMethod *im,
char *lib_lang, char *name)
{
- char *lang = remap_lang_name(lib_lang);
+ char *lang = uim_get_language_code_from_language_name(lib_lang);
im_array = realloc(im_array,
sizeof(struct im_) * (nr_input_methods + 1));
More information about the uim-commit
mailing list