[Turn on line numbering]arg @ms; var d, out, m, a, ams, av, v, b, at; out = #[]; if (ms) ms = ms[1]; else ms = msgs || #[]; d = $compiler.compile_cml(">>NO DEFAULT<<"); for a in ([this()] + ancestors()) { if (a == definer()) break; catch any { ams = a.msgs(); for m in (a.defined_msgs()) { [m, at] = m; v = (| ms[m] |); av = (| ams[m] |); if (v) { if (av) v = dict_union(av, v); else v = dict_union(hash b in (at['branches]) to ([b, d]), v); } else if (av) { v = av; } else { v = hash b in (at['branches]) to ([b, d]); } out = dict_add(out, m, v); } } } return out;
// Created 27-Mar-1995 as a part of ColdCore, see: @help Credit