add casts to zune macros to silence some warnings
[tangerine.git] / workbench / libs / locale / english.c
blobe1e9e819bfefc014b488acacfa7729d48f298b8d
1 /*
2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: english.language description file.
6 Lang: english
7 */
9 #include <exec/types.h>
10 #include <libraries/locale.h>
12 #include <proto/exec.h>
13 #include <aros/asmcall.h>
14 #include <aros/libcall.h>
18 This is the language implementation for the default .language, the
19 English language based on the ISO-8859-1 (ECMA Latin 1) code table.
21 This code can also be used to create other .languages.
23 Languages using the same code table could be implemented by reusing
24 the code for GetLangString, StrCompare, and StrConvert, and redefining
25 the language character order tables and the language strings. For all
26 other functions the english code could be allowed to do all the work
27 (see Mask() function).
29 Languages even using the same character order could be implemented by
30 reusing the code for GetLangString and only redefining the language
31 strings.
32 ("Character order" refers to the alphabet. However, it also concerns the
33 the way characters outside the alphabet should be ordered, and how
34 characters with accents should mix with "regular"characters. If you're
35 defining a custom .languages to change the sorting behaviour of the OS,
36 then you're changing its character order.)
38 Languages using a different code table of one-byte characters, like
39 other ISO-8859 pages, could be implemented by reusing the code for all
40 functions, and just redefining the tables and strings according to
41 code table and language to implement.
43 (There's no need to actually change anything in the functions in any of
44 these cases; it's just necessary to reuse them as access-functions for
45 the tables since locale.library currently has no mechanism for just
46 passing code tables or language tables. That's why you also don't have
47 to include the code table arrays if none of the code-table functions
48 are reused. Likewise, for a language using the same character order the
49 only required table is the one including the language strings.)
51 Most functions should be adaptable to multi-byte characters with very
52 few alterations.
56 /* Code table arrays for character type/conversion.
57 The arrays defined later are those valid for ISO 8859/1.
59 extern const UWORD __code_table_ctype[];
60 extern const ULONG __code_table_to_lower[];
61 extern const ULONG __code_table_to_upper[];
62 #define __CODE_TABLE_SIZE 256
65 /* Language arrays.
66 The arrays defined later are valid for "english.language" only.
68 extern const STRPTR __language_strings[];
69 extern const ULONG __language_short_order_tab[];
70 extern const ULONG __language_long_order_tab[];
71 extern ULONG AROS_SLIB_ENTRY( null, Locale)();
74 /* We use these in the code table ctype array to indicate the types that a
75 character belongs to, and test against them in the IsXXXXX functions.
76 They're not a requirement, though. If you implement your own IsXXXX
77 functions you can do as you see fit.
78 Note, however, that the code table functions in this file ought to be
79 valid for any code table with single-byte characters. Replacing the
80 values in the code table arrays ought to be enough to provide a language
81 with support for a different code table.
83 #define iAlpha (1 << 0) /* Alphabetical characters */
84 #define iCntrl (1 << 1) /* A control character */
85 #define iDigit (1 << 2) /* Digit */
86 #define iGraph (1 << 3) /* Graphical */
87 #define iLower (1 << 4) /* Lower case alphabetical */
88 #define iPrint (1 << 5) /* Printable */
89 #define iPunct (1 << 6) /* Punctuation */
90 #define iSpace (1 << 7) /* Whitespace */
91 #define iUpper (1 << 8) /* Upper case */
92 #define iXDigit (1 << 9) /* Hexadecimal digit */
94 /* This is not in the array. It's only used for testing against:
96 #define iAlNum (iAlpha | iDigit) /* Alphanumerical character. */
99 /* ------------------------------------------------------------------
100 Language Functions
101 ------------------------------------------------------------------ */
103 /* ULONG ConvToLower(ULONG char): Language function 0
104 This function converts the character char to the equivalent
105 lower case value.
107 AROS_LH1(ULONG, convtolower,
108 AROS_LHA(ULONG, chr, D0),
109 struct LocaleBase *, LocaleBase, 6, english)
111 AROS_LIBFUNC_INIT
113 /* For compatability we have to use only lower byte, and preserve upper word! */
114 return ((chr & ~0xFFFF) + __code_table_to_lower[(UBYTE)chr]);
116 AROS_LIBFUNC_EXIT
119 /* ULONG ConvToUpper(ULONG char): Language Function 1
120 This function converts the character char to the equivalent
121 upper case character.
123 AROS_LH1(ULONG, convtoupper,
124 AROS_LHA(ULONG, chr, D0),
125 struct LocaleBase *, LocaleBase, 7, english)
127 AROS_LIBFUNC_INIT
129 /* For compatability we have to use only lower byte, and preserve upper word! */
130 return ((chr & ~0xFFFF) + __code_table_to_upper[(UBYTE)chr]);
132 AROS_LIBFUNC_EXIT
135 /* STRPTR GetLangString(ULONG num): Language function 3
136 This function is called by GetLocaleStr() and should return
137 the string matching the string id passed in as num.
139 AROS_LH1(STRPTR, getlangstring,
140 AROS_LHA(ULONG, id, D0),
141 struct LocaleBase *, LocaleBase, 9, english)
143 AROS_LIBFUNC_INIT
145 if(id < MAXSTRMSG)
146 return __language_strings[id];
147 else
148 return NULL;
150 AROS_LIBFUNC_EXIT
153 /* BOOL IsXXXXX(ULONG char): Language functions 4-14
154 These function are the same as the ANSI C isxxxxx() functions,
155 however these will pay extra attention to the current language.
157 This gives the advantage of allowing different character sets.
158 Of course, this would also require using the relevant fonts, since
159 without those the effects would be quite peculiar.
162 AROS_LH1(ULONG, isalnum,
163 AROS_LHA(ULONG, chr, D0),
164 struct LocaleBase *, LocaleBase, 10, english)
166 AROS_LIBFUNC_INIT
168 /* For compatability we have to use only lower byte, and preserve upper word! */
169 return ((chr & ~0xFFFF) + (__code_table_ctype[(UBYTE)chr] & iAlNum));
171 AROS_LIBFUNC_EXIT
174 AROS_LH1(ULONG, isalpha,
175 AROS_LHA(ULONG, chr, D0),
176 struct LocaleBase *, LocaleBase, 11, english)
178 AROS_LIBFUNC_INIT
180 /* For compatability we have to use only lower byte, and preserve upper word! */
181 return ((chr & ~0xFFFF) + (__code_table_ctype[(UBYTE)chr] & iAlpha));
183 AROS_LIBFUNC_EXIT
186 AROS_LH1(ULONG, iscntrl,
187 AROS_LHA(ULONG, chr, D0),
188 struct LocaleBase *, LocaleBase, 12, english)
190 AROS_LIBFUNC_INIT
192 /* For compatability we have to use only lower byte, and preserve upper word! */
193 return ((chr & ~0xFFFF) + (__code_table_ctype[(UBYTE)chr] & iCntrl));
195 AROS_LIBFUNC_EXIT
198 AROS_LH1(ULONG, isdigit,
199 AROS_LHA(ULONG, chr, D0),
200 struct LocaleBase *, LocaleBase, 13, english)
202 AROS_LIBFUNC_INIT
204 /* For compatability we have to use only lower byte, and preserve upper word! */
205 return ((chr & ~0xFFFF) + (__code_table_ctype[(UBYTE)chr] & iDigit));
207 AROS_LIBFUNC_EXIT
210 AROS_LH1(ULONG, isgraph,
211 AROS_LHA(ULONG, chr, D0),
212 struct LocaleBase *, LocaleBase, 14, english)
214 AROS_LIBFUNC_INIT
216 /* For compatability we have to use only lower byte, and preserve upper word! */
217 return ((chr & ~0xFFFF) + (__code_table_ctype[(UBYTE)chr] & iGraph));
219 AROS_LIBFUNC_EXIT
222 AROS_LH1(ULONG, islower,
223 AROS_LHA(ULONG, chr, D0),
224 struct LocaleBase *, LocaleBase, 15, english)
226 AROS_LIBFUNC_INIT
228 /* For compatability we have to use only lower byte, and preserve upper word! */
229 return ((chr & ~0xFFFF) + (__code_table_ctype[(UBYTE)chr] & iLower));
231 AROS_LIBFUNC_EXIT
234 AROS_LH1(ULONG, isprint,
235 AROS_LHA(ULONG, chr, D0),
236 struct LocaleBase *, LocaleBase, 16, english)
238 AROS_LIBFUNC_INIT
240 /* For compatability we have to use only lower byte, and preserve upper word! */
241 return ((chr & ~0xFFFF) + (__code_table_ctype[(UBYTE)chr] & iPrint));
243 AROS_LIBFUNC_EXIT
246 AROS_LH1(ULONG, ispunct,
247 AROS_LHA(ULONG, chr, D0),
248 struct LocaleBase *, LocaleBase, 17, english)
250 AROS_LIBFUNC_INIT
252 /* For compatability we have to use only lower byte, and preserve upper word! */
253 return ((chr & ~0xFFFF) + (__code_table_ctype[(UBYTE)chr] & iPunct));
255 AROS_LIBFUNC_EXIT
258 AROS_LH1(ULONG, isspace,
259 AROS_LHA(ULONG, chr, D0),
260 struct LocaleBase *, LocaleBase, 18, english)
262 AROS_LIBFUNC_INIT
264 /* For compatability we have to use only lower byte, and preserve upper word! */
265 return ((chr & ~0xFFFF) + (__code_table_ctype[(UBYTE)chr] & iSpace));
267 AROS_LIBFUNC_EXIT
270 AROS_LH1(ULONG, isupper,
271 AROS_LHA(ULONG, chr, D0),
272 struct LocaleBase *, LocaleBase, 19, english)
274 AROS_LIBFUNC_INIT
276 /* For compatability we have to use only lower byte, and preserve upper word! */
277 return ((chr & ~0xFFFF) + (__code_table_ctype[(UBYTE)chr] & iUpper));
279 AROS_LIBFUNC_EXIT
282 AROS_LH1(ULONG, isxdigit,
283 AROS_LHA(ULONG, chr, D0),
284 struct LocaleBase *, LocaleBase, 20, english)
286 AROS_LIBFUNC_INIT
288 /* For compatability we have to use only lower byte, and preserve upper word! */
289 return ((chr & ~0xFFFF) + (__code_table_ctype[(UBYTE)chr] & iXDigit));
291 AROS_LIBFUNC_EXIT
296 /* ULONG strconvert(STRPTR s1, STRPTR s2, ULONG len, ULONG typ): LF 15
297 This function will convert a string to automatically use the
298 character order table. This is a bit dodgy in the opinion of some
299 developers. However, the ANSI people saw this differently ...
301 Since comparing pre-converted strings is not faster than comparing
302 the strings themselves there should be very little reason to ever
303 do this.
305 AROS_LH4(ULONG, strconvert,
306 AROS_LHA(STRPTR, string1, A1),
307 AROS_LHA(STRPTR, string2, A2),
308 AROS_LHA(ULONG, length, D0),
309 AROS_LHA(ULONG, type, D1),
310 struct LocaleBase *, LocaleBase, 21, english)
312 AROS_LIBFUNC_INIT
314 ULONG count = 0;
315 const ULONG *collTab;
317 if (type == SC_ASCII)
318 collTab = __code_table_to_upper;
319 else if (type == SC_COLLATE1)
320 collTab = __language_short_order_tab;
321 else if (type == SC_COLLATE2)
322 collTab = __language_long_order_tab;
323 else /* Wrong argument: */
324 return 0;
326 if (length && string2)
328 while(--length && *string1)
330 *string2++ = collTab[ (UBYTE)*string1 ];
331 count++;
333 *string2 = '\0';
336 return count;
338 AROS_LIBFUNC_EXIT
341 /* LONG strcompare(STRPTR s1, STRPTR s2, LONG len, ULONG typ): LF 16
342 This function will do the comparison using either plain ASCII
343 or the collation (character order) information. This is explained in
344 more detail in the data file, or in the autodoc...
346 AROS_LH4(LONG, strcompare,
347 AROS_LHA(STRPTR, string1, A1),
348 AROS_LHA(STRPTR, string2, A2),
349 AROS_LHA(LONG, length, D0),
350 AROS_LHA(ULONG, type, D1),
351 struct LocaleBase *, LocaleBase, 22, english)
353 AROS_LIBFUNC_INIT
355 if (string1 && string2)
356 { const ULONG *collTab;
357 ULONG a= 0;
359 /* Determine which collation table to use... */
360 if (type == SC_ASCII)
361 collTab = __code_table_to_upper;
362 else if (type == SC_COLLATE1)
363 collTab = __language_short_order_tab;
364 else if (type == SC_COLLATE2)
365 collTab = __language_long_order_tab;
366 else /* Wrong argument: */
367 return 0;
369 while ( length--
370 && ! (a= ( collTab[(UBYTE)*string1]
371 - collTab[(UBYTE)*(string2++)]))
372 && *string1++ );
374 return a;
376 else if (length)
378 if (string1 && *string1)
379 return 1; /* String1 exists therefore is bigger. */
380 if (string2 && *string2)
381 return -1; /* String2 exists therefore is bigger. */
384 return 0; /* Equal for the 0 characters we compared. */
386 AROS_LIBFUNC_EXIT
389 /* -----------------------------------------------------------------------
390 Library function table - you will need to alter this to indicate a
391 different language.
392 (It's right here at the end of the library so that there's no need for
393 function-prototypes. Using prototypes would also be OK, though.)
394 ----------------------------------------------------------------------- */
396 #ifdef __MORPHOS__
397 #define Xj(a,b) a##b
398 #define TRAPIT(n,s) \
399 struct EmulLibEntry Xj(LIB_##n,_Gate) = { TRAP_LIB, 0, (void (*)(void)) LIB_##n }
400 #define AROS_SLIB_ENTRY_GATED(n,s) Xj(LIB_##n,_Gate)
402 /* 0 - 3 */
403 TRAPIT(convtolower, english);
404 TRAPIT(convtoupper, english);
405 TRAPIT(null, Locale);
406 TRAPIT(getlangstring, english);
408 /* 4 - 7 */
409 TRAPIT(isalnum, english);
410 TRAPIT(isalpha, english);
411 TRAPIT(iscntrl, english);
412 TRAPIT(isdigit, english);
414 /* 8 - 11 */
415 TRAPIT(isgraph, english);
416 TRAPIT(islower, english);
417 TRAPIT(isprint, english);
418 TRAPIT(ispunct, english);
420 /* 12 - 15 */
421 TRAPIT(isspace, english);
422 TRAPIT(isupper, english);
423 TRAPIT(isxdigit, english);
424 TRAPIT(strconvert, english);
426 /* 16 */
427 TRAPIT(strcompare, english);
428 #else
429 #define AROS_SLIB_ENTRY_GATED AROS_SLIB_ENTRY
430 #endif /*Morphos*/
433 void *const __eng_functable[] =
435 /* 0 - 3 */
436 &AROS_SLIB_ENTRY_GATED(convtolower, english),
437 &AROS_SLIB_ENTRY_GATED(convtoupper, english),
438 NULL,
439 &AROS_SLIB_ENTRY_GATED(getlangstring, english),
441 /* 4 - 7 */
442 &AROS_SLIB_ENTRY_GATED(isalnum, english),
443 &AROS_SLIB_ENTRY_GATED(isalpha, english),
444 &AROS_SLIB_ENTRY_GATED(iscntrl, english),
445 &AROS_SLIB_ENTRY_GATED(isdigit, english),
447 /* 8 - 11 */
448 &AROS_SLIB_ENTRY_GATED(isgraph, english),
449 &AROS_SLIB_ENTRY_GATED(islower, english),
450 &AROS_SLIB_ENTRY_GATED(isprint, english),
451 &AROS_SLIB_ENTRY_GATED(ispunct, english),
453 /* 12 - 15 */
454 &AROS_SLIB_ENTRY_GATED(isspace, english),
455 &AROS_SLIB_ENTRY_GATED(isupper, english),
456 &AROS_SLIB_ENTRY_GATED(isxdigit, english),
457 &AROS_SLIB_ENTRY_GATED(strconvert, english),
459 /* 16 */
460 &AROS_SLIB_ENTRY_GATED(strcompare, english),
462 (void *)-1
467 /* --------------------------------------------------------------------
468 Language data:
470 Whether your .language needs any of these tables depends on how it
471 differs from english.
472 - If it uses a different code table you'll need the code table
473 defining tables.
474 - If it uses a different character order (which will most likely
475 also be true for languages using a different code table) you'll
476 need the language character order tables.
477 - If your .languages just different words and names, which is
478 usually true, you'll need the language strings.
480 If you're creating a custom .language:
481 - If you're just changing the sorting behaviour you'll only need
482 the language character order tables.
483 - If you just want to change the names of things, eg. for a dialect,
484 you only need the language strings (provided the dialect uses the
485 regular English alphabet).
487 -------------------------------------------------------------------- */
490 /* Code table defining tables: Ctype, to-lower, to-upper.
491 (The descriptions for non-ASCII characters is given in the comments for
492 ctype.)
496 /* Array for the IsXXXXX() functions:
497 Each entry gives the basic types a character belongs to.
500 const UWORD __code_table_ctype[ __CODE_TABLE_SIZE] =
502 /* 0 */ iCntrl,
503 /* 1 */ iCntrl,
504 /* 2 */ iCntrl,
505 /* 3 */ iCntrl,
506 /* 4 */ iCntrl,
507 /* 5 */ iCntrl,
508 /* 6 */ iCntrl,
509 /* 7 */ iCntrl,
510 /* 8 */ iCntrl,
511 /* 9 */ iCntrl | iPrint | iSpace,
512 /* 10 */ iCntrl | iPrint | iSpace,
513 /* 11 */ iCntrl | iPrint | iSpace,
514 /* 12 */ iCntrl | iPrint | iSpace,
515 /* 13 */ iCntrl | iPrint | iSpace,
516 /* 14 */ iCntrl,
517 /* 15 */ iCntrl,
518 /* 16 */ iCntrl,
519 /* 17 */ iCntrl,
520 /* 18 */ iCntrl,
521 /* 19 */ iCntrl,
522 /* 20 */ iCntrl,
523 /* 21 */ iCntrl,
524 /* 22 */ iCntrl,
525 /* 23 */ iCntrl,
526 /* 24 */ iCntrl,
527 /* 25 */ iCntrl,
528 /* 26 */ iCntrl,
529 /* 27 */ iCntrl,
530 /* 28 */ iCntrl,
531 /* 29 */ iCntrl,
532 /* 30 */ iCntrl,
533 /* 31 */ iCntrl,
535 /* 32 */ iPrint | iSpace,
536 /* '!' */ iGraph | iPrint | iPunct,
537 /* '"' */ iGraph | iPrint | iPunct,
538 /* '#' */ iGraph | iPrint | iPunct,
539 /* '$' */ iGraph | iPrint | iPunct,
540 /* '%' */ iGraph | iPrint | iPunct,
541 /* '&' */ iGraph | iPrint | iPunct,
542 /* ''' */ iGraph | iPrint | iPunct,
543 /* '(' */ iGraph | iPrint | iPunct,
544 /* ')' */ iGraph | iPrint | iPunct,
545 /* '*' */ iGraph | iPrint | iPunct,
546 /* '+' */ iGraph | iPrint | iPunct,
547 /* ',' */ iGraph | iPrint | iPunct,
548 /* '-' */ iGraph | iPrint | iPunct,
549 /* '.' */ iGraph | iPrint | iPunct,
550 /* '/' */ iGraph | iPrint | iPunct,
551 /* '0' */ iDigit | iGraph | iPrint | iXDigit,
552 /* '1' */ iDigit | iGraph | iPrint | iXDigit,
553 /* '2' */ iDigit | iGraph | iPrint | iXDigit,
554 /* '3' */ iDigit | iGraph | iPrint | iXDigit,
555 /* '4' */ iDigit | iGraph | iPrint | iXDigit,
556 /* '5' */ iDigit | iGraph | iPrint | iXDigit,
557 /* '6' */ iDigit | iGraph | iPrint | iXDigit,
558 /* '7' */ iDigit | iGraph | iPrint | iXDigit,
559 /* '8' */ iDigit | iGraph | iPrint | iXDigit,
560 /* '9' */ iDigit | iGraph | iPrint | iXDigit,
561 /* ':' */ iGraph | iPrint | iPunct,
562 /* ';' */ iGraph | iPrint | iPunct,
563 /* '<' */ iGraph | iPrint | iPunct,
564 /* '=' */ iGraph | iPrint | iPunct,
565 /* '>' */ iGraph | iPrint | iPunct,
566 /* '?' */ iGraph | iPrint | iPunct,
568 /* '@' */ iGraph | iPrint | iPunct,
569 /* 'A' */ iAlpha | iGraph | iPrint | iUpper | iXDigit,
570 /* 'B' */ iAlpha | iGraph | iPrint | iUpper | iXDigit,
571 /* 'C' */ iAlpha | iGraph | iPrint | iUpper | iXDigit,
572 /* 'D' */ iAlpha | iGraph | iPrint | iUpper | iXDigit,
573 /* 'E' */ iAlpha | iGraph | iPrint | iUpper | iXDigit,
574 /* 'F' */ iAlpha | iGraph | iPrint | iUpper | iXDigit,
575 /* 'G' */ iAlpha | iGraph | iPrint | iUpper,
576 /* 'H' */ iAlpha | iGraph | iPrint | iUpper,
577 /* 'I' */ iAlpha | iGraph | iPrint | iUpper,
578 /* 'J' */ iAlpha | iGraph | iPrint | iUpper,
579 /* 'K' */ iAlpha | iGraph | iPrint | iUpper,
580 /* 'L' */ iAlpha | iGraph | iPrint | iUpper,
581 /* 'M' */ iAlpha | iGraph | iPrint | iUpper,
582 /* 'N' */ iAlpha | iGraph | iPrint | iUpper,
583 /* 'O' */ iAlpha | iGraph | iPrint | iUpper,
584 /* 'P' */ iAlpha | iGraph | iPrint | iUpper,
585 /* 'Q' */ iAlpha | iGraph | iPrint | iUpper,
586 /* 'R' */ iAlpha | iGraph | iPrint | iUpper,
587 /* 'S' */ iAlpha | iGraph | iPrint | iUpper,
588 /* 'T' */ iAlpha | iGraph | iPrint | iUpper,
589 /* 'U' */ iAlpha | iGraph | iPrint | iUpper,
590 /* 'V' */ iAlpha | iGraph | iPrint | iUpper,
591 /* 'W' */ iAlpha | iGraph | iPrint | iUpper,
592 /* 'X' */ iAlpha | iGraph | iPrint | iUpper,
593 /* 'Y' */ iAlpha | iGraph | iPrint | iUpper,
594 /* 'Z' */ iAlpha | iGraph | iPrint | iUpper,
595 /* '[' */ iGraph | iPrint | iPunct,
596 /* '\' */ iGraph | iPrint | iPunct,
597 /* ']' */ iGraph | iPrint | iPunct,
598 /* '^' */ iGraph | iPrint | iPunct,
599 /* '_' */ iGraph | iPrint | iPunct,
601 /* '`' */ iGraph | iPrint | iPunct,
602 /* 'a' */ iAlpha | iGraph | iLower | iPrint | iXDigit,
603 /* 'b' */ iAlpha | iGraph | iLower | iPrint | iXDigit,
604 /* 'c' */ iAlpha | iGraph | iLower | iPrint | iXDigit,
605 /* 'd' */ iAlpha | iGraph | iLower | iPrint | iXDigit,
606 /* 'e' */ iAlpha | iGraph | iLower | iPrint | iXDigit,
607 /* 'f' */ iAlpha | iGraph | iLower | iPrint | iXDigit,
608 /* 'g' */ iAlpha | iGraph | iLower | iPrint,
609 /* 'h' */ iAlpha | iGraph | iLower | iPrint,
610 /* 'i' */ iAlpha | iGraph | iLower | iPrint,
611 /* 'j' */ iAlpha | iGraph | iLower | iPrint,
612 /* 'k' */ iAlpha | iGraph | iLower | iPrint,
613 /* 'l' */ iAlpha | iGraph | iLower | iPrint,
614 /* 'm' */ iAlpha | iGraph | iLower | iPrint,
615 /* 'n' */ iAlpha | iGraph | iLower | iPrint,
616 /* 'o' */ iAlpha | iGraph | iLower | iPrint,
617 /* 'p' */ iAlpha | iGraph | iLower | iPrint,
618 /* 'q' */ iAlpha | iGraph | iLower | iPrint,
619 /* 'r' */ iAlpha | iGraph | iLower | iPrint,
620 /* 's' */ iAlpha | iGraph | iLower | iPrint,
621 /* 't' */ iAlpha | iGraph | iLower | iPrint,
622 /* 'u' */ iAlpha | iGraph | iLower | iPrint,
623 /* 'v' */ iAlpha | iGraph | iLower | iPrint,
624 /* 'w' */ iAlpha | iGraph | iLower | iPrint,
625 /* 'x' */ iAlpha | iGraph | iLower | iPrint,
626 /* 'y' */ iAlpha | iGraph | iLower | iPrint,
627 /* 'z' */ iAlpha | iGraph | iLower | iPrint,
628 /* '{' */ iGraph | iPrint | iPunct,
629 /* '|' */ iGraph | iPrint | iPunct,
630 /* '}' */ iGraph | iPrint | iPunct,
631 /* '~' */ iGraph | iPrint | iPunct,
632 /* 127 */ iCntrl,
634 /* 128 */ iCntrl,
635 /* 129 */ iCntrl,
636 /* 130 */ iCntrl,
637 /* 131 */ iCntrl,
638 /* 132 */ iCntrl,
639 /* 133 */ iCntrl,
640 /* 134 */ iCntrl,
641 /* 135 */ iCntrl,
642 /* 136 */ iCntrl,
643 /* 137 */ iCntrl,
644 /* 138 */ iCntrl,
645 /* 139 */ iCntrl,
646 /* 140 */ iCntrl,
647 /* 141 */ iCntrl,
648 /* 142 */ iCntrl,
649 /* 143 */ iCntrl,
650 /* 144 */ iCntrl,
651 /* 145 */ iCntrl,
652 /* 146 */ iCntrl,
653 /* 147 */ iCntrl,
654 /* 148 */ iCntrl,
655 /* 149 */ iCntrl,
656 /* 150 */ iCntrl,
657 /* 151 */ iCntrl,
658 /* 152 */ iCntrl,
659 /* 153 */ iCntrl,
660 /* 154 */ iCntrl,
661 /* 155 */ iCntrl,
662 /* 156 */ iCntrl,
663 /* 157 */ iCntrl,
664 /* 158 */ iCntrl,
665 /* 159 */ iCntrl,
667 /* 160 Non-breaking space */ iPrint | iPunct,
668 /* 161 Inverted exclamation */ iGraph | iPrint | iPunct,
669 /* 162 Cent */ iGraph | iPrint | iPunct,
670 /* 163 Pound sterling */ iGraph | iPrint | iPunct,
671 /* 164 Currency */ iGraph | iPrint | iPunct,
672 /* 165 Yen */ iGraph | iPrint | iPunct,
673 /* 166 Broken bar */ iGraph | iPrint | iPunct,
674 /* 167 Section */ iGraph | iPrint | iPunct,
675 /* 168 Dieresis/Umlaut */ iGraph | iPrint | iPunct,
676 /* 169 Copyright */ iGraph | iPrint | iPunct,
677 /* 170 Feminine ordinal */ iGraph | iPrint | iPunct,
678 /* 171 Left guillemot */ iGraph | iPrint | iPunct,
679 /* 172 Not */ iGraph | iPrint | iPunct,
680 /* 173 Soft hyphen */ iGraph | iPrint | iPunct,
681 /* 174 Registered trademark */ iGraph | iPrint | iPunct,
682 /* 175 Macron accent */ iGraph | iPrint | iPunct,
683 /* 176 Degree */ iGraph | iPrint | iPunct,
684 /* 177 Plus Minus */ iGraph | iPrint | iPunct,
685 /* 178 Superscript two */ iGraph | iPrint | iPunct,
686 /* 179 Superscript three */ iGraph | iPrint | iPunct,
687 /* 180 Acute accent */ iGraph | iPrint | iPunct,
688 /* 181 Mu */ iGraph | iPrint | iPunct,
689 /* 182 Paragraph */ iGraph | iPrint | iPunct,
690 /* 183 Middle dot */ iGraph | iPrint | iPunct,
691 /* 184 Cedilla */ iGraph | iPrint | iPunct,
692 /* 185 Superscript one */ iGraph | iPrint | iPunct,
693 /* 186 Masculine ordinal */ iGraph | iPrint | iPunct,
694 /* 187 Right guillemot */ iGraph | iPrint | iPunct,
695 /* 188 One quarter */ iGraph | iPrint | iPunct,
696 /* 189 One half */ iGraph | iPrint | iPunct,
697 /* 190 Three quarters */ iGraph | iPrint | iPunct,
698 /* 191 Inverted question */ iGraph | iPrint | iPunct,
700 /* 192 Capital A grave */ iAlpha | iGraph | iPrint | iUpper,
701 /* 193 Capital A acute */ iAlpha | iGraph | iPrint | iUpper,
702 /* 194 Capital A circumflex */ iAlpha | iGraph | iPrint | iUpper,
703 /* 195 Capital A tilde */ iAlpha | iGraph | iPrint | iUpper,
704 /* 196 Capital A dieresis */ iAlpha | iGraph | iPrint | iUpper,
705 /* 197 Capital A ring */ iAlpha | iGraph | iPrint | iUpper,
706 /* 198 Capital AE */ iAlpha | iGraph | iPrint | iUpper,
707 /* 199 Capital C cedilla */ iAlpha | iGraph | iPrint | iUpper,
708 /* 200 Capital E grave */ iAlpha | iGraph | iPrint | iUpper,
709 /* 201 Capital E acute */ iAlpha | iGraph | iPrint | iUpper,
710 /* 202 Capital E circumflex */ iAlpha | iGraph | iPrint | iUpper,
711 /* 203 Capital E dieresis */ iAlpha | iGraph | iPrint | iUpper,
712 /* 204 Capital I grave */ iAlpha | iGraph | iPrint | iUpper,
713 /* 205 Capital I acute */ iAlpha | iGraph | iPrint | iUpper,
714 /* 206 Capital I circumflex */ iAlpha | iGraph | iPrint | iUpper,
715 /* 207 Capital I dieresis */ iAlpha | iGraph | iPrint | iUpper,
716 /* 208 Capital Eth */ iAlpha | iGraph | iPrint | iUpper,
717 /* 209 Capital N tilde */ iAlpha | iGraph | iPrint | iUpper,
718 /* 210 Capital O grave */ iAlpha | iGraph | iPrint | iUpper,
719 /* 211 Capital O acute */ iAlpha | iGraph | iPrint | iUpper,
720 /* 212 Capital O circumflex */ iAlpha | iGraph | iPrint | iUpper,
721 /* 213 Capital O tilde */ iAlpha | iGraph | iPrint | iUpper,
722 /* 214 Capital O dieresis */ iAlpha | iGraph | iPrint | iUpper,
723 /* 215 Multiply */ iGraph | iPrint | iPunct,
724 /* 216 Capital O slash */ iAlpha | iGraph | iPrint | iUpper,
725 /* 217 Capital U grave */ iAlpha | iGraph | iPrint | iUpper,
726 /* 218 Capital U acute */ iAlpha | iGraph | iPrint | iUpper,
727 /* 219 Capital U circumflex */ iAlpha | iGraph | iPrint | iUpper,
728 /* 220 Capital U dieresis */ iAlpha | iGraph | iPrint | iUpper,
729 /* 221 Capital Y acute */ iAlpha | iGraph | iPrint | iUpper,
730 /* 222 Capital Thorn */ iAlpha | iGraph | iPrint | iUpper,
731 /* 223 Ringel-s */ iAlpha | iGraph | iLower | iPrint | iUpper,
733 /* 224 Small a grave */ iAlpha | iGraph | iLower | iPrint,
734 /* 225 Small a acute */ iAlpha | iGraph | iLower | iPrint,
735 /* 226 Small a circumflex */ iAlpha | iGraph | iLower | iPrint,
736 /* 227 Small a tilde */ iAlpha | iGraph | iLower | iPrint,
737 /* 228 Small a dieresis */ iAlpha | iGraph | iLower | iPrint,
738 /* 229 Small a ring */ iAlpha | iGraph | iLower | iPrint,
739 /* 230 Small ae */ iAlpha | iGraph | iLower | iPrint,
740 /* 231 Small c cedilla */ iAlpha | iGraph | iLower | iPrint,
741 /* 232 Small e grave */ iAlpha | iGraph | iLower | iPrint,
742 /* 233 Small e acute */ iAlpha | iGraph | iLower | iPrint,
743 /* 234 Small e circumflex */ iAlpha | iGraph | iLower | iPrint,
744 /* 235 Small e dieresis */ iAlpha | iGraph | iLower | iPrint,
745 /* 236 Small i grave */ iAlpha | iGraph | iLower | iPrint,
746 /* 237 Small i acute */ iAlpha | iGraph | iLower | iPrint,
747 /* 238 Small i circumflex */ iAlpha | iGraph | iLower | iPrint,
748 /* 239 Small i dieresis */ iAlpha | iGraph | iLower | iPrint,
749 /* 240 Small eth */ iAlpha | iGraph | iLower | iPrint,
750 /* 241 Small n tilde */ iAlpha | iGraph | iLower | iPrint,
751 /* 242 Small o grave */ iAlpha | iGraph | iLower | iPrint,
752 /* 243 Small o acute */ iAlpha | iGraph | iLower | iPrint,
753 /* 244 Small o circumflex */ iAlpha | iGraph | iLower | iPrint,
754 /* 245 Small o tilde */ iAlpha | iGraph | iLower | iPrint,
755 /* 246 Small o dieresis */ iAlpha | iGraph | iLower | iPrint,
756 /* 247 Division */ iGraph | iPrint | iPunct,
757 /* 248 Small o slash */ iAlpha | iGraph | iLower | iPrint,
758 /* 249 Small u grave */ iAlpha | iGraph | iLower | iPrint,
759 /* 250 Small u acute */ iAlpha | iGraph | iLower | iPrint,
760 /* 251 Small u circumflex */ iAlpha | iGraph | iLower | iPrint,
761 /* 252 Small u dieresis */ iAlpha | iGraph | iLower | iPrint,
762 /* 253 Small y acute */ iAlpha | iGraph | iLower | iPrint,
763 /* 254 Small thorn */ iAlpha | iGraph | iLower | iPrint,
764 /* 255 Small y dieresis */ iAlpha | iGraph | iLower | iPrint,
769 /* Array for the ConvToLower function:
770 Each entry gives the lower case version of a character.
771 If the character is already in lower case the entry holds the
772 character itself.
775 const ULONG __code_table_to_lower[ __CODE_TABLE_SIZE] =
777 0 , /* 0 */ 1 , /* 1 */
778 2 , /* 2 */ 3 , /* 3 */
779 4 , /* 4 */ 5 , /* 5 */
780 6 , /* 6 */ 7 , /* 7 */
781 8 , /* 8 */ 9 , /* 9 */
782 10 , /* 10 */ 11 , /* 11 */
783 12 , /* 12 */ 13 , /* 13 */
784 14 , /* 14 */ 15 , /* 15 */
785 16 , /* 16 */ 17 , /* 17 */
786 18 , /* 18 */ 19 , /* 19 */
787 20 , /* 20 */ 21 , /* 21 */
788 22 , /* 22 */ 23 , /* 23 */
789 24 , /* 24 */ 25 , /* 25 */
790 26 , /* 26 */ 27 , /* 27 */
791 28 , /* 28 */ 29 , /* 29 */
792 30 , /* 30 */ 31 , /* 31 */
794 ' ', /* ' ' */ '!', /* '!' */
795 '\"', /* '"' */ '#', /* '#' */
796 '$', /* '$' */ '%', /* '%' */
797 '&', /* '&' */ '\'', /* ''' */
798 '(', /* '(' */ ')', /* ')' */
799 '*', /* '*' */ '+', /* '+' */
800 ',', /* ',' */ '-', /* '-' */
801 '.', /* '.' */ '/', /* '/' */
802 '0', /* '0' */ '1', /* '1' */
803 '2', /* '2' */ '3', /* '3' */
804 '4', /* '4' */ '5', /* '5' */
805 '6', /* '6' */ '7', /* '7' */
806 '8', /* '8' */ '9', /* '9' */
807 ':', /* ':' */ ';', /* ';' */
808 '<', /* '<' */ '=', /* '=' */
809 '>', /* '>' */ '\?', /* '?' */
811 '@', /* '@' */ 'a', /* 'A' */
812 'b', /* 'B' */ 'c', /* 'C' */
813 'd', /* 'D' */ 'e', /* 'E' */
814 'f', /* 'F' */ 'g', /* 'G' */
815 'h', /* 'H' */ 'i', /* 'I' */
816 'j', /* 'J' */ 'k', /* 'K' */
817 'l', /* 'L' */ 'm', /* 'M' */
818 'n', /* 'N' */ 'o', /* 'O' */
819 'p', /* 'P' */ 'q', /* 'Q' */
820 'r', /* 'R' */ 's', /* 'S' */
821 't', /* 'T' */ 'u', /* 'U' */
822 'v', /* 'V' */ 'w', /* 'W' */
823 'x', /* 'X' */ 'y', /* 'Y' */
824 'z', /* 'Z' */ '[', /* '[' */
825 '\\', /* '\' */ ']', /* ']' */
826 '^', /* '^' */ '_', /* '_' */
828 '`', /* '`' */ 'a', /* 'a' */
829 'b', /* 'b' */ 'c', /* 'c' */
830 'd', /* 'd' */ 'e', /* 'e' */
831 'f', /* 'f' */ 'g', /* 'g' */
832 'h', /* 'h' */ 'i', /* 'i' */
833 'j', /* 'j' */ 'k', /* 'k' */
834 'l', /* 'l' */ 'm', /* 'm' */
835 'n', /* 'n' */ 'o', /* 'o' */
836 'p', /* 'p' */ 'q', /* 'q' */
837 'r', /* 'r' */ 's', /* 's' */
838 't', /* 't' */ 'u', /* 'u' */
839 'v', /* 'v' */ 'w', /* 'w' */
840 'x', /* 'x' */ 'y', /* 'y' */
841 'z', /* 'z' */ '{', /* '{' */
842 '|', /* '|' */ '}', /* '}' */
843 '~', /* '~' */ 127, /* 127 */
845 128, /* 128 */ 129, /* 129 */
846 130, /* 130 */ 131, /* 131 */
847 132, /* 132 */ 133, /* 133 */
848 134, /* 134 */ 135, /* 135 */
849 136, /* 136 */ 137, /* 137 */
850 138, /* 138 */ 139, /* 139 */
851 140, /* 140 */ 141, /* 141 */
852 142, /* 142 */ 143, /* 143 */
853 144, /* 144 */ 145, /* 145 */
854 146, /* 146 */ 147, /* 147 */
855 148, /* 148 */ 149, /* 149 */
856 150, /* 150 */ 151, /* 151 */
857 152, /* 152 */ 153, /* 153 */
858 154, /* 154 */ 155, /* 155 */
859 156, /* 156 */ 157, /* 157 */
860 158, /* 158 */ 159, /* 159 */
862 160, /* 160 */ 161, /* 161 */
863 162, /* 162 */ 163, /* 163 */
864 164, /* 164 */ 165, /* 165 */
865 166, /* 166 */ 167, /* 167 */
866 168, /* 168 */ 169, /* 169 */
867 170, /* 170 */ 171, /* 171 */
868 172, /* 172 */ 173, /* 173 */
869 174, /* 174 */ 175, /* 175 */
870 176, /* 176 */ 177, /* 177 */
871 178, /* 178 */ 179, /* 179 */
872 180, /* 180 */ 181, /* 181 */
873 182, /* 182 */ 183, /* 183 */
874 184, /* 184 */ 185, /* 185 */
875 186, /* 186 */ 187, /* 187 */
876 188, /* 188 */ 189, /* 189 */
877 190, /* 190 */ 191, /* 191 */
879 224, /* 192 */ 225, /* 193 */
880 226, /* 194 */ 227, /* 195 */
881 228, /* 196 */ 229, /* 197 */
882 230, /* 198 */ 231, /* 199 */
883 232, /* 200 */ 233, /* 201 */
884 234, /* 202 */ 235, /* 203 */
885 236, /* 204 */ 237, /* 205 */
886 238, /* 206 */ 239, /* 207 */
887 240, /* 208 */ 241, /* 209 */
888 242, /* 210 */ 243, /* 211 */
889 244, /* 212 */ 245, /* 213 */
890 246, /* 214 */ 215, /* 215 Multiply */
891 248, /* 216 */ 249, /* 217 */
892 250, /* 218 */ 251, /* 219 */
893 252, /* 220 */ 253, /* 221 */
894 254, /* 222 */ 223, /* 223 Ringel-S */
896 224, /* 224 */ 225, /* 225 */
897 226, /* 226 */ 227, /* 227 */
898 228, /* 228 */ 229, /* 229 */
899 230, /* 230 */ 231, /* 231 */
900 232, /* 232 */ 233, /* 233 */
901 234, /* 234 */ 235, /* 235 */
902 236, /* 236 */ 237, /* 237 */
903 238, /* 238 */ 239, /* 239 */
904 240, /* 240 */ 241, /* 241 */
905 242, /* 242 */ 243, /* 243 */
906 244, /* 244 */ 245, /* 245 */
907 246, /* 246 */ 247, /* 247 */
908 248, /* 248 */ 249, /* 249 */
909 250, /* 250 */ 251, /* 251 */
910 252, /* 252 */ 253, /* 253 */
911 254, /* 254 */ 255, /* 255 */
915 /* Array for the ConvToUpper function:
916 Each entry gives the upper case version of a character.
917 If the character is already in upper case the entry holds the
918 character itself.
921 const ULONG __code_table_to_upper[ __CODE_TABLE_SIZE] =
923 0 , /* 0 */ 1 , /* 1 */
924 2 , /* 2 */ 3 , /* 3 */
925 4 , /* 4 */ 5 , /* 5 */
926 6 , /* 6 */ 7 , /* 7 */
927 8 , /* 8 */ 9 , /* 9 */
928 10 , /* 10 */ 11 , /* 11 */
929 12 , /* 12 */ 13 , /* 13 */
930 14 , /* 14 */ 15 , /* 15 */
931 16 , /* 16 */ 17 , /* 17 */
932 18 , /* 18 */ 19 , /* 19 */
933 20 , /* 20 */ 21 , /* 21 */
934 22 , /* 22 */ 23 , /* 23 */
935 24 , /* 24 */ 25 , /* 25 */
936 26 , /* 26 */ 27 , /* 27 */
937 28 , /* 28 */ 29 , /* 29 */
938 30 , /* 30 */ 31 , /* 31 */
940 ' ', /* 32 */ '!', /* '!' */
941 '\"', /* '"' */ '#', /* '#' */
942 '$', /* '$' */ '%', /* '%' */
943 '&', /* '&' */ '\'', /* ''' */
944 '(', /* '(' */ ')', /* ')' */
945 '*', /* '*' */ '+', /* '+' */
946 ',', /* ',' */ '-', /* '-' */
947 '.', /* '.' */ '/', /* '/' */
948 '0', /* '0' */ '1', /* '1' */
949 '2', /* '2' */ '3', /* '3' */
950 '4', /* '4' */ '5', /* '5' */
951 '6', /* '6' */ '7', /* '7' */
952 '8', /* '8' */ '9', /* '9' */
953 ':', /* ':' */ ';', /* ';' */
954 '<', /* '<' */ '=', /* '=' */
955 '>', /* '>' */ '\?', /* '?' */
957 '@', /* '@' */ 'A', /* 'A' */
958 'B', /* 'B' */ 'C', /* 'C' */
959 'D', /* 'D' */ 'E', /* 'E' */
960 'F', /* 'F' */ 'G', /* 'G' */
961 'H', /* 'H' */ 'I', /* 'I' */
962 'J', /* 'J' */ 'K', /* 'K' */
963 'L', /* 'L' */ 'M', /* 'M' */
964 'N', /* 'N' */ 'O', /* 'O' */
965 'P', /* 'P' */ 'Q', /* 'Q' */
966 'R', /* 'R' */ 'S', /* 'S' */
967 'T', /* 'T' */ 'U', /* 'U' */
968 'V', /* 'V' */ 'W', /* 'W' */
969 'X', /* 'X' */ 'Y', /* 'Y' */
970 'Z', /* 'Z' */ '[', /* '[' */
971 '\\', /* '\' */ ']', /* ']' */
972 '^', /* '^' */ '_', /* '_' */
974 '`', /* '`' */ 'A', /* 'a' */
975 'B', /* 'b' */ 'C', /* 'c' */
976 'D', /* 'd' */ 'E', /* 'e' */
977 'F', /* 'f' */ 'G', /* 'g' */
978 'H', /* 'h' */ 'I', /* 'i' */
979 'J', /* 'j' */ 'K', /* 'k' */
980 'L', /* 'l' */ 'M', /* 'm' */
981 'N', /* 'n' */ 'O', /* 'o' */
982 'P', /* 'p' */ 'Q', /* 'q' */
983 'R', /* 'r' */ 'S', /* 's' */
984 'T', /* 't' */ 'U', /* 'u' */
985 'V', /* 'v' */ 'W', /* 'w' */
986 'X', /* 'x' */ 'Y', /* 'y' */
987 'Z', /* 'z' */ '{', /* '{' */
988 '|', /* '|' */ '}', /* '}' */
989 '~', /* '~' */ 127, /* 127 */
991 128, /* 128 */ 129, /* 129 */
992 130, /* 130 */ 131, /* 131 */
993 132, /* 132 */ 133, /* 133 */
994 134, /* 134 */ 135, /* 135 */
995 136, /* 136 */ 137, /* 137 */
996 138, /* 138 */ 139, /* 139 */
997 140, /* 140 */ 141, /* 141 */
998 142, /* 142 */ 143, /* 143 */
999 144, /* 144 */ 145, /* 145 */
1000 146, /* 146 */ 147, /* 147 */
1001 148, /* 148 */ 149, /* 149 */
1002 150, /* 150 */ 151, /* 151 */
1003 152, /* 152 */ 153, /* 153 */
1004 154, /* 154 */ 155, /* 155 */
1005 156, /* 156 */ 157, /* 157 */
1006 158, /* 158 */ 159, /* 159 */
1008 160, /* 160 */ 161, /* 161 */
1009 162, /* 162 */ 163, /* 163 */
1010 164, /* 164 */ 165, /* 165 */
1011 166, /* 166 */ 167, /* 167 */
1012 168, /* 168 */ 169, /* 169 */
1013 170, /* 170 */ 171, /* 171 */
1014 172, /* 172 */ 173, /* 173 */
1015 174, /* 174 */ 175, /* 175 */
1016 176, /* 176 */ 177, /* 177 */
1017 178, /* 178 */ 179, /* 179 */
1018 180, /* 180 */ 181, /* 181 */
1019 182, /* 182 */ 183, /* 183 */
1020 184, /* 184 */ 185, /* 185 */
1021 186, /* 186 */ 187, /* 187 */
1022 188, /* 188 */ 189, /* 189 */
1023 190, /* 190 */ 191, /* 191 */
1025 192, /* 192 */ 193, /* 193 */
1026 194, /* 194 */ 195, /* 195 */
1027 196, /* 196 */ 197, /* 197 */
1028 198, /* 198 */ 199, /* 199 */
1029 200, /* 200 */ 201, /* 201 */
1030 202, /* 202 */ 203, /* 203 */
1031 204, /* 204 */ 205, /* 205 */
1032 206, /* 206 */ 207, /* 207 */
1033 208, /* 208 */ 209, /* 209 */
1034 210, /* 210 */ 211, /* 211 */
1035 212, /* 212 */ 213, /* 213 */
1036 214, /* 214 */ 215, /* 215 */
1037 216, /* 216 */ 217, /* 217 */
1038 218, /* 218 */ 219, /* 219 */
1039 220, /* 220 */ 221, /* 221 */
1040 222, /* 222 */ 223, /* 223 */
1042 192, /* 224 */ 193, /* 225 */
1043 194, /* 226 */ 195, /* 227 */
1044 196, /* 228 */ 197, /* 229 */
1045 198, /* 230 */ 199, /* 231 */
1046 200, /* 232 */ 201, /* 233 */
1047 202, /* 234 */ 203, /* 235 */
1048 204, /* 236 */ 205, /* 237 */
1049 206, /* 238 */ 207, /* 239 */
1050 208, /* 240 */ 209, /* 241 */
1051 210, /* 242 */ 211, /* 243 */
1052 212, /* 244 */ 213, /* 245 */
1053 214, /* 246 */ 247, /* 247 Division */
1054 216, /* 248 */ 217, /* 249 */
1055 218, /* 250 */ 219, /* 251 */
1056 220, /* 252 */ 221, /* 253 */
1057 222, /* 254 */ 255, /* 255 Small y dieresis */
1062 /* Language character order tables: Short order, long order.
1063 (These values are not really characters. Rather, they should be
1064 considered indices for implied sorting tables.)
1069 This is the short character order table (COLLATE1).
1071 This defines a sorting order for the regular characters of the language
1072 only. Sorting using this order will place others characters together
1073 with the regular characters they are related to.
1075 This is done by giving for each character the regular character to be
1076 used for sorting instead.
1078 Eg. the entry for 'a' is 'A', so while sorting 'a' will be considered
1079 the same as 'A'. Thus sorting will place "amiga" and "Amiga" immediately
1080 together under "A" (in no particular order), rather on different sides
1081 of "Z-80", as would happen by sorting just by character values. Though
1082 this simple example could also be done using ToUpper, the short
1083 character order also groups all accented characters with their base
1084 character.
1086 (Though for regular English characters the ordinals have here been
1087 chosen equal to the character values, there's no need to do so. It's
1088 also not true for other characters. Eg. the value of '~' is 126, but
1089 it's ordered here as the 100-th character.)
1092 const ULONG __language_short_order_tab[ __CODE_TABLE_SIZE] =
1094 0 , /* 0 */ 1 , /* 1 */
1095 2 , /* 2 */ 3 , /* 3 */
1096 4 , /* 4 */ 5 , /* 5 */
1097 6 , /* 6 */ 7 , /* 7 */
1098 8 , /* 8 */ 9 , /* 9 */
1099 10 , /* 10 */ 11 , /* 11 */
1100 12 , /* 12 */ 13 , /* 13 */
1101 14 , /* 14 */ 15 , /* 15 */
1102 16 , /* 16 */ 17 , /* 17 */
1103 18 , /* 18 */ 19 , /* 19 */
1104 20 , /* 20 */ 21 , /* 21 */
1105 22 , /* 22 */ 23 , /* 23 */
1106 24 , /* 24 */ 25 , /* 25 */
1107 26 , /* 26 */ 27 , /* 27 */
1108 28 , /* 28 */ 29 , /* 29 */
1109 30 , /* 30 */ 31 , /* 31 */
1111 ' ', /* ' ' */ '!', /* '!' */
1112 '\"', /* '"' */ '#', /* '#' */
1113 '$', /* '$' */ '%', /* '%' */
1114 '&', /* '&' */ '\'', /* ''' */
1115 '(', /* '(' */ ')', /* ')' */
1116 '*', /* '*' */ '+', /* '+' */
1117 ',', /* ',' */ '-', /* '-' */
1118 '.', /* '.' */ '/', /* '/' */
1119 '0', /* '0' */ '1', /* '1' */
1120 '2', /* '2' */ '3', /* '3' */
1121 '4', /* '4' */ '5', /* '5' */
1122 '6', /* '6' */ '7', /* '7' */
1123 '8', /* '8' */ '9', /* '9' */
1124 ':', /* ':' */ ';', /* ';' */
1125 '<', /* '<' */ '=', /* '=' */
1126 '>', /* '>' */ '\?', /* '?' */
1128 '@', /* '@' */ 'A', /* 'A' */
1129 'B', /* 'B' */ 'C', /* 'C' */
1130 'D', /* 'D' */ 'E', /* 'E' */
1131 'F', /* 'F' */ 'G', /* 'G' */
1132 'H', /* 'H' */ 'I', /* 'I' */
1133 'J', /* 'J' */ 'K', /* 'K' */
1134 'L', /* 'L' */ 'M', /* 'M' */
1135 'N', /* 'N' */ 'O', /* 'O' */
1136 'P', /* 'P' */ 'Q', /* 'Q' */
1137 'R', /* 'R' */ 'S', /* 'S' */
1138 'T', /* 'T' */ 'U', /* 'U' */
1139 'V', /* 'V' */ 'W', /* 'W' */
1140 'X', /* 'X' */ 'Y', /* 'Y' */
1141 'Z', /* 'Z' */ '[', /* '[' */
1142 '\\', /* '\' */ ']', /* ']' */
1143 '^', /* '^' */ '_', /* '_' */
1145 '`', /* '`' */ 'A', /* 'a' */
1146 'B', /* 'b' */ 'C', /* 'c' */
1147 'D', /* 'd' */ 'E', /* 'e' */
1148 'F', /* 'f' */ 'G', /* 'g' */
1149 'H', /* 'h' */ 'I', /* 'i' */
1150 'J', /* 'j' */ 'K', /* 'k' */
1151 'L', /* 'l' */ 'M', /* 'm' */
1152 'N', /* 'n' */ 'O', /* 'o' */
1153 'P', /* 'p' */ 'Q', /* 'q' */
1154 'R', /* 'r' */ 'S', /* 's' */
1155 'T', /* 't' */ 'U', /* 'u' */
1156 'V', /* 'v' */ 'W', /* 'w' */
1157 'X', /* 'x' */ 'Y', /* 'y' */
1158 'Z', /* 'z' */ 97 , /* '{' */
1159 98 , /* '|' */ 99 , /* '}' */
1160 100, /* '~' */ 101, /* 127 */
1162 224, /* 128 */ 225, /* 129 */
1163 226, /* 130 */ 227, /* 131 */
1164 228, /* 132 */ 229, /* 133 */
1165 230, /* 134 */ 231, /* 135 */
1166 232, /* 136 */ 233, /* 137 */
1167 234, /* 138 */ 235, /* 139 */
1168 236, /* 140 */ 237, /* 141 */
1169 238, /* 142 */ 239, /* 143 */
1170 240, /* 144 */ 241, /* 145 */
1171 242, /* 146 */ 243, /* 147 */
1172 244, /* 148 */ 245, /* 149 */
1173 246, /* 150 */ 247, /* 151 */
1174 248, /* 152 */ 249, /* 153 */
1175 250, /* 154 */ 251, /* 155 */
1176 252, /* 156 */ 253, /* 157 */
1177 254, /* 158 */ 255, /* 159 */
1179 ' ', /* 160 */ '!', /* 161 */
1180 '$', /* 162 */ '$', /* 163 */
1181 103, /* 164 */ 104, /* 165 */
1182 105, /* 166 */ 'S', /* 167 */
1183 106, /* 168 */ 107, /* 169 */
1184 108, /* 170 */ '\"', /* 171 */
1185 109, /* 172 */ 110, /* 173 */
1186 111, /* 174 */ 112, /* 175 */
1187 112, /* 176 */ 114, /* 177 */
1188 115, /* 178 */ 116, /* 179 */
1189 117, /* 180 */ 118, /* 181 */
1190 119, /* 182 */ 120, /* 183 */
1191 121, /* 184 */ 122, /* 185 */
1192 123, /* 186 */ '\"', /* 187 */
1193 124, /* 188 */ 125, /* 189 */
1194 126, /* 190 */ '\?', /* 191 */
1196 'A', /* 192 */ 'A', /* 193 */
1197 'A', /* 194 */ 'A', /* 195 */
1198 'A', /* 196 */ 'A', /* 197 */
1199 'A', /* 198 */ 'C', /* 199 */
1200 'E', /* 200 */ 'E', /* 201 */
1201 'E', /* 202 */ 'E', /* 203 */
1202 'I', /* 204 */ 'I', /* 205 */
1203 'I', /* 206 */ 'I', /* 207 */
1204 'D', /* 208 */ 'N', /* 209 */
1205 'O', /* 210 */ 'O', /* 211 */
1206 'O', /* 212 */ 'O', /* 213 */
1207 'O', /* 214 */ '*', /* 215 */
1208 'O', /* 216 */ 'U', /* 217 */
1209 'U', /* 218 */ 'U', /* 219 */
1210 'U', /* 220 */ 'Y', /* 221 */
1211 'T', /* 222 */ 'S', /* 223 */
1213 'A', /* 224 */ 'A', /* 225 */
1214 'A', /* 226 */ 'A', /* 227 */
1215 'A', /* 228 */ 'A', /* 229 */
1216 'A', /* 230 */ 'C', /* 231 */
1217 'E', /* 232 */ 'E', /* 233 */
1218 'E', /* 234 */ 'E', /* 235 */
1219 'I', /* 236 */ 'I', /* 237 */
1220 'I', /* 238 */ 'I', /* 239 */
1221 'D', /* 240 */ 'N', /* 241 */
1222 'O', /* 242 */ 'O', /* 243 */
1223 'O', /* 244 */ 'O', /* 245 */
1224 'O', /* 246 */ '/', /* 247 */
1225 'O', /* 248 */ 'U', /* 249 */
1226 'U', /* 250 */ 'U', /* 251 */
1227 'U', /* 252 */ 'Y', /* 253 */
1228 'T', /* 254 */ 'Y', /* 255 */
1234 This is the long character order table (COLLATE2).
1236 This defines a sorting order for all the characters of the code set.
1237 Sorting using this order will group related characters together, but
1238 will nevertheless sort out the different characters.
1240 This is done by giving for each character a different ordinal, where the
1241 ordinals for related characters are "adjacent".
1243 Eg. the ordinal for 'A' is 74, and ordinal for 'a' is 75. Thus sorting
1244 will place "amiga" shortly after "Amiga", but "Amy" will be sorted
1245 closer since it too starts with ordinal 74. Though this is a simple
1246 example, for all accented characters the long character order also
1247 defines ordinals adjacent to that of their base characters.
1249 (Characters will usually have an ordinal different from their value.)
1251 const ULONG __language_long_order_tab[ __CODE_TABLE_SIZE] =
1253 0 , /* 0 */ 1 , /* 1 */
1254 2 , /* 2 */ 3 , /* 3 */
1255 4 , /* 4 */ 5 , /* 5 */
1256 6 , /* 6 */ 7 , /* 7 */
1257 8 , /* 8 */ 9 , /* 9 */
1258 10 , /* 10 */ 11 , /* 11 */
1259 12 , /* 12 */ 13 , /* 13 */
1260 14 , /* 14 */ 15 , /* 15 */
1261 16 , /* 16 */ 17 , /* 17 */
1262 18 , /* 18 */ 19 , /* 19 */
1263 20 , /* 20 */ 21 , /* 21 */
1264 22 , /* 22 */ 23 , /* 23 */
1265 24 , /* 24 */ 25 , /* 25 */
1266 26 , /* 26 */ 27 , /* 27 */
1267 28 , /* 28 */ 29 , /* 29 */
1268 30 , /* 30 */ 31 , /* 31 */
1270 32 , /* ' ' */ 34 , /* '!' */
1271 36 , /* '"' */ 39 , /* '#' */
1272 40 , /* '$' */ 43 , /* '%' */
1273 44 , /* '&' */ 45 , /* ''' */
1274 46 , /* '(' */ 47 , /* ')' */
1275 48 , /* '*' */ 50 , /* '+' */
1276 51 , /* ',' */ 52 , /* '-' */
1277 53 , /* '.' */ 54 , /* '/' */
1278 56 , /* '0' */ 57 , /* '1' */
1279 58 , /* '2' */ 59 , /* '3' */
1280 60 , /* '4' */ 61 , /* '5' */
1281 62 , /* '6' */ 63 , /* '7' */
1282 64 , /* '8' */ 65 , /* '9' */
1283 66 , /* ':' */ 67 , /* ';' */
1284 68 , /* '<' */ 69 , /* '=' */
1285 70 , /* '>' */ 71 , /* '?' */
1287 73 , /* '@' */ 74 , /* 'A' */
1288 90 , /* 'B' */ 92 , /* 'C' */
1289 96 , /* 'D' */ 100, /* 'E' */
1290 110, /* 'F' */ 112, /* 'G' */
1291 114, /* 'H' */ 116, /* 'I' */
1292 126, /* 'J' */ 128, /* 'K' */
1293 130, /* 'L' */ 132, /* 'M' */
1294 134, /* 'N' */ 138, /* 'O' */
1295 152, /* 'P' */ 154, /* 'Q' */
1296 156, /* 'R' */ 158, /* 'S' */
1297 162, /* 'T' */ 166, /* 'U' */
1298 176, /* 'V' */ 178, /* 'W' */
1299 180, /* 'X' */ 182, /* 'Y' */
1300 187, /* 'Z' */ 189, /* '[' */
1301 190, /* '\' */ 191, /* ']' */
1302 192, /* '^' */ 193, /* '_' */
1304 194, /* '`' */ 75 , /* 'a' */
1305 91 , /* 'b' */ 93 , /* 'c' */
1306 97 , /* 'd' */ 101, /* 'e' */
1307 111, /* 'f' */ 113, /* 'g' */
1308 115, /* 'h' */ 117, /* 'i' */
1309 127, /* 'j' */ 129, /* 'k' */
1310 131, /* 'l' */ 133, /* 'm' */
1311 135, /* 'n' */ 139, /* 'o' */
1312 153, /* 'p' */ 155, /* 'q' */
1313 157, /* 'r' */ 159, /* 's' */
1314 163, /* 't' */ 167, /* 'u' */
1315 177, /* 'v' */ 179, /* 'w' */
1316 181, /* 'x' */ 183, /* 'y' */
1317 188, /* 'z' */ 195, /* '{' */
1318 196, /* '|' */ 197, /* '}' */
1319 198, /* '~' */ 199, /* 127 */
1321 224, /* 128 */ 225, /* 129 */
1322 226, /* 130 */ 227, /* 131 */
1323 228, /* 132 */ 229, /* 133 */
1324 230, /* 134 */ 231, /* 135 */
1325 232, /* 136 */ 233, /* 137 */
1326 234, /* 138 */ 235, /* 139 */
1327 236, /* 140 */ 237, /* 141 */
1328 238, /* 142 */ 239, /* 143 */
1329 240, /* 144 */ 241, /* 145 */
1330 242, /* 146 */ 243, /* 147 */
1331 244, /* 148 */ 245, /* 149 */
1332 246, /* 150 */ 247, /* 151 */
1333 248, /* 152 */ 249, /* 153 */
1334 250, /* 154 */ 251, /* 155 */
1335 252, /* 156 */ 253, /* 157 */
1336 254, /* 158 */ 255, /* 159 */
1338 33 , /* 160 */ 35 , /* 161 */
1339 41 , /* 162 */ 42 , /* 163 */
1340 200, /* 164 */ 201, /* 165 */
1341 202, /* 166 */ 160, /* 167 */
1342 203, /* 168 */ 204, /* 169 */
1343 205, /* 170 */ 37 , /* 171 */
1344 206, /* 172 */ 207, /* 173 */
1345 208, /* 174 */ 209, /* 175 */
1346 210, /* 176 */ 211, /* 177 */
1347 212, /* 178 */ 213, /* 179 */
1348 214, /* 180 */ 215, /* 181 */
1349 216, /* 182 */ 217, /* 183 */
1350 218, /* 184 */ 219, /* 185 */
1351 220, /* 186 */ 38 , /* 187 */
1352 221, /* 188 */ 222, /* 189 */
1353 223, /* 190 */ 72 , /* 191 */
1355 76 , /* 192 */ 77 , /* 193 */
1356 78 , /* 194 */ 79 , /* 195 */
1357 80 , /* 196 */ 81 , /* 197 */
1358 82 , /* 198 */ 94 , /* 199 */
1359 102 , /* 200 */ 103, /* 201 */
1360 104, /* 202 */ 105, /* 203 */
1361 118, /* 204 */ 119, /* 205 */
1362 120, /* 206 */ 121, /* 207 */
1363 98 , /* 208 */ 136, /* 209 */
1364 140, /* 210 */ 141, /* 211 */
1365 142, /* 212 */ 143, /* 213 */
1366 144, /* 214 */ 49 , /* 215 */
1367 145, /* 216 */ 168, /* 217 */
1368 169, /* 218 */ 170, /* 219 */
1369 171, /* 220 */ 184, /* 221 */
1370 164, /* 222 */ 161, /* 223 */
1372 83 , /* 224 */ 84 , /* 225 */
1373 85 , /* 226 */ 86 , /* 227 */
1374 87 , /* 228 */ 88 , /* 229 */
1375 89 , /* 230 */ 95 , /* 231 */
1376 106, /* 232 */ 107, /* 233 */
1377 108, /* 234 */ 109, /* 235 */
1378 122, /* 236 */ 123, /* 237 */
1379 124, /* 238 */ 125, /* 239 */
1380 99 , /* 240 */ 137, /* 241 */
1381 146, /* 242 */ 147, /* 243 */
1382 148, /* 244 */ 149, /* 245 */
1383 150, /* 246 */ 55 , /* 247 */
1384 151, /* 248 */ 172, /* 249 */
1385 173, /* 250 */ 174, /* 251 */
1386 175, /* 252 */ 185, /* 253 */
1387 165, /* 254 */ 186, /* 255 */
1391 /* --------------------------------------------------------------------
1393 This is the list of strings. It is an array of pointers to strings,
1394 although how it is laid out is implementation dependant.
1396 const STRPTR __language_strings[] =
1398 /* A blank string: */
1401 /* The days of the week. Starts with the day which is called "Sunday"
1402 in English. Always used this order: What day the calender actually
1403 starts a week with is set using Locale->CalendarType.
1405 "Sunday" ,
1406 "Monday" ,
1407 "Tuesday" ,
1408 "Wednesday",
1409 "Thursday" ,
1410 "Friday" ,
1411 "Saturday" ,
1413 /* Abbreviated days of the week: */
1414 "Sun",
1415 "Mon",
1416 "Tue",
1417 "Wed",
1418 "Thu",
1419 "Fri",
1420 "Sat",
1422 /* Months of the year: */
1423 "January" ,
1424 "February" ,
1425 "March" ,
1426 "April" ,
1427 "May" ,
1428 "June" ,
1429 "July" ,
1430 "August" ,
1431 "September",
1432 "October" ,
1433 "November" ,
1434 "December" ,
1436 /* Abbreviated months of the year: */
1437 "Jan",
1438 "Feb",
1439 "Mar",
1440 "Apr",
1441 "May",
1442 "Jun",
1443 "Jul",
1444 "Aug",
1445 "Sep",
1446 "Oct",
1447 "Nov",
1448 "Dec",
1450 /* Yes and No: */
1451 "Yes", /* Yes - affirmative response; */
1452 "No" , /* No - negative response; */
1454 /* AM/PM strings AM 0000 -> 1159, PM 1200 -> 2359: */
1455 "am",
1456 "pm",
1458 /* Soft and hard hyphens: */
1459 "-", /* Soft; */
1460 "-", /* Hard; */
1462 /* Open and close quotes */
1463 "\"",
1464 "\"",
1466 /* Days: Relative day names: */
1467 "Yesterday", /* Yesterday - the day before the current; */
1468 "Today" , /* Today - the current day; */
1469 "Tomorrow" , /* Tomorrow - the next day; */
1470 "Future" /* Future - all days beyond the current. */
1474 /* This is the end-of-ROMtag marker. */
1475 const char end=0;