Drizzled Public API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
t_ctype.h
1
/* Copyright (C) 2000 MySQL AB
2
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; version 2 of the License.
6
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
11
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
15
16
/*
17
Copyright (C) 1998, 1999 by Pruet Boonma, all rights reserved.
18
Copyright (C) 1998 by Theppitak Karoonboonyanan, all rights reserved.
19
Permission to use, copy, modify, distribute and sell this software
20
and its documentation for any purpose is hereby granted without fee,
21
provided that the above copyright notice appear in all copies.
22
Smaphan Raruenrom and Pruet Boonma makes no representations about
23
the suitability of this software for any purpose. It is provided
24
"as is" without express or implied warranty.
25
*/
26
27
/*
28
LC_COLLATE category + Level information
29
*/
30
31
#pragma once
32
33
namespace
drizzled
34
{
35
namespace
internal
36
{
37
38
typedef
unsigned
char
tchar;
39
40
#define TOT_LEVELS 5
41
#define LAST_LEVEL 4
/* TOT_LEVELS - 1 */
42
43
#define IGNORE 0
44
45
46
/* level 1 symbols & order */
47
enum
l1_symbols {
48
L1_08 = TOT_LEVELS,
49
L1_18,
50
L1_28,
51
L1_38,
52
L1_48,
53
L1_58,
54
L1_68,
55
L1_78,
56
L1_88,
57
L1_98,
58
L1_A8,
59
L1_B8,
60
L1_C8,
61
L1_D8,
62
L1_E8,
63
L1_F8,
64
L1_G8,
65
L1_H8,
66
L1_I8,
67
L1_J8,
68
L1_K8,
69
L1_L8,
70
L1_M8,
71
L1_N8,
72
L1_O8,
73
L1_P8,
74
L1_Q8,
75
L1_R8,
76
L1_S8,
77
L1_T8,
78
L1_U8,
79
L1_V8,
80
L1_W8,
81
L1_X8,
82
L1_Y8,
83
L1_Z8,
84
L1_KO_KAI,
85
L1_KHO_KHAI,
86
L1_KHO_KHUAT,
87
L1_KHO_KHWAI,
88
L1_KHO_KHON,
89
L1_KHO_RAKHANG,
90
L1_NGO_NGU,
91
L1_CHO_CHAN,
92
L1_CHO_CHING,
93
L1_CHO_CHANG,
94
L1_SO_SO,
95
L1_CHO_CHOE,
96
L1_YO_YING,
97
L1_DO_CHADA,
98
L1_TO_PATAK,
99
L1_THO_THAN,
100
L1_THO_NANGMONTHO,
101
L1_THO_PHUTHAO,
102
L1_NO_NEN,
103
L1_DO_DEK,
104
L1_TO_TAO,
105
L1_THO_THUNG,
106
L1_THO_THAHAN,
107
L1_THO_THONG,
108
L1_NO_NU,
109
L1_BO_BAIMAI,
110
L1_PO_PLA,
111
L1_PHO_PHUNG,
112
L1_FO_FA,
113
L1_PHO_PHAN,
114
L1_FO_FAN,
115
L1_PHO_SAMPHAO,
116
L1_MO_MA,
117
L1_YO_YAK,
118
L1_RO_RUA,
119
L1_RU,
120
L1_LO_LING,
121
L1_LU,
122
L1_WO_WAEN,
123
L1_SO_SALA,
124
L1_SO_RUSI,
125
L1_SO_SUA,
126
L1_HO_HIP,
127
L1_LO_CHULA,
128
L1_O_ANG,
129
L1_HO_NOKHUK,
130
L1_NKHIT,
131
L1_SARA_A,
132
L1_MAI_HAN_AKAT,
133
L1_SARA_AA,
134
L1_SARA_AM,
135
L1_SARA_I,
136
L1_SARA_II,
137
L1_SARA_UE,
138
L1_SARA_UEE,
139
L1_SARA_U,
140
L1_SARA_UU,
141
L1_SARA_E,
142
L1_SARA_AE,
143
L1_SARA_O,
144
L1_SARA_AI_MAIMUAN,
145
L1_SARA_AI_MAIMALAI
146
};
147
148
/* level 2 symbols & order */
149
enum
l2_symbols {
150
L2_BLANK = TOT_LEVELS,
151
L2_THAII,
152
L2_YAMAK,
153
L2_PINTHU,
154
L2_GARAN,
155
L2_TYKHU,
156
L2_TONE1,
157
L2_TONE2,
158
L2_TONE3,
159
L2_TONE4
160
};
161
162
/* level 3 symbols & order */
163
enum
l3_symbols {
164
L3_BLANK = TOT_LEVELS,
165
L3_SPACE,
166
L3_NB_SACE,
167
L3_LOW_LINE,
168
L3_HYPHEN,
169
L3_COMMA,
170
L3_SEMICOLON,
171
L3_COLON,
172
L3_EXCLAMATION,
173
L3_QUESTION,
174
L3_SOLIDUS,
175
L3_FULL_STOP,
176
L3_PAIYAN_NOI,
177
L3_MAI_YAMOK,
178
L3_GRAVE,
179
L3_CIRCUMFLEX,
180
L3_TILDE,
181
L3_APOSTROPHE,
182
L3_QUOTATION,
183
L3_L_PARANTHESIS,
184
L3_L_BRACKET,
185
L3_L_BRACE,
186
L3_R_BRACE,
187
L3_R_BRACKET,
188
L3_R_PARENTHESIS,
189
L3_AT,
190
L3_BAHT,
191
L3_DOLLAR,
192
L3_FONGMAN,
193
L3_ANGKHANKHU,
194
L3_KHOMUT,
195
L3_ASTERISK,
196
L3_BK_SOLIDUS,
197
L3_AMPERSAND,
198
L3_NUMBER,
199
L3_PERCENT,
200
L3_PLUS,
201
L3_LESS_THAN,
202
L3_EQUAL,
203
L3_GREATER_THAN,
204
L3_V_LINE
205
};
206
207
/* level 4 symbols & order */
208
enum
l4_symbols {
209
L4_BLANK = TOT_LEVELS,
210
L4_MIN,
211
L4_CAP,
212
L4_EXT
213
};
214
215
enum
level_symbols {
216
L_UPRUPR = TOT_LEVELS,
217
L_UPPER,
218
L_MIDDLE,
219
L_LOWER
220
};
221
222
#define _is(c) (t_ctype[(c)][LAST_LEVEL])
223
#define _level 8
224
#define _consnt 16
225
#define _ldvowel 32
226
#define _fllwvowel 64
227
#define _uprvowel 128
228
#define _lwrvowel 256
229
#define _tone 512
230
#define _diacrt1 1024
231
#define _diacrt2 2048
232
#define _combine 4096
233
#define _stone 8192
234
#define _tdig 16384
235
#define _rearvowel (_fllwvowel | _uprvowel | _lwrvowel)
236
#define _diacrt (_diacrt1 | _diacrt2)
237
#define istalpha(c) ( _is(c) & (_consnt|_ldvowel|_rearvowel|\
238
_tone|_diacrt1|_diacrt2) )
239
#define isconsnt(c) ( _is(c) & _consnt )
240
#define isldvowel(c) ( _is(c) & _ldvowel )
241
#define isfllwvowel(c) ( _is(c) & _fllwvowel )
242
#define ismidvowel(c) ( _is(c) & (_ldvowel|_fllwvowel) )
243
#define isuprvowel(c) ( _is(c) & _uprvowel )
244
#define islwrvowel(c) ( _is(c) & _lwrvowel )
245
#define isuprlwrvowel(c) ( _is(c) & (_lwrvowel | _uprvowel))
246
#define isrearvowel(c) ( _is(c) & _rearvowel )
247
#define isvowel(c) ( _is(c) & (_ldvowel|_rearvowel) )
248
#define istone(c) ( _is(c) & _tone )
249
#define isunldable(c) ( _is(c) & (_rearvowel|_tone|_diacrt1|_diacrt2) )
250
#define iscombinable(c) ( _is(c) & _combine )
251
#define istdigit(c) ( _is(c) & _tdig )
252
#define isstone(c) ( _is(c) & _stone )
253
#define isdiacrt1(c) ( _is(c) & _diacrt1)
254
#define isdiacrt2(c) ( _is(c) & _diacrt2)
255
#define isdiacrt(c) ( _is(c) & _diacrt)
256
257
/* Function prototype called by sql/field.cc */
258
void
ThNormalize(
unsigned
char
* ptr, uint32_t field_length,
const
unsigned
char
* from, uint32_t length);
259
260
}
/* namespace internal */
261
}
/* namespace drizzled */
262
drizzled
internal
t_ctype.h
Generated on Wed Jan 29 2014 17:38:27 for drizzle by
1.8.6