moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc,
const char*)
{
- if (__cloc == _S_c_locale)
+ if (!__cloc)
{
// "C" locale
_M_decimal_point = '.';
moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc,
const char*)
{
- if (__cloc == _S_c_locale)
+ if (!__cloc)
{
// "C" locale
_M_decimal_point = '.';
moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc,
const char* __name)
{
- if (__cloc == _S_c_locale)
+ if (!__cloc)
{
// "C" locale
_M_decimal_point = L'.';
_M_thousands_sep = static_cast<wchar_t>(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc)}).__w);
_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
- mbstate_t __state;
- size_t __len;
const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
- // NB: Should swich to __cloc's ctype info first.
- __len = strlen(__cpossign);
+ mbstate_t __state;
+ size_t __len = strlen(__cpossign);
if (__len)
{
++__len;
moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
const char* __name)
{
- if (__cloc == _S_c_locale)
+ if (!__cloc)
{
// "C" locale
_M_decimal_point = L'.';
_M_thousands_sep = static_cast<wchar_t>(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc)}).__w);
_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
- mbstate_t __state;
- size_t __len;
const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
- // NB: Should swich to __cloc's ctype info first.
+ mbstate_t __state;
+ size_t __len;
__len = strlen(__cpossign);
if (__len)
{