Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | /* |
2 | * ========== Copyright Header Begin ========================================== | |
3 | * | |
4 | * Hypervisor Software File: ctype.c | |
5 | * | |
6 | * Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved. | |
7 | * | |
8 | * - Do no alter or remove copyright notices | |
9 | * | |
10 | * - Redistribution and use of this software in source and binary forms, with | |
11 | * or without modification, are permitted provided that the following | |
12 | * conditions are met: | |
13 | * | |
14 | * - Redistribution of source code must retain the above copyright notice, | |
15 | * this list of conditions and the following disclaimer. | |
16 | * | |
17 | * - Redistribution in binary form must reproduce the above copyright notice, | |
18 | * this list of conditions and the following disclaimer in the | |
19 | * documentation and/or other materials provided with the distribution. | |
20 | * | |
21 | * Neither the name of Sun Microsystems, Inc. or the names of contributors | |
22 | * may be used to endorse or promote products derived from this software | |
23 | * without specific prior written permission. | |
24 | * | |
25 | * This software is provided "AS IS," without a warranty of any kind. | |
26 | * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, | |
27 | * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A | |
28 | * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN | |
29 | * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR | |
30 | * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR | |
31 | * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN | |
32 | * OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR | |
33 | * FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE | |
34 | * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, | |
35 | * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF | |
36 | * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. | |
37 | * | |
38 | * You acknowledge that this software is not designed, licensed or | |
39 | * intended for use in the design, construction, operation or maintenance of | |
40 | * any nuclear facility. | |
41 | * | |
42 | * ========== Copyright Header End ============================================ | |
43 | */ | |
44 | /* | |
45 | * Copyright 2003 Sun Microsystems, Inc. All rights reserved. | |
46 | * Use is subject to license terms. | |
47 | */ | |
48 | ||
49 | #pragma ident "@(#)ctype.c 1.2 03/11/10 SMI" | |
50 | ||
51 | #include <locale.h> | |
52 | #include <ctype.h> | |
53 | #include <sys/types.h> | |
54 | #include "locale.h" | |
55 | ||
56 | unsigned char _ctype[SZ_TOTAL] = | |
57 | { | |
58 | 0, /* EOF */ | |
59 | _C, _C, _C, _C, _C, _C, _C, _C, | |
60 | _C, _S|_C, _S|_C, _S|_C, _S|_C, _S|_C, _C, _C, | |
61 | _C, _C, _C, _C, _C, _C, _C, _C, | |
62 | _C, _C, _C, _C, _C, _C, _C, _C, | |
63 | _S|_B, _P, _P, _P, _P, _P, _P, _P, | |
64 | _P, _P, _P, _P, _P, _P, _P, _P, | |
65 | _N|_X, _N|_X, _N|_X, _N|_X, _N|_X, _N|_X, _N|_X, _N|_X, | |
66 | _N|_X, _N|_X, _P, _P, _P, _P, _P, _P, | |
67 | _P, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U, | |
68 | _U, _U, _U, _U, _U, _U, _U, _U, | |
69 | _U, _U, _U, _U, _U, _U, _U, _U, | |
70 | _U, _U, _U, _P, _P, _P, _P, _P, | |
71 | _P, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L, | |
72 | _L, _L, _L, _L, _L, _L, _L, _L, | |
73 | _L, _L, _L, _L, _L, _L, _L, _L, | |
74 | _L, _L, _L, _P, _P, _P, _P, _C, | |
75 | 0, 0, 0, 0, 0, 0, 0, 0, | |
76 | 0, 0, 0, 0, 0, 0, 0, 0, | |
77 | 0, 0, 0, 0, 0, 0, 0, 0, | |
78 | 0, 0, 0, 0, 0, 0, 0, 0, | |
79 | 0, 0, 0, 0, 0, 0, 0, 0, | |
80 | 0, 0, 0, 0, 0, 0, 0, 0, | |
81 | 0, 0, 0, 0, 0, 0, 0, 0, | |
82 | 0, 0, 0, 0, 0, 0, 0, 0, | |
83 | 0, 0, 0, 0, 0, 0, 0, 0, | |
84 | 0, 0, 0, 0, 0, 0, 0, 0, | |
85 | 0, 0, 0, 0, 0, 0, 0, 0, | |
86 | 0, 0, 0, 0, 0, 0, 0, 0, | |
87 | 0, 0, 0, 0, 0, 0, 0, 0, | |
88 | 0, 0, 0, 0, 0, 0, 0, 0, | |
89 | 0, 0, 0, 0, 0, 0, 0, 0, | |
90 | 0, 0, 0, 0, 0, 0, 0, 0, | |
91 | ||
92 | /* tolower() and toupper() conversion table */ 0, | |
93 | 0, 1, 2, 3, 4, 5, 6, 7, | |
94 | 8, 9, 10, 11, 12, 13, 14, 15, | |
95 | 16, 17, 18, 19, 20, 21, 22, 23, | |
96 | 24, 25, 26, 27, 28, 29, 30, 31, | |
97 | 32, 33, 34, 35, 36, 37, 38, 39, | |
98 | 40, 41, 42, 43, 44, 45, 46, 47, | |
99 | 48, 49, 50, 51, 52, 53, 54, 55, | |
100 | 56, 57, 58, 59, 60, 61, 62, 63, | |
101 | 64, 97, 98, 99, 100, 101, 102, 103, | |
102 | 104, 105, 106, 107, 108, 109, 110, 111, | |
103 | 112, 113, 114, 115, 116, 117, 118, 119, | |
104 | 120, 121, 122, 91, 92, 93, 94, 95, | |
105 | 96, 65, 66, 67, 68, 69, 70, 71, | |
106 | 72, 73, 74, 75, 76, 77, 78, 79, | |
107 | 80, 81, 82, 83, 84, 85, 86, 87, | |
108 | 88, 89, 90, 123, 124, 125, 126, 127, | |
109 | 0, 0, 0, 0, 0, 0, 0, 0, | |
110 | 0, 0, 0, 0, 0, 0, 0, 0, | |
111 | 0, 0, 0, 0, 0, 0, 0, 0, | |
112 | 0, 0, 0, 0, 0, 0, 0, 0, | |
113 | 0, 0, 0, 0, 0, 0, 0, 0, | |
114 | 0, 0, 0, 0, 0, 0, 0, 0, | |
115 | 0, 0, 0, 0, 0, 0, 0, 0, | |
116 | 0, 0, 0, 0, 0, 0, 0, 0, | |
117 | 0, 0, 0, 0, 0, 0, 0, 0, | |
118 | 0, 0, 0, 0, 0, 0, 0, 0, | |
119 | 0, 0, 0, 0, 0, 0, 0, 0, | |
120 | 0, 0, 0, 0, 0, 0, 0, 0, | |
121 | 0, 0, 0, 0, 0, 0, 0, 0, | |
122 | 0, 0, 0, 0, 0, 0, 0, 0, | |
123 | 0, 0, 0, 0, 0, 0, 0, 0, | |
124 | 0, 0, 0, 0, 0, 0, 0, 0, | |
125 | /* CSWIDTH information */ | |
126 | 1, 0, 0, 1, 0, 0, 1, | |
127 | }; | |
128 | ||
129 | unsigned char _numeric[SZ_NUMERIC] = | |
130 | { | |
131 | '.', '\0', | |
132 | }; |