summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
Diffstat (limited to 'strings')
-rwxr-xr-xstrings/CMakeLists.txt2
-rw-r--r--strings/Makefile.am4
-rw-r--r--strings/bchange.c32
-rw-r--r--strings/bmove512.c33
-rw-r--r--strings/bmove_upp.c39
-rw-r--r--strings/conf_to_src.c6
-rw-r--r--strings/ctype-big5.c3
-rw-r--r--strings/ctype-bin.c8
-rw-r--r--strings/ctype-cp932.c3
-rw-r--r--strings/ctype-czech.c6
-rw-r--r--strings/ctype-euc_kr.c3
-rw-r--r--strings/ctype-eucjpms.c5
-rw-r--r--strings/ctype-extra.c3
-rw-r--r--strings/ctype-gb2312.c3
-rw-r--r--strings/ctype-gbk.c3
-rw-r--r--strings/ctype-latin1.c6
-rw-r--r--strings/ctype-mb.c3
-rw-r--r--strings/ctype-simple.c6
-rw-r--r--strings/ctype-sjis.c3
-rw-r--r--strings/ctype-tis620.c17
-rw-r--r--strings/ctype-uca.c8
-rw-r--r--strings/ctype-ucs2.c7
-rw-r--r--strings/ctype-ujis.c5
-rw-r--r--strings/ctype-utf8.c8
-rw-r--r--strings/ctype-win1250ch.c5
-rw-r--r--strings/ctype.c6
-rw-r--r--strings/decimal.c38
-rw-r--r--strings/do_ctype.c6
-rw-r--r--strings/dump_map.c6
-rw-r--r--strings/my_strchr.c3
-rw-r--r--strings/my_vsnprintf.c3
-rw-r--r--strings/str_alloc.c6
-rw-r--r--strings/str_test.c3
-rw-r--r--strings/strappend.c10
-rw-r--r--strings/strcend.c9
-rw-r--r--strings/strinstr.c1
-rw-r--r--strings/strmake.c4
-rw-r--r--strings/strtod.c6
-rw-r--r--strings/uca-dump.c6
-rw-r--r--strings/uctypedump.c6
-rw-r--r--strings/utr11-dump.c6
-rw-r--r--strings/xml.c3
42 files changed, 189 insertions, 154 deletions
diff --git a/strings/CMakeLists.txt b/strings/CMakeLists.txt
index bdea64c755a..29e986543fb 100755
--- a/strings/CMakeLists.txt
+++ b/strings/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (C) 2006 MySQL AB
+# Copyright (c) 2006, 2010, Oracle and/or its affiliates
#
# 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
diff --git a/strings/Makefile.am b/strings/Makefile.am
index 3ba4685a2a5..109ab068498 100644
--- a/strings/Makefile.am
+++ b/strings/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright (C) 2000-2006 MySQL AB
+# Copyright (c) 2000, 2010, Oracle and/or its affiliates
#
# 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
@@ -11,7 +11,7 @@
#
# 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
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# This file is public domain and comes with NO WARRANTY of any kind
diff --git a/strings/bchange.c b/strings/bchange.c
index c8e477fa186..50ea6c3b396 100644
--- a/strings/bchange.c
+++ b/strings/bchange.c
@@ -1,29 +1,19 @@
/* Copyright (c) 2000 TXT DataKonsult Ab & Monty Program Ab
Copyright (c) 2009-2011, Monty Program Ab
+ Use is subject to license terms.
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are
- met:
+ 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; version 2 of the License.
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
+ 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.
- 2. Redistributions in binary form must the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ``AS IS'' AND ANY
- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
+ 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/* File : bchange.c
diff --git a/strings/bmove512.c b/strings/bmove512.c
index 096dbcc0fb3..67776b78b57 100644
--- a/strings/bmove512.c
+++ b/strings/bmove512.c
@@ -1,29 +1,20 @@
/* Copyright (c) 2000 TXT DataKonsult Ab & Monty Program Ab
+ Copyright (c) 2000, 2001, 2003, 2006, 2007 MySQL AB
Copyright (c) 2009-2011, Monty Program Ab
+ Use is subject to license terms.
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are
- met:
+ 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; version 2 of the License.
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
+ 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.
- 2. Redistributions in binary form must the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ``AS IS'' AND ANY
- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
+ 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/* File : bmove512.c
diff --git a/strings/bmove_upp.c b/strings/bmove_upp.c
index 6ae33f8f0ef..a7b30d74585 100644
--- a/strings/bmove_upp.c
+++ b/strings/bmove_upp.c
@@ -1,29 +1,18 @@
/* Copyright (c) 2000 TXT DataKonsult Ab & Monty Program Ab
- Copyright (c) 2009-2011, Monty Program Ab
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are
- met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ``AS IS'' AND ANY
- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
+ Use is subject to license terms.
+
+ 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; version 2 of the License.
+
+ 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/* File : bmove.c
diff --git a/strings/conf_to_src.c b/strings/conf_to_src.c
index 11a4042b10c..772ad74c664 100644
--- a/strings/conf_to_src.c
+++ b/strings/conf_to_src.c
@@ -1,5 +1,6 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates.
+/* Copyright (c) 2000-2003, 2005-2007 MySQL AB
Copyright (c) 2009-2011, Monty Program Ab
+ Use is subject to license terms.
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
@@ -12,7 +13,8 @@
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 */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
#include "strings_def.h"
#include <m_ctype.h>
diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c
index 2b898fd1707..4ae1fe2524a 100644
--- a/strings/ctype-big5.c
+++ b/strings/ctype-big5.c
@@ -12,7 +12,8 @@
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 */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
/*
* This file is basicly usa7 character sets with some extra functions
diff --git a/strings/ctype-bin.c b/strings/ctype-bin.c
index ebfdcac00d9..2140cd36129 100644
--- a/strings/ctype-bin.c
+++ b/strings/ctype-bin.c
@@ -1,5 +1,4 @@
-/* Copyright tommy@valley.ne.jp.
- Copyright (c) 2002, 2011, Oracle and/or its affiliates.
+/* Copyright (c) 2002-2007 MySQL AB & tommy@valley.ne.jp
Copyright (c) 2009-2011, Monty Program Ab
This library is free software; you can redistribute it and/or
@@ -14,8 +13,9 @@
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 */
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ MA 02110-1301, USA
+*/
/* This file is for binary pseudo charset, created by bar@mysql.com */
diff --git a/strings/ctype-cp932.c b/strings/ctype-cp932.c
index c1fa3891f15..ed4a72c6e0d 100644
--- a/strings/ctype-cp932.c
+++ b/strings/ctype-cp932.c
@@ -12,7 +12,8 @@
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 */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
/* This file is for cp932 charaset (Windows Japanese),
and created based on ctype-sjis.c file */
diff --git a/strings/ctype-czech.c b/strings/ctype-czech.c
index e9acdce5e79..3d0f85bb557 100644
--- a/strings/ctype-czech.c
+++ b/strings/ctype-czech.c
@@ -1,5 +1,6 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates.
+/* Copyright (c) 2000-2007 MySQL AB
Copyright (c) 2009-2011, Monty Program Ab
+ Use is subject to license terms.
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
@@ -12,7 +13,8 @@
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 */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
/* File strings/ctype-czech.c for MySQL.
diff --git a/strings/ctype-euc_kr.c b/strings/ctype-euc_kr.c
index 058cd16d5aa..b796d385214 100644
--- a/strings/ctype-euc_kr.c
+++ b/strings/ctype-euc_kr.c
@@ -12,7 +12,8 @@
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 */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
/*
* This file is for Korean EUC charset, and created by powerm90@tinc.co.kr.
diff --git a/strings/ctype-eucjpms.c b/strings/ctype-eucjpms.c
index 60f43086eaf..8f0e67186b1 100644
--- a/strings/ctype-eucjpms.c
+++ b/strings/ctype-eucjpms.c
@@ -14,8 +14,9 @@
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 */
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ MA 02110-1301, USA
+*/
/* This file is for Japanese EUC charset, and created based on
ctype-ujis.c file.
diff --git a/strings/ctype-extra.c b/strings/ctype-extra.c
index e0499c6f2e3..4b1109379d1 100644
--- a/strings/ctype-extra.c
+++ b/strings/ctype-extra.c
@@ -20,7 +20,8 @@
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
#include "strings_def.h"
#include <m_ctype.h>
diff --git a/strings/ctype-gb2312.c b/strings/ctype-gb2312.c
index dad25084d58..bc1bb287c17 100644
--- a/strings/ctype-gb2312.c
+++ b/strings/ctype-gb2312.c
@@ -12,7 +12,8 @@
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 */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
/* This file is for Chinese EUC character sets (GB2312), and created by Miles Tsai (net-bull@126.com).
*/
diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c
index 7d6be3dde1e..8e0ff6ee678 100644
--- a/strings/ctype-gbk.c
+++ b/strings/ctype-gbk.c
@@ -12,7 +12,8 @@
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 */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
/* This file is for Chinese character sets GBK, created by Wei He
(hewei@mail.ied.ac.cn)
diff --git a/strings/ctype-latin1.c b/strings/ctype-latin1.c
index e85838fdea5..dd9a1ec9f18 100644
--- a/strings/ctype-latin1.c
+++ b/strings/ctype-latin1.c
@@ -1,5 +1,6 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates.
+/* Copyright (c) 2003-2007 MySQL AB
Copyright (c) 2009-2011, Monty Program Ab
+ Use is subject to license terms.
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
@@ -12,7 +13,8 @@
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 */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
#include "strings_def.h"
#include <m_ctype.h>
diff --git a/strings/ctype-mb.c b/strings/ctype-mb.c
index 73001d1ad34..0b3f1a032d8 100644
--- a/strings/ctype-mb.c
+++ b/strings/ctype-mb.c
@@ -12,7 +12,8 @@
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 */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
#include "strings_def.h"
#include <m_ctype.h>
diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c
index cc142b7fbef..f962b4f77cf 100644
--- a/strings/ctype-simple.c
+++ b/strings/ctype-simple.c
@@ -1,5 +1,6 @@
-/* Copyright (c) 2002, 2011, Oracle and/or its affiliates.
+/* Copyright (c) 2002-2007 MySQL AB, 2009 Sun Microsystems, Inc.
Copyright (c) 2009-2011, Monty Program Ab
+ Use is subject to license terms.
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
@@ -12,7 +13,8 @@
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 */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
#include "strings_def.h"
#include <m_ctype.h>
diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c
index 28e4950a111..472eeea41c6 100644
--- a/strings/ctype-sjis.c
+++ b/strings/ctype-sjis.c
@@ -12,7 +12,8 @@
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 */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
/* This file is for Shift JIS charset, and created by tommy@valley.ne.jp.
*/
diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c
index a6dee014123..4350a0aa219 100644
--- a/strings/ctype-tis620.c
+++ b/strings/ctype-tis620.c
@@ -1,19 +1,4 @@
-/*
- 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; version 2 of the License.
-
- 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, 2011, Oracle and/or its affiliates.
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates.
Copyright (c) 2009-2011, Monty Program Ab
Copyright (C) 2003 by Sathit Jittanupat
<jsat66@hotmail.com,jsat66@yahoo.com>
diff --git a/strings/ctype-uca.c b/strings/ctype-uca.c
index 2a5e01958b4..61a6096db17 100644
--- a/strings/ctype-uca.c
+++ b/strings/ctype-uca.c
@@ -1,5 +1,6 @@
-/* Copyright (c) 2004, 2011, Oracle and/or its affiliates.
+/* Copyright (c) 2004-2007 MySQL AB, 2009 Sun Microsystems, Inc.
Copyright (c) 2009-2011, Monty Program Ab
+ Use is subject to license terms.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -13,8 +14,9 @@
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 */
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ MA 02110-1301, USA
+*/
/*
UCA (Unicode Collation Algorithm) support.
diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c
index 37ece4a9840..6c2d1cf2fb1 100644
--- a/strings/ctype-ucs2.c
+++ b/strings/ctype-ucs2.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates.
+/* Copyright (c) 2003, 2010, Oracle and/or its affiliates
Copyright (c) 2009-2011, Monty Program Ab
This library is free software; you can redistribute it and/or
@@ -13,8 +13,9 @@
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 */
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ MA 02110-1301, USA
+*/
/* UCS2 support. Written by Alexander Barkov <bar@mysql.com> */
diff --git a/strings/ctype-ujis.c b/strings/ctype-ujis.c
index a90428a981a..65b17970a04 100644
--- a/strings/ctype-ujis.c
+++ b/strings/ctype-ujis.c
@@ -14,8 +14,9 @@
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 */
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ MA 02110-1301, USA
+*/
/* This file is for Japanese EUC charset, and created by tommy@valley.ne.jp.
*/
diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c
index a1254895fcb..160052e3ce7 100644
--- a/strings/ctype-utf8.c
+++ b/strings/ctype-utf8.c
@@ -1,5 +1,6 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates.
+/* Copyright (c) 2002-2008 MySQL AB, 2009 Sun Microsystems, Inc.
Copyright (c) 2009-2011, Monty Program Ab
+ Use is subject to license terms.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -13,8 +14,9 @@
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 */
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ MA 02110-1301, USA
+*/
/* UTF8 according RFC 2279 */
/* Written by Alexander Barkov <bar@udm.net> */
diff --git a/strings/ctype-win1250ch.c b/strings/ctype-win1250ch.c
index d42ac3a5e43..611d06d2b2f 100644
--- a/strings/ctype-win1250ch.c
+++ b/strings/ctype-win1250ch.c
@@ -1,5 +1,5 @@
/* Copyright (c) 2001 Jan Pazdziora.
- Copyright (c) 2003, 2011, Oracle and/or its affiliates.
+ Copyright (c) 2002-2007 MySQL AB
Copyright (c) 2009-2011, Monty Program Ab
This program is free software; you can redistribute it and/or modify
@@ -13,7 +13,8 @@
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 */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
/*
Shared, independent copyright: (C) 2001 Jan Pazdziora.
diff --git a/strings/ctype.c b/strings/ctype.c
index 6b039b5336f..b1809eccac1 100644
--- a/strings/ctype.c
+++ b/strings/ctype.c
@@ -1,5 +1,6 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates.
+/* Copyright (c) 2000-2007 MySQL AB, 2008, 2009 Sun Microsystems, Inc.
Copyright (c) 2009-2011, Monty Program Ab
+ Use is subject to license terms.
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
@@ -12,7 +13,8 @@
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 */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
#include "strings_def.h"
#include <m_ctype.h>
diff --git a/strings/decimal.c b/strings/decimal.c
index a05867927ee..8cd5c93e84b 100644
--- a/strings/decimal.c
+++ b/strings/decimal.c
@@ -12,7 +12,8 @@
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 */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
#line 18 "decimal.c"
@@ -320,8 +321,8 @@ int decimal_actual_fraction(decimal_t *from)
from - value to convert
to - points to buffer where string representation
should be stored
- *to_len - in: size of to buffer
- out: length of the actually written string
+ *to_len - in: size of to buffer (incl. terminating '\0')
+ out: length of the actually written string (excl. '\0')
fixed_precision - 0 if representation can be variable length and
fixed_decimals will not be checked in this case.
Put number as with fixed point position with this
@@ -338,6 +339,7 @@ int decimal2string(const decimal_t *from, char *to, int *to_len,
int fixed_precision, int fixed_decimals,
char filler)
{
+ /* {intg_len, frac_len} output widths; {intg, frac} places in input */
int len, intg, frac= from->frac, i, intg_len, frac_len, fill;
/* number digits before decimal point */
int fixed_intg= (fixed_precision ?
@@ -1421,11 +1423,18 @@ int bin2decimal(const uchar *from, decimal_t *to, int precision, int scale)
buf++;
}
my_afree(d_copy);
+
+ /*
+ No digits? We have read the number zero, of unspecified precision.
+ Make it a proper zero, with non-zero precision.
+ */
+ if (to->intg == 0 && to->frac == 0)
+ decimal_make_zero(to);
return error;
err:
my_afree(d_copy);
- decimal_make_zero(((decimal_t*) to));
+ decimal_make_zero(to);
return(E_DEC_BAD_NUM);
}
@@ -1485,9 +1494,8 @@ decimal_round(const decimal_t *from, decimal_t *to, int scale,
{
int frac0=scale>0 ? ROUND_UP(scale) : scale/DIG_PER_DEC1,
frac1=ROUND_UP(from->frac), UNINIT_VAR(round_digit),
- intg0=ROUND_UP(from->intg), error=E_DEC_OK, len=to->len,
- intg1=ROUND_UP(from->intg +
- (((intg0 + frac0)>0) && (from->buf[0] == DIG_MAX)));
+ intg0=ROUND_UP(from->intg), error=E_DEC_OK, len=to->len;
+
dec1 *buf0=from->buf, *buf1=to->buf, x, y, carry=0;
int first_dig;
@@ -1502,6 +1510,12 @@ decimal_round(const decimal_t *from, decimal_t *to, int scale,
default: DBUG_ASSERT(0);
}
+ /*
+ For my_decimal we always use len == DECIMAL_BUFF_LENGTH == 9
+ For internal testing here (ifdef MAIN) we always use len == 100/4
+ */
+ DBUG_ASSERT(from->len == to->len);
+
if (unlikely(frac0+intg0 > len))
{
frac0=len-intg0;
@@ -1515,17 +1529,17 @@ decimal_round(const decimal_t *from, decimal_t *to, int scale,
return E_DEC_OK;
}
- if (to != from || intg1>intg0)
+ if (to != from)
{
dec1 *p0= buf0+intg0+max(frac1, frac0);
- dec1 *p1= buf1+intg1+max(frac1, frac0);
+ dec1 *p1= buf1+intg0+max(frac1, frac0);
+
+ DBUG_ASSERT(p0 - buf0 <= len);
+ DBUG_ASSERT(p1 - buf1 <= len);
while (buf0 < p0)
*(--p1) = *(--p0);
- if (unlikely(intg1 > intg0))
- to->buf[0]= 0;
- intg0= intg1;
buf0=to->buf;
buf1=to->buf;
to->sign=from->sign;
diff --git a/strings/do_ctype.c b/strings/do_ctype.c
index 8b51f7850c1..402830dd824 100644
--- a/strings/do_ctype.c
+++ b/strings/do_ctype.c
@@ -1,5 +1,6 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates.
+/* Copyright (c) 2000-2002, 2006, 2007 MySQL AB
Copyright (c) 2009-2011, Monty Program Ab
+ Use is subject to license terms.
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
@@ -12,7 +13,8 @@
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 */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
/* Prints case-convert and sort-convert tabell on stdout. This is used to
make _ctype.c easyer */
diff --git a/strings/dump_map.c b/strings/dump_map.c
index 61e6cbb6e02..b19cc949940 100644
--- a/strings/dump_map.c
+++ b/strings/dump_map.c
@@ -1,5 +1,6 @@
-/* Copyright (c) 2003, 2011, Oracle and/or its affiliates.
+/* Copyright (c) 2003, 2004, 2006 MySQL AB
Copyright (c) 2009-2011, Monty Program Ab
+ Use is subject to license terms.
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
@@ -12,7 +13,8 @@
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
#include <stdio.h>
#include <string.h>
diff --git a/strings/my_strchr.c b/strings/my_strchr.c
index baf832c9a0a..e3ec1066970 100644
--- a/strings/my_strchr.c
+++ b/strings/my_strchr.c
@@ -12,7 +12,8 @@
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 */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
#include "strings_def.h"
#include <m_ctype.h>
diff --git a/strings/my_vsnprintf.c b/strings/my_vsnprintf.c
index 4105aaee189..685b65b7bc4 100644
--- a/strings/my_vsnprintf.c
+++ b/strings/my_vsnprintf.c
@@ -12,7 +12,8 @@
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 */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
#include "strings_def.h"
#include <m_ctype.h>
diff --git a/strings/str_alloc.c b/strings/str_alloc.c
index 5233a804153..8f92063c841 100644
--- a/strings/str_alloc.c
+++ b/strings/str_alloc.c
@@ -1,5 +1,6 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates.
+/* Copyright (c) 2005, 2006 MySQL AB
Copyright (c) 2009-2011, Monty Program Ab
+ Use is subject to license terms.
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
@@ -12,7 +13,8 @@
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 */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
#include "strings_def.h"
diff --git a/strings/str_test.c b/strings/str_test.c
index b0853cb0e98..61daff4c594 100644
--- a/strings/str_test.c
+++ b/strings/str_test.c
@@ -12,7 +12,8 @@
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 */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
/* Test of all stringfunktions that is coded in assembler */
diff --git a/strings/strappend.c b/strings/strappend.c
index 29d38e74fb5..2d04f009a60 100644
--- a/strings/strappend.c
+++ b/strings/strappend.c
@@ -26,6 +26,16 @@
SUCH DAMAGE.
*/
+/* File : strappend.c
+ Author : Monty
+ Updated: 1987.02.07
+ Defines: strappend()
+
+ strappend(dest, len, fill) appends fill-characters to a string so that
+ the result length == len. If the string is longer than len it's
+ trunked. The des+len character is allways set to NULL.
+*/
+
#include "strings_def.h"
void strappend(register char *s, size_t len, pchar fill)
diff --git a/strings/strcend.c b/strings/strcend.c
index a78bb749e0c..48b6070a0ff 100644
--- a/strings/strcend.c
+++ b/strings/strcend.c
@@ -26,6 +26,15 @@
SUCH DAMAGE.
*/
+/* File : strcend.c
+ Author : Michael Widenius: ifdef MC68000
+ Updated: 20 April 1984
+ Defines: strcend()
+
+ strcend(s, c) returns a pointer to the first place in s where c
+ occurs, or a pointer to the end-null of s if c does not occur in s.
+*/
+
#include "strings_def.h"
#if defined(MC68000) && defined(DS90)
diff --git a/strings/strinstr.c b/strings/strinstr.c
index 9dddfbe0d04..6bf889c3310 100644
--- a/strings/strinstr.c
+++ b/strings/strinstr.c
@@ -25,6 +25,7 @@
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
*/
+
/* File : strinstr.c
Author : Monty & David
Updated: 1986.12.08
diff --git a/strings/strmake.c b/strings/strmake.c
index 5c26538c9bd..c313ed17740 100644
--- a/strings/strmake.c
+++ b/strings/strmake.c
@@ -1,5 +1,6 @@
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates.
Copyright (c) 2009-2011, Monty Program Ab
+ Use is subject to license terms.
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
@@ -12,7 +13,8 @@
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 */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
/* File : strmake.c
Author : Michael Widenius
diff --git a/strings/strtod.c b/strings/strtod.c
index f0e7bd65bcd..1b284df2d6d 100644
--- a/strings/strtod.c
+++ b/strings/strtod.c
@@ -1,4 +1,6 @@
-/*
+/* Copyright (c) 2000, 2004-2007 MySQL AB
+ Use is subject to license terms.
+
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; version 2 of the License.
@@ -10,7 +12,7 @@
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 */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
/*
An alternative implementation of "strtod()" that is both
diff --git a/strings/uca-dump.c b/strings/uca-dump.c
index d281783aa2b..e0c976d9671 100644
--- a/strings/uca-dump.c
+++ b/strings/uca-dump.c
@@ -1,5 +1,6 @@
-/* Copyright (c) 2004, 2011, Oracle and/or its affiliates.
+/* Copyright (c) 2004, 2006 MySQL AB
Copyright (c) 2009-2011, Monty Program Ab
+ Use is subject to license terms.
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
@@ -12,7 +13,8 @@
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
#include <stdio.h>
#include <stdlib.h>
diff --git a/strings/uctypedump.c b/strings/uctypedump.c
index 117db2ba30a..83d430db393 100644
--- a/strings/uctypedump.c
+++ b/strings/uctypedump.c
@@ -1,4 +1,5 @@
-/* Copyright (c) 2006, 2011, Oracle and/or its affiliates.
+/* Copyright (c) 2006 MySQL AB
+ Use is subject to license terms.
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
@@ -11,7 +12,8 @@
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
#include "strings_def.h"
#include <m_ctype.h>
diff --git a/strings/utr11-dump.c b/strings/utr11-dump.c
index 41cc387b2e0..2bf9987f992 100644
--- a/strings/utr11-dump.c
+++ b/strings/utr11-dump.c
@@ -1,5 +1,6 @@
-/* Copyright (c) 2004, 2011, Oracle and/or its affiliates.
+/* Copyright (c) 2004, 2006 MySQL AB
Copyright (c) 2009-2011, Monty Program Ab
+ Use is subject to license terms.
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
@@ -12,7 +13,8 @@
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
#include <stdio.h>
#include <stdlib.h>
diff --git a/strings/xml.c b/strings/xml.c
index 7834f971269..ac6ab807ed8 100644
--- a/strings/xml.c
+++ b/strings/xml.c
@@ -12,7 +12,8 @@
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 */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
#include "strings_def.h"
#include "my_xml.h"