45 #define INDI_LOCALE(s) L""#s
49 return _wcsdup(_wsetlocale(category, locale));
52 __inline
static void indi_restore_locale(
int category,
locale_char_t *prev)
54 _wsetlocale(category, prev);
58 # define _INDI_C_INLINE __inline
63 #define INDI_LOCALE(s) s
67 return setlocale(category, locale);
70 inline static void indi_restore_locale(
int category,
locale_char_t *prev)
72 setlocale(category, prev);
75 # define _INDI_C_INLINE inline
81 return indi_setlocale(LC_NUMERIC,
INDI_LOCALE(
"C"));
86 indi_restore_locale(LC_NUMERIC, prev);
113 : m_category(category)
115 m_orig = indi_setlocale(category, locale);
124 indi_restore_locale(m_category, m_orig);
135 class AutoCNumeric :
public AutoLocale
138 AutoCNumeric() : AutoLocale(LC_NUMERIC,
INDI_LOCALE(
"C")) { }