lconv

Holds locale information for NLM specific functions

Service:Internationalization
Defined In:nwlocale.h

Structure

  typedef struct { 
     char   decimal_point [4]; 
     char   thousands_sep [4]; 
     char   grouping [4]; 
     char   int_curr_symbol [8]; 
     char   currency_symbol [4]; 
     char   mon_decimal_point [4]; 
     char   mon_thousands_sep [4]; 
     char   mon_grouping [8]; 
     char   positive_sign [4]; 
     char   negative_sign [4]; 
     char   int_frac_digits ; 
     char   frac_digits ; 
     char   p_cs_precedes ; 
     char   p_sep_by_space ; 
     char   p_sign_posn ; 
     char   n_cs_precedes ; 
     char   n_sep_by_space ; 
     char   n_sign_posn ; 
  } lconv; 
  
  

Fields

decimal_point
Specifies the decimal point character used to format non-monetary quantities.
thousands_sep
Specifies the character used to separate groups of digits to the left of the decimal point character in non-monetary quantities.
grouping
Specifies the size of each group of digits in formatted non-monetary quantities.
int_curr_symbol
Specifies the international currency symbol applicable to the locale.
currency_symbol
Specifies the local currency symbol applicable to the locale.
mon_decimal_point
Specifies the character used as a decimal point in monetary quantities.
mon_thousands_sep
Specifies the character used to separate groups of digits to the left of the decimal point character in formatted monetary quantities.
mon_grouping
Specifies the size of each group of digits in formatted monetary quantities.
positive_sign
Specifies the character used to indicate non-negative monetary quantities.
negative_sign
Specifies the character used to indicate negative monetary quantities.
int_frac_digits
Specifies the number of fractional digits to be displayed in internationally formatted monetary quantities.
frac_digits
Specifies the number of fractional digits to be displayed in locally formatted monetary quantities
p_cs_precedes
Specifies whether the currency symbol precedes or follows the value for non-negative formatted monetary quantities:
  • 0 Currency symbol follows
  • 1 Currency symbol precedes
p_sep_by_space
Specifies whether the currency symbol is separated by a space from the value for non-negative formatted monetary quantities:
  • 0 Currency symbol not separated
  • 1 Currency symbol separated
p_sign_posn
Specifies the position of the positive_sign field for a formatted monetary quantity.
n_cs_precedes
Specifies whether the currency symbol precedes or follows the value for negative formatted monetary quantities:
  • 0 Currency symbol precedes
  • 1 Currency symbol follows
n_sep_by_space
Specifies whether the currency symbol is separated by a space from the value for negative formatted monetary quantities:
  • 0 Currency symbol is not separated
  • 1 Currency symbol is separated
n_sign_posn
Specifies the position of the negative_sign field for a formatted monetary quantity.

Remarks

The nwlocale.h file redefines lconv as the LCONV structure and adds additional information.

The int_curr_symbol structure stores the international currency symbol applicable to the current locale. The first three characters of the int_curr_symbol field contain the alphabetical international currency symbol in accordance with ISO 4217 Codes for the Representation of Currency and Funds. The fourth character (preceding the NULL terminator) is the character that separates the international currency symbol from the monetary quantity.

The elements of the grouping and mon_grouping fields are interpreted as follows:

CHAR_MAX

No further grouping is to be performed.

0

The previous element is to be repeatedly used for the remainder of the digits.

other

The value is the number of digits that comprise the current group. The next element is examined to determine the size of the nest group of digits to the left of the current group.

The values of the p_sign_posn and n_sign_posn fields are interpreted as follows:

0

Parentheses surround the quantity and currency symbol.

1

The sign string precedes the quantity and currency symbol.

2

The sign string follows the quantity and currency symbol.

3

The sign string immediately precedes the quantity and currency symbol.

4

The sign string immediately follows the quantity and currency symbol.