From: handa Date: Mon, 11 Jun 2007 08:00:11 +0000 (+0000) Subject: (mcoding__load_from_database): Add aliases in X-Git-Tag: FLT-base~14 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=ec5e917ad96704fae39b82e1bfa53e9be85c5a0b;p=m17n%2Fm17n-lib.git (mcoding__load_from_database): Add aliases in coding_definition_list. --- diff --git a/src/coding.c b/src/coding.c index 4fc5e65..2e9a46e 100644 --- a/src/coding.c +++ b/src/coding.c @@ -3049,7 +3049,7 @@ mcoding__load_from_database () MDEBUG_PUSH_TIME (); MPLIST_DO (plist, def_list) { - MPlist *pl; + MPlist *pl, *aliases; MSymbol name, canonicalized; if (! MPLIST_PLIST_P (plist)) @@ -3062,6 +3062,16 @@ mcoding__load_from_database () pl = mplist__from_plist (MPLIST_NEXT (pl)); mplist_push (pl, Msymbol, name); definitions = mplist_add (definitions, canonicalized, pl); + aliases = mplist_get (pl, Maliases); + if (aliases) + MPLIST_DO (aliases, aliases) + if (MPLIST_SYMBOL_P (aliases)) + { + name = MPLIST_SYMBOL (aliases); + canonicalized = msymbol__canonicalize (name); + definitions = mplist_add (definitions, canonicalized, pl); + M17N_OBJECT_REF (pl); + } } M17N_OBJECT_UNREF (def_list);