Eneboo - Documentación para desarrolladores
src/libmysql_std/include/t_ctype.h
Ir a la documentación de este archivo.
00001 /* Copyright (C) 2000 MySQL AB
00002 
00003    This program is free software; you can redistribute it and/or modify
00004    it under the terms of the GNU General Public License as published by
00005    the Free Software Foundation; version 2 of the License.
00006 
00007    This program is distributed in the hope that it will be useful,
00008    but WITHOUT ANY WARRANTY; without even the implied warranty of
00009    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010    GNU General Public License for more details.
00011 
00012    You should have received a copy of the GNU General Public License
00013    along with this program; if not, write to the Free Software
00014    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
00015 
00016 /*
00017   Copyright (C) 1998, 1999 by Pruet Boonma, all rights reserved.
00018   Copyright (C) 1998 by Theppitak Karoonboonyanan, all rights reserved.
00019   Permission to use, copy, modify, distribute and sell this software
00020    and its documentation for any purpose is hereby granted without fee,
00021    provided that the above copyright notice appear in all copies.
00022    Smaphan Raruenrom and Pruet Boonma makes no representations about 
00023    the suitability of this software for any purpose.  It is provided
00024     "as is" without express or implied warranty.
00025 */
00026 
00027 /* LC_COLLATE category + Level information */
00028 
00029 #ifndef _t_ctype_h
00030 #define _t_ctype_h
00031 
00032 #define TOT_LEVELS 5
00033 #define LAST_LEVEL 4  /* TOT_LEVELS - 1 */
00034 
00035 #define IGNORE 0
00036 
00037 
00038 /* level 1 symbols & order */
00039 enum l1_symbols {
00040     L1_08 = TOT_LEVELS,
00041     L1_18,
00042     L1_28,
00043     L1_38,
00044     L1_48,
00045     L1_58,
00046     L1_68,
00047     L1_78,
00048     L1_88,
00049     L1_98,
00050     L1_A8,
00051     L1_B8,
00052     L1_C8,
00053     L1_D8,
00054     L1_E8,
00055     L1_F8,
00056     L1_G8,
00057     L1_H8,
00058     L1_I8,
00059     L1_J8,
00060     L1_K8,
00061     L1_L8,
00062     L1_M8,
00063     L1_N8,
00064     L1_O8,
00065     L1_P8,
00066     L1_Q8,
00067     L1_R8,
00068     L1_S8,
00069     L1_T8,
00070     L1_U8,
00071     L1_V8,
00072     L1_W8,
00073     L1_X8,
00074     L1_Y8,
00075     L1_Z8,
00076     L1_KO_KAI,
00077     L1_KHO_KHAI,
00078     L1_KHO_KHUAT,
00079     L1_KHO_KHWAI,
00080     L1_KHO_KHON,
00081     L1_KHO_RAKHANG,
00082     L1_NGO_NGU,
00083     L1_CHO_CHAN,
00084     L1_CHO_CHING,
00085     L1_CHO_CHANG,
00086     L1_SO_SO,
00087     L1_CHO_CHOE,
00088     L1_YO_YING,
00089     L1_DO_CHADA,
00090     L1_TO_PATAK,
00091     L1_THO_THAN,
00092     L1_THO_NANGMONTHO,
00093     L1_THO_PHUTHAO,
00094     L1_NO_NEN,
00095     L1_DO_DEK,
00096     L1_TO_TAO,
00097     L1_THO_THUNG,
00098     L1_THO_THAHAN,
00099     L1_THO_THONG,
00100     L1_NO_NU,
00101     L1_BO_BAIMAI,
00102     L1_PO_PLA,
00103     L1_PHO_PHUNG,
00104     L1_FO_FA,
00105     L1_PHO_PHAN,
00106     L1_FO_FAN,
00107     L1_PHO_SAMPHAO,
00108     L1_MO_MA,
00109     L1_YO_YAK,
00110     L1_RO_RUA,
00111     L1_RU,
00112     L1_LO_LING,
00113     L1_LU,
00114     L1_WO_WAEN,
00115     L1_SO_SALA,
00116     L1_SO_RUSI,
00117     L1_SO_SUA,
00118     L1_HO_HIP,
00119     L1_LO_CHULA,
00120     L1_O_ANG,
00121     L1_HO_NOKHUK,
00122     L1_NKHIT,
00123     L1_SARA_A,
00124     L1_MAI_HAN_AKAT,
00125     L1_SARA_AA,
00126     L1_SARA_AM,
00127     L1_SARA_I,
00128     L1_SARA_II,
00129     L1_SARA_UE,
00130     L1_SARA_UEE,
00131     L1_SARA_U,
00132     L1_SARA_UU,
00133     L1_SARA_E,
00134     L1_SARA_AE,
00135     L1_SARA_O,
00136     L1_SARA_AI_MAIMUAN,
00137     L1_SARA_AI_MAIMALAI
00138 };
00139 
00140 /* level 2 symbols & order */
00141 enum l2_symbols {
00142     L2_BLANK = TOT_LEVELS,
00143     L2_THAII,
00144     L2_YAMAK,
00145     L2_PINTHU,
00146     L2_GARAN,
00147     L2_TYKHU,
00148     L2_TONE1,
00149     L2_TONE2,
00150     L2_TONE3,
00151     L2_TONE4
00152 };
00153 
00154 /* level 3 symbols & order */
00155 enum l3_symbols {
00156         L3_BLANK = TOT_LEVELS,
00157     L3_SPACE,
00158     L3_NB_SACE,
00159     L3_LOW_LINE,
00160     L3_HYPHEN,
00161     L3_COMMA,
00162     L3_SEMICOLON,
00163     L3_COLON,
00164     L3_EXCLAMATION,
00165     L3_QUESTION,
00166     L3_SOLIDUS,
00167     L3_FULL_STOP,
00168     L3_PAIYAN_NOI,
00169     L3_MAI_YAMOK,
00170     L3_GRAVE,
00171     L3_CIRCUMFLEX,
00172     L3_TILDE,
00173     L3_APOSTROPHE,
00174     L3_QUOTATION,
00175     L3_L_PARANTHESIS,
00176     L3_L_BRACKET,
00177     L3_L_BRACE,
00178     L3_R_BRACE,
00179     L3_R_BRACKET,
00180     L3_R_PARENTHESIS,
00181     L3_AT,
00182     L3_BAHT,
00183     L3_DOLLAR,
00184     L3_FONGMAN,
00185     L3_ANGKHANKHU,
00186     L3_KHOMUT,
00187     L3_ASTERISK,
00188     L3_BK_SOLIDUS,
00189     L3_AMPERSAND,
00190     L3_NUMBER,
00191     L3_PERCENT,
00192     L3_PLUS,
00193     L3_LESS_THAN,
00194     L3_EQUAL,
00195     L3_GREATER_THAN,
00196     L3_V_LINE
00197 };
00198 
00199 /* level 4 symbols & order */
00200 enum l4_symbols {
00201     L4_BLANK = TOT_LEVELS,
00202     L4_MIN,
00203     L4_CAP,
00204     L4_EXT
00205 };
00206 
00207 enum level_symbols {
00208     L_UPRUPR = TOT_LEVELS,
00209     L_UPPER,
00210     L_MIDDLE,
00211     L_LOWER
00212 };
00213 
00214 #define _is(c)                  (t_ctype[(c)][LAST_LEVEL])
00215 #define _level                  8
00216 #define _consnt                 16
00217 #define _ldvowel                32
00218 #define _fllwvowel              64
00219 #define _uprvowel               128
00220 #define _lwrvowel               256
00221 #define _tone                   512
00222 #define _diacrt1                1024
00223 #define _diacrt2                2048
00224 #define _combine                4096
00225 #define _stone                  8192
00226 #define _tdig                   16384
00227 #define _rearvowel              (_fllwvowel | _uprvowel | _lwrvowel)
00228 #define _diacrt                 (_diacrt1 | _diacrt2)
00229 #define levelof(c)              ( _is(c) & _level )
00230 #define isthai(c)               ( (c) >= 128 )
00231 #define istalpha(c)             ( _is(c) & (_consnt|_ldvowel|_rearvowel|\
00232                          _tone|_diacrt1|_diacrt2) )
00233 #define isconsnt(c)             ( _is(c) & _consnt )
00234 #define isldvowel(c)    ( _is(c) & _ldvowel )
00235 #define isfllwvowel(c)  ( _is(c) & _fllwvowel )
00236 #define ismidvowel(c)   ( _is(c) & (_ldvowel|_fllwvowel) )
00237 #define isuprvowel(c)   ( _is(c) & _uprvowel )
00238 #define islwrvowel(c)   ( _is(c) & _lwrvowel )
00239 #define isuprlwrvowel(c) ( _is(c) & (_lwrvowel | _uprvowel))
00240 #define isrearvowel(c)  ( _is(c) & _rearvowel )
00241 #define isvowel(c)      ( _is(c) & (_ldvowel|_rearvowel) )
00242 #define istone(c)       ( _is(c) & _tone )
00243 #define isunldable(c)   ( _is(c) & (_rearvowel|_tone|_diacrt1|_diacrt2) )
00244 #define iscombinable(c) ( _is(c) & _combine )
00245 #define istdigit(c)     ( _is(c) & _tdig )
00246 #define isstone(c)      ( _is(c) & _stone )
00247 #define isdiacrt1(c)    ( _is(c) & _diacrt1)
00248 #define isdiacrt2(c)    ( _is(c) & _diacrt2)
00249 #define isdiacrt(c)             ( _is(c) & _diacrt) 
00250 
00251 /* Function prototype called by sql/field.cc */
00252 void ThNormalize(uchar* ptr, uint field_length, const uchar* from, uint length);
00253 
00254 #endif  
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'