OSDN Git Service

Cleanup the toploevel makefile handing of shared libs. Add weak_alias
[uclinux-h8/uClibc.git] / include / locale.h
1 /* locale.h
2  * Support international type specific characters.
3  */
4 #ifndef _LOCALE_H
5 #define _LOCALE_H       1
6
7 #include <features.h>
8
9 #ifndef NULL
10 #ifdef __cplusplus
11 #define NULL    0
12 #else
13 #define NULL    ((void *) 0)
14 #endif
15 #endif
16
17 /* These are the possibilities for the first argument to setlocale.
18    The code assumes that LC_ALL is the highest value, and zero the lowest.  */
19 #define LC_CTYPE        0
20 #define LC_NUMERIC      1
21 #define LC_TIME         2
22 #define LC_COLLATE      3
23 #define LC_MONETARY     4
24 #define LC_MESSAGES     5
25 #define LC_ALL          6
26
27
28 /* Structure giving information about numeric and monetary notation.  */
29 struct lconv
30 {
31   /* Numeric (non-monetary) information.  */
32
33   char *decimal_point;          /* Decimal point character.  */
34   char *thousands_sep;          /* Thousands separator.  */
35   /* Each element is the number of digits in each group;
36      elements with higher indices are farther left.
37      An element with value CHAR_MAX means that no further grouping is done.
38      An element with value 0 means that the previous element is used
39      for all groups farther left.  */
40   char *grouping;
41
42   /* Monetary information.  */
43
44   /* First three chars are a currency symbol from ISO 4217.
45      Fourth char is the separator.  Fifth char is '\0'.  */
46   char *int_curr_symbol;
47   char *currency_symbol;        /* Local currency symbol.  */
48   char *mon_decimal_point;      /* Decimal point character.  */
49   char *mon_thousands_sep;      /* Thousands separator.  */
50   char *mon_grouping;           /* Like `grouping' element (above).  */
51   char *positive_sign;          /* Sign for positive values.  */
52   char *negative_sign;          /* Sign for negative values.  */
53   char int_frac_digits;         /* Int'l fractional digits.  */
54   char frac_digits;             /* Local fractional digits.  */
55   /* 1 if currency_symbol precedes a positive value, 0 if succeeds.  */
56   char p_cs_precedes;
57   /* 1 iff a space separates currency_symbol from a positive value.  */
58   char p_sep_by_space;
59   /* 1 if currency_symbol precedes a negative value, 0 if succeeds.  */
60   char n_cs_precedes;
61   /* 1 iff a space separates currency_symbol from a negative value.  */
62   char n_sep_by_space;
63   /* Positive and negative sign positions:
64      0 Parentheses surround the quantity and currency_symbol.
65      1 The sign string precedes the quantity and currency_symbol.
66      2 The sign string follows the quantity and currency_symbol.
67      3 The sign string immediately precedes the currency_symbol.
68      4 The sign string immediately follows the currency_symbol.  */
69   char p_sign_posn;
70   char n_sign_posn;
71 };
72
73 extern char *setlocale(int __category, __const char *__locale);
74
75 /* Return the numeric/monetary information for the current locale.  */
76 extern struct lconv *localeconv __P ((void));
77
78 #endif /* locale.h  */