source: trunk/libs/newlib/src/newlib/libc/include/locale.h @ 444

Last change on this file since 444 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 2.2 KB
Line 
1/*
2        locale.h
3        Values appropriate for the formatting of monetary and other
4        numberic quantities.
5*/
6
7#ifndef _LOCALE_H_
8#define _LOCALE_H_
9
10#include "_ansi.h"
11#include <sys/cdefs.h>
12
13#define __need_NULL
14#include <stddef.h>
15
16#define LC_ALL      0
17#define LC_COLLATE  1
18#define LC_CTYPE    2
19#define LC_MONETARY 3
20#define LC_NUMERIC  4
21#define LC_TIME     5
22#define LC_MESSAGES 6
23
24#if __POSIX_VISIBLE >= 200809 || defined (_COMPILING_NEWLIB)
25
26#include <xlocale.h>
27
28#define LC_ALL_MASK             (1 << LC_ALL)
29#define LC_COLLATE_MASK         (1 << LC_COLLATE)
30#define LC_CTYPE_MASK           (1 << LC_CTYPE)
31#define LC_MONETARY_MASK        (1 << LC_MONETARY)
32#define LC_NUMERIC_MASK         (1 << LC_NUMERIC)
33#define LC_TIME_MASK            (1 << LC_TIME)
34#define LC_MESSAGES_MASK        (1 << LC_MESSAGES)
35
36#define LC_GLOBAL_LOCALE        ((struct __locale_t *) -1)
37
38#endif /* __POSIX_VISIBLE >= 200809 */
39
40_BEGIN_STD_C
41
42struct lconv
43{
44  char *decimal_point;
45  char *thousands_sep;
46  char *grouping;
47  char *int_curr_symbol;
48  char *currency_symbol;
49  char *mon_decimal_point;
50  char *mon_thousands_sep;
51  char *mon_grouping;
52  char *positive_sign;
53  char *negative_sign;
54  char int_frac_digits;
55  char frac_digits;
56  char p_cs_precedes;
57  char p_sep_by_space;
58  char n_cs_precedes;
59  char n_sep_by_space;
60  char p_sign_posn;
61  char n_sign_posn;
62  char int_n_cs_precedes;
63  char int_n_sep_by_space;
64  char int_n_sign_posn;
65  char int_p_cs_precedes;
66  char int_p_sep_by_space;
67  char int_p_sign_posn;
68};
69
70struct _reent;
71char *_setlocale_r (struct _reent *, int, const char *);
72struct lconv *_localeconv_r (struct _reent *);
73
74struct __locale_t *_newlocale_r (struct _reent *, int, const char *,
75                                 struct __locale_t *);
76void _freelocale_r (struct _reent *, struct __locale_t *);
77struct __locale_t *_duplocale_r (struct _reent *, struct __locale_t *);
78struct __locale_t *_uselocale_r (struct _reent *, struct __locale_t *);
79
80#ifndef _REENT_ONLY
81
82char *setlocale (int, const char *);
83struct lconv *localeconv (void);
84
85#if __POSIX_VISIBLE >= 200809
86locale_t newlocale (int, const char *, locale_t);
87void freelocale (locale_t);
88locale_t duplocale (locale_t);
89locale_t uselocale (locale_t);
90#endif /* __POSIX_VISIBLE >= 200809 */
91
92#endif /* _REENT_ONLY */
93
94_END_STD_C
95
96#endif /* _LOCALE_H_ */
Note: See TracBrowser for help on using the repository browser.