From: handa Date: Wed, 28 Oct 2009 01:20:05 +0000 (+0000) Subject: (mscript__from_otf_tag): Adjusted for the new format X-Git-Tag: merge-to-XML~52 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=631a7afc9e847fd63af24a27957dfefae7070243;p=m17n%2Fm17n-lib.git (mscript__from_otf_tag): Adjusted for the new format of the database . --- diff --git a/src/language.c b/src/language.c index 168a27e..1e3d85c 100644 --- a/src/language.c +++ b/src/language.c @@ -317,11 +317,21 @@ mscript__from_otf_tag (MSymbol otf_tag) && (p = MPLIST_NEXT (p)) /* char list */ && ! MPLIST_TAIL_P (p) && (p = MPLIST_NEXT (p)) /* otf tag */ - && MPLIST_SYMBOL_P (p) - && otf_tag == MPLIST_SYMBOL (p)) + && ! MPLIST_TAIL_P (p)) { - script = MPLIST_SYMBOL (pl); - break; + if (MPLIST_SYMBOL_P (p)) + { + if (otf_tag == MPLIST_SYMBOL (p)) + return MPLIST_SYMBOL (pl); + } + else if (MPLIST_PLIST (p)) + { + MPlist *p0; + + MPLIST_DO (p0, MPLIST_PLIST (p)) + if (MPLIST_SYMBOL_P (p0) && otf_tag == MPLIST_SYMBOL (p0)) + return MPLIST_SYMBOL (pl); + } } } return script;