scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

locale.h.3 (4458B)


      1 .TH locale.h 3
      2 .SH NAME
      3 locale.h - category macros
      4 .SH SYNOPSIS
      5 #include <locale.h>
      6 
      7 The locale.h header declares the following functions:
      8 
      9 .nf
     10 char *setlocale(int category, const char *locale);
     11 struct lconv *localeconv(void);
     12 .fi
     13 .SH DESCRIPTION
     14 The locale.h header defines the following macros:
     15 
     16 .nf
     17 LC_ALL
     18 LC_COLLATE
     19 LC_CTYPE
     20 LC_MESSAGES
     21 LC_MONETARY
     22 LC_NUMERIC
     23 LC_TIME
     24 .fi
     25 
     26 These macros expand to integer constant expressions with distinct values,
     27 suitable for use as the first argument,
     28 .IR category ,
     29 to the
     30 .B setlocale
     31 function.
     32 
     33 The locale.h header declares the lconv structure defined as follows:
     34 
     35 .nf
     36 char *currency_symbol
     37 char *decimal_point
     38 char frac_digits
     39 char *grouping
     40 char *int_curr_symbol
     41 char int_frac_digits
     42 char int_n_cs_precedes
     43 char int_n_sep_by_space
     44 char int_n_sign_posn
     45 char int_p_cs_precedes
     46 char int_p_sep_by_space
     47 char int_p_sign_posn
     48 char *mon_decimal_point
     49 char *mon_grouping
     50 char *mon_thousands_sep
     51 char *negative_sign
     52 char n_cs_precedes
     53 char n_sep_by_space
     54 char n_sign_posn
     55 char *positive_sign
     56 char p_cs_precedes
     57 char p_sep_by_space
     58 char p_sign_posn
     59 char *thousands_sep
     60 .fi
     61 
     62 The members of the
     63 .I lconv
     64 structure are:
     65 .TP 10
     66 currency_symbol
     67 The local currency symbol applicable to the current locale.
     68 .TP
     69 decimal_point
     70 The decimal-point character used to format monetary quantities.
     71 .TP
     72 thousands_sep
     73 The character used to separate groups of digits
     74 before the decimal-point character in formatted monetary quantities.
     75 .TP
     76 grouping
     77 A string whose elements indicate the size of each group of digits in
     78 formatted nonmonetary quantities.
     79 .TP
     80 mon_decimal_point
     81 The decimal-point used to format monetary quantities.
     82 .TP
     83 mon_thousands_sep
     84 The separator for groups of digits before
     85 the decimal-point in formatted monetary quantities.
     86 .TP
     87 mon_grouping
     88 A string whose elements indicate the size of each group of digits in
     89 formatted monetary quantities.
     90 .TP
     91 positive_sign
     92 The string used to indicate a nonnegative-valued formatted monetary
     93 quantity.
     94 .TP
     95 negative_sign
     96 The string used to indicate a negative-valued formatted
     97 monetary quantity.
     98 .TP
     99 frac_digits
    100 The number of fractional digits (those after the decimal-point)
    101 to be displayed in a locally formatted monetary quantity.
    102 .TP
    103 p_cs_precedes
    104 Set to 1 or 0 if the currency_symbol respectively precedes or
    105 succeeds the value for a nonnegative locally formatted
    106 monetary quantity.
    107 .TP
    108 n_cs_precedes
    109 Set to 1 or 0 if the currency_symbol respectively precedes or
    110 succeeds the value for a negative locally formatted
    111 monetary quantity
    112 .TP
    113 p_sep_by_space
    114 Set to a value indicating the separation of the currency_symbol,
    115 the sign string, and the value for a nonnegative locally formatted
    116 monetary quantity.
    117 .TP
    118 n_sep_by_space
    119 Set to a value indicating the separation of the currency_symbol,
    120 the sign string, and the value for a negative locally formatted
    121 monetary quantity.
    122 .TP
    123 p_sign_posn
    124 Set to a value indicating the positioning of the positive_sign for
    125 a nonnegative locally formatted monetary quantity.
    126 .TP
    127 n_sign_posn
    128 Set to a value indicating the positioning of the negative_sign for
    129 a negative locally formatted monetary quantity.
    130 .TP
    131 int_curr_symbol
    132 The international currency symbol applicable to the current locale.
    133 .TP
    134 int_frac_digits
    135 The number of fractional digits (those after the decimal-point) to be
    136 displayed in an internationally formatted monetary quantity.
    137 .TP
    138 int_p_cs_precedes
    139 Set to 1 or 0 if the int_curr_symbol respectively precedes or
    140 succeeds the value for a nonnegative internationally formatted
    141 monetary quantity.
    142 .TP
    143 int_n_cs_precedes
    144 Set to 1 or 0 if the int_curr_symbol respectively precedes or
    145 succeeds the value for a negative internationally formatted
    146 monetary quantity.
    147 .TP
    148 int_p_sep_by_space
    149 Set to a value indicating the separation of the int_curr_symbol,
    150 the sign string, and the value for a nonnegative internationally
    151 formatted monetary quantity.
    152 .TP
    153 int_n_sep_by_space
    154 Set to a value indicating the separation of the int_curr_symbol,
    155 the sign string, and the value for a negative internationally
    156 formatted monetary quantity.
    157 .TP
    158 int_p_sign_posn
    159 Set to a value indicating the positioning of the positive_sign for
    160 a nonnegative internationally formatted monetary quantity.
    161 .TP
    162 int_n_sign_posn
    163 Set to a value indicating the positioning of the negative_sign for
    164 a negative internationally formatted monetary quantity.
    165 .SH STANDARDS
    166 ISO/IEC 9899:1999 Section 7.11
    167 
    168 ISO/IEC 9899:1999 Section 7.11.2.1
    169 .SH SEE ALSO
    170 .BR localeconv (3)
    171 .BR setlocale (3)