diff options
Diffstat (limited to 'strings')
45 files changed, 57 insertions, 52 deletions
diff --git a/strings/atof.c b/strings/atof.c index 1ce16027089..1284695d287 100644 --- a/strings/atof.c +++ b/strings/atof.c @@ -23,7 +23,7 @@ Must be inited with init_my_atof to handle possibly overflows. */ -#include <global.h> +#include <my_global.h> #ifdef USE_MY_ATOF /* Skipp if we don't want it */ #include <m_ctype.h> #include <floatingpoint.h> diff --git a/strings/bchange.c b/strings/bchange.c index 99066cf1e95..68b1434de4f 100644 --- a/strings/bchange.c +++ b/strings/bchange.c @@ -25,7 +25,7 @@ src in a buffer with tot_length bytes. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" void bchange(register char *dst, uint old_length, register const char *src, uint new_length, uint tot_length) diff --git a/strings/bcmp.c b/strings/bcmp.c index 3dce5025b64..5f872afc709 100644 --- a/strings/bcmp.c +++ b/strings/bcmp.c @@ -22,7 +22,7 @@ Now only used with purify. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #if !defined(bcmp) && !defined(HAVE_BCMP) diff --git a/strings/bfill.c b/strings/bfill.c index ac5d3096b14..59dc4d273b4 100644 --- a/strings/bfill.c +++ b/strings/bfill.c @@ -12,7 +12,7 @@ code is presented for your interest and amusement. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #if !defined(bfill) && !defined(HAVE_BFILL) diff --git a/strings/bmove.c b/strings/bmove.c index f63ff0bd4f8..d8ba5478eb0 100644 --- a/strings/bmove.c +++ b/strings/bmove.c @@ -19,7 +19,7 @@ code is presented for your interest and amusement. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #if !defined(HAVE_BMOVE) && !defined(bmove) diff --git a/strings/bmove512.c b/strings/bmove512.c index 11dc282d05c..7b62ce3a5f0 100644 --- a/strings/bmove512.c +++ b/strings/bmove512.c @@ -27,7 +27,7 @@ fastest way to move a mutiple of 512 byte. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #ifndef bmove512 diff --git a/strings/bmove_upp.c b/strings/bmove_upp.c index af6575ebf41..5b8f27385de 100644 --- a/strings/bmove_upp.c +++ b/strings/bmove_upp.c @@ -24,7 +24,7 @@ "src-len" to the destination "dst-len" counting downwards. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #if defined(MC68000) && defined(DS90) diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c index cccf6730046..cf43e6ed61c 100644 --- a/strings/ctype-big5.c +++ b/strings/ctype-big5.c @@ -28,7 +28,7 @@ * .configure. mbmaxlen_big5=2 */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #include "m_ctype.h" diff --git a/strings/ctype-czech.c b/strings/ctype-czech.c index b47eaf3a63f..d3a3e11d310 100644 --- a/strings/ctype-czech.c +++ b/strings/ctype-czech.c @@ -67,7 +67,7 @@ #ifdef REAL_MYSQL -#include <global.h> +#include <my_global.h> #include "m_string.h" #else @@ -427,7 +427,7 @@ my_bool my_like_range_czech(const char *ptr,uint ptr_length,pchar escape, * * definition table reworked by Jaromir Dolecek <dolecek@ics.muni.cz> */ -#include <global.h> +#include <my_global.h> #include "m_string.h" uchar NEAR ctype_czech[257] = { diff --git a/strings/ctype-euc_kr.c b/strings/ctype-euc_kr.c index df6f8c496bc..68beb574062 100644 --- a/strings/ctype-euc_kr.c +++ b/strings/ctype-euc_kr.c @@ -27,7 +27,7 @@ * .configure. mbmaxlen_euc_kr=2 */ -#include <global.h> +#include <my_global.h> #include "m_string.h" uchar NEAR ctype_euc_kr[257] = diff --git a/strings/ctype-gb2312.c b/strings/ctype-gb2312.c index a587d72905e..9bf3b464e5d 100644 --- a/strings/ctype-gb2312.c +++ b/strings/ctype-gb2312.c @@ -25,7 +25,7 @@ * .configure. mbmaxlen_gb2312=2 */ -#include <global.h> +#include <my_global.h> #include "m_string.h" uchar NEAR ctype_gb2312[257] = diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c index a5d55789bb8..3f08b039b9d 100644 --- a/strings/ctype-gbk.c +++ b/strings/ctype-gbk.c @@ -28,7 +28,7 @@ */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #include "m_ctype.h" diff --git a/strings/ctype-latin1_de.c b/strings/ctype-latin1_de.c index fa32c6d21f7..afdf4a28d03 100644 --- a/strings/ctype-latin1_de.c +++ b/strings/ctype-latin1_de.c @@ -33,7 +33,7 @@ * .configure. strxfrm_multiply_latin1_de=2 */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #include "m_ctype.h" @@ -320,11 +320,11 @@ my_bool my_like_range_latin1_de(const char *ptr, uint ptr_length, char *min_org = min_str; char *min_end = min_str + res_length; - for (; ptr != end && min_str != min_end; ++ptr) + for (; ptr != end && min_str != min_end; ptr++) { if (*ptr == escape && ptr + 1 != end) { - ++ptr; /* Skip escape */ + ptr++; /* Skip escape */ *min_str++ = *max_str++ = *ptr; continue; } @@ -339,7 +339,7 @@ my_bool my_like_range_latin1_de(const char *ptr, uint ptr_length, *min_length = (uint)(min_str - min_org); *max_length = res_length; do { - *min_str++ = min_sort_char; + *min_str++ = ' '; // Because if key compression *max_str++ = max_sort_char; } while (min_str != min_end); return 0; @@ -347,10 +347,15 @@ my_bool my_like_range_latin1_de(const char *ptr, uint ptr_length, *min_str++ = *max_str++ = *ptr; } *min_length = *max_length = (uint) (min_str - min_org); - while (min_str != min_end) + + /* Temporary fix for handling wild_one at end of string (key compression) */ { - *min_str++ = ' '; /* For proper key compression */ - *max_str++ = ' '; + char *tmp; + for (tmp= min_str ; tmp > min_org && tmp[-1] == '\0';) + *--tmp=' '; } + + while (min_str != min_end) + *min_str++ = *max_str++ = ' '; // Because if key compression return 0; } diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c index 9f23d69eb12..ba2c7c3c1e5 100644 --- a/strings/ctype-sjis.c +++ b/strings/ctype-sjis.c @@ -18,7 +18,7 @@ /* This file is for Shift JIS charset, and created by tommy@valley.ne.jp. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #include "m_ctype.h" diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c index 1c0acc38e24..736bfbd810f 100644 --- a/strings/ctype-tis620.c +++ b/strings/ctype-tis620.c @@ -27,7 +27,7 @@ * .configure. strxfrm_multiply_tis620=4 */ -#include <global.h> +#include <my_global.h> #include <my_sys.h> #include "m_string.h" #include "m_ctype.h" diff --git a/strings/ctype-ujis.c b/strings/ctype-ujis.c index d994a2e5e96..d5d48c31309 100644 --- a/strings/ctype-ujis.c +++ b/strings/ctype-ujis.c @@ -8,7 +8,7 @@ * .configure. mbmaxlen_ujis=3 */ -#include <global.h> +#include <my_global.h> #include "m_string.h" uchar NEAR ctype_ujis[257] = diff --git a/strings/ctype.c b/strings/ctype.c index a0e183a89d6..b343ff44bcd 100644 --- a/strings/ctype.c +++ b/strings/ctype.c @@ -15,7 +15,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ -#include <global.h> +#include <my_global.h> #include <m_ctype.h> #include <m_string.h> diff --git a/strings/do_ctype.c b/strings/do_ctype.c index e05926bf8d3..d035acf2915 100644 --- a/strings/do_ctype.c +++ b/strings/do_ctype.c @@ -22,7 +22,7 @@ #undef DBUG_OFF #endif -#include <global.h> +#include <my_global.h> #include <ctype.h> #include <my_sys.h> #include "m_string.h" diff --git a/strings/int2str.c b/strings/int2str.c index 4003e8a6167..813daee2f5c 100644 --- a/strings/int2str.c +++ b/strings/int2str.c @@ -39,7 +39,7 @@ itoa assumes that 10 -base numbers are allways signed and other arn't. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" char NEAR _dig_vec[] = diff --git a/strings/is_prefix.c b/strings/is_prefix.c index d3f2b148de2..5fb29f87ceb 100644 --- a/strings/is_prefix.c +++ b/strings/is_prefix.c @@ -23,7 +23,7 @@ A empty t is allways a prefix. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" int is_prefix(register const char *s, register const char *t) diff --git a/strings/llstr.c b/strings/llstr.c index 470645a4f65..3e935c699fb 100644 --- a/strings/llstr.c +++ b/strings/llstr.c @@ -26,7 +26,7 @@ */ -#include <global.h> +#include <my_global.h> #include "m_string.h" char *llstr(longlong value,char *buff) diff --git a/strings/longlong2str.c b/strings/longlong2str.c index 5c4eaf98c85..fe4d419a6d6 100644 --- a/strings/longlong2str.c +++ b/strings/longlong2str.c @@ -39,7 +39,7 @@ itoa assumes that 10 -base numbers are allways signed and other arn't. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #if defined(HAVE_LONG_LONG) && !defined(longlong2str) && !defined(HAVE_LONGLONG2STR) diff --git a/strings/r_strinstr.c b/strings/r_strinstr.c index 882a4eda412..364102cc1ac 100644 --- a/strings/r_strinstr.c +++ b/strings/r_strinstr.c @@ -24,7 +24,7 @@ the pattern counted from the begining of the string. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" uint r_strinstr(reg1 my_string str,int from, reg4 my_string search) diff --git a/strings/str2int.c b/strings/str2int.c index 55fcd56adb9..7f42b0280ce 100644 --- a/strings/str2int.c +++ b/strings/str2int.c @@ -39,7 +39,7 @@ call has no problems. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #include "m_ctype.h" #include "my_sys.h" /* defines errno */ diff --git a/strings/str_test.c b/strings/str_test.c index bd54bc6d806..feaa1bc487d 100644 --- a/strings/str_test.c +++ b/strings/str_test.c @@ -17,7 +17,7 @@ /* Test of all stringfunktions that is coded in assembler */ -#include <global.h> +#include <my_global.h> #include <stdarg.h> #include "m_string.h" diff --git a/strings/strappend.c b/strings/strappend.c index d5defaeb0bf..d1c8ce97f43 100644 --- a/strings/strappend.c +++ b/strings/strappend.c @@ -25,7 +25,7 @@ trunked. The des+len character is allways set to NULL. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" diff --git a/strings/strcend.c b/strings/strcend.c index 246b81d7f7b..d4a41ca5311 100644 --- a/strings/strcend.c +++ b/strings/strcend.c @@ -24,7 +24,7 @@ occurs, or a pointer to the end-null of s if c does not occur in s. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #if defined(MC68000) && defined(DS90) diff --git a/strings/strcont.c b/strings/strcont.c index 5c7d5d2e55f..d4e903a1763 100644 --- a/strings/strcont.c +++ b/strings/strcont.c @@ -26,7 +26,7 @@ */ -#include <global.h> +#include <my_global.h> #include "m_string.h" my_string strcont(reg1 const char *str,reg2 const char *set) diff --git a/strings/strend.c b/strings/strend.c index 18b9d1fbd0d..56bc4ade829 100644 --- a/strings/strend.c +++ b/strings/strend.c @@ -10,7 +10,7 @@ Beware: the asm version works only if strlen(s) < 65535. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #if VaxAsm diff --git a/strings/strfill.c b/strings/strfill.c index ef0ccb567d1..2f9bfc137b3 100644 --- a/strings/strfill.c +++ b/strings/strfill.c @@ -25,7 +25,7 @@ strfill() returns pointer to dest+len; */ -#include <global.h> +#include <my_global.h> #include "m_string.h" my_string strfill(my_string s,uint len,pchar fill) diff --git a/strings/strings-not-used.h b/strings/strings-not-used.h index fa4dff318f5..3514cce6ec5 100644 --- a/strings/strings-not-used.h +++ b/strings/strings-not-used.h @@ -13,7 +13,7 @@ #ifndef NullS -#include <global.h> /* Define standar vars */ +#include <my_global.h> /* Define standar vars */ #include "m_string.h" #define NUL '\0' diff --git a/strings/strinstr.c b/strings/strinstr.c index e1d502f4004..8ebd6afb3df 100644 --- a/strings/strinstr.c +++ b/strings/strinstr.c @@ -27,7 +27,7 @@ char is 1. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" uint strinstr(reg1 const char *str,reg4 const char *search) diff --git a/strings/strmake.c b/strings/strmake.c index d4edce689a5..6f02e4007c8 100644 --- a/strings/strmake.c +++ b/strings/strmake.c @@ -25,7 +25,7 @@ strmake() returns pointer to closing null; */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #ifdef BAD_STRING_COMPILER diff --git a/strings/strmov.c b/strings/strmov.c index 8f5beb41f41..5502c40b7ec 100644 --- a/strings/strmov.c +++ b/strings/strmov.c @@ -23,7 +23,7 @@ into dst, which seems useful. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #ifdef BAD_STRING_COMPILER diff --git a/strings/strnlen.c b/strings/strnlen.c index 3d625f7d48a..b630edecee6 100644 --- a/strings/strnlen.c +++ b/strings/strnlen.c @@ -22,7 +22,7 @@ strnlen(s, len) returns the length of s or len if s is longer than len. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #ifndef HAVE_STRNLEN diff --git a/strings/strnmov.c b/strings/strnmov.c index ffc4a62f75e..5b3e3b3b7cf 100644 --- a/strings/strnmov.c +++ b/strings/strnmov.c @@ -22,7 +22,7 @@ truncated. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" char *strnmov(register char *dst, register const char *src, uint n) diff --git a/strings/strstr.c b/strings/strstr.c index 572bf88c95c..00355bc8165 100644 --- a/strings/strstr.c +++ b/strings/strstr.c @@ -10,7 +10,7 @@ */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #ifndef HAVE_STRSTR diff --git a/strings/strto.c b/strings/strto.c index 64b1c9a5ae9..adada98e143 100644 --- a/strings/strto.c +++ b/strings/strto.c @@ -36,7 +36,7 @@ it can be compiled with the UNSIGNED and/or LONGLONG flag set */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #include "m_ctype.h" #include "my_sys.h" /* defines errno */ diff --git a/strings/strtol.c b/strings/strtol.c index 87fe0d22cf3..912c42ba3cf 100644 --- a/strings/strtol.c +++ b/strings/strtol.c @@ -17,7 +17,7 @@ /* This defines strtol() if neaded */ -#include <global.h> +#include <my_global.h> #if !defined(MSDOS) && !defined(HAVE_STRTOL) && !defined(__WIN__) #include "strto.c" #endif diff --git a/strings/strtoll.c b/strings/strtoll.c index 678c28649ef..6050eba28b0 100644 --- a/strings/strtoll.c +++ b/strings/strtoll.c @@ -17,7 +17,7 @@ /* This is defines strtoll() if neaded */ -#include <global.h> +#include <my_global.h> #include <m_string.h> #if !defined(HAVE_STRTOLL) && defined(HAVE_LONG_LONG) #define USE_LONGLONG diff --git a/strings/strtoul.c b/strings/strtoul.c index e49a9ebea6a..ac9313f67da 100644 --- a/strings/strtoul.c +++ b/strings/strtoul.c @@ -17,7 +17,7 @@ /* This is defines strtoul() if neaded */ -#include <global.h> +#include <my_global.h> #if !defined(MSDOS) && !defined(HAVE_STRTOUL) #define USE_UNSIGNED #include "strto.c" diff --git a/strings/strtoull.c b/strings/strtoull.c index 74dab95b801..104885e70d0 100644 --- a/strings/strtoull.c +++ b/strings/strtoull.c @@ -17,7 +17,7 @@ /* This is defines strtoull() */ -#include <global.h> +#include <my_global.h> #include <m_string.h> #if !defined(HAVE_STRTOULL) && defined(HAVE_LONG_LONG) #define USE_UNSIGNED diff --git a/strings/strxmov.c b/strings/strxmov.c index 7ee1d303ee8..c1a7d1c4058 100644 --- a/strings/strxmov.c +++ b/strings/strxmov.c @@ -13,7 +13,7 @@ character pointer, or not the same bit pattern as NullS. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #include <stdarg.h> diff --git a/strings/strxnmov.c b/strings/strxnmov.c index b55a2e0ab79..c8c14394e84 100644 --- a/strings/strxnmov.c +++ b/strings/strxnmov.c @@ -20,7 +20,7 @@ needed. */ -#include <global.h> +#include <my_global.h> #include "m_string.h" #include <stdarg.h> diff --git a/strings/udiv.c b/strings/udiv.c index 07af323a706..3efba5e149e 100644 --- a/strings/udiv.c +++ b/strings/udiv.c @@ -17,7 +17,7 @@ /* Do udiv and urem if machine dosn't have it */ -#include <global.h> +#include <my_global.h> #include <math.h> unsigned long udiv(long unsigned int a, long unsigned int b) |