localeconv()

get locale-specific symbols 

Function


SYNOPSIS

#include <locale.h>

struct lconv *localeconv(void);


DESCRIPTION

The localeconv() function returns a pointer to an lconv struct that has values for locale-specific symbols. Members of the structure lconv are either char or pointers to char. The pointers to char are null-terminated, possibly zero-length strings. Members that are type char have either the value of the symbol, or have the value CHAR_MAX to indicate that the symbol has no definition in the current locale.

The members of struct lconv are:

char *decimal_point 

The radix character used to format nonmonetary quantities. This string is never empty.

char *thousands_sep 

The character used to separate groups of digits before the radix character in formatted nonmonetary quantities.

char *grouping 

A string whose elements indicate the size of each group of digits in formatted nonmonetary quantities.

char *int_curr_symbol 

The international currency symbol applicable to the current locale.

char *currency_symbol 

The local currency symbol applicable to the current locale.

char *mon_decimal_point 

The radix character used to format monetary quantities.

char *mon_thousands_sep 

The separator for groups of digits before the radix character in formatted monetary quantities.

char *mon_grouping 

A string whose elements indicate the size of each group of digits in formatted monetary quantities.

char *positive_sign 

The character used to indicate that a formatted monetary quantity is nonnegative.

char *negative_sign 

The character used to indicate that a formatted monetary quantity is negative.

char int_frac_digits 

The number of digits to be displayed following the radix character in an internationally formatted monetary quantity.

char frac_digits 

The number of digits to be displayed following the radix character in a locally formatted monetary quantity.

char p_cs_precedes 

Boolean value to indicate whether the currency_symbol precedes the value for a nonnegative formatted monetary quantity.

char p_sep_by_space 

Boolean value to indicate whether the currency_symbol is separated by a space from the value for a nonnegative formatted monetary quantity.

char n_cs_precedes 

Boolean value to indicate whether the currency_symbol precedes the value for a negative formatted monetary quantity.

char n_sep_by_space 

Boolean value to indicate whether the currency_symbol is separated by a space from the value for a negative formatted monetary quantity.

char p_sign_posn 

Set to a value indicating the position of the positive_sign for a nonnegative formatted monetary quantity.

char n_sign_posn 

Set to a value indicating the position of the negative_sign for a negative formatted monetary quantity.

The values of p_sign_posn and n_sign_posn are defined as follows:

0 

Parentheses surround the quantity and currency_symbol.

1 

The sign precedes the quantity and currency_symbol.

2 

The sign follows the quantity and currency_symbol.

3 

The sign immediately precedes the currency_symbol.

4 

The sign immediately follows the currency_symbol.


PARAMETERS

None.


RETURN VALUES

A pointer to static storage that holds a filled-in lconv structure. Subsequent calls to localeconv() overwrite this area.


CONFORMANCE

ANSI/ISO 9899-1990.


MULTITHREAD SAFETY LEVEL

MT-Safe, with exceptions.

This function is MT-Safe as long as no thread calls setlocale() while this function is executing.


PORTING ISSUES

None.


AVAILABILITY

MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
setlocale()


MKS Toolkit 9.2 Documentation Build 16.