summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
Diffstat (limited to 'strings')
-rw-r--r--strings/Makefile.am4
-rw-r--r--strings/atof.c31
-rw-r--r--strings/bchange.c34
-rw-r--r--strings/bcmp.c48
-rw-r--r--strings/bcopy-duff.c29
-rw-r--r--strings/bfill.c2
-rw-r--r--strings/bmove.c2
-rw-r--r--strings/bmove512.c31
-rw-r--r--strings/bmove_upp.c31
-rw-r--r--strings/bzero.c16
-rw-r--r--strings/conf_to_src.c29
-rw-r--r--strings/ctype-big5.c31
-rw-r--r--strings/ctype-czech.c33
-rw-r--r--strings/ctype-euc_kr.c31
-rw-r--r--strings/ctype-gb2312.c31
-rw-r--r--strings/ctype-gbk.c35
-rw-r--r--strings/ctype-latin1_de.c361
-rw-r--r--strings/ctype-sjis.c31
-rw-r--r--strings/ctype-tis620.c18
-rw-r--r--strings/ctype-ujis.c2
-rw-r--r--strings/ctype.c33
-rw-r--r--strings/do_ctype.c31
-rw-r--r--strings/int2str.c31
-rw-r--r--strings/is_prefix.c31
-rw-r--r--strings/llstr.c31
-rw-r--r--strings/longlong2str-x86.s29
-rw-r--r--strings/longlong2str.c31
-rw-r--r--strings/memcmp.c29
-rw-r--r--strings/memcpy.c29
-rw-r--r--strings/memset.c18
-rw-r--r--strings/r_strinstr.c31
-rw-r--r--strings/str2int.c34
-rw-r--r--strings/str_test.c31
-rw-r--r--strings/strappend.c33
-rw-r--r--strings/strcat.c16
-rw-r--r--strings/strcend.c31
-rw-r--r--strings/strchr.c16
-rw-r--r--strings/strcmp.c16
-rw-r--r--strings/strcont.c31
-rw-r--r--strings/strend.c2
-rw-r--r--strings/strfill.c31
-rw-r--r--strings/strings-not-used.h18
-rw-r--r--strings/strings-x86.s377
-rw-r--r--strings/strinstr.c31
-rw-r--r--strings/strlen.c16
-rw-r--r--strings/strmake.c31
-rw-r--r--strings/strmov.c31
-rw-r--r--strings/strnlen.c31
-rw-r--r--strings/strnmov.c31
-rw-r--r--strings/strrchr.c16
-rw-r--r--strings/strstr.c2
-rw-r--r--strings/strto.c31
-rw-r--r--strings/strtol.c31
-rw-r--r--strings/strtoll.c31
-rw-r--r--strings/strtoul.c31
-rw-r--r--strings/strtoull.c31
-rw-r--r--strings/strxmov.c2
-rw-r--r--strings/strxnmov.c2
-rw-r--r--strings/t_ctype.h20
-rw-r--r--strings/udiv.c31
60 files changed, 1337 insertions, 852 deletions
diff --git a/strings/Makefile.am b/strings/Makefile.am
index a3ae5357597..a29c5a3365d 100644
--- a/strings/Makefile.am
+++ b/strings/Makefile.am
@@ -22,7 +22,7 @@ pkglib_LIBRARIES = libmystrings.a
# Exact one of ASSEMBLER_X
if ASSEMBLER_x86
ASRCS = strings-x86.s longlong2str-x86.s
-CSRCS = bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c atof.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c strxmov.c bmove_upp.c strappend.c strcont.c strend.c strfill.c strcend.c is_prefix.c strstr.c strinstr.c strmake.c strnmov.c strmov.c llstr.c ctype.c strnlen.c
+CSRCS = bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c atof.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c ctype.c strnlen.c
else
if ASSEMBLER_sparc
# These file MUST all be on the same line!! Otherwise automake
@@ -43,7 +43,7 @@ noinst_PROGRAMS = conf_to_src
# Default charset definitions
EXTRA_DIST = ctype-big5.c ctype-czech.c ctype-euc_kr.c \
ctype-gb2312.c ctype-gbk.c ctype-sjis.c \
- ctype-tis620.c ctype-ujis.c \
+ ctype-tis620.c ctype-ujis.c ctype-latin1_de.c \
ctype_autoconf.c \
strto.c strings-x86.s longlong2str-x86.s \
strxmov.c bmove_upp.c strappend.c strcont.c strend.c \
diff --git a/strings/atof.c b/strings/atof.c
index 1ce16027089..0e0aa598718 100644
--- a/strings/atof.c
+++ b/strings/atof.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
A quicker atof. About 2-10 times faster than standard atof on sparc.
@@ -23,7 +22,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..034dd3382e1 100644
--- a/strings/bchange.c
+++ b/strings/bchange.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* File : bchange.c
Author : Michael widenius
@@ -25,10 +24,11 @@
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)
+void bchange(register char *dst, uint old_length, register const char *src,
+ uint new_length, uint tot_length)
{
uint rest=tot_length-old_length;
if (old_length < new_length)
diff --git a/strings/bcmp.c b/strings/bcmp.c
index 3dce5025b64..64a6b72c443 100644
--- a/strings/bcmp.c
+++ b/strings/bcmp.c
@@ -1,30 +1,35 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
bcmp(s1, s2, len) returns 0 if the "len" bytes starting at "s1" are
identical to the "len" bytes starting at "s2", non-zero if they are
different.
- Now only used with purify.
+ Now only used with purify because purify gives wrong warnings when
+ comparing a shorter string with bcmp.
*/
-#include <global.h>
+#include <my_global.h>
#include "m_string.h"
+#ifdef HAVE_purify
+#undef bcmp
+#undef HAVE_BCMP
+#endif
+
#if !defined(bcmp) && !defined(HAVE_BCMP)
#if defined(MC68000) && defined(DS90)
@@ -46,14 +51,11 @@ uint len; /* 0 <= len <= 65535 */
#else
-#ifdef HAVE_purify
-int my_bcmp(s1, s2, len)
+#ifndef HAVE_purify
+int bcmp(register const char *s1,register const char *s2, register uint len)
#else
-int bcmp(s1, s2, len)
+int my_bcmp(register const char *s1,register const char *s2, register uint len)
#endif
- register const char *s1;
- register const char *s2;
- register uint len;
{
while (len-- != 0 && *s1++ == *s2++) ;
return len+1;
diff --git a/strings/bcopy-duff.c b/strings/bcopy-duff.c
index 2f5a709c3a0..5ac6a716dab 100644
--- a/strings/bcopy-duff.c
+++ b/strings/bcopy-duff.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#define IFACTOR 4
diff --git a/strings/bfill.c b/strings/bfill.c
index 9f5db7201d0..85d21483b41 100644
--- a/strings/bfill.c
+++ b/strings/bfill.c
@@ -29,7 +29,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 466bf74db75..09fe067adcd 100644
--- a/strings/bmove.c
+++ b/strings/bmove.c
@@ -36,7 +36,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..30ac4b744b6 100644
--- a/strings/bmove512.c
+++ b/strings/bmove512.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* File : bmove512.c
Author : Michael Widenius;
@@ -27,7 +26,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..5319cd9611a 100644
--- a/strings/bmove_upp.c
+++ b/strings/bmove_upp.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* File : bmove.c
Author : Michael widenius
@@ -24,7 +23,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/bzero.c b/strings/bzero.c
index cc628e05277..a2b780cb396 100644
--- a/strings/bzero.c
+++ b/strings/bzero.c
@@ -1,3 +1,19 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
/* File : bzero.c
Author : Richard A. O'Keefe.
Michael Widenius; ifdef MC68000
diff --git a/strings/conf_to_src.c b/strings/conf_to_src.c
index 89415d31820..22e04337b14 100644
--- a/strings/conf_to_src.c
+++ b/strings/conf_to_src.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* can't use -lmysys because this prog is used to create -lstrings */
diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c
index cccf6730046..44f8a100897 100644
--- a/strings/ctype-big5.c
+++ b/strings/ctype-big5.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
* This file is basicly usa7 character sets with some extra functions
@@ -28,7 +27,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..70f95e0d5d6 100644
--- a/strings/ctype-czech.c
+++ b/strings/ctype-czech.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* File strings/ctype-czech.c for MySQL.
@@ -67,7 +66,7 @@
#ifdef REAL_MYSQL
-#include <global.h>
+#include <my_global.h>
#include "m_string.h"
#else
@@ -427,7 +426,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..d05ca518283 100644
--- a/strings/ctype-euc_kr.c
+++ b/strings/ctype-euc_kr.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
* This file is for Korean EUC charset, and created by powerm90@tinc.co.kr.
@@ -27,7 +26,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..28717d98403 100644
--- a/strings/ctype-gb2312.c
+++ b/strings/ctype-gb2312.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* This file is for Chinese EUC character sets (GB2312), and created by Miles Tsai (net-bull@126.com).
*/
@@ -25,7 +24,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..9fccce175d8 100644
--- a/strings/ctype-gbk.c
+++ b/strings/ctype-gbk.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* This file is for Chinese character sets GBK, created by Wei He
(hewei@mail.ied.ac.cn)
@@ -28,7 +27,7 @@
*/
-#include <global.h>
+#include <my_global.h>
#include "m_string.h"
#include "m_ctype.h"
@@ -2629,12 +2628,12 @@ int my_strnxfrm_gbk(uchar * dest, const uchar * src, int len, int srclen)
}
return srclen;
}
-
+
int my_strxfrm_gbk(uchar * dest, const uchar * src, int len)
{
return my_strnxfrm_gbk(dest,src,len,(uint) strlen((char*) src));
}
-
+
/*
** Calculate min_str and max_str that ranges a LIKE string.
** Arguments:
diff --git a/strings/ctype-latin1_de.c b/strings/ctype-latin1_de.c
new file mode 100644
index 00000000000..86b667b8f40
--- /dev/null
+++ b/strings/ctype-latin1_de.c
@@ -0,0 +1,361 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+/*
+ * This file is the latin1 character set with German sorting
+ *
+ * The modern sort order is used, where:
+ *
+ * 'ä' -> "ae"
+ * 'ö' -> "oe"
+ * 'ü' -> "ue"
+ * 'ß' -> "ss"
+ */
+
+/*
+ * This comment is parsed by configure to create ctype.c,
+ * so don't change it unless you know what you are doing.
+ *
+ * .configure. strxfrm_multiply_latin1_de=2
+ */
+
+#include <my_global.h>
+#include "m_string.h"
+#include "m_ctype.h"
+
+uchar ctype_latin1_de[] = {
+ 0,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
+ 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
+ 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 2
+};
+
+uchar to_lower_latin1_de[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,215,248,249,250,251,252,253,254,223,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+
+uchar to_upper_latin1_de[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,247,216,217,218,219,220,221,222,255
+};
+
+/*
+ * This is a simple latin1 mapping table, which maps all accented
+ * characters to their non-accented equivalents. Note: in this
+ * table, 'ä' is mapped to 'A', 'ÿ' is mapped to 'Y', etc. - all
+ * accented characters except the following are treated the same way.
+ * Ü, ü, Ö, ö, Ä, ä
+ */
+
+uchar sort_order_latin1_de[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 65, 65, 65, 65,196, 65, 92, 67, 69, 69, 69, 69, 73, 73, 73, 73,
+ 68, 78, 79, 79, 79, 79,214,215,216, 85, 85, 85,220, 89,222,223,
+ 65, 65, 65, 65,196, 65, 92, 67, 69, 69, 69, 69, 73, 73, 73, 73,
+ 68, 78, 79, 79, 79, 79,214,247,216, 85, 85, 85,220, 89,222, 89
+};
+
+#define L1_AE 196
+#define L1_ae 228
+#define L1_OE 214
+#define L1_oe 246
+#define L1_UE 220
+#define L1_ue 252
+#define L1_ss 223
+
+
+/*
+ Some notes about the following comparison rules:
+ By definition, my_strnncoll_latin_de must works exactly as if had called
+ my_strnxfrm_latin_de() on both strings and compared the result strings.
+
+ This means that:
+ Ä must also matches ÁE and Aè, because my_strxn_frm_latin_de() will convert
+ both to AE.
+
+ The other option would be to not do any accent removal in
+ sort_order_latin_de[] at all
+*/
+
+
+#define CHECK_S1_COMBO(ch1, ch2, str1, str1_end, res_if_str1_smaller, str2, fst, snd, accent) \
+ /* Invariant: ch1 == fst == sort_order_latin1_de[accent] && ch1 != ch2 */ \
+ if (ch2 != accent) \
+ { \
+ ch1= fst; \
+ goto normal; \
+ } \
+ if (str1 == str1_end) \
+ return res_if_str1_smaller; \
+ { \
+ int diff = (int) sort_order_latin1_de[*str1] - snd; \
+ if (diff) \
+ return diff*(-(res_if_str1_smaller)); \
+ /* They are equal (e.g., "Ae" == 'ä') */ \
+ str1++; \
+ }
+
+
+int my_strnncoll_latin1_de(const uchar * s1, int len1,
+ const uchar * s2, int len2)
+{
+ const uchar *e1 = s1 + len1;
+ const uchar *e2 = s2 + len2;
+
+ while (s1 < e1 && s2 < e2)
+ {
+ /*
+ Because sort_order_latin1_de doesn't convert 'Ä', Ü or ß we
+ can use it here.
+ */
+ uchar c1 = sort_order_latin1_de[*s1++];
+ uchar c2 = sort_order_latin1_de[*s2++];
+ if (c1 != c2)
+ {
+ switch (c1) {
+ case 'A':
+ CHECK_S1_COMBO(c1, c2, s1, e1, -1, s2, 'A', 'E', L1_AE);
+ break;
+ case 'O':
+ CHECK_S1_COMBO(c1, c2, s1, e1, -1, s2, 'O', 'E', L1_OE);
+ break;
+ case 'U':
+ CHECK_S1_COMBO(c1, c2, s1, e1, -1, s2, 'U', 'E', L1_UE);
+ break;
+ case 'S':
+ CHECK_S1_COMBO(c1, c2, s1, e1, -1, s2, 'S', 'S', L1_ss);
+ break;
+ case L1_AE:
+ CHECK_S1_COMBO(c1, c2, s2, e2, 1, s1, 'A', 'E', 'A');
+ break;
+ case L1_OE:
+ CHECK_S1_COMBO(c1, c2, s2, e2, 1, s1, 'O', 'E', 'O');
+ break;
+ case L1_UE:
+ CHECK_S1_COMBO(c1, c2, s2, e2, 1, s1, 'U', 'E', 'U');
+ break;
+ case L1_ss:
+ CHECK_S1_COMBO(c1, c2, s2, e2, 1, s1, 'S', 'S', 'S');
+ break;
+ default:
+ /*
+ Handle the case where 'c2' is a special character
+ If this is true, we know that c1 can't match this character.
+ */
+ normal:
+ switch (c2) {
+ case L1_AE:
+ return (int) c1 - (int) 'A';
+ case L1_OE:
+ return (int) c1 - (int) 'O';
+ case L1_UE:
+ return (int) c1 - (int) 'U';
+ case L1_ss:
+ return (int) c1 - (int) 'S';
+ default:
+ {
+ int diff= (int) c1 - (int) c2;
+ if (diff)
+ return diff;
+ }
+ break;
+ }
+ }
+ }
+ }
+ /* A simple test of string lengths won't work -- we test to see
+ * which string ran out first */
+ return s1 < e1 ? 1 : s2 < e2 ? -1 : 0;
+}
+
+
+int my_strnxfrm_latin1_de(uchar * dest, const uchar * src, int len, int srclen)
+{
+ const uchar *dest_orig = dest;
+ const uchar *de = dest + len;
+ const uchar *se = src + srclen;
+ while (src < se && dest < de)
+ {
+ uchar chr=sort_order_latin1_de[*src];
+ switch (chr) {
+ case L1_AE:
+ *dest++ = 'A';
+ if (dest < de)
+ *dest++ = 'E';
+ break;
+ case L1_OE:
+ *dest++ = 'O';
+ if (dest < de)
+ *dest++ = 'E';
+ break;
+ case L1_UE:
+ *dest++ = 'U';
+ if (dest < de)
+ *dest++ = 'E';
+ break;
+ case L1_ss:
+ *dest++ = 'S';
+ if (dest < de)
+ *dest++ = 'S';
+ break;
+ default:
+ *dest++= chr;
+ break;
+ }
+ ++src;
+ }
+ return dest - dest_orig;
+}
+
+
+int my_strcoll_latin1_de(const uchar * s1, const uchar * s2)
+{
+ /* XXX QQ: This should be fixed to not call strlen */
+ return my_strnncoll_latin1_de(s1, strlen((char*) s1),
+ s2, strlen((char*) s2));
+}
+
+int my_strxfrm_latin1_de(uchar * dest, const uchar * src, int len)
+{
+ /* XXX QQ: This should be fixed to not call strlen */
+ return my_strnxfrm_latin1_de(dest, src, len, strlen((char*) src));
+}
+
+/*
+ * Calculate min_str and max_str that ranges a LIKE string.
+ * Arguments:
+ * ptr IN: Pointer to LIKE string.
+ * ptr_length IN: Length of LIKE string.
+ * escape IN: Escape character in LIKE. (Normally '\').
+ * No escape characters should appear in min_str or max_str
+ * res_length IN: Length of min_str and max_str.
+ * min_str IN/OUT: Smallest case sensitive string that ranges LIKE.
+ * Should be space padded to res_length.
+ * max_str IN/OUT: Largest case sensitive string that ranges LIKE.
+ * Normally padded with the biggest character sort value.
+ * min_length OUT: Length of min_str without space padding.
+ * max_length OUT: Length of max_str without space padding.
+ *
+ * The function should return 0 if ok and 1 if the LIKE string can't be
+ * optimized !
+ */
+
+#define min_sort_char ((char) 0)
+#define max_sort_char ((char) 255)
+#define wild_one '_'
+#define wild_many '%'
+
+my_bool my_like_range_latin1_de(const char *ptr, uint ptr_length,
+ pchar escape, uint res_length,
+ char *min_str, char *max_str,
+ uint *min_length, uint *max_length)
+{
+ const char *end = ptr + ptr_length;
+ char *min_org = min_str;
+ char *min_end = min_str + res_length;
+
+ for (; ptr != end && min_str != min_end; ptr++)
+ {
+ if (*ptr == escape && ptr + 1 != end)
+ {
+ ptr++; /* Skip escape */
+ *min_str++ = *max_str++ = *ptr;
+ continue;
+ }
+ if (*ptr == wild_one) /* '_' in SQL */
+ {
+ *min_str++ = min_sort_char;
+ *max_str++ = max_sort_char;
+ continue;
+ }
+ if (*ptr == wild_many) /* '%' in SQL */
+ {
+ *min_length = (uint)(min_str - min_org);
+ *max_length = res_length;
+ do {
+ *min_str++ = ' '; // Because if key compression
+ *max_str++ = max_sort_char;
+ } while (min_str != min_end);
+ return 0;
+ }
+ *min_str++ = *max_str++ = *ptr;
+ }
+ *min_length = *max_length = (uint) (min_str - min_org);
+
+ /* Temporary fix for handling wild_one at end of string (key compression) */
+ {
+ 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..5d5f64cc5fe 100644
--- a/strings/ctype-sjis.c
+++ b/strings/ctype-sjis.c
@@ -1,24 +1,23 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* 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..370c4c773c6 100644
--- a/strings/ctype-tis620.c
+++ b/strings/ctype-tis620.c
@@ -1,3 +1,19 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
/*
Copyright (C) 2001 by Korakot Chaovavanich <korakot@iname.com> and
Apisilp Trunganont <apisilp@pantip.inet.co.th>
@@ -27,7 +43,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 5356978976f..650182bfda1 100644
--- a/strings/ctype-ujis.c
+++ b/strings/ctype-ujis.c
@@ -25,7 +25,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 e66c9771d78..8e3571b1b88 100644
--- a/strings/ctype.c
+++ b/strings/ctype.c
@@ -1,23 +1,24 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#include <global.h>
+#include <my_global.h>
#include <m_ctype.h>
+#ifndef SCO
#include <m_string.h>
+#endif
/* generated by make, using conf_to_src */
#include "ctype_extra_sources.c"
diff --git a/strings/do_ctype.c b/strings/do_ctype.c
index e05926bf8d3..14ede6891da 100644
--- a/strings/do_ctype.c
+++ b/strings/do_ctype.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* Prints case-convert and sort-convert tabell on stdout. This is used to
make _ctype.c easyer */
@@ -22,7 +21,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..38e8a5182a3 100644
--- a/strings/int2str.c
+++ b/strings/int2str.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
Defines: int2str(), itoa(), ltoa()
@@ -39,7 +38,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..37d8002703b 100644
--- a/strings/is_prefix.c
+++ b/strings/is_prefix.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* File : is_prefix.c
Author : Michael Widenius
@@ -23,7 +22,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..966b347ac7e 100644
--- a/strings/llstr.c
+++ b/strings/llstr.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
Defines: llstr();
@@ -26,7 +25,7 @@
*/
-#include <global.h>
+#include <my_global.h>
#include "m_string.h"
char *llstr(longlong value,char *buff)
diff --git a/strings/longlong2str-x86.s b/strings/longlong2str-x86.s
index bafc485f759..98e60acbafb 100644
--- a/strings/longlong2str-x86.s
+++ b/strings/longlong2str-x86.s
@@ -1,18 +1,17 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+# Copyright (C) 2000 MySQL AB
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Optimized longlong2str function for Intel 80x86 (gcc/gas syntax)
# Some set sequences are optimized for pentuimpro II
diff --git a/strings/longlong2str.c b/strings/longlong2str.c
index 5c4eaf98c85..a991c57b4d9 100644
--- a/strings/longlong2str.c
+++ b/strings/longlong2str.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
Defines: longlong2str();
@@ -39,7 +38,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/memcmp.c b/strings/memcmp.c
index 1bb8deaeac0..2f1e4e2ea1f 100644
--- a/strings/memcmp.c
+++ b/strings/memcmp.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* memcmp(lhs, rhs, len)
compares the two memory areas lhs[0..len-1] ?? rhs[0..len-1]. It
diff --git a/strings/memcpy.c b/strings/memcpy.c
index 4fc84fb6052..de79e43ae72 100644
--- a/strings/memcpy.c
+++ b/strings/memcpy.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
memcpy(dst, src, len)
diff --git a/strings/memset.c b/strings/memset.c
index 57c8fea5ebe..53383beb170 100644
--- a/strings/memset.c
+++ b/strings/memset.c
@@ -1,3 +1,19 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
/* File : memset.c
Author : Richard A. O'Keefe.
Updated: 25 May 1984
@@ -27,7 +43,7 @@ char *memset(char *dst,int chr, int len)
char *memset(char *dst, register pchar chr, register int len)
{
register char *d;
-
+
for (d = dst; --len >= 0; *d++ = chr) ;
return dst;
}
diff --git a/strings/r_strinstr.c b/strings/r_strinstr.c
index 882a4eda412..76d310a3fda 100644
--- a/strings/r_strinstr.c
+++ b/strings/r_strinstr.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
Author : David
@@ -24,7 +23,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..58669287473 100644
--- a/strings/str2int.c
+++ b/strings/str2int.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
str2int(src, radix, lower, upper, &val)
@@ -39,7 +38,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 */
@@ -50,7 +49,8 @@
X >= 'a' && X <= 'z' ? X-'a'+10 :\
'\177')
-char *str2int(register const char *src, register int radix, long int lower, long int upper, long int *val)
+char *str2int(register const char *src, register int radix, long int lower,
+ long int upper, long int *val)
{
int sign; /* is number negative (+1) or positive (-1) */
int n; /* number of digits yet to be converted */
diff --git a/strings/str_test.c b/strings/str_test.c
index bd54bc6d806..bef48814f6d 100644
--- a/strings/str_test.c
+++ b/strings/str_test.c
@@ -1,23 +1,22 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* 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..9912bd5197d 100644
--- a/strings/strappend.c
+++ b/strings/strappend.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* File : strappend.c
Author : Monty
@@ -25,7 +24,7 @@
trunked. The des+len character is allways set to NULL.
*/
-#include <global.h>
+#include <my_global.h>
#include "m_string.h"
@@ -39,5 +38,3 @@ void strappend(register char *s, uint len, pchar fill)
while (s<endpos) *(s++) = fill;
*(endpos) = '\0';
} /* strappend */
-
-
diff --git a/strings/strcat.c b/strings/strcat.c
index 699729cd7b5..3c571514701 100644
--- a/strings/strcat.c
+++ b/strings/strcat.c
@@ -1,3 +1,19 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
/* File : strcat.c
Author : Richard A. O'Keefe.
Updated: 10 April 1984
diff --git a/strings/strcend.c b/strings/strcend.c
index 246b81d7f7b..a3f00a1057b 100644
--- a/strings/strcend.c
+++ b/strings/strcend.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* File : strcend.c
Author : Michael Widenius: ifdef MC68000
@@ -24,7 +23,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/strchr.c b/strings/strchr.c
index ef117d85635..3f1a569c296 100644
--- a/strings/strchr.c
+++ b/strings/strchr.c
@@ -1,3 +1,19 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
/* File : strchr.c
Author : Richard A. O'Keefe.
Michael Widenius: ifdef MC68000
diff --git a/strings/strcmp.c b/strings/strcmp.c
index d911b2daa17..d673c035dbc 100644
--- a/strings/strcmp.c
+++ b/strings/strcmp.c
@@ -1,3 +1,19 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
/* File : strcmp.c
Author : Richard A. O'Keefe.
Updated: 10 April 1984
diff --git a/strings/strcont.c b/strings/strcont.c
index 5c7d5d2e55f..1d89be89517 100644
--- a/strings/strcont.c
+++ b/strings/strcont.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* File : strcont.c
Author : Monty
@@ -26,7 +25,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 3affb9bd5f6..0e9c0333fc8 100644
--- a/strings/strend.c
+++ b/strings/strend.c
@@ -27,7 +27,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..0ef56a67706 100644
--- a/strings/strfill.c
+++ b/strings/strfill.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* File : strfill.c
Author : Monty
@@ -25,7 +24,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..e0dc1eac3a5 100644
--- a/strings/strings-not-used.h
+++ b/strings/strings-not-used.h
@@ -1,3 +1,19 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
/* File : strings.h
Author : Richard A. O'Keefe.
Updated: 1 June 1984
@@ -13,7 +29,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/strings-x86.s b/strings/strings-x86.s
index 5d7cbde1b38..8b29a2db7f1 100644
--- a/strings/strings-x86.s
+++ b/strings/strings-x86.s
@@ -1,38 +1,37 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-
-/* Optimized string functions Intel 80x86 (gcc/gas syntax) */
-
- .file "strings.s"
+# Copyright (C) 2000 MySQL AB
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+# Optimized string functions Intel 80x86 (gcc/gas syntax)
+
+ .file "strings.s"
.version "1.00"
.text
- /* Move a alligned, not overlapped, by (long) divided memory area */
- /* Args: to,from,length */
+# Move a alligned, not overlapped, by (long) divided memory area
+# Args: to,from,length
.globl bmove_allign
.type bmove_allign,@function
bmove_allign:
movl %edi,%edx
movl %esi,%eax
- movl 4(%esp),%edi /* to */
- movl 8(%esp),%esi /* from */
- movl 12(%esp),%ecx /* length */
- addw $3,%cx /* fix if not divisible with long */
+ movl 4(%esp),%edi # to
+ movl 8(%esp),%esi # from
+ movl 12(%esp),%ecx # length
+ addw $3,%cx # fix if not divisible with long
shrw $2,%cx
rep
movsl
@@ -42,198 +41,198 @@ bmove_allign:
.end:
.size bmove_allign,.end-bmove_allign
- /* Move a string from higher to lower */
- /* Arg from+1,to+1,length */
+ # Move a string from higher to lower
+ # Arg from+1,to+1,length
.globl bmove_upp
.type bmove_upp,@function
bmove_upp:
- std /* Work downward */
+ std # Work downward
movl %edi,%edx
movl %esi,%eax
- movl 4(%esp),%edi /* p1 */
- movl 8(%esp),%esi /* p2 */
- movl 12(%esp),%ecx /* length */
- decl %edi /* Don't move last arg */
+ movl 4(%esp),%edi # p1
+ movl 8(%esp),%esi # p2
+ movl 12(%esp),%ecx # length
+ decl %edi # Don't move last arg
decl %esi
rep
- movsb /* One byte a time because overlap */
- cld /* C library wants cld */
+ movsb # One byte a time because overlap
+ cld # C library wants cld
movl %eax,%esi
movl %edx,%edi
ret
.bmove_upp_end:
.size bmove_upp,.bmove_upp_end-bmove_upp
- /* Append fillchars to string */
- /* Args: dest,len,fill */
+ # Append fillchars to string
+ # Args: dest,len,fill
.globl strappend
.type strappend,@function
strappend:
pushl %edi
- movl 8(%esp),%edi /* Memory pointer */
- movl 12(%esp),%ecx /* Length */
- clrl %eax /* Find end of string */
+ movl 8(%esp),%edi # Memory pointer
+ movl 12(%esp),%ecx # Length
+ clrl %eax # Find end of string
repne
scasb
- jnz sa_99 /* String to long, shorten it */
- movzb 16(%esp),%eax /* Fillchar */
- decl %edi /* Point at end null */
- incl %ecx /* rep made one dec for null-char */
-
- movb %al,%ah /* (2) Set up a 32 bit pattern. */
- movw %ax,%dx /* (2) */
- shll $16,%eax /* (3) */
- movw %dx,%ax /* (2) %eax has the 32 bit pattern. */
-
- movl %ecx,%edx /* (2) Save the count of bytes. */
- shrl $2,%ecx /* (2) Number of dwords. */
+ jnz sa_99 # String to long, shorten it
+ movzb 16(%esp),%eax # Fillchar
+ decl %edi # Point at end null
+ incl %ecx # rep made one dec for null-char
+
+ movb %al,%ah # (2) Set up a 32 bit pattern.
+ movw %ax,%dx # (2)
+ shll $16,%eax # (3)
+ movw %dx,%ax # (2) %eax has the 32 bit pattern.
+
+ movl %ecx,%edx # (2) Save the count of bytes.
+ shrl $2,%ecx # (2) Number of dwords.
rep
- stosl /* (5 + 5n) */
- movb $3,%cl /* (2) */
- and %edx,%ecx /* (2) Fill in the odd bytes*/
+ stosl # (5 + 5n)
+ movb $3,%cl # (2)
+ and %edx,%ecx # (2) Fill in the odd bytes
rep
- stosb /* Move last bytes if any */
+ stosb # Move last bytes if any
-sa_99: movb $0,(%edi) /* End of string */
+sa_99: movb $0,(%edi) # End of string
popl %edi
ret
.strappend_end:
.size strappend,.strappend_end-strappend
- /* Find if string contains any char in another string */
- /* Arg: str,set */
- /* Ret: Pointer to first found char in str */
+ # Find if string contains any char in another string
+ # Arg: str,set
+ # Ret: Pointer to first found char in str
.globl strcont
.type strcont,@function
strcont:
movl %edi,%edx
pushl %esi
- movl 8(%esp),%esi /* str */
- movl 12(%esp),%ecx /* set */
- clrb %ah /* For endtest */
+ movl 8(%esp),%esi # str
+ movl 12(%esp),%ecx # set
+ clrb %ah # For endtest
jmp sc_60
sc_10: scasb
- jz sc_fo /* Found char */
-sc_20: cmp (%edi),%ah /* Test if null */
- jnz sc_10 /* Not end of set yet */
- incl %esi /* Next char in str */
-sc_60: movl %ecx,%edi /* %edi = Set */
- movb (%esi),%al /* Test if this char exist */
+ jz sc_fo # Found char
+sc_20: cmp (%edi),%ah # Test if null
+ jnz sc_10 # Not end of set yet
+ incl %esi # Next char in str
+sc_60: movl %ecx,%edi # %edi = Set
+ movb (%esi),%al # Test if this char exist
andb %al,%al
- jnz sc_20 /* Not end of string */
- clrl %esi /* Return Null */
-sc_fo: movl %esi,%eax /* Char found here */
- movl %edx,%edi /* Restore */
+ jnz sc_20 # Not end of string
+ clrl %esi # Return Null
+sc_fo: movl %esi,%eax # Char found here
+ movl %edx,%edi # Restore
popl %esi
ret
.strcont_end:
.size strcont,.strcont_end-strcont
- /* Find end of string */
- /* Arg: str */
- /* ret: Pointer to end null */
+ # Find end of string
+ # Arg: str
+ # ret: Pointer to end null
.globl strend
.type strend,@function
strend:
- movl %edi,%edx /* Save */
- movl 4(%esp),%edi /* str */
- clrl %eax /* Find end of string */
+ movl %edi,%edx # Save
+ movl 4(%esp),%edi # str
+ clrl %eax # Find end of string
movl %eax,%ecx
- decl %ecx /* ECX = -1 */
+ decl %ecx # ECX = -1
repne
scasb
movl %edi,%eax
- decl %eax /* End of string */
- movl %edx,%edi /* Restore */
+ decl %eax # End of string
+ movl %edx,%edi # Restore
ret
.strend_end:
.size strend,.strend_end-strend
- /* Make a string with len fill-chars and endnull */
- /* Args: dest,len,fill */
- /* Ret: dest+len */
+ # Make a string with len fill-chars and endnull
+ # Args: dest,len,fill
+ # Ret: dest+len
.globl strfill
.type strfill,@function
strfill:
pushl %edi
- movl 8(%esp),%edi /* Memory pointer */
- movl 12(%esp),%ecx /* Length */
- movzb 16(%esp),%eax /* Fill */
+ movl 8(%esp),%edi # Memory pointer
+ movl 12(%esp),%ecx # Length
+ movzb 16(%esp),%eax # Fill
- movb %al,%ah /* (2) Set up a 32 bit pattern */
- movw %ax,%dx /* (2) */
- shll $16,%eax /* (3) */
- movw %dx,%ax /* (2) %eax has the 32 bit pattern. */
+ movb %al,%ah # (2) Set up a 32 bit pattern
+ movw %ax,%dx # (2)
+ shll $16,%eax # (3)
+ movw %dx,%ax # (2) %eax has the 32 bit pattern.
- movl %ecx,%edx /* (2) Save the count of bytes. */
- shrl $2,%ecx /* (2) Number of dwords. */
+ movl %ecx,%edx # (2) Save the count of bytes.
+ shrl $2,%ecx # (2) Number of dwords.
rep
- stosl /* (5 + 5n) */
- movb $3,%cl /* (2) */
- and %edx,%ecx /* (2) Fill in the odd bytes */
+ stosl # (5 + 5n)
+ movb $3,%cl # (2)
+ and %edx,%ecx # (2) Fill in the odd bytes
rep
- stosb /* Move last bytes if any */
+ stosb # Move last bytes if any
- movb %cl,(%edi) /* End NULL */
- movl %edi,%eax /* End i %eax */
+ movb %cl,(%edi) # End NULL
+ movl %edi,%eax # End i %eax
popl %edi
ret
.strfill_end:
.size strfill,.strfill_end-strfill
- /* Find a char in or end of a string */
- /* Arg: str,char */
- /* Ret: pointer to found char or NullS */
+ # Find a char in or end of a string
+ # Arg: str,char
+ # Ret: pointer to found char or NullS
.globl strcend
.type strcend,@function
strcend:
movl %edi,%edx
- movl 4(%esp),%edi /* str */
- movb 8(%esp),%ah /* search */
- clrb %al /* for scasb to find end */
+ movl 4(%esp),%edi # str
+ movb 8(%esp),%ah # search
+ clrb %al # for scasb to find end
se_10: cmpb (%edi),%ah
- jz se_20 /* Found char */
+ jz se_20 # Found char
scasb
- jnz se_10 /* Not end */
- dec %edi /* Not found, point at end of string */
+ jnz se_10 # Not end
+ dec %edi # Not found, point at end of string
se_20: movl %edi,%eax
- movl %edx,%edi /* Restore */
+ movl %edx,%edi # Restore
ret
.strcend_end:
.size strcend,.strcend_end-strcend
- /* Test if string has a given suffix */
+ # Test if string has a given suffix
.globl is_prefix
.type is_prefix,@function
is_prefix:
- movl %edi,%edx /* Save %edi */
- pushl %esi /* and %esi */
- movl 12(%esp),%esi /* get suffix */
- movl 8(%esp),%edi /* s1 */
- movl $1,%eax /* Ok and zero-test */
+ movl %edi,%edx # Save %edi
+ pushl %esi # and %esi
+ movl 12(%esp),%esi # get suffix
+ movl 8(%esp),%edi # s1
+ movl $1,%eax # Ok and zero-test
ip_10: cmpb (%esi),%ah
- jz suf_ok /* End of string/ found suffix */
- cmpsb /* Compare strings */
- jz ip_10 /* Same, possible prefix */
- xor %eax,%eax /* Not suffix */
+ jz suf_ok # End of string/ found suffix
+ cmpsb # Compare strings
+ jz ip_10 # Same, possible prefix
+ xor %eax,%eax # Not suffix
suf_ok: popl %esi
movl %edx,%edi
ret
.is_prefix_end:
.size is_prefix,.is_prefix_end-is_prefix
- /* Find a substring in string */
- /* Arg: str,search */
+ # Find a substring in string
+ # Arg: str,search
.globl strstr
.type strstr,@function
@@ -241,31 +240,31 @@ suf_ok: popl %esi
strstr:
pushl %edi
pushl %esi
- movl 12(%esp),%esi /* str */
- movl 16(%esp),%edi /* search */
+ movl 12(%esp),%esi # str
+ movl 16(%esp),%edi # search
movl %edi,%ecx
- incl %ecx /* %ecx = search+1 */
- movb (%edi),%ah /* %ah = First char in search */
+ incl %ecx # %ecx = search+1
+ movb (%edi),%ah # %ah = First char in search
jmp sf_10
-sf_00: movl %edx,%esi /* si = Current str-pos */
-sf_10: movb (%esi),%al /* Test if this char exist */
+sf_00: movl %edx,%esi # si = Current str-pos
+sf_10: movb (%esi),%al # Test if this char exist
andb %al,%al
- jz sf_90 /* End of string, didn't find search */
+ jz sf_90 # End of string, didn't find search
incl %esi
cmpb %al,%ah
- jnz sf_10 /* Didn't find first char, continue */
- movl %esi,%edx /* Save str-pos in %edx */
+ jnz sf_10 # Didn't find first char, continue
+ movl %esi,%edx # Save str-pos in %edx
movl %ecx,%edi
sf_20: cmpb $0,(%edi)
- jz sf_fo /* Found substring */
+ jz sf_fo # Found substring
cmpsb
- jz sf_20 /* Char ok */
- jmp sf_00 /* Next str-pos */
+ jz sf_20 # Char ok
+ jmp sf_00 # Next str-pos
-sf_90: movl $1,%edx /* Return Null */
-sf_fo: movl %edx,%eax /* Char found here */
- decl %eax /* Pointed one after */
+sf_90: movl $1,%edx # Return Null
+sf_fo: movl %edx,%eax # Char found here
+ decl %eax # Pointed one after
popl %esi
popl %edi
ret
@@ -273,8 +272,8 @@ sf_fo: movl %edx,%eax /* Char found here */
.size strstr,.strstr_end-strstr
- /* Find a substring in string, return index */
- /* Arg: str,search */
+ # Find a substring in string, return index
+ # Arg: str,search
.globl strinstr
.type strinstr,@function
@@ -282,22 +281,22 @@ sf_fo: movl %edx,%eax /* Char found here */
strinstr:
pushl %ebp
movl %esp,%ebp
- pushl 12(%ebp) /* search */
- pushl 8(%ebp) /* str */
+ pushl 12(%ebp) # search
+ pushl 8(%ebp) # str
call strstr
add $8,%esp
or %eax,%eax
- jz si_99 /* Not found, return NULL */
- sub 8(%ebp),%eax /* Pos from start */
- inc %eax /* And first pos = 1 */
+ jz si_99 # Not found, return NULL
+ sub 8(%ebp),%eax # Pos from start
+ inc %eax # And first pos = 1
si_99: popl %ebp
ret
.strinstr_end:
.size strinstr,.strinstr_end-strinstr
- /* Make a string of len length from another string */
- /* Arg: dst,src,length */
- /* ret: end of dst */
+ # Make a string of len length from another string
+ # Arg: dst,src,length
+ # ret: end of dst
.globl strmake
.type strmake,@function
@@ -305,48 +304,48 @@ si_99: popl %ebp
strmake:
pushl %edi
pushl %esi
- movl 12(%esp),%edi /* dst */
- movl 16(%esp),%esi /* src */
- movl 20(%esp),%ecx /* Length of memory-area */
- clrb %al /* For test of end-null */
- jecxz sm_90 /* Nothing to move, put zero at end. */
-
-sm_10: cmpb (%esi),%al /* Next char to move */
- movsb /* move arg */
- jz sm_99 /* last char, we are ready */
- loop sm_10 /* Continue moving */
-sm_90: movb %al,(%edi) /* Set end pos */
- incl %edi /* Fix that di points at end null */
-sm_99: decl %edi /* di points now at end null */
- movl %edi,%eax /* Ret value.p $ */
+ movl 12(%esp),%edi # dst
+ movl 16(%esp),%esi # src
+ movl 20(%esp),%ecx # Length of memory-area
+ clrb %al # For test of end-null
+ jecxz sm_90 # Nothing to move, put zero at end.
+
+sm_10: cmpb (%esi),%al # Next char to move
+ movsb # move arg
+ jz sm_99 # last char, we are ready
+ loop sm_10 # Continue moving
+sm_90: movb %al,(%edi) # Set end pos
+ incl %edi # Fix that di points at end null
+sm_99: decl %edi # di points now at end null
+ movl %edi,%eax # Ret value.p $
popl %esi
popl %edi
ret
.strmake_end:
.size strmake,.strmake_end-strmake
- /* Move a string with max len chars */
- /* arg: dst,src,len */
- /* ret: pos to first null or dst+len */
+ # Move a string with max len chars
+ # arg: dst,src,len
+ # ret: pos to first null or dst+len
.globl strnmov
.type strnmov,@function
strnmov:
pushl %edi
pushl %esi
- movl 12(%esp),%edi /* dst */
- movl 16(%esp),%esi /* src */
- movl 20(%esp),%ecx /* Length of memory-area */
- jecxz snm_99 /* Nothing to do */
- clrb %al /* For test of end-null */
-
-snm_10: cmpb (%esi),%al /* Next char to move */
- movsb /* move arg */
- jz snm_20 /* last char, fill with null */
- loop snm_10 /* Continue moving */
- incl %edi /* Point two after last */
-snm_20: decl %edi /* Point at first null (or last+1) */
-snm_99: movl %edi,%eax /* Pointer at last char */
+ movl 12(%esp),%edi # dst
+ movl 16(%esp),%esi # src
+ movl 20(%esp),%ecx # Length of memory-area
+ jecxz snm_99 # Nothing to do
+ clrb %al # For test of end-null
+
+snm_10: cmpb (%esi),%al # Next char to move
+ movsb # move arg
+ jz snm_20 # last char, fill with null
+ loop snm_10 # Continue moving
+ incl %edi # Point two after last
+snm_20: decl %edi # Point at first null (or last+1)
+snm_99: movl %edi,%eax # Pointer at last char
popl %esi
popl %edi
ret
@@ -357,17 +356,17 @@ snm_99: movl %edi,%eax /* Pointer at last char */
.globl strmov
.type strmov,@function
strmov:
- movl %esi,%ecx /* Save old %esi and %edi */
+ movl %esi,%ecx # Save old %esi and %edi
movl %edi,%edx
- movl 8(%esp),%esi /* get source pointer (s2) */
- movl 4(%esp),%edi /* %edi -> s1 */
+ movl 8(%esp),%esi # get source pointer (s2)
+ movl 4(%esp),%edi # %edi -> s1
smo_10: movb (%esi),%al
- movsb /* move arg */
+ movsb # move arg
andb %al,%al
- jnz smo_10 /* Not last */
+ jnz smo_10 # Not last
movl %edi,%eax
dec %eax
- movl %ecx,%esi /* Restore */
+ movl %ecx,%esi # Restore
movl %edx,%edi
ret
.strmov_end:
@@ -376,29 +375,29 @@ smo_10: movb (%esi),%al
.globl strxmov
.type strxmov,@function
strxmov:
- movl %ebx,%edx /* Save %ebx, %esi and %edi */
+ movl %ebx,%edx # Save %ebx, %esi and %edi
mov %esi,%ecx
push %edi
- leal 8(%esp),%ebx /* Get destination */
+ leal 8(%esp),%ebx # Get destination
movl (%ebx),%edi
xorb %al,%al
- jmp next_str /* Handle source ebx+4 */
+ jmp next_str # Handle source ebx+4
start_str:
movsb
cmpb -1(%edi),%al
jne start_str
- decl %edi /* Don't copy last null */
+ decl %edi # Don't copy last null
next_str:
addl $4,%ebx
movl (%ebx),%esi
orl %esi,%esi
jne start_str
- movb %al,0(%edi) /* Force last to ASCII 0 */
+ movb %al,0(%edi) # Force last to ASCII 0
- movl %edi,%eax /* Return ptr to ASCII 0 */
- pop %edi /* Restore registers */
+ movl %edi,%eax # Return ptr to ASCII 0
+ pop %edi # Restore registers
movl %ecx,%esi
movl %edx,%ebx
ret
diff --git a/strings/strinstr.c b/strings/strinstr.c
index e1d502f4004..1c814d19d47 100644
--- a/strings/strinstr.c
+++ b/strings/strinstr.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* File : strinstr.c
Author : Monty & David
@@ -27,7 +26,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/strlen.c b/strings/strlen.c
index c142a7f2b14..b9be374fa6e 100644
--- a/strings/strlen.c
+++ b/strings/strlen.c
@@ -1,3 +1,19 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
/* File : strlen.c
Author : Richard A. O'Keefe. / Monty
Michael Widenius; ifdef MC68000
diff --git a/strings/strmake.c b/strings/strmake.c
index 66a230338a1..2e384fc168a 100644
--- a/strings/strmake.c
+++ b/strings/strmake.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* File : strmake.c
Author : Michael Widenius
@@ -26,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..507c2b6d997 100644
--- a/strings/strmov.c
+++ b/strings/strmov.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
strmov(dst, src) moves all the characters of src (including the
@@ -23,7 +22,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..fc8879b3a41 100644
--- a/strings/strnlen.c
+++ b/strings/strnlen.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* File : strnlen.c
Author : Michael Widenius
@@ -22,7 +21,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..362f3d6c4a8 100644
--- a/strings/strnmov.c
+++ b/strings/strnmov.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
strnmov(dst,src,length) moves length characters, or until end, of src to
@@ -22,7 +21,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/strrchr.c b/strings/strrchr.c
index 5a045ac3740..fb588c015f2 100644
--- a/strings/strrchr.c
+++ b/strings/strrchr.c
@@ -1,3 +1,19 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
/* File : strrchr.c
Author : Richard A. O'Keefe.
Updated: 10 April 1984
diff --git a/strings/strstr.c b/strings/strstr.c
index 01b29db0068..ca845568ddb 100644
--- a/strings/strstr.c
+++ b/strings/strstr.c
@@ -27,7 +27,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 d3392c794e9..84dccbcbeb8 100644
--- a/strings/strto.c
+++ b/strings/strto.c
@@ -1,19 +1,18 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
strtol,strtoul,strtoll,strtoull
@@ -36,7 +35,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..10d7f8f9da6 100644
--- a/strings/strtol.c
+++ b/strings/strtol.c
@@ -1,23 +1,22 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* 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..8d0ba21d576 100644
--- a/strings/strtoll.c
+++ b/strings/strtoll.c
@@ -1,23 +1,22 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* 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..00e1f820942 100644
--- a/strings/strtoul.c
+++ b/strings/strtoul.c
@@ -1,23 +1,22 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* 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..25201e546ce 100644
--- a/strings/strtoull.c
+++ b/strings/strtoull.c
@@ -1,23 +1,22 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* 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 3ef120a691e..fe1e88c13d0 100644
--- a/strings/strxmov.c
+++ b/strings/strxmov.c
@@ -30,7 +30,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 ec3b6fe71e8..3ef0e57650c 100644
--- a/strings/strxnmov.c
+++ b/strings/strxnmov.c
@@ -37,7 +37,7 @@
needed.
*/
-#include <global.h>
+#include <my_global.h>
#include "m_string.h"
#include <stdarg.h>
diff --git a/strings/t_ctype.h b/strings/t_ctype.h
index 6699244c1f4..ac1fa408c0e 100644
--- a/strings/t_ctype.h
+++ b/strings/t_ctype.h
@@ -1,3 +1,19 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
/*
Copyright (C) 1998, 1999 by Pruet Boonma, all rights reserved.
Copyright (C) 1998 by Theppitak Karoonboonyanan, all rights reserved.
@@ -125,7 +141,7 @@ enum l1_symbols {
L1_SARA_AI_MAIMUAN,
L1_SARA_AI_MAIMALAI
};
-
+
// level 2 symbols & order
enum l2_symbols {
L2_BLANK = TOT_LEVELS,
@@ -139,7 +155,7 @@ enum l2_symbols {
L2_TONE3,
L2_TONE4
};
-
+
// level 3 symbols & order
enum l3_symbols {
L3_BLANK = TOT_LEVELS,
diff --git a/strings/udiv.c b/strings/udiv.c
index 07af323a706..25f3f4685f0 100644
--- a/strings/udiv.c
+++ b/strings/udiv.c
@@ -1,23 +1,22 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA */
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* 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)