/***********************************************************************1* *2* This software is part of the ast package *3* Copyright (c) 1985-2011 AT&T Intellectual Property *4* and is licensed under the *5* Eclipse Public License, Version 1.0 *6* by AT&T Intellectual Property *7* *8* A copy of the License is available at *9* http://www.eclipse.org/org/documents/epl-v10.html *10* (with md5 checksum b35adb5213ca9657e911e9befb180842) *11* *12* Information and Software Systems Research *13* AT&T Research *14* Florham Park NJ *15* *16* Glenn Fowler <[email protected]> *17* David Korn <[email protected]> *18* Phong Vo <[email protected]> *19* *20***********************************************************************/21#pragma prototyped2223#include "lclib.h"2425/*26* low level for ERROR_translate()27* this fills in NiL arg defaults and calls error_info.translate28*/2930char*31errorx(const char* loc, const char* cmd, const char* cat, const char* msg)32{33char* s;3435if (!error_info.translate)36error_info.translate = translate; /* 2007-03-19 OLD_Error_info_t workaround */37if (ERROR_translating())38{39if (!loc)40loc = (const char*)locales[AST_LC_MESSAGES]->code;41if (!cmd)42cmd = (const char*)error_info.id;43if (!cat)44cat = (const char*)error_info.catalog;45if (s = (*error_info.translate)(loc, cmd, cat, msg))46return s;47}48return (char*)msg;49}505152