Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/locale/lmonetary.c
Show First 20 Lines • Show All 101 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
int ret; | int ret; | ||||
struct lc_monetary_T *l = &loc->locale; | struct lc_monetary_T *l = &loc->locale; | ||||
ret = __part_load_locale(name, using_locale, | ret = __part_load_locale(name, using_locale, | ||||
&loc->buffer, "LC_MONETARY", | &loc->buffer, "LC_MONETARY", | ||||
LCMONETARY_SIZE_FULL, LCMONETARY_SIZE_MIN, | LCMONETARY_SIZE_FULL, LCMONETARY_SIZE_MIN, | ||||
(const char **)l); | (const char **)l); | ||||
if (ret != _LDP_ERROR) | |||||
*changed = 1; | |||||
if (ret == _LDP_LOADED) { | if (ret == _LDP_LOADED) { | ||||
l->mon_grouping = | l->mon_grouping = | ||||
__fix_locale_grouping_str(l->mon_grouping); | __fix_locale_grouping_str(l->mon_grouping); | ||||
#define M_ASSIGN_CHAR(NAME) (((char *)l->NAME)[0] = \ | #define M_ASSIGN_CHAR(NAME) (((char *)l->NAME)[0] = \ | ||||
cnv(l->NAME)) | cnv(l->NAME)) | ||||
M_ASSIGN_CHAR(int_frac_digits); | M_ASSIGN_CHAR(int_frac_digits); | ||||
Show All 21 Lines | #define M_ASSIGN_ICHAR(NAME) \ | ||||
M_ASSIGN_ICHAR(p_cs_precedes); | M_ASSIGN_ICHAR(p_cs_precedes); | ||||
M_ASSIGN_ICHAR(n_cs_precedes); | M_ASSIGN_ICHAR(n_cs_precedes); | ||||
M_ASSIGN_ICHAR(p_sep_by_space); | M_ASSIGN_ICHAR(p_sep_by_space); | ||||
M_ASSIGN_ICHAR(n_sep_by_space); | M_ASSIGN_ICHAR(n_sep_by_space); | ||||
M_ASSIGN_ICHAR(p_sign_posn); | M_ASSIGN_ICHAR(p_sign_posn); | ||||
M_ASSIGN_ICHAR(n_sign_posn); | M_ASSIGN_ICHAR(n_sign_posn); | ||||
} | } | ||||
if (ret != _LDP_ERROR) | |||||
atomic_store_rel_int(changed, 1); | |||||
return (ret); | return (ret); | ||||
} | } | ||||
int | int | ||||
__monetary_load_locale(const char *name) | __monetary_load_locale(const char *name) | ||||
{ | { | ||||
return monetary_load_locale_l(&__xlocale_global_monetary, | return monetary_load_locale_l(&__xlocale_global_monetary, | ||||
&__xlocale_global_locale.using_monetary_locale, | &__xlocale_global_locale.using_monetary_locale, | ||||
&__xlocale_global_locale.monetary_locale_changed, name); | &__xlocale_global_locale.monetary_locale_changed, name); | ||||
▲ Show 20 Lines • Show All 71 Lines • Show Last 20 Lines |