/***********************************************************************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/*24* localeconv() intercept25*/2627#include "lclib.h"2829#undef localeconv3031static char null[] = "";3233static struct lconv debug_lconv =34{35",",36".",37&null[0],38&null[0],39&null[0],40&null[0],41&null[0],42&null[0],43&null[0],44&null[0],45CHAR_MAX,46CHAR_MAX,47CHAR_MAX,48CHAR_MAX,49CHAR_MAX,50CHAR_MAX,51CHAR_MAX,52CHAR_MAX,53};5455static struct lconv default_lconv =56{57".",58&null[0],59&null[0],60&null[0],61&null[0],62&null[0],63&null[0],64&null[0],65&null[0],66&null[0],67CHAR_MAX,68CHAR_MAX,69CHAR_MAX,70CHAR_MAX,71CHAR_MAX,72CHAR_MAX,73CHAR_MAX,74CHAR_MAX,75};7677#if !_lib_localeconv7879struct lconv*80localeconv(void)81{82return &default_lconv;83}8485#endif8687/*88* localeconv() intercept89*/9091struct lconv*92_ast_localeconv(void)93{94if ((locales[AST_LC_MONETARY]->flags | locales[AST_LC_NUMERIC]->flags) & LC_debug)95return &debug_lconv;96if ((locales[AST_LC_NUMERIC]->flags & (LC_default|LC_local)) == LC_local)97return locales[AST_LC_NUMERIC]->territory == &lc_territories[0] ? &default_lconv : &debug_lconv;98return localeconv();99}100101102