diff options
author | Michael Widenius <monty@askmonty.org> | 2010-01-06 21:20:16 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2010-01-06 21:20:16 +0200 |
commit | f83113df07d6ef8e8a6d1db8f6dc3bb90fb0652a (patch) | |
tree | dd61d137ac567ebd15d245f0d24a12e763f78545 /strings/ctype-gb2312.c | |
parent | 43ddd3b89ffea24147332f95fb7c8929d2873e63 (diff) | |
download | mariadb-git-f83113df07d6ef8e8a6d1db8f6dc3bb90fb0652a.tar.gz |
Applied Antony T Curtis patch for declaring many CHARSET objects as const
Removed compiler warnings
extra/libevent/epoll.c:
Removed compiler warnings
extra/libevent/evbuffer.c:
Removed compiler warnings
extra/libevent/event.c:
Removed compiler warnings
extra/libevent/select.c:
Removed compiler warnings
extra/libevent/signal.c:
Removed compiler warnings
include/m_ctype.h:
Define CHARSET_INFO, MY_CHARSET_HANDLER, MY_COLLATION_HANDLER, MY_UNICASE_INFO, MY_UNI_CTYPE and MY_UNI_IDX as const structures.
Declare that pointers point to const data
include/m_string.h:
Declare that pointers point to const data
include/my_sys.h:
Redefine variables and function prototypes
include/mysql.h:
Declare charset as const
include/mysql.h.pp:
Declare charset as const
include/mysql/plugin.h:
Declare charset as const
include/mysql/plugin.h.pp:
Declare charset as const
mysys/charset-def.c:
Charset can't be of type CHARSET_INFO as they are changed when they are initialized.
mysys/charset.c:
Functions that change CHARSET_INFO must use 'struct charset_info_st'
Add temporary variables to not have to change all_charsets[] (Which now is const)
sql-common/client.c:
Added cast to const
sql/item_cmpfunc.h:
Added cast to avoid compiler error.
sql/sql_class.cc:
Added cast to const
sql/sql_lex.cc:
Added cast to const
storage/maria/ma_ft_boolean_search.c:
Added cast to avoid compiler error.
storage/maria/ma_ft_parser.c:
Added cast to avoid compiler error.
storage/maria/ma_search.c:
Added cast to const
storage/myisam/ft_boolean_search.c:
Added cast to avoid compiler error
storage/myisam/ft_parser.c:
Added cast to avoid compiler error
storage/myisam/mi_search.c:
Added cast to const
storage/pbxt/src/datadic_xt.cc:
Added cast to const
storage/pbxt/src/ha_pbxt.cc:
Added cast to const
Removed compiler warning by changing prototype of XTThreadPtr()
storage/pbxt/src/myxt_xt.h:
Character sets should be const
storage/pbxt/src/xt_defs.h:
Character sets should be const
storage/xtradb/btr/btr0cur.c:
Removed compiler warning
strings/conf_to_src.c:
Added const
Functions that change CHARSET_INFO must use 'struct charset_info_st'
strings/ctype-big5.c:
Made arrays const
strings/ctype-bin.c:
Made arrays const
strings/ctype-cp932.c:
Made arrays const
strings/ctype-czech.c:
Made arrays const
strings/ctype-euc_kr.c:
Made arrays const
strings/ctype-eucjpms.c:
Made arrays const
strings/ctype-extra.c:
Made arrays const
strings/ctype-gb2312.c:
Made arrays const
strings/ctype-gbk.c:
Made arrays const
strings/ctype-latin1.c:
Made arrays const
strings/ctype-mb.c:
Made arrays const
strings/ctype-simple.c:
Made arrays const
strings/ctype-sjis.c:
Made arrays const
strings/ctype-tis620.c:
Made arrays const
strings/ctype-uca.c:
Made arrays const
strings/ctype-ucs2.c:
Made arrays const
strings/ctype-ujis.c:
Made arrays const
strings/ctype-utf8.c:
Made arrays const
strings/ctype-win1250ch.c:
Made arrays const
strings/ctype.c:
Made arrays const
Added cast to const
Functions that change CHARSET_INFO must use 'struct charset_info_st'
strings/int2str.c:
Added cast to const
Diffstat (limited to 'strings/ctype-gb2312.c')
-rw-r--r-- | strings/ctype-gb2312.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/strings/ctype-gb2312.c b/strings/ctype-gb2312.c index 0267f35ff5c..641fe2ea24e 100644 --- a/strings/ctype-gb2312.c +++ b/strings/ctype-gb2312.c @@ -29,7 +29,7 @@ #ifdef HAVE_CHARSET_gb2312 -static uchar NEAR ctype_gb2312[257] = +static const uchar NEAR ctype_gb2312[257] = { 0, /* For standard library */ 32,32,32,32,32,32,32,32,32,40,40,40,40,40,32,32, @@ -50,7 +50,7 @@ static uchar NEAR ctype_gb2312[257] = 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0, }; -static uchar NEAR to_lower_gb2312[]= +static const uchar NEAR to_lower_gb2312[]= { '\000','\001','\002','\003','\004','\005','\006','\007', '\010','\011','\012','\013','\014','\015','\016','\017', @@ -86,7 +86,7 @@ static uchar NEAR to_lower_gb2312[]= (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377', }; -static uchar NEAR to_upper_gb2312[]= +static const uchar NEAR to_upper_gb2312[]= { '\000','\001','\002','\003','\004','\005','\006','\007', '\010','\011','\012','\013','\014','\015','\016','\017', @@ -122,7 +122,7 @@ static uchar NEAR to_upper_gb2312[]= (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377', }; -static uchar NEAR sort_order_gb2312[]= +static const uchar NEAR sort_order_gb2312[]= { '\000','\001','\002','\003','\004','\005','\006','\007', '\010','\011','\012','\013','\014','\015','\016','\017', @@ -178,7 +178,7 @@ static uint mbcharlen_gb2312(CHARSET_INFO *cs __attribute__((unused)),uint c) /* page 0 0x2121-0x2658 */ -static uint16 tab_gb2312_uni0[]={ +static const uint16 tab_gb2312_uni0[]={ 0x3000,0x3001,0x3002,0x30FB,0x02C9,0x02C7,0x00A8,0x3003, 0x3005,0x2015,0xFF5E,0x2016,0x2026,0x2018,0x2019,0x201C, 0x201D,0x3014,0x3015,0x3008,0x3009,0x300A,0x300B,0x300C, @@ -349,7 +349,7 @@ static uint16 tab_gb2312_uni0[]={ }; /* page 1 0x2721-0x296F */ -static uint16 tab_gb2312_uni1[]={ +static const uint16 tab_gb2312_uni1[]={ 0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0401,0x0416, 0x0417,0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E, 0x041F,0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426, @@ -426,7 +426,7 @@ static uint16 tab_gb2312_uni1[]={ 0x2545,0x2546,0x2547,0x2548,0x2549,0x254A,0x254B}; /* page 2 0x3021-0x777E */ -static uint16 tab_gb2312_uni2[]={ +static const uint16 tab_gb2312_uni2[]={ 0x554A,0x963F,0x57C3,0x6328,0x54CE,0x5509,0x54C0,0x7691, 0x764C,0x853C,0x77EE,0x827E,0x788D,0x7231,0x9698,0x978D, 0x6C28,0x5B89,0x4FFA,0x6309,0x6697,0x5CB8,0x80FA,0x6848, @@ -2724,7 +2724,7 @@ static int func_gb2312_uni_onechar(int code){ /* page 0 0x00A4-0x01DC */ -static uint16 tab_uni_gb23120[]={ +static const uint16 tab_uni_gb23120[]={ 0x2168, 0, 0,0x216C,0x2127, 0, 0, 0, 0, 0, 0, 0,0x2163,0x2140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -2767,7 +2767,7 @@ static uint16 tab_uni_gb23120[]={ 0x2838}; /* page 1 0x02C7-0x0451 */ -static uint16 tab_uni_gb23121[]={ +static const uint16 tab_uni_gb23121[]={ 0x2126, 0,0x2125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -2820,7 +2820,7 @@ static uint16 tab_uni_gb23121[]={ 0x2771, 0,0x2757}; /* page 2 0x2015-0x2312 */ -static uint16 tab_uni_gb23122[]={ +static const uint16 tab_uni_gb23122[]={ 0x212A,0x212C, 0,0x212E,0x212F, 0, 0,0x2130, 0x2131, 0, 0, 0, 0, 0, 0, 0, 0,0x212D, 0, 0, 0, 0, 0, 0, @@ -2919,7 +2919,7 @@ static uint16 tab_uni_gb23122[]={ 0, 0, 0, 0, 0,0x2150}; /* page 3 0x2460-0x2642 */ -static uint16 tab_uni_gb23123[]={ +static const uint16 tab_uni_gb23123[]={ 0x2259,0x225A,0x225B,0x225C,0x225D,0x225E,0x225F,0x2260, 0x2261,0x2262, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,0x2245,0x2246,0x2247,0x2248, @@ -2983,7 +2983,7 @@ static uint16 tab_uni_gb23123[]={ 0x2162, 0,0x2161}; /* page 4 0x3000-0x3129 */ -static uint16 tab_uni_gb23124[]={ +static const uint16 tab_uni_gb23124[]={ 0x2121,0x2122,0x2123,0x2128, 0,0x2129, 0, 0, 0x2134,0x2135,0x2136,0x2137,0x2138,0x2139,0x213A,0x213B, 0x213E,0x213F, 0,0x217E,0x2132,0x2133,0x213C,0x213D, @@ -3024,12 +3024,12 @@ static uint16 tab_uni_gb23124[]={ 0x2868,0x2869}; /* page 5 0x3220-0x3229 */ -static uint16 tab_uni_gb23125[]={ +static const uint16 tab_uni_gb23125[]={ 0x2265,0x2266,0x2267,0x2268,0x2269,0x226A,0x226B,0x226C, 0x226D,0x226E}; /* page 6 0x4E00-0x9B54 */ -static uint16 tab_uni_gb23126[]={ +static const uint16 tab_uni_gb23126[]={ 0x523B,0x3621, 0,0x465F, 0, 0, 0,0x4D72, 0x5549,0x487D,0x494F,0x4F42,0x5822,0x323B,0x536B, 0, 0x5824,0x3373, 0,0x5728,0x4752,0x5827,0x4A40, 0, @@ -5507,7 +5507,7 @@ static uint16 tab_uni_gb23126[]={ 0,0x774E, 0, 0,0x4427}; /* page 7 0x9C7C-0x9CE2 */ -static uint16 tab_uni_gb23127[]={ +static const uint16 tab_uni_gb23127[]={ 0x5363, 0, 0,0x764F, 0,0x4233,0x7650, 0, 0,0x7651,0x7652,0x7653,0x7654, 0, 0,0x7656, 0,0x312B,0x7657, 0,0x7658,0x7659,0x765A, 0, @@ -5523,7 +5523,7 @@ static uint16 tab_uni_gb23127[]={ 0x772C,0x772D,0x415B,0x772E, 0, 0,0x772F}; /* page 8 0x9E1F-0x9FA0 */ -static uint16 tab_uni_gb23128[]={ +static const uint16 tab_uni_gb23128[]={ 0x4471,0x702F,0x3C26,0x7030,0x4379, 0,0x4538,0x513B, 0,0x7031,0x7032,0x7033,0x7034,0x7035,0x513C, 0, 0x516C, 0,0x7037,0x7036,0x5427, 0,0x4D52,0x7038, @@ -5575,7 +5575,7 @@ static uint16 tab_uni_gb23128[]={ 0x396A,0x595F}; /* page 9 0xFF01-0xFFE5 */ -static uint16 tab_uni_gb23129[]={ +static const uint16 tab_uni_gb23129[]={ 0x2321,0x2322,0x2323,0x2167,0x2325,0x2326,0x2327,0x2328, 0x2329,0x232A,0x232B,0x232C,0x232D,0x232E,0x232F,0x2330, 0x2331,0x2332,0x2333,0x2334,0x2335,0x2336,0x2337,0x2338, @@ -5765,7 +5765,7 @@ static MY_CHARSET_HANDLER my_charset_handler= }; -CHARSET_INFO my_charset_gb2312_chinese_ci= +struct charset_info_st my_charset_gb2312_chinese_ci= { 24,0,0, /* number */ MY_CS_COMPILED|MY_CS_PRIMARY, /* state */ @@ -5797,7 +5797,7 @@ CHARSET_INFO my_charset_gb2312_chinese_ci= &my_collation_ci_handler }; -CHARSET_INFO my_charset_gb2312_bin= +struct charset_info_st my_charset_gb2312_bin= { 86,0,0, /* number */ MY_CS_COMPILED|MY_CS_BINSORT, /* state */ |