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