MicrOS
locale.h
Go to the documentation of this file.
1 #ifndef LOCALE_H
2 #define LOCALE_H
3 
4 #include <limits.h>
5 #include "stdlib.h"
6 #include "string.h"
7 
9 #define LC_ALL 0
10 
12 #define LC_COLLATE 1
13 
15 #define LC_CTYPE 2
16 
18 #define LC_MONETARY 3
19 
21 #define LC_NUMERIC 4
22 
24 #define LC_TIME 5
25 
27 typedef struct lconv
28 {
31 
34 
36  char *grouping;
37 
40 
43 
46 
49 
51  char *mon_grouping;
52 
55 
58 
61 
64 
67 
70 
73 
76 
79 
82 
85 
88 
91 
94 
97 
100 } lconv;
101 
103 extern lconv *locale_state;
104 
106 extern char *locale_name;
107 
108 #ifdef __cplusplus
109 extern "C" {
110 #endif
111 
113 
119 char *setlocale(int category, const char *locale);
120 
122 
126 lconv *localeconv();
127 
129 
133 void __locale_delete_char_field_value(char *field);
134 
136 
140 char *__locale_set_char_field_value(const char *value);
141 
143 
147 void __locale_set_neutral_locale(int category);
148 
149 #ifdef __cplusplus
150 }
151 #endif
152 
153 #endif
char * mon_thousands_sep
Separators used to delimit groups of digits to the left of the decimal point for monetary quantities...
Definition: locale.h:48
char * locale_name
Current locale name.
Definition: locale.c:4
char * setlocale(int category, const char *locale)
Set or retrieve locale.
Definition: setlocale.c:3
char * mon_decimal_point
Decimal-point separator used for monetary quantities.
Definition: locale.h:45
char int_n_sep_by_space
Same as n_sep_by_space, but for the international format.
Definition: locale.h:93
char p_sign_posn
Position of the sign for nonnegative (positive or zero) monetary quantities.
Definition: locale.h:75
char int_n_sign_posn
Same as n_sign_posn, but for the international format.
Definition: locale.h:99
char * negative_sign
Sign to be used for negative monetary quantities.
Definition: locale.h:57
char * grouping
Specifies the amount of digits that form each of the groups to be separated by thousands_sep separato...
Definition: locale.h:36
char * __locale_set_char_field_value(const char *value)
Set field&#39;s value.
Definition: locale.c:14
char * decimal_point
Decimal-point separator used for non-monetary quantities.
Definition: locale.h:30
char * mon_grouping
Specifies the amount of digits that form each of the groups to be separated by mon_thousands_sep sepa...
Definition: locale.h:51
void __locale_delete_char_field_value(char *field)
Delete (free) field&#39;s value.
Definition: locale.c:6
char int_frac_digits
Same as frac_digits, but for the international format.
Definition: locale.h:81
lconv * locale_state
Current locale state.
Definition: locale.c:3
char n_sep_by_space
Whether a space should appear between the currency symbol and negative monetary quantities.
Definition: locale.h:72
Formatting info for numeric values.
Definition: locale.h:27
char n_sign_posn
Position of the sign for negative monetary quantities.
Definition: locale.h:78
char * positive_sign
Sign to be used for nonnegative (positive or zero) monetary quantities.
Definition: locale.h:54
char * currency_symbol
Local currency symbol.
Definition: locale.h:42
char p_sep_by_space
Whether a space should appear between the currency symbol and nonnegative (positive or zero) monetary...
Definition: locale.h:69
char int_p_cs_precedes
Same as p_cs_precedes, but for the international format.
Definition: locale.h:84
char p_cs_precedes
Whether the currency symbol should precede nonnegative (positive or zero) monetary quantities...
Definition: locale.h:63
char * int_curr_symbol
International currency symbol.
Definition: locale.h:39
char * thousands_sep
Separators used to delimit groups of digits to the left of the decimal point for non-monetary quantit...
Definition: locale.h:33
char int_n_cs_precedes
Same as n_cs_precedes, but for the international format.
Definition: locale.h:87
void __locale_set_neutral_locale(int category)
Set locale state to the neutral value.
Definition: locale.c:23
lconv * localeconv()
Get locale formatting parameters for quantities.
Definition: localeconv.c:3
char frac_digits
Amount of fractional digits to the right of the decimal point for monetary quantities in the local fo...
Definition: locale.h:60
char int_p_sep_by_space
Same as p_sep_by_space, but for the international format.
Definition: locale.h:90
char int_p_sign_posn
Same as p_sign_posn, but for the international format.
Definition: locale.h:96
char n_cs_precedes
Whether the currency symbol should precede negative monetary quantities.
Definition: locale.h:66