Merge lp:~paul-lucas/zorba/pjl-misc into lp:zorba
- pjl-misc
- Merge into trunk
Proposed by
Paul J. Lucas
Status: | Merged |
---|---|
Approved by: | Matthias Brantner |
Approved revision: | 11109 |
Merged at revision: | 11278 |
Proposed branch: | lp:~paul-lucas/zorba/pjl-misc |
Merge into: | lp:zorba |
Diff against target: |
671 lines (+318/-250) 7 files modified
include/zorba/dynamic_context.h (+21/-0) include/zorba/locale.h (+256/-0) src/api/dynamiccontextimpl.cpp (+12/-0) src/api/dynamiccontextimpl.h (+7/-0) src/context/dynamic_context.cpp (+4/-0) src/context/dynamic_context.h (+18/-0) src/zorbautils/locale.h (+0/-250) |
To merge this branch: | bzr merge lp:~paul-lucas/zorba/pjl-misc |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Matthias Brantner | Approve | ||
Paul J. Lucas | Approve | ||
Review via email: mp+152319@code.launchpad.net |
Commit message
Added locale to dynamic context. (This is needed to implement format-date() correctly.)
Description of the change
Added locale to dynamic context. (This is needed to implement format-date() correctly.)
To post a comment you must log in.
Revision history for this message
Paul J. Lucas (paul-lucas) : | # |
review:
Approve
Revision history for this message
Matthias Brantner (matthias-brantner) : | # |
review:
Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : | # |
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue job pjl-misc-
All tests succeeded!
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'include/zorba/dynamic_context.h' | |||
2 | --- include/zorba/dynamic_context.h 2013-02-07 17:24:36 +0000 | |||
3 | +++ include/zorba/dynamic_context.h 2013-03-08 04:27:22 +0000 | |||
4 | @@ -21,6 +21,7 @@ | |||
5 | 21 | #include <memory> | 21 | #include <memory> |
6 | 22 | 22 | ||
7 | 23 | #include <zorba/config.h> | 23 | #include <zorba/config.h> |
8 | 24 | #include <zorba/locale.h> | ||
9 | 24 | #include <zorba/api_shared_types.h> | 25 | #include <zorba/api_shared_types.h> |
10 | 25 | #include <zorba/static_context_consts.h> | 26 | #include <zorba/static_context_consts.h> |
11 | 26 | #include <zorba/xmldatamanager.h> | 27 | #include <zorba/xmldatamanager.h> |
12 | @@ -247,6 +248,26 @@ | |||
13 | 247 | virtual Item | 248 | virtual Item |
14 | 248 | getDefaultCollection() const = 0; | 249 | getDefaultCollection() const = 0; |
15 | 249 | 250 | ||
16 | 251 | /** \brief Sets the locale. | ||
17 | 252 | * | ||
18 | 253 | * @param aLang The language to set. | ||
19 | 254 | * @param aCountry The country to set. | ||
20 | 255 | */ | ||
21 | 256 | virtual void | ||
22 | 257 | setLocale( locale::iso639_1::type aLang, | ||
23 | 258 | locale::iso3166_1::type aCountry ) = 0; | ||
24 | 259 | |||
25 | 260 | /** \brief Gets the locale. | ||
26 | 261 | * | ||
27 | 262 | * @param aLang A pointer to a \c iso639_1::type to receive the language. | ||
28 | 263 | * If \c null, this is not set. | ||
29 | 264 | * @param aCountry A pointer to a \c iso3166_1::type to receive the country. | ||
30 | 265 | * If \c null, this is not set. | ||
31 | 266 | */ | ||
32 | 267 | virtual void | ||
33 | 268 | getLocale( locale::iso639_1::type *aLang, | ||
34 | 269 | locale::iso3166_1::type *aCountry ) const = 0; | ||
35 | 270 | |||
36 | 250 | /** \brief Add a name-value pair to this context. | 271 | /** \brief Add a name-value pair to this context. |
37 | 251 | * The value can be accessed in the evaluate method | 272 | * The value can be accessed in the evaluate method |
38 | 252 | * of external functions (see ContextualExternalFunction). | 273 | * of external functions (see ContextualExternalFunction). |
39 | 253 | 274 | ||
40 | === modified file 'include/zorba/locale.h' | |||
41 | --- include/zorba/locale.h 2013-02-07 17:24:36 +0000 | |||
42 | +++ include/zorba/locale.h 2013-03-08 04:27:22 +0000 | |||
43 | @@ -218,6 +218,262 @@ | |||
44 | 218 | }; | 218 | }; |
45 | 219 | } | 219 | } |
46 | 220 | 220 | ||
47 | 221 | /** | ||
48 | 222 | * Defines constants for all ISO 3166-1 country codes. | ||
49 | 223 | */ | ||
50 | 224 | namespace iso3166_1 { | ||
51 | 225 | enum type { | ||
52 | 226 | unknown, | ||
53 | 227 | AD, ///< Andorra | ||
54 | 228 | AE, ///< United Arab Emirates | ||
55 | 229 | AF, ///< Afghanistan | ||
56 | 230 | AG, ///< Antigua and Barbuda | ||
57 | 231 | AI, ///< Anguilla | ||
58 | 232 | AL, ///< Albania | ||
59 | 233 | AM, ///< Armenia | ||
60 | 234 | AN, ///< Netherlands Antilles | ||
61 | 235 | AO, ///< Angola | ||
62 | 236 | AQ, ///< Antarctica | ||
63 | 237 | AR, ///< Argentina | ||
64 | 238 | AS, ///< American Samoa | ||
65 | 239 | AT, ///< Austria | ||
66 | 240 | AU, ///< Australia | ||
67 | 241 | AW, ///< Aruba | ||
68 | 242 | AX, ///< Aland Islands | ||
69 | 243 | AZ, ///< Azerbaijan | ||
70 | 244 | BA, ///< Bosnia and Herzegovina | ||
71 | 245 | BB, ///< Barbados | ||
72 | 246 | BD, ///< Bangladesh | ||
73 | 247 | BE, ///< Belgium | ||
74 | 248 | BF, ///< Burkina Faso | ||
75 | 249 | BG, ///< Bulgaria | ||
76 | 250 | BH, ///< Bahrain | ||
77 | 251 | BI, ///< Burundi | ||
78 | 252 | BJ, ///< Benin | ||
79 | 253 | BL, ///< Saint Barthelemy | ||
80 | 254 | BM, ///< Bermuda | ||
81 | 255 | BN, ///< Brunei Darussalam | ||
82 | 256 | BO, ///< Bolivia | ||
83 | 257 | BR, ///< Brazil | ||
84 | 258 | BS, ///< Bahamas | ||
85 | 259 | BT, ///< Bhutan | ||
86 | 260 | BV, ///< Bouvet Island | ||
87 | 261 | BW, ///< Botswana | ||
88 | 262 | BY, ///< Belarus | ||
89 | 263 | BZ, ///< Belize | ||
90 | 264 | CA, ///< Canada | ||
91 | 265 | CC, ///< Cocos Islands | ||
92 | 266 | CD, ///< Congo | ||
93 | 267 | CF, ///< Central African Republic | ||
94 | 268 | CG, ///< Congo | ||
95 | 269 | CH, ///< Switzerland | ||
96 | 270 | CI, ///< Cote D'Ivoire | ||
97 | 271 | CK, ///< Cook Islands | ||
98 | 272 | CL, ///< Chile | ||
99 | 273 | CM, ///< Cameroon | ||
100 | 274 | CN, ///< China | ||
101 | 275 | CO, ///< Colombia | ||
102 | 276 | CR, ///< Costa Rica | ||
103 | 277 | CU, ///< Cuba | ||
104 | 278 | CV, ///< Cape Verde | ||
105 | 279 | CX, ///< Christmas Island | ||
106 | 280 | CY, ///< Cyprus | ||
107 | 281 | CZ, ///< Czech Republic | ||
108 | 282 | DE, ///< Germany | ||
109 | 283 | DJ, ///< Djibouti | ||
110 | 284 | DK, ///< Denmark | ||
111 | 285 | DM, ///< Dominica | ||
112 | 286 | DO, ///< Dominican Republic | ||
113 | 287 | DZ, ///< Algeria | ||
114 | 288 | EC, ///< Ecuador | ||
115 | 289 | EE, ///< Estonia | ||
116 | 290 | EG, ///< Egypt | ||
117 | 291 | EH, ///< Western Sahara | ||
118 | 292 | ER, ///< Eritrea | ||
119 | 293 | ES, ///< Spain | ||
120 | 294 | ET, ///< Ethiopia | ||
121 | 295 | FI, ///< Finland | ||
122 | 296 | FJ, ///< Fiji | ||
123 | 297 | FK, ///< Falkland Islands | ||
124 | 298 | FM, ///< Micronesia | ||
125 | 299 | FO, ///< Faroe Islands | ||
126 | 300 | FR, ///< France | ||
127 | 301 | GA, ///< Gabon | ||
128 | 302 | GB, ///< United Kingdom | ||
129 | 303 | GD, ///< Grenada | ||
130 | 304 | GE, ///< Georgia | ||
131 | 305 | GF, ///< French Guiana | ||
132 | 306 | GG, ///< Guernsey | ||
133 | 307 | GH, ///< Ghana | ||
134 | 308 | GI, ///< Gibraltar | ||
135 | 309 | GL, ///< Greenland | ||
136 | 310 | GM, ///< Gambia | ||
137 | 311 | GN, ///< Guinea | ||
138 | 312 | GP, ///< Guadeloupe | ||
139 | 313 | GQ, ///< Equatorial Guinea | ||
140 | 314 | GR, ///< Greece | ||
141 | 315 | GS, ///< South Georgia and the South Sandwich Islands | ||
142 | 316 | GT, ///< Guatemala | ||
143 | 317 | GU, ///< Guam | ||
144 | 318 | GW, ///< Guinea-Bissau | ||
145 | 319 | GY, ///< Guyana | ||
146 | 320 | HK, ///< Hong Kong | ||
147 | 321 | HM, ///< Heard Island and Mcdonald Islands | ||
148 | 322 | HN, ///< Honduras | ||
149 | 323 | HR, ///< Croatia | ||
150 | 324 | HT, ///< Haiti | ||
151 | 325 | HU, ///< Hungary | ||
152 | 326 | ID, ///< Indonesia | ||
153 | 327 | IE, ///< Ireland | ||
154 | 328 | IL, ///< Israel | ||
155 | 329 | IM, ///< Isle of Man | ||
156 | 330 | IN_, ///< India [without '_', it clashes with an identifier on Windows] | ||
157 | 331 | IO, ///< British Indian Ocean Territory | ||
158 | 332 | IQ, ///< Iraq | ||
159 | 333 | IR, ///< Iran | ||
160 | 334 | IS, ///< Iceland | ||
161 | 335 | IT, ///< Italy | ||
162 | 336 | JE, ///< Jersey | ||
163 | 337 | JM, ///< Jamaica | ||
164 | 338 | JO, ///< Jordan | ||
165 | 339 | JP, ///< Japan | ||
166 | 340 | KE, ///< Kenya | ||
167 | 341 | KG, ///< Kyrgyzstan | ||
168 | 342 | KH, ///< Cambodia | ||
169 | 343 | KI, ///< Kiribati | ||
170 | 344 | KM, ///< Comoros | ||
171 | 345 | KN, ///< Saint Kitts and Nevis | ||
172 | 346 | KP, ///< Korea (Democratic People's Republic) | ||
173 | 347 | KR, ///< Korea | ||
174 | 348 | KW, ///< Kuwait | ||
175 | 349 | KY, ///< Cayman Islands | ||
176 | 350 | KZ, ///< Kazakhstan | ||
177 | 351 | LA, ///< Lao | ||
178 | 352 | LB, ///< Lebanon | ||
179 | 353 | LC, ///< Saint Lucia | ||
180 | 354 | LI, ///< Liechtenstein | ||
181 | 355 | LK, ///< Sri Lanka | ||
182 | 356 | LR, ///< Liberia | ||
183 | 357 | LS, ///< Lesotho | ||
184 | 358 | LT, ///< Lithuania | ||
185 | 359 | LU, ///< Luxembourg | ||
186 | 360 | LV, ///< Latvia | ||
187 | 361 | LY, ///< Libyan Arab Jamahiriya | ||
188 | 362 | MA, ///< Morocco | ||
189 | 363 | MC, ///< Monaco | ||
190 | 364 | MD, ///< Moldova | ||
191 | 365 | ME, ///< Montenegro | ||
192 | 366 | MF, ///< Saint Martin | ||
193 | 367 | MG, ///< Madagascar | ||
194 | 368 | MH, ///< Marshall Islands | ||
195 | 369 | MK, ///< Macedonia | ||
196 | 370 | ML, ///< Mali | ||
197 | 371 | MM, ///< Myanmar | ||
198 | 372 | MN, ///< Mongolia | ||
199 | 373 | MO, ///< Macao | ||
200 | 374 | MP, ///< Northern Mariana Islands | ||
201 | 375 | MQ, ///< Martinique | ||
202 | 376 | MR, ///< Mauritania | ||
203 | 377 | MS, ///< Montserrat | ||
204 | 378 | MT, ///< Malta | ||
205 | 379 | MU, ///< Mauritius | ||
206 | 380 | MV, ///< Maldives | ||
207 | 381 | MW, ///< Malawi | ||
208 | 382 | MX, ///< Mexico | ||
209 | 383 | MY, ///< Malaysia | ||
210 | 384 | MZ, ///< Mozambique | ||
211 | 385 | NA, ///< Namibia | ||
212 | 386 | NC, ///< New Caledonia | ||
213 | 387 | NE, ///< Niger | ||
214 | 388 | NF, ///< Norfolk Island | ||
215 | 389 | NG, ///< Nigeria | ||
216 | 390 | NI, ///< Nicaragua | ||
217 | 391 | NL, ///< Netherlands | ||
218 | 392 | NO, ///< Norway | ||
219 | 393 | NP, ///< Nepal | ||
220 | 394 | NR, ///< Nauru | ||
221 | 395 | NU, ///< Niue | ||
222 | 396 | NZ, ///< New Zealand | ||
223 | 397 | OM, ///< Oman | ||
224 | 398 | PA, ///< Panama | ||
225 | 399 | PE, ///< Peru | ||
226 | 400 | PF, ///< French Polynesia | ||
227 | 401 | PG, ///< Papua New Guinea | ||
228 | 402 | PH, ///< Philippines | ||
229 | 403 | PK, ///< Pakistan | ||
230 | 404 | PL, ///< Poland | ||
231 | 405 | PM, ///< Saint Pierre and Miquelon | ||
232 | 406 | PN, ///< Pitcairn | ||
233 | 407 | PR, ///< Puerto Rico | ||
234 | 408 | PS, ///< Palestinian Territory | ||
235 | 409 | PT, ///< Portugal | ||
236 | 410 | PW, ///< Palau | ||
237 | 411 | PY, ///< Paraguay | ||
238 | 412 | QA, ///< Qatar | ||
239 | 413 | RE, ///< Reunion | ||
240 | 414 | RO, ///< Romania | ||
241 | 415 | RS, ///< Serbia | ||
242 | 416 | RU, ///< Russian Federation | ||
243 | 417 | RW, ///< Rwanda | ||
244 | 418 | SA, ///< Saudi Arabia | ||
245 | 419 | SB, ///< Solomon Islands | ||
246 | 420 | SC, ///< Seychelles | ||
247 | 421 | SD, ///< Sudan | ||
248 | 422 | SE, ///< Sweden | ||
249 | 423 | SG, ///< Singapore | ||
250 | 424 | SH, ///< Saint Helena | ||
251 | 425 | SI, ///< Slovenia | ||
252 | 426 | SJ, ///< Svalbard and Jan Mayen | ||
253 | 427 | SK, ///< Slovakia | ||
254 | 428 | SL, ///< Sierra Leone | ||
255 | 429 | SM, ///< San Marino | ||
256 | 430 | SN, ///< Senegal | ||
257 | 431 | SO, ///< Somalia | ||
258 | 432 | SR, ///< Suriname | ||
259 | 433 | ST, ///< Sao Tome and Principe | ||
260 | 434 | SV, ///< El Salvador | ||
261 | 435 | SY, ///< Syria | ||
262 | 436 | SZ, ///< Swaziland | ||
263 | 437 | TC, ///< Turks and Caicos Islands | ||
264 | 438 | TD, ///< Chad | ||
265 | 439 | TF, ///< French Southern Territories | ||
266 | 440 | TG, ///< Togo | ||
267 | 441 | TH, ///< Thailand | ||
268 | 442 | TJ, ///< Tajikistan | ||
269 | 443 | TK, ///< Tokelau | ||
270 | 444 | TL, ///< Timor-Leste | ||
271 | 445 | TM, ///< Turkmenistan | ||
272 | 446 | TN, ///< Tunisia | ||
273 | 447 | TO, ///< Tonga | ||
274 | 448 | TR, ///< Turkey | ||
275 | 449 | TT, ///< Trinidad and Tobago | ||
276 | 450 | TV, ///< Tuvalu | ||
277 | 451 | TW, ///< Taiwan | ||
278 | 452 | TZ, ///< Tanzania | ||
279 | 453 | UA, ///< Ukraine | ||
280 | 454 | UG, ///< Uganda | ||
281 | 455 | UM, ///< United States Minor Outlying Islands | ||
282 | 456 | US, ///< United States | ||
283 | 457 | UY, ///< Uruguay | ||
284 | 458 | UZ, ///< Uzbekistan | ||
285 | 459 | VA, ///< Vatican | ||
286 | 460 | VC, ///< Saint Vincent and the Grenadines | ||
287 | 461 | VE, ///< Venezuela | ||
288 | 462 | VG, ///< Virgin Islands (British) | ||
289 | 463 | VI, ///< Virgin Islands (USA) | ||
290 | 464 | VN, ///< Viet Nam | ||
291 | 465 | VU, ///< Vanuatu | ||
292 | 466 | WF, ///< Wallis and Futuna | ||
293 | 467 | WS, ///< Samoa | ||
294 | 468 | YE, ///< Yemen | ||
295 | 469 | YT, ///< Mayotte | ||
296 | 470 | ZA, ///< South Africa | ||
297 | 471 | ZM, ///< Zambia | ||
298 | 472 | ZW, ///< Zimbabwe | ||
299 | 473 | NUM_ENTRIES | ||
300 | 474 | }; | ||
301 | 475 | } | ||
302 | 476 | |||
303 | 221 | /////////////////////////////////////////////////////////////////////////// | 477 | /////////////////////////////////////////////////////////////////////////// |
304 | 222 | 478 | ||
305 | 223 | } // namespace locale | 479 | } // namespace locale |
306 | 224 | 480 | ||
307 | === modified file 'src/api/dynamiccontextimpl.cpp' | |||
308 | --- src/api/dynamiccontextimpl.cpp 2013-02-07 17:24:36 +0000 | |||
309 | +++ src/api/dynamiccontextimpl.cpp 2013-03-08 04:27:22 +0000 | |||
310 | @@ -675,6 +675,18 @@ | |||
311 | 675 | return Item(); | 675 | return Item(); |
312 | 676 | } | 676 | } |
313 | 677 | 677 | ||
314 | 678 | /****************************************************************************//** | ||
315 | 679 | |||
316 | 680 | ********************************************************************************/ | ||
317 | 681 | void DynamicContextImpl::setLocale( locale::iso639_1::type aLang, | ||
318 | 682 | locale::iso3166_1::type aCountry ) { | ||
319 | 683 | theCtx->set_locale( aLang, aCountry ); | ||
320 | 684 | } | ||
321 | 685 | |||
322 | 686 | void DynamicContextImpl::getLocale( locale::iso639_1::type *aLang, | ||
323 | 687 | locale::iso3166_1::type *aCountry ) const { | ||
324 | 688 | theCtx->get_locale( aLang, aCountry ); | ||
325 | 689 | } | ||
326 | 678 | 690 | ||
327 | 679 | /****************************************************************************//** | 691 | /****************************************************************************//** |
328 | 680 | 692 | ||
329 | 681 | 693 | ||
330 | === modified file 'src/api/dynamiccontextimpl.h' | |||
331 | --- src/api/dynamiccontextimpl.h 2013-02-07 17:24:36 +0000 | |||
332 | +++ src/api/dynamiccontextimpl.h 2013-03-08 04:27:22 +0000 | |||
333 | @@ -144,6 +144,13 @@ | |||
334 | 144 | virtual Item | 144 | virtual Item |
335 | 145 | getDefaultCollection() const; | 145 | getDefaultCollection() const; |
336 | 146 | 146 | ||
337 | 147 | virtual void | ||
338 | 148 | setLocale( locale::iso639_1::type aLang, locale::iso3166_1::type aCountry ); | ||
339 | 149 | |||
340 | 150 | virtual void | ||
341 | 151 | getLocale( locale::iso639_1::type *aLang, | ||
342 | 152 | locale::iso3166_1::type *aCountry ) const; | ||
343 | 153 | |||
344 | 147 | virtual bool | 154 | virtual bool |
345 | 148 | addExternalFunctionParam(const String& aName, void* aValue); | 155 | addExternalFunctionParam(const String& aName, void* aValue); |
346 | 149 | 156 | ||
347 | 150 | 157 | ||
348 | === modified file 'src/context/dynamic_context.cpp' | |||
349 | --- src/context/dynamic_context.cpp 2013-02-26 04:12:43 +0000 | |||
350 | +++ src/context/dynamic_context.cpp 2013-03-08 04:27:22 +0000 | |||
351 | @@ -135,12 +135,16 @@ | |||
352 | 135 | if(parent == NULL) | 135 | if(parent == NULL) |
353 | 136 | { | 136 | { |
354 | 137 | reset_current_date_time(); | 137 | reset_current_date_time(); |
355 | 138 | theLang = locale::get_host_lang(); | ||
356 | 139 | theCountry = locale::get_host_country(); | ||
357 | 138 | } | 140 | } |
358 | 139 | else | 141 | else |
359 | 140 | { | 142 | { |
360 | 141 | theCurrentDateTime = parent->theCurrentDateTime; | 143 | theCurrentDateTime = parent->theCurrentDateTime; |
361 | 142 | theTimezone = parent->theTimezone; | 144 | theTimezone = parent->theTimezone; |
362 | 143 | theDefaultCollectionUri = parent->theDefaultCollectionUri; | 145 | theDefaultCollectionUri = parent->theDefaultCollectionUri; |
363 | 146 | theLang = parent->theLang; | ||
364 | 147 | theCountry = parent->theCountry; | ||
365 | 144 | } | 148 | } |
366 | 145 | } | 149 | } |
367 | 146 | 150 | ||
368 | 147 | 151 | ||
369 | === modified file 'src/context/dynamic_context.h' | |||
370 | --- src/context/dynamic_context.h 2013-02-07 17:24:36 +0000 | |||
371 | +++ src/context/dynamic_context.h 2013-03-08 04:27:22 +0000 | |||
372 | @@ -21,6 +21,7 @@ | |||
373 | 21 | 21 | ||
374 | 22 | #include "zorbautils/hashmap_zstring.h" | 22 | #include "zorbautils/hashmap_zstring.h" |
375 | 23 | #include "zorbautils/hashmap_itemp.h" | 23 | #include "zorbautils/hashmap_itemp.h" |
376 | 24 | #include "zorbautils/locale.h" | ||
377 | 24 | 25 | ||
378 | 25 | #include "common/shared_types.h" | 26 | #include "common/shared_types.h" |
379 | 26 | 27 | ||
380 | @@ -138,6 +139,9 @@ | |||
381 | 138 | //MODIFY | 139 | //MODIFY |
382 | 139 | EnvVarMap * theEnvironmentVariables; | 140 | EnvVarMap * theEnvironmentVariables; |
383 | 140 | 141 | ||
384 | 142 | locale::iso639_1::type theLang; | ||
385 | 143 | locale::iso3166_1::type theCountry; | ||
386 | 144 | |||
387 | 141 | public: | 145 | public: |
388 | 142 | double theDocLoadingUserTime; | 146 | double theDocLoadingUserTime; |
389 | 143 | double theDocLoadingTime; | 147 | double theDocLoadingTime; |
390 | @@ -171,6 +175,20 @@ | |||
391 | 171 | 175 | ||
392 | 172 | long get_implicit_timezone() const; | 176 | long get_implicit_timezone() const; |
393 | 173 | 177 | ||
394 | 178 | void set_locale( locale::iso639_1::type lang, | ||
395 | 179 | locale::iso3166_1::type country ) { | ||
396 | 180 | theLang = lang; | ||
397 | 181 | theCountry = country; | ||
398 | 182 | } | ||
399 | 183 | |||
400 | 184 | void get_locale( locale::iso639_1::type *lang, | ||
401 | 185 | locale::iso3166_1::type *country ) { | ||
402 | 186 | if ( lang ) | ||
403 | 187 | *lang = theLang; | ||
404 | 188 | if ( country ) | ||
405 | 189 | *country = theCountry; | ||
406 | 190 | } | ||
407 | 191 | |||
408 | 174 | const std::vector<VarValue>& get_variables() const { return theVarValues; } | 192 | const std::vector<VarValue>& get_variables() const { return theVarValues; } |
409 | 175 | 193 | ||
410 | 176 | void add_variable(ulong varid, store::Item_t& value); | 194 | void add_variable(ulong varid, store::Item_t& value); |
411 | 177 | 195 | ||
412 | === modified file 'src/zorbautils/locale.h' | |||
413 | --- src/zorbautils/locale.h 2013-02-07 17:24:36 +0000 | |||
414 | +++ src/zorbautils/locale.h 2013-03-08 04:27:22 +0000 | |||
415 | @@ -30,256 +30,6 @@ | |||
416 | 30 | /////////////////////////////////////////////////////////////////////////// | 30 | /////////////////////////////////////////////////////////////////////////// |
417 | 31 | 31 | ||
418 | 32 | namespace iso3166_1 { | 32 | namespace iso3166_1 { |
419 | 33 | enum type { | ||
420 | 34 | unknown, | ||
421 | 35 | AD, ///< Andorra | ||
422 | 36 | AE, ///< United Arab Emirates | ||
423 | 37 | AF, ///< Afghanistan | ||
424 | 38 | AG, ///< Antigua and Barbuda | ||
425 | 39 | AI, ///< Anguilla | ||
426 | 40 | AL, ///< Albania | ||
427 | 41 | AM, ///< Armenia | ||
428 | 42 | AN, ///< Netherlands Antilles | ||
429 | 43 | AO, ///< Angola | ||
430 | 44 | AQ, ///< Antarctica | ||
431 | 45 | AR, ///< Argentina | ||
432 | 46 | AS, ///< American Samoa | ||
433 | 47 | AT, ///< Austria | ||
434 | 48 | AU, ///< Australia | ||
435 | 49 | AW, ///< Aruba | ||
436 | 50 | AX, ///< Aland Islands | ||
437 | 51 | AZ, ///< Azerbaijan | ||
438 | 52 | BA, ///< Bosnia and Herzegovina | ||
439 | 53 | BB, ///< Barbados | ||
440 | 54 | BD, ///< Bangladesh | ||
441 | 55 | BE, ///< Belgium | ||
442 | 56 | BF, ///< Burkina Faso | ||
443 | 57 | BG, ///< Bulgaria | ||
444 | 58 | BH, ///< Bahrain | ||
445 | 59 | BI, ///< Burundi | ||
446 | 60 | BJ, ///< Benin | ||
447 | 61 | BL, ///< Saint Barthelemy | ||
448 | 62 | BM, ///< Bermuda | ||
449 | 63 | BN, ///< Brunei Darussalam | ||
450 | 64 | BO, ///< Bolivia | ||
451 | 65 | BR, ///< Brazil | ||
452 | 66 | BS, ///< Bahamas | ||
453 | 67 | BT, ///< Bhutan | ||
454 | 68 | BV, ///< Bouvet Island | ||
455 | 69 | BW, ///< Botswana | ||
456 | 70 | BY, ///< Belarus | ||
457 | 71 | BZ, ///< Belize | ||
458 | 72 | CA, ///< Canada | ||
459 | 73 | CC, ///< Cocos Islands | ||
460 | 74 | CD, ///< Congo | ||
461 | 75 | CF, ///< Central African Republic | ||
462 | 76 | CG, ///< Congo | ||
463 | 77 | CH, ///< Switzerland | ||
464 | 78 | CI, ///< Cote D'Ivoire | ||
465 | 79 | CK, ///< Cook Islands | ||
466 | 80 | CL, ///< Chile | ||
467 | 81 | CM, ///< Cameroon | ||
468 | 82 | CN, ///< China | ||
469 | 83 | CO, ///< Colombia | ||
470 | 84 | CR, ///< Costa Rica | ||
471 | 85 | CU, ///< Cuba | ||
472 | 86 | CV, ///< Cape Verde | ||
473 | 87 | CX, ///< Christmas Island | ||
474 | 88 | CY, ///< Cyprus | ||
475 | 89 | CZ, ///< Czech Republic | ||
476 | 90 | DE, ///< Germany | ||
477 | 91 | DJ, ///< Djibouti | ||
478 | 92 | DK, ///< Denmark | ||
479 | 93 | DM, ///< Dominica | ||
480 | 94 | DO, ///< Dominican Republic | ||
481 | 95 | DZ, ///< Algeria | ||
482 | 96 | EC, ///< Ecuador | ||
483 | 97 | EE, ///< Estonia | ||
484 | 98 | EG, ///< Egypt | ||
485 | 99 | EH, ///< Western Sahara | ||
486 | 100 | ER, ///< Eritrea | ||
487 | 101 | ES, ///< Spain | ||
488 | 102 | ET, ///< Ethiopia | ||
489 | 103 | FI, ///< Finland | ||
490 | 104 | FJ, ///< Fiji | ||
491 | 105 | FK, ///< Falkland Islands | ||
492 | 106 | FM, ///< Micronesia | ||
493 | 107 | FO, ///< Faroe Islands | ||
494 | 108 | FR, ///< France | ||
495 | 109 | GA, ///< Gabon | ||
496 | 110 | GB, ///< United Kingdom | ||
497 | 111 | GD, ///< Grenada | ||
498 | 112 | GE, ///< Georgia | ||
499 | 113 | GF, ///< French Guiana | ||
500 | 114 | GG, ///< Guernsey | ||
501 | 115 | GH, ///< Ghana | ||
502 | 116 | GI, ///< Gibraltar | ||
503 | 117 | GL, ///< Greenland | ||
504 | 118 | GM, ///< Gambia | ||
505 | 119 | GN, ///< Guinea | ||
506 | 120 | GP, ///< Guadeloupe | ||
507 | 121 | GQ, ///< Equatorial Guinea | ||
508 | 122 | GR, ///< Greece | ||
509 | 123 | GS, ///< South Georgia and the South Sandwich Islands | ||
510 | 124 | GT, ///< Guatemala | ||
511 | 125 | GU, ///< Guam | ||
512 | 126 | GW, ///< Guinea-Bissau | ||
513 | 127 | GY, ///< Guyana | ||
514 | 128 | HK, ///< Hong Kong | ||
515 | 129 | HM, ///< Heard Island and Mcdonald Islands | ||
516 | 130 | HN, ///< Honduras | ||
517 | 131 | HR, ///< Croatia | ||
518 | 132 | HT, ///< Haiti | ||
519 | 133 | HU, ///< Hungary | ||
520 | 134 | ID, ///< Indonesia | ||
521 | 135 | IE, ///< Ireland | ||
522 | 136 | IL, ///< Israel | ||
523 | 137 | IM, ///< Isle of Man | ||
524 | 138 | IN_, ///< India [without '_', it clashes with an identifier on Windows] | ||
525 | 139 | IO, ///< British Indian Ocean Territory | ||
526 | 140 | IQ, ///< Iraq | ||
527 | 141 | IR, ///< Iran | ||
528 | 142 | IS, ///< Iceland | ||
529 | 143 | IT, ///< Italy | ||
530 | 144 | JE, ///< Jersey | ||
531 | 145 | JM, ///< Jamaica | ||
532 | 146 | JO, ///< Jordan | ||
533 | 147 | JP, ///< Japan | ||
534 | 148 | KE, ///< Kenya | ||
535 | 149 | KG, ///< Kyrgyzstan | ||
536 | 150 | KH, ///< Cambodia | ||
537 | 151 | KI, ///< Kiribati | ||
538 | 152 | KM, ///< Comoros | ||
539 | 153 | KN, ///< Saint Kitts and Nevis | ||
540 | 154 | KP, ///< Korea (Democratic People's Republic) | ||
541 | 155 | KR, ///< Korea | ||
542 | 156 | KW, ///< Kuwait | ||
543 | 157 | KY, ///< Cayman Islands | ||
544 | 158 | KZ, ///< Kazakhstan | ||
545 | 159 | LA, ///< Lao | ||
546 | 160 | LB, ///< Lebanon | ||
547 | 161 | LC, ///< Saint Lucia | ||
548 | 162 | LI, ///< Liechtenstein | ||
549 | 163 | LK, ///< Sri Lanka | ||
550 | 164 | LR, ///< Liberia | ||
551 | 165 | LS, ///< Lesotho | ||
552 | 166 | LT, ///< Lithuania | ||
553 | 167 | LU, ///< Luxembourg | ||
554 | 168 | LV, ///< Latvia | ||
555 | 169 | LY, ///< Libyan Arab Jamahiriya | ||
556 | 170 | MA, ///< Morocco | ||
557 | 171 | MC, ///< Monaco | ||
558 | 172 | MD, ///< Moldova | ||
559 | 173 | ME, ///< Montenegro | ||
560 | 174 | MF, ///< Saint Martin | ||
561 | 175 | MG, ///< Madagascar | ||
562 | 176 | MH, ///< Marshall Islands | ||
563 | 177 | MK, ///< Macedonia | ||
564 | 178 | ML, ///< Mali | ||
565 | 179 | MM, ///< Myanmar | ||
566 | 180 | MN, ///< Mongolia | ||
567 | 181 | MO, ///< Macao | ||
568 | 182 | MP, ///< Northern Mariana Islands | ||
569 | 183 | MQ, ///< Martinique | ||
570 | 184 | MR, ///< Mauritania | ||
571 | 185 | MS, ///< Montserrat | ||
572 | 186 | MT, ///< Malta | ||
573 | 187 | MU, ///< Mauritius | ||
574 | 188 | MV, ///< Maldives | ||
575 | 189 | MW, ///< Malawi | ||
576 | 190 | MX, ///< Mexico | ||
577 | 191 | MY, ///< Malaysia | ||
578 | 192 | MZ, ///< Mozambique | ||
579 | 193 | NA, ///< Namibia | ||
580 | 194 | NC, ///< New Caledonia | ||
581 | 195 | NE, ///< Niger | ||
582 | 196 | NF, ///< Norfolk Island | ||
583 | 197 | NG, ///< Nigeria | ||
584 | 198 | NI, ///< Nicaragua | ||
585 | 199 | NL, ///< Netherlands | ||
586 | 200 | NO, ///< Norway | ||
587 | 201 | NP, ///< Nepal | ||
588 | 202 | NR, ///< Nauru | ||
589 | 203 | NU, ///< Niue | ||
590 | 204 | NZ, ///< New Zealand | ||
591 | 205 | OM, ///< Oman | ||
592 | 206 | PA, ///< Panama | ||
593 | 207 | PE, ///< Peru | ||
594 | 208 | PF, ///< French Polynesia | ||
595 | 209 | PG, ///< Papua New Guinea | ||
596 | 210 | PH, ///< Philippines | ||
597 | 211 | PK, ///< Pakistan | ||
598 | 212 | PL, ///< Poland | ||
599 | 213 | PM, ///< Saint Pierre and Miquelon | ||
600 | 214 | PN, ///< Pitcairn | ||
601 | 215 | PR, ///< Puerto Rico | ||
602 | 216 | PS, ///< Palestinian Territory | ||
603 | 217 | PT, ///< Portugal | ||
604 | 218 | PW, ///< Palau | ||
605 | 219 | PY, ///< Paraguay | ||
606 | 220 | QA, ///< Qatar | ||
607 | 221 | RE, ///< Reunion | ||
608 | 222 | RO, ///< Romania | ||
609 | 223 | RS, ///< Serbia | ||
610 | 224 | RU, ///< Russian Federation | ||
611 | 225 | RW, ///< Rwanda | ||
612 | 226 | SA, ///< Saudi Arabia | ||
613 | 227 | SB, ///< Solomon Islands | ||
614 | 228 | SC, ///< Seychelles | ||
615 | 229 | SD, ///< Sudan | ||
616 | 230 | SE, ///< Sweden | ||
617 | 231 | SG, ///< Singapore | ||
618 | 232 | SH, ///< Saint Helena | ||
619 | 233 | SI, ///< Slovenia | ||
620 | 234 | SJ, ///< Svalbard and Jan Mayen | ||
621 | 235 | SK, ///< Slovakia | ||
622 | 236 | SL, ///< Sierra Leone | ||
623 | 237 | SM, ///< San Marino | ||
624 | 238 | SN, ///< Senegal | ||
625 | 239 | SO, ///< Somalia | ||
626 | 240 | SR, ///< Suriname | ||
627 | 241 | ST, ///< Sao Tome and Principe | ||
628 | 242 | SV, ///< El Salvador | ||
629 | 243 | SY, ///< Syria | ||
630 | 244 | SZ, ///< Swaziland | ||
631 | 245 | TC, ///< Turks and Caicos Islands | ||
632 | 246 | TD, ///< Chad | ||
633 | 247 | TF, ///< French Southern Territories | ||
634 | 248 | TG, ///< Togo | ||
635 | 249 | TH, ///< Thailand | ||
636 | 250 | TJ, ///< Tajikistan | ||
637 | 251 | TK, ///< Tokelau | ||
638 | 252 | TL, ///< Timor-Leste | ||
639 | 253 | TM, ///< Turkmenistan | ||
640 | 254 | TN, ///< Tunisia | ||
641 | 255 | TO, ///< Tonga | ||
642 | 256 | TR, ///< Turkey | ||
643 | 257 | TT, ///< Trinidad and Tobago | ||
644 | 258 | TV, ///< Tuvalu | ||
645 | 259 | TW, ///< Taiwan | ||
646 | 260 | TZ, ///< Tanzania | ||
647 | 261 | UA, ///< Ukraine | ||
648 | 262 | UG, ///< Uganda | ||
649 | 263 | UM, ///< United States Minor Outlying Islands | ||
650 | 264 | US, ///< United States | ||
651 | 265 | UY, ///< Uruguay | ||
652 | 266 | UZ, ///< Uzbekistan | ||
653 | 267 | VA, ///< Vatican | ||
654 | 268 | VC, ///< Saint Vincent and the Grenadines | ||
655 | 269 | VE, ///< Venezuela | ||
656 | 270 | VG, ///< Virgin Islands (British) | ||
657 | 271 | VI, ///< Virgin Islands (USA) | ||
658 | 272 | VN, ///< Viet Nam | ||
659 | 273 | VU, ///< Vanuatu | ||
660 | 274 | WF, ///< Wallis and Futuna | ||
661 | 275 | WS, ///< Samoa | ||
662 | 276 | YE, ///< Yemen | ||
663 | 277 | YT, ///< Mayotte | ||
664 | 278 | ZA, ///< South Africa | ||
665 | 279 | ZM, ///< Zambia | ||
666 | 280 | ZW, ///< Zimbabwe | ||
667 | 281 | NUM_ENTRIES | ||
668 | 282 | }; | ||
669 | 283 | extern char const *const string_of[]; | 33 | extern char const *const string_of[]; |
670 | 284 | 34 | ||
671 | 285 | /** | 35 | /** |
Validation queue starting for merge proposal. zorbatest. lambda. nu:8080/ remotequeue/ pjl-misc- 2013-03- 08T05-00- 48.853Z/ log.html
Log at: http://