localeconv: It is portable but …
Together with the
setlocale function the ISO C people
localeconv function. It is a masterpiece of poor
design. It is expensive to use, not extensible, and not generally
usable as it provides access to only
LC_NUMERIC related information. Nevertheless, if it is
applicable to a given situation it should be used since it is very
portable. The function
strfmon formats monetary amounts
according to the selected locale using this information.
Preliminary: | MT-Unsafe race:localeconv locale | AS-Unsafe | AC-Safe | See POSIX Safety Concepts.
localeconv function returns a pointer to a structure whose
components contain information about how numeric and monetary values
should be formatted in the current locale.
You should not modify the structure or its contents. The structure might
be overwritten by subsequent calls to
localeconv, or by calls to
setlocale, but no other function in the library overwrites this
localeconv’s return value is of this data type. Its elements are
described in the following subsections.
If a member of the structure
struct lconv has type
and the value is
CHAR_MAX, it means that the current locale has
no value for that parameter.