author | naoto |
Thu, 14 Mar 2013 11:29:16 -0700 | |
changeset 16481 | 8e30386cc014 |
parent 14028 | 5f3d5ae5f1ea |
child 17169 | 5e5039c3181d |
permissions | -rw-r--r-- |
13583 | 1 |
/* |
2 |
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. |
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
|
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. Oracle designates this |
|
8 |
* particular file as subject to the "Classpath" exception as provided |
|
9 |
* by Oracle in the LICENSE file that accompanied this code. |
|
10 |
* |
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
24 |
*/ |
|
25 |
||
26 |
#include "sun_util_locale_provider_HostLocaleProviderAdapterImpl.h" |
|
27 |
#include <windows.h> |
|
28 |
#include <gdefs.h> |
|
29 |
#include <stdlib.h> |
|
30 |
||
31 |
#define BUFLEN 256 |
|
32 |
||
33 |
// global variables |
|
34 |
typedef int (WINAPI *PGLIE)(const jchar *, LCTYPE, LPWSTR, int); |
|
35 |
typedef int (WINAPI *PGCIE)(const jchar *, CALID, LPCWSTR, CALTYPE, LPWSTR, int, LPDWORD); |
|
36 |
PGLIE pGetLocaleInfoEx; |
|
37 |
PGCIE pGetCalendarInfoEx; |
|
38 |
BOOL initialized = FALSE; |
|
39 |
||
40 |
// prototypes |
|
41 |
int getLocaleInfoWrapper(const jchar *langtag, LCTYPE type, LPWSTR data, int buflen); |
|
42 |
int getCalendarInfoWrapper(const jchar *langtag, CALID id, LPCWSTR reserved, CALTYPE type, LPWSTR data, int buflen, LPDWORD val); |
|
43 |
jint getCalendarID(const jchar *langtag); |
|
44 |
void replaceCalendarArrayElems(JNIEnv *env, jstring jlangtag, jobjectArray jarray, |
|
45 |
CALTYPE* pCalTypes, int offset, int length); |
|
46 |
WCHAR * getNumberPattern(const jchar * langtag, const jint numberStyle); |
|
47 |
void getNumberPart(const jchar * langtag, const jint numberStyle, WCHAR * number); |
|
48 |
void getFixPart(const jchar * langtag, const jint numberStyle, BOOL positive, BOOL prefix, WCHAR * ret); |
|
49 |
||
50 |
// from java_props_md.c |
|
51 |
extern __declspec(dllexport) const char * getJavaIDFromLangID(LANGID langID); |
|
52 |
||
53 |
CALTYPE monthsType[] = { |
|
54 |
CAL_SMONTHNAME1, |
|
55 |
CAL_SMONTHNAME2, |
|
56 |
CAL_SMONTHNAME3, |
|
57 |
CAL_SMONTHNAME4, |
|
58 |
CAL_SMONTHNAME5, |
|
59 |
CAL_SMONTHNAME6, |
|
60 |
CAL_SMONTHNAME7, |
|
61 |
CAL_SMONTHNAME8, |
|
62 |
CAL_SMONTHNAME9, |
|
63 |
CAL_SMONTHNAME10, |
|
64 |
CAL_SMONTHNAME11, |
|
65 |
CAL_SMONTHNAME12, |
|
66 |
CAL_SMONTHNAME13, |
|
67 |
}; |
|
68 |
||
69 |
CALTYPE sMonthsType[] = { |
|
70 |
CAL_SABBREVMONTHNAME1, |
|
71 |
CAL_SABBREVMONTHNAME2, |
|
72 |
CAL_SABBREVMONTHNAME3, |
|
73 |
CAL_SABBREVMONTHNAME4, |
|
74 |
CAL_SABBREVMONTHNAME5, |
|
75 |
CAL_SABBREVMONTHNAME6, |
|
76 |
CAL_SABBREVMONTHNAME7, |
|
77 |
CAL_SABBREVMONTHNAME8, |
|
78 |
CAL_SABBREVMONTHNAME9, |
|
79 |
CAL_SABBREVMONTHNAME10, |
|
80 |
CAL_SABBREVMONTHNAME11, |
|
81 |
CAL_SABBREVMONTHNAME12, |
|
82 |
CAL_SABBREVMONTHNAME13, |
|
83 |
}; |
|
84 |
||
85 |
CALTYPE wDaysType[] = { |
|
86 |
CAL_SDAYNAME7, |
|
87 |
CAL_SDAYNAME1, |
|
88 |
CAL_SDAYNAME2, |
|
89 |
CAL_SDAYNAME3, |
|
90 |
CAL_SDAYNAME4, |
|
91 |
CAL_SDAYNAME5, |
|
92 |
CAL_SDAYNAME6, |
|
93 |
}; |
|
94 |
||
95 |
CALTYPE sWDaysType[] = { |
|
96 |
CAL_SABBREVDAYNAME7, |
|
97 |
CAL_SABBREVDAYNAME1, |
|
98 |
CAL_SABBREVDAYNAME2, |
|
99 |
CAL_SABBREVDAYNAME3, |
|
100 |
CAL_SABBREVDAYNAME4, |
|
101 |
CAL_SABBREVDAYNAME5, |
|
102 |
CAL_SABBREVDAYNAME6, |
|
103 |
}; |
|
104 |
||
105 |
WCHAR * fixes[2][2][3][16] = |
|
106 |
{ |
|
107 |
{ //prefix |
|
108 |
{ //positive |
|
109 |
{ // number |
|
110 |
L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", |
|
111 |
}, |
|
112 |
{ // currency |
|
113 |
L"\xA4", L"", L"\xA4 ", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", |
|
114 |
}, |
|
115 |
{ // percent |
|
116 |
L"", L"", L"%", L"% ", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", |
|
117 |
} |
|
118 |
}, |
|
119 |
{ // negative |
|
120 |
{ // number |
|
121 |
L"(", L"-", L"- ", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", |
|
122 |
}, |
|
123 |
{ //currency |
|
124 |
L"(\xA4", L"-\xA4", L"\xA4-", L"\xA4", L"(", L"-", L"", L"", L"-", L"-\xA4 ", L"", L"\xA4 ", L"\xA4 -", L"", L"(\xA4 ", L"(" |
|
125 |
}, |
|
126 |
{ // percent |
|
127 |
L"-", L"-", L"-%", L"%-", L"%", L"", L"", L"-% ", L"", L"% ", L"% -", L"", L"", L"", L"", L"", |
|
128 |
} |
|
129 |
} |
|
130 |
}, |
|
131 |
{ // suffix |
|
132 |
{ //positive |
|
133 |
{ // number |
|
134 |
L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"" |
|
135 |
}, |
|
136 |
{ // currency |
|
137 |
L"", L"\xA4 ", L"", L" \xA4", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", |
|
138 |
}, |
|
139 |
{ // percent |
|
140 |
L" %", L"%", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", |
|
141 |
} |
|
142 |
}, |
|
143 |
{ // negative |
|
144 |
{ // number |
|
145 |
L")", L"", L" ", L"-", L" -", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", L"", |
|
146 |
}, |
|
147 |
{ //currency |
|
148 |
L")", L"", L"", L"-", L"\xA4)", L"\xA4", L"-\xA4", L"\xA4-", L" \xA4", L"", L" \xA4-", L"-", L"", L"- \xA4", L")", L" \xA4)" |
|
149 |
}, |
|
150 |
{ // percent |
|
151 |
L" %", L"%", L"", L"", L"-", L"-%", L"%-", L"", L" %-", L"-", L"", L"- %", L"", L"", L"", L"", |
|
152 |
} |
|
153 |
} |
|
154 |
} |
|
155 |
}; |
|
156 |
||
157 |
/* |
|
158 |
* Class: sun_util_locale_provider_HostLocaleProviderAdapterImpl |
|
159 |
* Method: initialize |
|
160 |
* Signature: ()Z |
|
161 |
*/ |
|
162 |
JNIEXPORT jboolean JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_initialize |
|
163 |
(JNIEnv *env, jclass cls) { |
|
164 |
if (!initialized) { |
|
165 |
pGetLocaleInfoEx = (PGLIE)GetProcAddress( |
|
166 |
GetModuleHandle("kernel32.dll"), |
|
167 |
"GetLocaleInfoEx"); |
|
168 |
pGetCalendarInfoEx = (PGCIE)GetProcAddress( |
|
169 |
GetModuleHandle("kernel32.dll"), |
|
170 |
"GetCalendarInfoEx"); |
|
171 |
initialized =TRUE; |
|
172 |
} |
|
173 |
||
174 |
return pGetLocaleInfoEx != NULL && |
|
175 |
pGetCalendarInfoEx != NULL; |
|
176 |
} |
|
177 |
||
178 |
/* |
|
179 |
* Class: sun_util_locale_provider_HostLocaleProviderAdapterImpl |
|
180 |
* Method: getDefaultLocale |
|
181 |
* Signature: (I)Ljava/lang/String; |
|
182 |
*/ |
|
183 |
JNIEXPORT jstring JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getDefaultLocale |
|
184 |
(JNIEnv *env, jclass cls, jint cat) { |
|
185 |
char * localeString = NULL; |
|
186 |
LANGID langid; |
|
187 |
jstring ret; |
|
188 |
||
189 |
switch (cat) { |
|
190 |
case sun_util_locale_provider_HostLocaleProviderAdapterImpl_CAT_DISPLAY: |
|
191 |
langid = LANGIDFROMLCID(GetUserDefaultUILanguage()); |
|
192 |
break; |
|
193 |
case sun_util_locale_provider_HostLocaleProviderAdapterImpl_CAT_FORMAT: |
|
194 |
default: |
|
195 |
langid = LANGIDFROMLCID(GetUserDefaultLCID()); |
|
196 |
break; |
|
197 |
} |
|
198 |
||
199 |
localeString = getJavaIDFromLangID(langid); |
|
200 |
ret = (*env)->NewStringUTF(env, localeString); |
|
201 |
free(localeString); |
|
202 |
return ret; |
|
203 |
} |
|
204 |
||
205 |
/* |
|
206 |
* Class: sun_util_locale_provider_HostLocaleProviderAdapterImpl |
|
207 |
* Method: getDateTimePattern |
|
208 |
* Signature: (IILjava/lang/String;)Ljava/lang/String; |
|
209 |
*/ |
|
210 |
JNIEXPORT jstring JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getDateTimePattern |
|
211 |
(JNIEnv *env, jclass cls, jint dateStyle, jint timeStyle, jstring jlangtag) { |
|
14028
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
13583
diff
changeset
|
212 |
WCHAR pattern[BUFLEN]; |
13583 | 213 |
const jchar *langtag = (*env)->GetStringChars(env, jlangtag, JNI_FALSE); |
214 |
||
14028
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
13583
diff
changeset
|
215 |
pattern[0] = L'\0'; |
13583 | 216 |
|
217 |
if (dateStyle == 0 || dateStyle == 1) { |
|
14028
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
13583
diff
changeset
|
218 |
getLocaleInfoWrapper(langtag, LOCALE_SLONGDATE, pattern, BUFLEN); |
13583 | 219 |
} else if (dateStyle == 2 || dateStyle == 3) { |
14028
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
13583
diff
changeset
|
220 |
getLocaleInfoWrapper(langtag, LOCALE_SSHORTDATE, pattern, BUFLEN); |
13583 | 221 |
} |
222 |
||
223 |
if (timeStyle == 0 || timeStyle == 1) { |
|
14028
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
13583
diff
changeset
|
224 |
getLocaleInfoWrapper(langtag, LOCALE_STIMEFORMAT, pattern, BUFLEN); |
13583 | 225 |
} else if (timeStyle == 2 || timeStyle == 3) { |
14028
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
13583
diff
changeset
|
226 |
getLocaleInfoWrapper(langtag, LOCALE_SSHORTTIME, pattern, BUFLEN); |
13583 | 227 |
} |
228 |
||
229 |
(*env)->ReleaseStringChars(env, jlangtag, langtag); |
|
230 |
||
14028
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
13583
diff
changeset
|
231 |
return (*env)->NewString(env, pattern, wcslen(pattern)); |
13583 | 232 |
} |
233 |
||
234 |
/* |
|
235 |
* Class: sun_util_locale_provider_HostLocaleProviderAdapterImpl |
|
236 |
* Method: getCalendarID |
|
237 |
* Signature: (Ljava/lang/String;)I |
|
238 |
*/ |
|
239 |
JNIEXPORT jint JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getCalendarID |
|
240 |
(JNIEnv *env, jclass cls, jstring jlangtag) { |
|
241 |
const jchar *langtag = (*env)->GetStringChars(env, jlangtag, JNI_FALSE); |
|
242 |
jint ret = getCalendarID(langtag); |
|
243 |
(*env)->ReleaseStringChars(env, jlangtag, langtag); |
|
244 |
return ret; |
|
245 |
} |
|
246 |
||
247 |
/* |
|
248 |
* Class: sun_util_locale_provider_HostLocaleProviderAdapterImpl |
|
249 |
* Method: getAmPmStrings |
|
250 |
* Signature: (Ljava/lang/String;[Ljava/lang/String;)[Ljava/lang/String; |
|
251 |
*/ |
|
252 |
JNIEXPORT jobjectArray JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getAmPmStrings |
|
253 |
(JNIEnv *env, jclass cls, jstring jlangtag, jobjectArray ampms) { |
|
254 |
WCHAR buf[BUFLEN]; |
|
255 |
const jchar *langtag = (*env)->GetStringChars(env, jlangtag, JNI_FALSE); |
|
256 |
||
257 |
// AM |
|
258 |
int got = getLocaleInfoWrapper(langtag, LOCALE_S1159, buf, BUFLEN); |
|
259 |
if (got) { |
|
260 |
(*env)->SetObjectArrayElement(env, ampms, 0, (*env)->NewString(env, buf, wcslen(buf))); |
|
261 |
} |
|
262 |
||
263 |
// PM |
|
264 |
got = getLocaleInfoWrapper(langtag, LOCALE_S2359, buf, BUFLEN); |
|
265 |
if (got) { |
|
266 |
(*env)->SetObjectArrayElement(env, ampms, 1, (*env)->NewString(env, buf, wcslen(buf))); |
|
267 |
} |
|
268 |
||
269 |
(*env)->ReleaseStringChars(env, jlangtag, langtag); |
|
270 |
||
271 |
return ampms; |
|
272 |
} |
|
273 |
||
274 |
/* |
|
275 |
* Class: sun_util_locale_provider_HostLocaleProviderAdapterImpl |
|
276 |
* Method: getEras |
|
277 |
* Signature: (Ljava/lang/String;[Ljava/lang/String;)[Ljava/lang/String; |
|
278 |
*/ |
|
279 |
JNIEXPORT jobjectArray JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getEras |
|
280 |
(JNIEnv *env, jclass cls, jstring jlangtag, jobjectArray eras) { |
|
281 |
WCHAR ad[BUFLEN]; |
|
282 |
const jchar *langtag = (*env)->GetStringChars(env, jlangtag, JNI_FALSE); |
|
283 |
||
284 |
getCalendarInfoWrapper(langtag, getCalendarID(langtag), NULL, |
|
285 |
CAL_SERASTRING, ad, BUFLEN, NULL); |
|
286 |
||
287 |
// Windows does not provide B.C. era. |
|
288 |
(*env)->SetObjectArrayElement(env, eras, 1, (*env)->NewString(env, ad, wcslen(ad))); |
|
289 |
||
290 |
(*env)->ReleaseStringChars(env, jlangtag, langtag); |
|
291 |
||
292 |
return eras; |
|
293 |
} |
|
294 |
||
295 |
/* |
|
296 |
* Class: sun_util_locale_provider_HostLocaleProviderAdapterImpl |
|
297 |
* Method: getMonths |
|
298 |
* Signature: (Ljava/lang/String;[Ljava/lang/String;)[Ljava/lang/String; |
|
299 |
*/ |
|
300 |
JNIEXPORT jobjectArray JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getMonths |
|
301 |
(JNIEnv *env, jclass cls, jstring jlangtag, jobjectArray months) { |
|
302 |
replaceCalendarArrayElems(env, jlangtag, months, monthsType, |
|
303 |
0, sizeof(monthsType)/sizeof(CALTYPE)); |
|
304 |
return months; |
|
305 |
} |
|
306 |
||
307 |
/* |
|
308 |
* Class: sun_util_locale_provider_HostLocaleProviderAdapterImpl |
|
309 |
* Method: getShortMonths |
|
310 |
* Signature: (Ljava/lang/String;[Ljava/lang/String;)[Ljava/lang/String; |
|
311 |
*/ |
|
312 |
JNIEXPORT jobjectArray JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getShortMonths |
|
313 |
(JNIEnv *env, jclass cls, jstring jlangtag, jobjectArray smonths) { |
|
314 |
replaceCalendarArrayElems(env, jlangtag, smonths, sMonthsType, |
|
315 |
0, sizeof(sMonthsType)/sizeof(CALTYPE)); |
|
316 |
return smonths; |
|
317 |
} |
|
318 |
||
319 |
/* |
|
320 |
* Class: sun_util_locale_provider_HostLocaleProviderAdapterImpl |
|
321 |
* Method: getWeekdays |
|
322 |
* Signature: (Ljava/lang/String;[Ljava/lang/String;)[Ljava/lang/String; |
|
323 |
*/ |
|
324 |
JNIEXPORT jobjectArray JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getWeekdays |
|
325 |
(JNIEnv *env, jclass cls, jstring jlangtag, jobjectArray wdays) { |
|
326 |
replaceCalendarArrayElems(env, jlangtag, wdays, wDaysType, |
|
327 |
1, sizeof(wDaysType)/sizeof(CALTYPE)); |
|
328 |
return wdays; |
|
329 |
} |
|
330 |
||
331 |
/* |
|
332 |
* Class: sun_util_locale_provider_HostLocaleProviderAdapterImpl |
|
333 |
* Method: getShortWeekdays |
|
334 |
* Signature: (Ljava/lang/String;[Ljava/lang/String;)[Ljava/lang/String; |
|
335 |
*/ |
|
336 |
JNIEXPORT jobjectArray JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getShortWeekdays |
|
337 |
(JNIEnv *env, jclass cls, jstring jlangtag, jobjectArray swdays) { |
|
338 |
replaceCalendarArrayElems(env, jlangtag, swdays, sWDaysType, |
|
339 |
1, sizeof(sWDaysType)/sizeof(CALTYPE)); |
|
340 |
return swdays; |
|
341 |
} |
|
342 |
||
343 |
/* |
|
344 |
* Class: sun_util_locale_provider_HostLocaleProviderAdapterImpl |
|
345 |
* Method: getNumberPattern |
|
346 |
* Signature: (ILjava/lang/String;)Ljava/lang/String; |
|
347 |
*/ |
|
348 |
JNIEXPORT jstring JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getNumberPattern |
|
349 |
(JNIEnv *env, jclass cls, jint numberStyle, jstring jlangtag) { |
|
350 |
const jchar *langtag = (*env)->GetStringChars(env, jlangtag, JNI_FALSE); |
|
351 |
jstring ret; |
|
352 |
||
353 |
WCHAR * pattern = getNumberPattern(langtag, numberStyle); |
|
354 |
||
355 |
(*env)->ReleaseStringChars(env, jlangtag, langtag); |
|
356 |
ret = (*env)->NewString(env, pattern, wcslen(pattern)); |
|
357 |
free(pattern); |
|
358 |
||
359 |
return ret; |
|
360 |
} |
|
361 |
||
362 |
/* |
|
363 |
* Class: sun_util_locale_provider_HostLocaleProviderAdapterImpl |
|
364 |
* Method: isNativeDigit |
|
365 |
* Signature: (Ljava/lang/String;)Z |
|
366 |
*/ |
|
367 |
JNIEXPORT jboolean JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_isNativeDigit |
|
368 |
(JNIEnv *env, jclass cls, jstring jlangtag) { |
|
369 |
WCHAR buf[BUFLEN]; |
|
370 |
const jchar *langtag = (*env)->GetStringChars(env, jlangtag, JNI_FALSE); |
|
371 |
int got = getLocaleInfoWrapper(langtag, LOCALE_IDIGITSUBSTITUTION, buf, BUFLEN); |
|
372 |
(*env)->ReleaseStringChars(env, jlangtag, langtag); |
|
373 |
||
374 |
return got && buf[0] == L'2'; // 2: native digit substitution |
|
375 |
} |
|
376 |
||
377 |
/* |
|
378 |
* Class: sun_util_locale_provider_HostLocaleProviderAdapterImpl |
|
379 |
* Method: getCurrencySymbol |
|
380 |
* Signature: (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; |
|
381 |
*/ |
|
382 |
JNIEXPORT jstring JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getCurrencySymbol |
|
383 |
(JNIEnv *env, jclass cls, jstring jlangtag, jstring currencySymbol) { |
|
384 |
WCHAR buf[BUFLEN]; |
|
385 |
const jchar *langtag = (*env)->GetStringChars(env, jlangtag, JNI_FALSE); |
|
386 |
int got = getLocaleInfoWrapper(langtag, LOCALE_SCURRENCY, buf, BUFLEN); |
|
387 |
(*env)->ReleaseStringChars(env, jlangtag, langtag); |
|
388 |
||
389 |
if (got) { |
|
390 |
return (*env)->NewString(env, buf, wcslen(buf)); |
|
391 |
} else { |
|
392 |
return currencySymbol; |
|
393 |
} |
|
394 |
} |
|
395 |
||
396 |
/* |
|
397 |
* Class: sun_util_locale_provider_HostLocaleProviderAdapterImpl |
|
398 |
* Method: getDecimalSeparator |
|
399 |
* Signature: (Ljava/lang/String;C)C |
|
400 |
*/ |
|
401 |
JNIEXPORT jchar JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getDecimalSeparator |
|
402 |
(JNIEnv *env, jclass cls, jstring jlangtag, jchar decimalSeparator) { |
|
403 |
WCHAR buf[BUFLEN]; |
|
404 |
const jchar *langtag = (*env)->GetStringChars(env, jlangtag, JNI_FALSE); |
|
405 |
int got = getLocaleInfoWrapper(langtag, LOCALE_SDECIMAL, buf, BUFLEN); |
|
406 |
(*env)->ReleaseStringChars(env, jlangtag, langtag); |
|
407 |
||
408 |
if (got) { |
|
409 |
return buf[0]; |
|
410 |
} else { |
|
411 |
return decimalSeparator; |
|
412 |
} |
|
413 |
} |
|
414 |
||
415 |
/* |
|
416 |
* Class: sun_util_locale_provider_HostLocaleProviderAdapterImpl |
|
417 |
* Method: getGroupingSeparator |
|
418 |
* Signature: (Ljava/lang/String;C)C |
|
419 |
*/ |
|
420 |
JNIEXPORT jchar JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getGroupingSeparator |
|
421 |
(JNIEnv *env, jclass cls, jstring jlangtag, jchar groupingSeparator) { |
|
422 |
WCHAR buf[BUFLEN]; |
|
423 |
const jchar *langtag = (*env)->GetStringChars(env, jlangtag, JNI_FALSE); |
|
424 |
int got = getLocaleInfoWrapper(langtag, LOCALE_STHOUSAND, buf, BUFLEN); |
|
425 |
(*env)->ReleaseStringChars(env, jlangtag, langtag); |
|
426 |
||
427 |
if (got) { |
|
428 |
return buf[0]; |
|
429 |
} else { |
|
430 |
return groupingSeparator; |
|
431 |
} |
|
432 |
} |
|
433 |
||
434 |
/* |
|
435 |
* Class: sun_util_locale_provider_HostLocaleProviderAdapterImpl |
|
436 |
* Method: getInfinity |
|
437 |
* Signature: (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; |
|
438 |
*/ |
|
439 |
JNIEXPORT jstring JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getInfinity |
|
440 |
(JNIEnv *env, jclass cls, jstring jlangtag, jstring infinity) { |
|
441 |
WCHAR buf[BUFLEN]; |
|
442 |
const jchar *langtag = (*env)->GetStringChars(env, jlangtag, JNI_FALSE); |
|
443 |
int got = getLocaleInfoWrapper(langtag, LOCALE_SPOSINFINITY, buf, BUFLEN); |
|
444 |
(*env)->ReleaseStringChars(env, jlangtag, langtag); |
|
445 |
||
446 |
if (got) { |
|
447 |
return (*env)->NewString(env, buf, wcslen(buf)); |
|
448 |
} else { |
|
449 |
return infinity; |
|
450 |
} |
|
451 |
} |
|
452 |
||
453 |
/* |
|
454 |
* Class: sun_util_locale_provider_HostLocaleProviderAdapterImpl |
|
455 |
* Method: getInternationalCurrencySymbol |
|
456 |
* Signature: (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; |
|
457 |
*/ |
|
458 |
JNIEXPORT jstring JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getInternationalCurrencySymbol |
|
459 |
(JNIEnv *env, jclass cls, jstring jlangtag, jstring internationalCurrencySymbol) { |
|
460 |
WCHAR buf[BUFLEN]; |
|
461 |
const jchar *langtag = (*env)->GetStringChars(env, jlangtag, JNI_FALSE); |
|
462 |
int got = getLocaleInfoWrapper(langtag, LOCALE_SINTLSYMBOL, buf, BUFLEN); |
|
463 |
(*env)->ReleaseStringChars(env, jlangtag, langtag); |
|
464 |
||
465 |
if (got) { |
|
466 |
return (*env)->NewString(env, buf, wcslen(buf)); |
|
467 |
} else { |
|
468 |
return internationalCurrencySymbol; |
|
469 |
} |
|
470 |
} |
|
471 |
||
472 |
/* |
|
473 |
* Class: sun_util_locale_provider_HostLocaleProviderAdapterImpl |
|
474 |
* Method: getMinusSign |
|
475 |
* Signature: (Ljava/lang/String;C)C |
|
476 |
*/ |
|
477 |
JNIEXPORT jchar JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getMinusSign |
|
478 |
(JNIEnv *env, jclass cls, jstring jlangtag, jchar minusSign) { |
|
479 |
WCHAR buf[BUFLEN]; |
|
480 |
const jchar *langtag = (*env)->GetStringChars(env, jlangtag, JNI_FALSE); |
|
481 |
int got = getLocaleInfoWrapper(langtag, LOCALE_SNEGATIVESIGN, buf, BUFLEN); |
|
482 |
(*env)->ReleaseStringChars(env, jlangtag, langtag); |
|
483 |
||
484 |
if (got) { |
|
485 |
return buf[0]; |
|
486 |
} else { |
|
487 |
return minusSign; |
|
488 |
} |
|
489 |
} |
|
490 |
||
491 |
/* |
|
492 |
* Class: sun_util_locale_provider_HostLocaleProviderAdapterImpl |
|
493 |
* Method: getMonetaryDecimalSeparator |
|
494 |
* Signature: (Ljava/lang/String;C)C |
|
495 |
*/ |
|
496 |
JNIEXPORT jchar JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getMonetaryDecimalSeparator |
|
497 |
(JNIEnv *env, jclass cls, jstring jlangtag, jchar monetaryDecimalSeparator) { |
|
498 |
WCHAR buf[BUFLEN]; |
|
499 |
const jchar *langtag = (*env)->GetStringChars(env, jlangtag, JNI_FALSE); |
|
500 |
int got = getLocaleInfoWrapper(langtag, LOCALE_SMONDECIMALSEP, buf, BUFLEN); |
|
501 |
(*env)->ReleaseStringChars(env, jlangtag, langtag); |
|
502 |
||
503 |
if (got) { |
|
504 |
return buf[0]; |
|
505 |
} else { |
|
506 |
return monetaryDecimalSeparator; |
|
507 |
} |
|
508 |
} |
|
509 |
||
510 |
/* |
|
511 |
* Class: sun_util_locale_provider_HostLocaleProviderAdapterImpl |
|
512 |
* Method: getNaN |
|
513 |
* Signature: (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; |
|
514 |
*/ |
|
515 |
JNIEXPORT jstring JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getNaN |
|
516 |
(JNIEnv *env, jclass cls, jstring jlangtag, jstring nan) { |
|
517 |
WCHAR buf[BUFLEN]; |
|
518 |
const jchar *langtag = (*env)->GetStringChars(env, jlangtag, JNI_FALSE); |
|
519 |
int got = getLocaleInfoWrapper(langtag, LOCALE_SNAN, buf, BUFLEN); |
|
520 |
(*env)->ReleaseStringChars(env, jlangtag, langtag); |
|
521 |
||
522 |
if (got) { |
|
523 |
return (*env)->NewString(env, buf, wcslen(buf)); |
|
524 |
} else { |
|
525 |
return nan; |
|
526 |
} |
|
527 |
} |
|
528 |
||
529 |
/* |
|
530 |
* Class: sun_util_locale_provider_HostLocaleProviderAdapterImpl |
|
531 |
* Method: getPercent |
|
532 |
* Signature: (Ljava/lang/String;C)C |
|
533 |
*/ |
|
534 |
JNIEXPORT jchar JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getPercent |
|
535 |
(JNIEnv *env, jclass cls, jstring jlangtag, jchar percent) { |
|
536 |
WCHAR buf[BUFLEN]; |
|
537 |
const jchar *langtag = (*env)->GetStringChars(env, jlangtag, JNI_FALSE); |
|
538 |
int got = getLocaleInfoWrapper(langtag, LOCALE_SPERCENT, buf, BUFLEN); |
|
539 |
(*env)->ReleaseStringChars(env, jlangtag, langtag); |
|
540 |
||
541 |
if (got) { |
|
542 |
return buf[0]; |
|
543 |
} else { |
|
544 |
return percent; |
|
545 |
} |
|
546 |
} |
|
547 |
||
548 |
/* |
|
549 |
* Class: sun_util_locale_provider_HostLocaleProviderAdapterImpl |
|
550 |
* Method: getPerMill |
|
551 |
* Signature: (Ljava/lang/String;C)C |
|
552 |
*/ |
|
553 |
JNIEXPORT jchar JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getPerMill |
|
554 |
(JNIEnv *env, jclass cls, jstring jlangtag, jchar perMill) { |
|
555 |
WCHAR buf[BUFLEN]; |
|
556 |
const jchar *langtag = (*env)->GetStringChars(env, jlangtag, JNI_FALSE); |
|
557 |
int got = getLocaleInfoWrapper(langtag, LOCALE_SPERMILLE, buf, BUFLEN); |
|
558 |
(*env)->ReleaseStringChars(env, jlangtag, langtag); |
|
559 |
||
560 |
if (got) { |
|
561 |
return buf[0]; |
|
562 |
} else { |
|
563 |
return perMill; |
|
564 |
} |
|
565 |
} |
|
566 |
||
567 |
/* |
|
568 |
* Class: sun_util_locale_provider_HostLocaleProviderAdapterImpl |
|
569 |
* Method: getZeroDigit |
|
570 |
* Signature: (Ljava/lang/String;C)C |
|
571 |
*/ |
|
572 |
JNIEXPORT jchar JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getZeroDigit |
|
573 |
(JNIEnv *env, jclass cls, jstring jlangtag, jchar zeroDigit) { |
|
574 |
WCHAR buf[BUFLEN]; |
|
575 |
const jchar *langtag = (*env)->GetStringChars(env, jlangtag, JNI_FALSE); |
|
576 |
int got = getLocaleInfoWrapper(langtag, LOCALE_SNATIVEDIGITS, buf, BUFLEN); |
|
577 |
(*env)->ReleaseStringChars(env, jlangtag, langtag); |
|
578 |
||
579 |
if (got) { |
|
580 |
return buf[0]; |
|
581 |
} else { |
|
582 |
return zeroDigit; |
|
583 |
} |
|
584 |
} |
|
585 |
||
586 |
/* |
|
587 |
* Class: sun_util_locale_provider_HostLocaleProviderAdapterImpl |
|
588 |
* Method: getCalendarDataValue |
|
589 |
* Signature: (Ljava/lang/String;I)I |
|
590 |
*/ |
|
591 |
JNIEXPORT jint JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getCalendarDataValue |
|
592 |
(JNIEnv *env, jclass cls, jstring jlangtag, jint type) { |
|
593 |
WCHAR buf[BUFLEN]; |
|
594 |
const jchar *langtag = (*env)->GetStringChars(env, jlangtag, JNI_FALSE); |
|
595 |
int got = 0; |
|
596 |
||
597 |
switch (type) { |
|
598 |
case sun_util_locale_provider_HostLocaleProviderAdapterImpl_CD_FIRSTDAYOFWEEK: |
|
599 |
got = getLocaleInfoWrapper(langtag, LOCALE_IFIRSTDAYOFWEEK, buf, BUFLEN); |
|
600 |
break; |
|
601 |
} |
|
602 |
||
603 |
(*env)->ReleaseStringChars(env, jlangtag, langtag); |
|
604 |
||
605 |
if (got) { |
|
606 |
return _wtoi(buf); |
|
607 |
} else { |
|
608 |
return -1; |
|
609 |
} |
|
610 |
} |
|
611 |
||
612 |
int getLocaleInfoWrapper(const jchar *langtag, LCTYPE type, LPWSTR data, int buflen) { |
|
613 |
if (pGetLocaleInfoEx) { |
|
16481
8e30386cc014
8008576: Calendar mismatch using Host LocaleProviderAdapter
naoto
parents:
14028
diff
changeset
|
614 |
if (wcscmp(L"und", (LPWSTR)langtag) == 0) { |
8e30386cc014
8008576: Calendar mismatch using Host LocaleProviderAdapter
naoto
parents:
14028
diff
changeset
|
615 |
// defaults to "en" |
8e30386cc014
8008576: Calendar mismatch using Host LocaleProviderAdapter
naoto
parents:
14028
diff
changeset
|
616 |
return pGetLocaleInfoEx(L"en", type, data, buflen); |
8e30386cc014
8008576: Calendar mismatch using Host LocaleProviderAdapter
naoto
parents:
14028
diff
changeset
|
617 |
} else { |
8e30386cc014
8008576: Calendar mismatch using Host LocaleProviderAdapter
naoto
parents:
14028
diff
changeset
|
618 |
return pGetLocaleInfoEx((LPWSTR)langtag, type, data, buflen); |
8e30386cc014
8008576: Calendar mismatch using Host LocaleProviderAdapter
naoto
parents:
14028
diff
changeset
|
619 |
} |
13583 | 620 |
} else { |
621 |
// If we ever wanted to support WinXP, we will need extra module from |
|
622 |
// MS... |
|
623 |
// return GetLocaleInfo(DownlevelLocaleNameToLCID(langtag, 0), type, data, buflen); |
|
624 |
return 0; |
|
625 |
} |
|
626 |
} |
|
627 |
||
628 |
int getCalendarInfoWrapper(const jchar *langtag, CALID id, LPCWSTR reserved, CALTYPE type, LPWSTR data, int buflen, LPDWORD val) { |
|
629 |
if (pGetCalendarInfoEx) { |
|
16481
8e30386cc014
8008576: Calendar mismatch using Host LocaleProviderAdapter
naoto
parents:
14028
diff
changeset
|
630 |
if (wcscmp(L"und", (LPWSTR)langtag) == 0) { |
8e30386cc014
8008576: Calendar mismatch using Host LocaleProviderAdapter
naoto
parents:
14028
diff
changeset
|
631 |
// defaults to "en" |
8e30386cc014
8008576: Calendar mismatch using Host LocaleProviderAdapter
naoto
parents:
14028
diff
changeset
|
632 |
return pGetCalendarInfoEx(L"en", id, reserved, type, data, buflen, val); |
8e30386cc014
8008576: Calendar mismatch using Host LocaleProviderAdapter
naoto
parents:
14028
diff
changeset
|
633 |
} else { |
8e30386cc014
8008576: Calendar mismatch using Host LocaleProviderAdapter
naoto
parents:
14028
diff
changeset
|
634 |
return pGetCalendarInfoEx((LPWSTR)langtag, id, reserved, type, data, buflen, val); |
8e30386cc014
8008576: Calendar mismatch using Host LocaleProviderAdapter
naoto
parents:
14028
diff
changeset
|
635 |
} |
13583 | 636 |
} else { |
637 |
// If we ever wanted to support WinXP, we will need extra module from |
|
638 |
// MS... |
|
639 |
// return GetCalendarInfo(DownlevelLocaleNameToLCID(langtag, 0), ...); |
|
640 |
return 0; |
|
641 |
} |
|
642 |
} |
|
643 |
||
644 |
jint getCalendarID(const jchar *langtag) { |
|
645 |
WCHAR type[BUFLEN]; |
|
646 |
int got = getLocaleInfoWrapper(langtag, LOCALE_ICALENDARTYPE, type, BUFLEN); |
|
647 |
||
648 |
if (got) { |
|
649 |
return _wtoi(type); |
|
650 |
} else { |
|
651 |
return 0; |
|
652 |
} |
|
653 |
} |
|
654 |
||
655 |
void replaceCalendarArrayElems(JNIEnv *env, jstring jlangtag, jobjectArray jarray, CALTYPE* pCalTypes, int offset, int length) { |
|
656 |
WCHAR name[BUFLEN]; |
|
657 |
const jchar *langtag = (*env)->GetStringChars(env, jlangtag, JNI_FALSE); |
|
658 |
int calid = getCalendarID(langtag); |
|
659 |
||
660 |
if (calid != -1) { |
|
661 |
int i; |
|
662 |
for (i = 0; i < length; i++) { |
|
663 |
getCalendarInfoWrapper(langtag, calid, NULL, |
|
664 |
pCalTypes[i], name, BUFLEN, NULL); |
|
665 |
(*env)->SetObjectArrayElement(env, jarray, i + offset, |
|
666 |
(*env)->NewString(env, name, wcslen(name))); |
|
667 |
} |
|
668 |
} |
|
669 |
||
670 |
(*env)->ReleaseStringChars(env, jlangtag, langtag); |
|
671 |
} |
|
672 |
||
673 |
WCHAR * getNumberPattern(const jchar * langtag, const jint numberStyle) { |
|
674 |
WCHAR ret[BUFLEN]; |
|
675 |
WCHAR number[BUFLEN]; |
|
676 |
WCHAR fix[BUFLEN]; |
|
677 |
||
678 |
getFixPart(langtag, numberStyle, TRUE, TRUE, ret); // "+" |
|
679 |
getNumberPart(langtag, numberStyle, number); |
|
680 |
wcscat_s(ret, BUFLEN-wcslen(ret), number); // "+12.34" |
|
681 |
getFixPart(langtag, numberStyle, TRUE, FALSE, fix); |
|
682 |
wcscat_s(ret, BUFLEN-wcslen(ret), fix); // "+12.34$" |
|
683 |
wcscat_s(ret, BUFLEN-wcslen(ret), L";"); // "+12.34$;" |
|
684 |
getFixPart(langtag, numberStyle, FALSE, TRUE, fix); |
|
685 |
wcscat_s(ret, BUFLEN-wcslen(ret), fix); // "+12.34$;(" |
|
686 |
wcscat_s(ret, BUFLEN-wcslen(ret), number); // "+12.34$;(12.34" |
|
687 |
getFixPart(langtag, numberStyle, FALSE, FALSE, fix); |
|
688 |
wcscat_s(ret, BUFLEN-wcslen(ret), fix); // "+12.34$;(12.34$)" |
|
689 |
||
690 |
return _wcsdup(ret); |
|
691 |
} |
|
692 |
||
693 |
void getNumberPart(const jchar * langtag, const jint numberStyle, WCHAR * number) { |
|
694 |
WCHAR buf[BUFLEN]; |
|
695 |
WCHAR grouping[BUFLEN]; |
|
696 |
WCHAR fractionPattern[BUFLEN]; |
|
697 |
WCHAR * integerPattern = number; |
|
698 |
int digits; |
|
699 |
BOOL leadingZero; |
|
700 |
WCHAR * pDest; |
|
701 |
int groupingLen; |
|
702 |
||
703 |
// Get info from Windows |
|
704 |
if (numberStyle == sun_util_locale_provider_HostLocaleProviderAdapterImpl_NF_CURRENCY) { |
|
705 |
getLocaleInfoWrapper(langtag, LOCALE_ICURRDIGITS, buf, BUFLEN); |
|
706 |
} else { |
|
707 |
getLocaleInfoWrapper(langtag, LOCALE_IDIGITS, buf, BUFLEN); |
|
708 |
} |
|
709 |
if (numberStyle == sun_util_locale_provider_HostLocaleProviderAdapterImpl_NF_INTEGER) { |
|
710 |
digits = 0; |
|
711 |
} else { |
|
712 |
digits = _wtoi(buf); |
|
713 |
} |
|
714 |
getLocaleInfoWrapper(langtag, LOCALE_ILZERO, buf, BUFLEN); |
|
715 |
leadingZero = _wtoi(buf) != 0; |
|
716 |
groupingLen = getLocaleInfoWrapper(langtag, LOCALE_SGROUPING, grouping, BUFLEN); |
|
717 |
||
718 |
// fraction pattern |
|
719 |
if (digits > 0) { |
|
720 |
int i; |
|
721 |
for(i = digits; i > 0; i--) { |
|
722 |
fractionPattern[i] = L'0'; |
|
723 |
} |
|
724 |
fractionPattern[0] = L'.'; |
|
725 |
fractionPattern[digits+1] = L'\0'; |
|
726 |
} else { |
|
727 |
fractionPattern[0] = L'\0'; |
|
728 |
} |
|
729 |
||
730 |
// integer pattern |
|
731 |
pDest = integerPattern; |
|
732 |
if (groupingLen > 0) { |
|
733 |
int cur = groupingLen - 1;// subtracting null terminator |
|
734 |
while (--cur >= 0) { |
|
735 |
int repnum; |
|
736 |
||
737 |
if (grouping[cur] == L';') { |
|
738 |
continue; |
|
739 |
} |
|
740 |
||
741 |
repnum = grouping[cur] - 0x30; |
|
742 |
if (repnum > 0) { |
|
743 |
*pDest++ = L'#'; |
|
744 |
*pDest++ = L','; |
|
745 |
while(--repnum > 0) { |
|
746 |
*pDest++ = L'#'; |
|
747 |
} |
|
748 |
} |
|
749 |
} |
|
750 |
} |
|
751 |
||
752 |
if (leadingZero) { |
|
753 |
*pDest++ = L'0'; |
|
754 |
} else { |
|
755 |
*pDest++ = L'#'; |
|
756 |
} |
|
757 |
*pDest = L'\0'; |
|
758 |
||
759 |
wcscat_s(integerPattern, BUFLEN, fractionPattern); |
|
760 |
} |
|
761 |
||
762 |
void getFixPart(const jchar * langtag, const jint numberStyle, BOOL positive, BOOL prefix, WCHAR * ret) { |
|
763 |
WCHAR buf[BUFLEN]; |
|
764 |
int pattern = 0; |
|
765 |
int style = numberStyle; |
|
766 |
int got = 0; |
|
767 |
||
768 |
if (positive) { |
|
769 |
if (style == sun_util_locale_provider_HostLocaleProviderAdapterImpl_NF_CURRENCY) { |
|
770 |
got = getLocaleInfoWrapper(langtag, LOCALE_ICURRENCY, buf, BUFLEN); |
|
771 |
} else if (style == sun_util_locale_provider_HostLocaleProviderAdapterImpl_NF_PERCENT) { |
|
772 |
got = getLocaleInfoWrapper(langtag, LOCALE_IPOSITIVEPERCENT, buf, BUFLEN); |
|
773 |
} |
|
774 |
} else { |
|
775 |
if (style == sun_util_locale_provider_HostLocaleProviderAdapterImpl_NF_CURRENCY) { |
|
776 |
got = getLocaleInfoWrapper(langtag, LOCALE_INEGCURR, buf, BUFLEN); |
|
777 |
} else if (style == sun_util_locale_provider_HostLocaleProviderAdapterImpl_NF_PERCENT) { |
|
778 |
got = getLocaleInfoWrapper(langtag, LOCALE_INEGATIVEPERCENT, buf, BUFLEN); |
|
779 |
} else { |
|
780 |
got = getLocaleInfoWrapper(langtag, LOCALE_INEGNUMBER, buf, BUFLEN); |
|
781 |
} |
|
782 |
} |
|
783 |
if (got) { |
|
784 |
pattern = _wtoi(buf); |
|
785 |
} |
|
786 |
||
787 |
if (numberStyle == sun_util_locale_provider_HostLocaleProviderAdapterImpl_NF_INTEGER) { |
|
788 |
style = sun_util_locale_provider_HostLocaleProviderAdapterImpl_NF_NUMBER; |
|
789 |
} |
|
790 |
||
791 |
wcscpy(ret, fixes[!prefix][!positive][style][pattern]); |
|
792 |
} |