xref: /haiku/src/system/libroot/posix/locale/LocaleData.cpp (revision a3f665982e2e078ba42e7bf941bd5f3dd8989c55)
1*a3f66598SOliver Tappe /*
2*a3f66598SOliver Tappe  * Copyright 2010, Oliver Tappe, zooey@hirschkaefer.de.
3*a3f66598SOliver Tappe  * Distributed under the terms of the MIT License.
4*a3f66598SOliver Tappe  */
5*a3f66598SOliver Tappe 
6*a3f66598SOliver Tappe 
7*a3f66598SOliver Tappe #include <ctype.h>
8*a3f66598SOliver Tappe #include <limits.h>
9*a3f66598SOliver Tappe 
10*a3f66598SOliver Tappe #include <PosixCtype.h>
11*a3f66598SOliver Tappe #include <PosixLocaleConv.h>
12*a3f66598SOliver Tappe 
13*a3f66598SOliver Tappe #ifndef _KERNEL_MODE
14*a3f66598SOliver Tappe #include <langinfo.h>
15*a3f66598SOliver Tappe #include <PosixLanginfo.h>
16*a3f66598SOliver Tappe #include <PosixLCTimeInfo.h>
17*a3f66598SOliver Tappe #endif
18*a3f66598SOliver Tappe 
19*a3f66598SOliver Tappe 
20*a3f66598SOliver Tappe /*
21*a3f66598SOliver Tappe  * The values below initialize the structs for the "C"/"POSIX" locale
22*a3f66598SOliver Tappe  * which is the default locale (and the only one supported without any locale
23*a3f66598SOliver Tappe  * backend).
24*a3f66598SOliver Tappe  */
25*a3f66598SOliver Tappe 
26*a3f66598SOliver Tappe 
27*a3f66598SOliver Tappe namespace BPrivate {
28*a3f66598SOliver Tappe 
29*a3f66598SOliver Tappe 
30*a3f66598SOliver Tappe const unsigned short gPosixClassInfo[256] = {
31*a3f66598SOliver Tappe 	/*   0 */	_IScntrl, _IScntrl, _IScntrl, _IScntrl, _IScntrl, _IScntrl, _IScntrl, _IScntrl,
32*a3f66598SOliver Tappe 	/*   8 */	_IScntrl, _ISblank|_IScntrl|_ISspace, _IScntrl|_ISspace, _IScntrl|_ISspace, _IScntrl|_ISspace, _IScntrl|_ISspace, _IScntrl, _IScntrl,
33*a3f66598SOliver Tappe 	/*  16 */	_IScntrl, _IScntrl, _IScntrl, _IScntrl, _IScntrl, _IScntrl, _IScntrl, _IScntrl,
34*a3f66598SOliver Tappe 	/*  24 */	_IScntrl, _IScntrl, _IScntrl, _IScntrl, _IScntrl, _IScntrl, _IScntrl, _IScntrl,
35*a3f66598SOliver Tappe 	/*  32 */	_ISblank|_ISspace|_ISprint, _ISpunct|_ISprint|_ISgraph, _ISpunct|_ISprint|_ISgraph, _ISpunct|_ISprint|_ISgraph, _ISpunct|_ISprint|_ISgraph, _ISpunct|_ISprint|_ISgraph, _ISpunct|_ISprint|_ISgraph, _ISpunct|_ISprint|_ISgraph,
36*a3f66598SOliver Tappe 	/*  40 */	_ISpunct|_ISprint|_ISgraph, _ISpunct|_ISprint|_ISgraph, _ISpunct|_ISprint|_ISgraph, _ISpunct|_ISprint|_ISgraph, _ISpunct|_ISprint|_ISgraph, _ISpunct|_ISprint|_ISgraph, _ISpunct|_ISprint|_ISgraph, _ISpunct|_ISprint|_ISgraph,
37*a3f66598SOliver Tappe 	/*  48 */	_ISalnum|_ISdigit|_ISxdigit|_ISprint|_ISgraph, _ISalnum|_ISdigit|_ISxdigit|_ISprint|_ISgraph, _ISalnum|_ISdigit|_ISxdigit|_ISprint|_ISgraph, _ISalnum|_ISdigit|_ISxdigit|_ISprint|_ISgraph, _ISalnum|_ISdigit|_ISxdigit|_ISprint|_ISgraph, _ISalnum|_ISdigit|_ISxdigit|_ISprint|_ISgraph, _ISalnum|_ISdigit|_ISxdigit|_ISprint|_ISgraph, _ISalnum|_ISdigit|_ISxdigit|_ISprint|_ISgraph,
38*a3f66598SOliver Tappe 	/*  56 */	_ISalnum|_ISdigit|_ISxdigit|_ISprint|_ISgraph, _ISalnum|_ISdigit|_ISxdigit|_ISprint|_ISgraph, _ISpunct|_ISprint|_ISgraph, _ISpunct|_ISprint|_ISgraph, _ISpunct|_ISprint|_ISgraph, _ISpunct|_ISprint|_ISgraph, _ISpunct|_ISprint|_ISgraph, _ISpunct|_ISprint|_ISgraph,
39*a3f66598SOliver Tappe 	/*  64 */	_ISpunct|_ISprint|_ISgraph, _ISalnum|_ISupper|_ISalpha|_ISxdigit|_ISprint|_ISgraph, _ISalnum|_ISupper|_ISalpha|_ISxdigit|_ISprint|_ISgraph, _ISalnum|_ISupper|_ISalpha|_ISxdigit|_ISprint|_ISgraph, _ISalnum|_ISupper|_ISalpha|_ISxdigit|_ISprint|_ISgraph, _ISalnum|_ISupper|_ISalpha|_ISxdigit|_ISprint|_ISgraph, _ISalnum|_ISupper|_ISalpha|_ISxdigit|_ISprint|_ISgraph, _ISalnum|_ISupper|_ISalpha|_ISprint|_ISgraph,
40*a3f66598SOliver Tappe 	/*  72 */	_ISalnum|_ISupper|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISupper|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISupper|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISupper|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISupper|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISupper|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISupper|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISupper|_ISalpha|_ISprint|_ISgraph,
41*a3f66598SOliver Tappe 	/*  80 */	_ISalnum|_ISupper|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISupper|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISupper|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISupper|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISupper|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISupper|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISupper|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISupper|_ISalpha|_ISprint|_ISgraph,
42*a3f66598SOliver Tappe 	/*  88 */	_ISalnum|_ISupper|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISupper|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISupper|_ISalpha|_ISprint|_ISgraph, _ISpunct|_ISprint|_ISgraph, _ISpunct|_ISprint|_ISgraph, _ISpunct|_ISprint|_ISgraph, _ISpunct|_ISprint|_ISgraph, _ISpunct|_ISprint|_ISgraph,
43*a3f66598SOliver Tappe 	/*  96 */	_ISpunct|_ISprint|_ISgraph, _ISalnum|_ISlower|_ISalpha|_ISxdigit|_ISprint|_ISgraph, _ISalnum|_ISlower|_ISalpha|_ISxdigit|_ISprint|_ISgraph, _ISalnum|_ISlower|_ISalpha|_ISxdigit|_ISprint|_ISgraph, _ISalnum|_ISlower|_ISalpha|_ISxdigit|_ISprint|_ISgraph, _ISalnum|_ISlower|_ISalpha|_ISxdigit|_ISprint|_ISgraph, _ISalnum|_ISlower|_ISalpha|_ISxdigit|_ISprint|_ISgraph, _ISalnum|_ISlower|_ISalpha|_ISprint|_ISgraph,
44*a3f66598SOliver Tappe 	/* 104 */	_ISalnum|_ISlower|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISlower|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISlower|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISlower|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISlower|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISlower|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISlower|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISlower|_ISalpha|_ISprint|_ISgraph,
45*a3f66598SOliver Tappe 	/* 112 */	_ISalnum|_ISlower|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISlower|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISlower|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISlower|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISlower|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISlower|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISlower|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISlower|_ISalpha|_ISprint|_ISgraph,
46*a3f66598SOliver Tappe 	/* 120 */	_ISalnum|_ISlower|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISlower|_ISalpha|_ISprint|_ISgraph, _ISalnum|_ISlower|_ISalpha|_ISprint|_ISgraph, _ISpunct|_ISprint|_ISgraph, _ISpunct|_ISprint|_ISgraph, _ISpunct|_ISprint|_ISgraph, _ISpunct|_ISprint|_ISgraph, _IScntrl,
47*a3f66598SOliver Tappe 	/* 128 */	0, 0, 0, 0, 0, 0, 0, 0,
48*a3f66598SOliver Tappe 	/* 136 */	0, 0, 0, 0, 0, 0, 0, 0,
49*a3f66598SOliver Tappe 	/* 144 */	0, 0, 0, 0, 0, 0, 0, 0,
50*a3f66598SOliver Tappe 	/* 152 */	0, 0, 0, 0, 0, 0, 0, 0,
51*a3f66598SOliver Tappe 	/* 160 */	0, 0, 0, 0, 0, 0, 0, 0,
52*a3f66598SOliver Tappe 	/* 168 */	0, 0, 0, 0, 0, 0, 0, 0,
53*a3f66598SOliver Tappe 	/* 176 */	0, 0, 0, 0, 0, 0, 0, 0,
54*a3f66598SOliver Tappe 	/* 184 */	0, 0, 0, 0, 0, 0, 0, 0,
55*a3f66598SOliver Tappe 	/* 192 */	0, 0, 0, 0, 0, 0, 0, 0,
56*a3f66598SOliver Tappe 	/* 200 */	0, 0, 0, 0, 0, 0, 0, 0,
57*a3f66598SOliver Tappe 	/* 208 */	0, 0, 0, 0, 0, 0, 0, 0,
58*a3f66598SOliver Tappe 	/* 216 */	0, 0, 0, 0, 0, 0, 0, 0,
59*a3f66598SOliver Tappe 	/* 224 */	0, 0, 0, 0, 0, 0, 0, 0,
60*a3f66598SOliver Tappe 	/* 232 */	0, 0, 0, 0, 0, 0, 0, 0,
61*a3f66598SOliver Tappe 	/* 240 */	0, 0, 0, 0, 0, 0, 0, 0,
62*a3f66598SOliver Tappe 	/* 248 */	0, 0, 0, 0, 0, 0, 0, 0
63*a3f66598SOliver Tappe };
64*a3f66598SOliver Tappe 
65*a3f66598SOliver Tappe const int gPosixToLowerMap[256] = {
66*a3f66598SOliver Tappe 	/*   0 */	  0,   1,   2,   3,   4,   5,   6,   7,
67*a3f66598SOliver Tappe 	/*   8 */	  8,   9,  10,  11,  12,  13,  14,  15,
68*a3f66598SOliver Tappe 	/*  16 */	 16,  17,  18,  19,  20,  21,  22,  23,
69*a3f66598SOliver Tappe 	/*  24 */	 24,  25,  26,  27,  28,  29,  30,  31,
70*a3f66598SOliver Tappe 	/*  32 */	 32,  33,  34,  35,  36,  37,  38,  39,
71*a3f66598SOliver Tappe 	/*  40 */	 40,  41,  42,  43,  44,  45,  46,  47,
72*a3f66598SOliver Tappe 	/*  48 */	'0', '1', '2', '3', '4', '5', '6', '7',
73*a3f66598SOliver Tappe 	/*  56 */	'8', '9',  58,  59,  60,  61,  62,  63,
74*a3f66598SOliver Tappe 	/*  64 */	 64, 'a', 'b', 'c', 'd', 'e', 'f', 'g',
75*a3f66598SOliver Tappe 	/*  72 */	'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
76*a3f66598SOliver Tappe 	/*  80 */	'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
77*a3f66598SOliver Tappe 	/*  88 */	'x', 'y', 'z',  91,  92,  93,  94,  95,
78*a3f66598SOliver Tappe 	/*  96 */	 96, 'a', 'b', 'c', 'd', 'e', 'f', 'g',
79*a3f66598SOliver Tappe 	/* 104 */	'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
80*a3f66598SOliver Tappe 	/* 112 */	'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
81*a3f66598SOliver Tappe 	/* 120 */	'x', 'y', 'z', 123, 124, 125, 126, 127,
82*a3f66598SOliver Tappe 	/* 128 */	128, 129, 130, 131, 132, 133, 134, 135,
83*a3f66598SOliver Tappe 	/* 136 */	136, 137, 138, 139, 140, 141, 142, 143,
84*a3f66598SOliver Tappe 	/* 144 */	144, 145, 146, 147, 148, 149, 150, 151,
85*a3f66598SOliver Tappe 	/* 152 */	152, 153, 154, 155, 156, 157, 158, 159,
86*a3f66598SOliver Tappe 	/* 160 */	160, 161, 162, 163, 164, 165, 166, 167,
87*a3f66598SOliver Tappe 	/* 168 */	168, 169, 170, 171, 172, 173, 174, 175,
88*a3f66598SOliver Tappe 	/* 176 */	176, 177, 178, 179, 180, 181, 182, 183,
89*a3f66598SOliver Tappe 	/* 184 */	184, 185, 186, 187, 188, 189, 190, 191,
90*a3f66598SOliver Tappe 	/* 192 */	192, 193, 194, 195, 196, 197, 198, 199,
91*a3f66598SOliver Tappe 	/* 200 */	200, 201, 202, 203, 204, 205, 206, 207,
92*a3f66598SOliver Tappe 	/* 208 */	208, 209, 210, 211, 212, 213, 214, 215,
93*a3f66598SOliver Tappe 	/* 216 */	216, 217, 218, 219, 220, 221, 222, 223,
94*a3f66598SOliver Tappe 	/* 224 */	224, 225, 226, 227, 228, 229, 230, 231,
95*a3f66598SOliver Tappe 	/* 232 */	232, 233, 234, 235, 236, 237, 238, 239,
96*a3f66598SOliver Tappe 	/* 240 */	240, 241, 242, 243, 244, 245, 246, 247,
97*a3f66598SOliver Tappe 	/* 248 */	248, 249, 250, 251, 252, 253, 254, 255
98*a3f66598SOliver Tappe };
99*a3f66598SOliver Tappe 
100*a3f66598SOliver Tappe 
101*a3f66598SOliver Tappe const int gPosixToUpperMap[256] = {
102*a3f66598SOliver Tappe 	/*   0 */	  0,   1,   2,   3,   4,   5,   6,   7,
103*a3f66598SOliver Tappe 	/*   8 */	  8,   9,  10,  11,  12,  13,  14,  15,
104*a3f66598SOliver Tappe 	/*  16 */	 16,  17,  18,  19,  20,  21,  22,  23,
105*a3f66598SOliver Tappe 	/*  24 */	 24,  25,  26,  27,  28,  29,  30,  31,
106*a3f66598SOliver Tappe 	/*  32 */	 32,  33,  34,  35,  36,  37,  38,  39,
107*a3f66598SOliver Tappe 	/*  40 */	 40,  41,  42,  43,  44,  45,  46,  47,
108*a3f66598SOliver Tappe 	/*  48 */	'0', '1', '2', '3', '4', '5', '6', '7',
109*a3f66598SOliver Tappe 	/*  56 */	'8', '9',  58,  59,  60,  61,  62,  63,
110*a3f66598SOliver Tappe 	/*  64 */	 64, 'A', 'B', 'C', 'D', 'E', 'F', 'G',
111*a3f66598SOliver Tappe 	/*  72 */	'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
112*a3f66598SOliver Tappe 	/*  80 */	'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
113*a3f66598SOliver Tappe 	/*  88 */	'X', 'Y', 'Z',  91,  92,  93,  94,  95,
114*a3f66598SOliver Tappe 	/*  96 */	 96, 'A', 'B', 'C', 'D', 'E', 'F', 'G',
115*a3f66598SOliver Tappe 	/* 104 */	'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
116*a3f66598SOliver Tappe 	/* 112 */	'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
117*a3f66598SOliver Tappe 	/* 120 */	'X', 'Y', 'Z', 123, 124, 125, 126, 127,
118*a3f66598SOliver Tappe 	/* 128 */	128, 129, 130, 131, 132, 133, 134, 135,
119*a3f66598SOliver Tappe 	/* 136 */	136, 137, 138, 139, 140, 141, 142, 143,
120*a3f66598SOliver Tappe 	/* 144 */	144, 145, 146, 147, 148, 149, 150, 151,
121*a3f66598SOliver Tappe 	/* 152 */	152, 153, 154, 155, 156, 157, 158, 159,
122*a3f66598SOliver Tappe 	/* 160 */	160, 161, 162, 163, 164, 165, 166, 167,
123*a3f66598SOliver Tappe 	/* 168 */	168, 169, 170, 171, 172, 173, 174, 175,
124*a3f66598SOliver Tappe 	/* 176 */	176, 177, 178, 179, 180, 181, 182, 183,
125*a3f66598SOliver Tappe 	/* 184 */	184, 185, 186, 187, 188, 189, 190, 191,
126*a3f66598SOliver Tappe 	/* 192 */	192, 193, 194, 195, 196, 197, 198, 199,
127*a3f66598SOliver Tappe 	/* 200 */	200, 201, 202, 203, 204, 205, 206, 207,
128*a3f66598SOliver Tappe 	/* 208 */	208, 209, 210, 211, 212, 213, 214, 215,
129*a3f66598SOliver Tappe 	/* 216 */	216, 217, 218, 219, 220, 221, 222, 223,
130*a3f66598SOliver Tappe 	/* 224 */	224, 225, 226, 227, 228, 229, 230, 231,
131*a3f66598SOliver Tappe 	/* 232 */	232, 233, 234, 235, 236, 237, 238, 239,
132*a3f66598SOliver Tappe 	/* 240 */	240, 241, 242, 243, 244, 245, 246, 247,
133*a3f66598SOliver Tappe 	/* 248 */	248, 249, 250, 251, 252, 253, 254, 255
134*a3f66598SOliver Tappe };
135*a3f66598SOliver Tappe 
136*a3f66598SOliver Tappe 
137*a3f66598SOliver Tappe struct lconv gPosixLocaleConv = {
138*a3f66598SOliver Tappe 	(char*)".",	// decimal point
139*a3f66598SOliver Tappe 	(char*)"",	// thousands separator
140*a3f66598SOliver Tappe 	(char*)"",	// grouping
141*a3f66598SOliver Tappe 	(char*)"",	// international currency symbol
142*a3f66598SOliver Tappe 	(char*)"",	// local currency symbol
143*a3f66598SOliver Tappe 	(char*)"",	// monetary decimal point
144*a3f66598SOliver Tappe 	(char*)"",	// monetary thousands separator
145*a3f66598SOliver Tappe 	(char*)"",	// monetary grouping
146*a3f66598SOliver Tappe 	(char*)"",	// positive sign
147*a3f66598SOliver Tappe 	(char*)"",	// negative sign
148*a3f66598SOliver Tappe 	CHAR_MAX,	// int_frac_digits
149*a3f66598SOliver Tappe 	CHAR_MAX,	// frac_digits
150*a3f66598SOliver Tappe 	CHAR_MAX,	// p_cs_precedes
151*a3f66598SOliver Tappe 	CHAR_MAX,	// p_sep_by_space
152*a3f66598SOliver Tappe 	CHAR_MAX,	// n_cs_precedes
153*a3f66598SOliver Tappe 	CHAR_MAX,	// n_sep_by_space
154*a3f66598SOliver Tappe 	CHAR_MAX,	// p_sign_posn
155*a3f66598SOliver Tappe 	CHAR_MAX,	// n_sign_posn
156*a3f66598SOliver Tappe 	CHAR_MAX,	// int_p_cs_precedes
157*a3f66598SOliver Tappe 	CHAR_MAX,	// int_p_sep_by_space
158*a3f66598SOliver Tappe 	CHAR_MAX,	// int_n_cs_precedes
159*a3f66598SOliver Tappe 	CHAR_MAX,	// int_n_sep_by_space
160*a3f66598SOliver Tappe 	CHAR_MAX,	// int_p_sign_posn
161*a3f66598SOliver Tappe 	CHAR_MAX	// int_n_sign_posn
162*a3f66598SOliver Tappe };
163*a3f66598SOliver Tappe 
164*a3f66598SOliver Tappe 
165*a3f66598SOliver Tappe #ifndef _KERNEL_MODE
166*a3f66598SOliver Tappe 
167*a3f66598SOliver Tappe const struct lc_time_t gPosixLCTimeInfo = {
168*a3f66598SOliver Tappe 	{
169*a3f66598SOliver Tappe 		"Jan", "Feb", "Mar", "Apr", "May", "Jun",
170*a3f66598SOliver Tappe 		"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
171*a3f66598SOliver Tappe 	},
172*a3f66598SOliver Tappe 	{
173*a3f66598SOliver Tappe 		"January", "February", "March", "April", "May", "June",
174*a3f66598SOliver Tappe 		"July", "August", "September", "October", "November", "December"
175*a3f66598SOliver Tappe 	},
176*a3f66598SOliver Tappe 	{
177*a3f66598SOliver Tappe 		"Sun", "Mon", "Tue", "Wed",	"Thu", "Fri", "Sat"
178*a3f66598SOliver Tappe 	},
179*a3f66598SOliver Tappe 	{
180*a3f66598SOliver Tappe 		"Sunday", "Monday", "Tuesday", "Wednesday",	"Thursday", "Friday",
181*a3f66598SOliver Tappe 		"Saturday"
182*a3f66598SOliver Tappe 	},
183*a3f66598SOliver Tappe 	"%H:%M:%S",
184*a3f66598SOliver Tappe 	"%m/%d/%y",
185*a3f66598SOliver Tappe 	"%a %b %e %H:%M:%S %Y",
186*a3f66598SOliver Tappe 	"AM",
187*a3f66598SOliver Tappe 	"PM",
188*a3f66598SOliver Tappe 	"%a %b %e %H:%M:%S %Z %Y",
189*a3f66598SOliver Tappe 	{
190*a3f66598SOliver Tappe 		"January", "February", "March", "April", "May", "June",
191*a3f66598SOliver Tappe 		"July", "August", "September", "October", "November", "December"
192*a3f66598SOliver Tappe 	},
193*a3f66598SOliver Tappe 	"md",
194*a3f66598SOliver Tappe 	"%I:%M:%S %p"
195*a3f66598SOliver Tappe };
196*a3f66598SOliver Tappe 
197*a3f66598SOliver Tappe 
198*a3f66598SOliver Tappe const char* gPosixLanginfo[_NL_LANGINFO_LAST] = {
199*a3f66598SOliver Tappe 	"US-ASCII",
200*a3f66598SOliver Tappe 	gPosixLCTimeInfo.c_fmt,
201*a3f66598SOliver Tappe 	gPosixLCTimeInfo.x_fmt,
202*a3f66598SOliver Tappe 	gPosixLCTimeInfo.X_fmt,
203*a3f66598SOliver Tappe 	gPosixLCTimeInfo.ampm_fmt,
204*a3f66598SOliver Tappe 	gPosixLCTimeInfo.am,
205*a3f66598SOliver Tappe 	gPosixLCTimeInfo.pm,
206*a3f66598SOliver Tappe 
207*a3f66598SOliver Tappe 	gPosixLCTimeInfo.weekday[0],
208*a3f66598SOliver Tappe 	gPosixLCTimeInfo.weekday[1],
209*a3f66598SOliver Tappe 	gPosixLCTimeInfo.weekday[2],
210*a3f66598SOliver Tappe 	gPosixLCTimeInfo.weekday[3],
211*a3f66598SOliver Tappe 	gPosixLCTimeInfo.weekday[4],
212*a3f66598SOliver Tappe 	gPosixLCTimeInfo.weekday[5],
213*a3f66598SOliver Tappe 	gPosixLCTimeInfo.weekday[6],
214*a3f66598SOliver Tappe 
215*a3f66598SOliver Tappe 	gPosixLCTimeInfo.wday[0],
216*a3f66598SOliver Tappe 	gPosixLCTimeInfo.wday[1],
217*a3f66598SOliver Tappe 	gPosixLCTimeInfo.wday[2],
218*a3f66598SOliver Tappe 	gPosixLCTimeInfo.wday[3],
219*a3f66598SOliver Tappe 	gPosixLCTimeInfo.wday[4],
220*a3f66598SOliver Tappe 	gPosixLCTimeInfo.wday[5],
221*a3f66598SOliver Tappe 	gPosixLCTimeInfo.wday[6],
222*a3f66598SOliver Tappe 
223*a3f66598SOliver Tappe 	gPosixLCTimeInfo.month[0],
224*a3f66598SOliver Tappe 	gPosixLCTimeInfo.month[1],
225*a3f66598SOliver Tappe 	gPosixLCTimeInfo.month[2],
226*a3f66598SOliver Tappe 	gPosixLCTimeInfo.month[3],
227*a3f66598SOliver Tappe 	gPosixLCTimeInfo.month[4],
228*a3f66598SOliver Tappe 	gPosixLCTimeInfo.month[5],
229*a3f66598SOliver Tappe 	gPosixLCTimeInfo.month[6],
230*a3f66598SOliver Tappe 	gPosixLCTimeInfo.month[7],
231*a3f66598SOliver Tappe 	gPosixLCTimeInfo.month[8],
232*a3f66598SOliver Tappe 	gPosixLCTimeInfo.month[9],
233*a3f66598SOliver Tappe 	gPosixLCTimeInfo.month[10],
234*a3f66598SOliver Tappe 	gPosixLCTimeInfo.month[11],
235*a3f66598SOliver Tappe 
236*a3f66598SOliver Tappe 	gPosixLCTimeInfo.mon[0],
237*a3f66598SOliver Tappe 	gPosixLCTimeInfo.mon[1],
238*a3f66598SOliver Tappe 	gPosixLCTimeInfo.mon[2],
239*a3f66598SOliver Tappe 	gPosixLCTimeInfo.mon[3],
240*a3f66598SOliver Tappe 	gPosixLCTimeInfo.mon[4],
241*a3f66598SOliver Tappe 	gPosixLCTimeInfo.mon[5],
242*a3f66598SOliver Tappe 	gPosixLCTimeInfo.mon[6],
243*a3f66598SOliver Tappe 	gPosixLCTimeInfo.mon[7],
244*a3f66598SOliver Tappe 	gPosixLCTimeInfo.mon[8],
245*a3f66598SOliver Tappe 	gPosixLCTimeInfo.mon[9],
246*a3f66598SOliver Tappe 	gPosixLCTimeInfo.mon[10],
247*a3f66598SOliver Tappe 	gPosixLCTimeInfo.mon[11],
248*a3f66598SOliver Tappe 
249*a3f66598SOliver Tappe 	"%EC, %Ey, %EY",
250*a3f66598SOliver Tappe 	"%Ex",
251*a3f66598SOliver Tappe 	"%Ec",
252*a3f66598SOliver Tappe 	"%EX",
253*a3f66598SOliver Tappe 	"%O",
254*a3f66598SOliver Tappe 
255*a3f66598SOliver Tappe 	gPosixLocaleConv.decimal_point,
256*a3f66598SOliver Tappe 	gPosixLocaleConv.thousands_sep,
257*a3f66598SOliver Tappe 
258*a3f66598SOliver Tappe 	"^[yY]",
259*a3f66598SOliver Tappe 	"^[nN]",
260*a3f66598SOliver Tappe 
261*a3f66598SOliver Tappe 	gPosixLocaleConv.currency_symbol
262*a3f66598SOliver Tappe };
263*a3f66598SOliver Tappe 
264*a3f66598SOliver Tappe #endif // !_KERNEL_MODE
265*a3f66598SOliver Tappe 
266*a3f66598SOliver Tappe 
267*a3f66598SOliver Tappe }	// namespace BPrivate
268*a3f66598SOliver Tappe 
269*a3f66598SOliver Tappe 
270*a3f66598SOliver Tappe const unsigned short* 	__ctype_b 		= BPrivate::gPosixClassInfo;
271*a3f66598SOliver Tappe const int* 				__ctype_tolower = BPrivate::gPosixToLowerMap;
272*a3f66598SOliver Tappe const int* 				__ctype_toupper = BPrivate::gPosixToUpperMap;
273