From: handa Date: Mon, 11 Jun 2007 08:47:15 +0000 (+0000) Subject: (mlanguage_name_list): Fix previous change. X-Git-Tag: FLT-base~12 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=699ce2a59e6d5614e57bd85e0f037b16ac95b2c0;p=m17n%2Fm17n-lib.git (mlanguage_name_list): Fix previous change. --- diff --git a/src/language.c b/src/language.c index b32265d..0104a06 100644 --- a/src/language.c +++ b/src/language.c @@ -566,14 +566,22 @@ mlanguage_name_list (MSymbol language, MSymbol target, } if (MPLIST_TAIL_P (pl)) { - pl = MPLIST_NEXT (MPLIST_NEXT (MPLIST_PLIST (plist))); - if (! (plist = mplist__assq (pl, language))) - plist = mplist__assq (pl, language2); + MPLIST_DO (pl, plist) + { + MPlist *p = MPLIST_NEXT (MPLIST_NEXT (MPLIST_PLIST (pl))), *p0; + + if ((p0 = mplist__assq (p, language)) + || (p0 = mplist__assq (p, language2))) + { + plist = p0; + break; + } + } + if (MPLIST_TAIL_P (pl)) + return NULL; } } - if (! plist) - return NULL; plist = MPLIST_NEXT (MPLIST_PLIST (plist)); if (territory != Mnil) {