1
/* Copyright (C) 2000 MySQL AB
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.
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.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
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.
28
LC_COLLATE category + Level information
31
#ifndef DRIZZLED_INTERNAL_T_CTYPE_H
32
#define DRIZZLED_INTERNAL_T_CTYPE_H
39
typedef unsigned char tchar;
42
#define LAST_LEVEL 4 /* TOT_LEVELS - 1 */
47
/* level 1 symbols & order */
149
/* level 2 symbols & order */
151
L2_BLANK = TOT_LEVELS,
163
/* level 3 symbols & order */
165
L3_BLANK = TOT_LEVELS,
208
/* level 4 symbols & order */
210
L4_BLANK = TOT_LEVELS,
217
L_UPRUPR = TOT_LEVELS,
223
#define _is(c) (t_ctype[(c)][LAST_LEVEL])
227
#define _fllwvowel 64
228
#define _uprvowel 128
229
#define _lwrvowel 256
231
#define _diacrt1 1024
232
#define _diacrt2 2048
233
#define _combine 4096
236
#define _rearvowel (_fllwvowel | _uprvowel | _lwrvowel)
237
#define _diacrt (_diacrt1 | _diacrt2)
238
#define istalpha(c) ( _is(c) & (_consnt|_ldvowel|_rearvowel|\
239
_tone|_diacrt1|_diacrt2) )
240
#define isconsnt(c) ( _is(c) & _consnt )
241
#define isldvowel(c) ( _is(c) & _ldvowel )
242
#define isfllwvowel(c) ( _is(c) & _fllwvowel )
243
#define ismidvowel(c) ( _is(c) & (_ldvowel|_fllwvowel) )
244
#define isuprvowel(c) ( _is(c) & _uprvowel )
245
#define islwrvowel(c) ( _is(c) & _lwrvowel )
246
#define isuprlwrvowel(c) ( _is(c) & (_lwrvowel | _uprvowel))
247
#define isrearvowel(c) ( _is(c) & _rearvowel )
248
#define isvowel(c) ( _is(c) & (_ldvowel|_rearvowel) )
249
#define istone(c) ( _is(c) & _tone )
250
#define isunldable(c) ( _is(c) & (_rearvowel|_tone|_diacrt1|_diacrt2) )
251
#define iscombinable(c) ( _is(c) & _combine )
252
#define istdigit(c) ( _is(c) & _tdig )
253
#define isstone(c) ( _is(c) & _stone )
254
#define isdiacrt1(c) ( _is(c) & _diacrt1)
255
#define isdiacrt2(c) ( _is(c) & _diacrt2)
256
#define isdiacrt(c) ( _is(c) & _diacrt)
258
/* Function prototype called by sql/field.cc */
259
void ThNormalize(unsigned char* ptr, uint32_t field_length, const unsigned char* from, uint32_t length);
261
} /* namespace internal */
262
} /* namespace drizzled */
264
#endif /* DRIZZLED_INTERNAL_T_CTYPE_H */