zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #25245
[Merge] lp:~paul-lucas/zorba/pjl-misc into lp:zorba
Paul J. Lucas has proposed merging lp:~paul-lucas/zorba/pjl-misc into lp:zorba.
Requested reviews:
Paul J. Lucas (paul-lucas)
For more details, see:
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/180271
--
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/180271
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2013-05-07 08:39:33 +0000
+++ CMakeLists.txt 2013-08-15 00:15:23 +0000
@@ -150,17 +150,17 @@
"int main() { static_assert(1,\"\"); }" ZORBA_CXX_STATIC_ASSERT)
# C++11 standard library types
-CHECK_CXX_SOURCE_COMPILES (
- "#include <type_traits>
+CHECK_CXX_SOURCE_COMPILES("
+ #include <type_traits>
int main() { std::enable_if<true,int> x; }" ZORBA_HAVE_ENABLE_IF)
-CHECK_CXX_SOURCE_COMPILES ("
+CHECK_CXX_SOURCE_COMPILES("
#include <memory>
int main() { std::unique_ptr<int> p; }" ZORBA_HAVE_UNIQUE_PTR)
-CHECK_CXX_SOURCE_COMPILES (
- "#include <unordered_map>
+CHECK_CXX_SOURCE_COMPILES("
+ #include <unordered_map>
int main() { std::unordered_map<int,int> m; }" ZORBA_HAVE_UNORDERED_MAP)
-CHECK_CXX_SOURCE_COMPILES (
- "#include <unordered_set>
+CHECK_CXX_SOURCE_COMPILES("
+ #include <unordered_set>
int main() { std::unordered_set<int> s; }" ZORBA_HAVE_UNORDERED_SET)
################################################################################
=== modified file 'NOTICE.txt'
--- NOTICE.txt 2013-05-07 08:39:33 +0000
+++ NOTICE.txt 2013-08-15 00:15:23 +0000
@@ -83,7 +83,7 @@
----------------------------------------------------
-src/zorbautils/stemmer/
+src/runtime/full_text/stemmer/
Copyright: 2001 Dr. Martin Porter
=== modified file 'NOTICE.xml'
--- NOTICE.xml 2013-08-09 09:04:36 +0000
+++ NOTICE.xml 2013-08-15 00:15:23 +0000
@@ -71,7 +71,7 @@
</foreign-notice>
</foreign-files>
<foreign-files>
- <file>src/zorbautils/stemmer/</file>
+ <file>src/runtime/full_text/stemmer/</file>
<copyright>2001 Dr. Martin Porter</copyright>
<foreign-notice>
All the software given out on this Snowball site is covered by the BSD
=== modified file 'README.txt'
--- README.txt 2013-08-09 09:04:36 +0000
+++ README.txt 2013-08-15 00:15:23 +0000
@@ -1,48 +1,46 @@
- --------------------------------------------------------------
- Zorba - The XQuery Processor developed by the FLWOR Foundation
- --------------------------------------------------------------
-
- The Latest Version
- ------------------
-
- The latest version can be found at http://www.zorba.io/.
-
- Documentation
- -------------
-
- The documentation is included in the doc directory, as well as
- on the website of the project at http://www.zorba-xquery.org/html/documentation
-
- Build & Installation
- --------------------
-
- Please see the documentation on the web site or in the doc directory
- of the package.
-
- Bugs and errors
- ---------------
-
- Bug or error reports should be sent to
- https://bugs.launchpad.net/zorba.
-
-
- Licensing
- ---------
-
- Please see the file called LICENSE.txt.
-
-
- Contacts
- --------
-
- o If you want to be informed about new code releases, bug fixes
- and general news and information about the Zorba XQuery Processor
- subscribe to the Zorba Users mailing list as described under
- <zorba-users@xxxxxxxxxxxxxxxxxxxxx>
-
- o If you have a concrete bug report for Zorba please go to the
- Zorba's Bug Database and submit your report:
- https://bugs.launchpad.net/zorba.
-
- o If you want to participate in actively developing Zorba or
- support Zorba, please write a mail to: zorba-dev@xxxxxxxxxxxxxxxx
+--------------------------------------------------------------
+Zorba - The XQuery Processor developed by the FLWOR Foundation
+--------------------------------------------------------------
+
+The Latest Version
+------------------
+
+The latest version can be found at <http://www.zorba.io/>.
+
+Documentation
+-------------
+
+The documentation is included in the doc directory as well as on the web site
+of the project at <http://www.zorba-xquery.org/html/documentation>.
+
+Build & Installation
+--------------------
+
+Please see the documentation on the web site or in the doc directory of the
+package.
+
+Bugs and errors
+---------------
+
+Bug or error reports should be sent to
+<https://bugs.launchpad.net/zorba>.
+
+
+Licensing
+---------
+
+Please see the file called LICENSE.txt.
+
+
+Contacts
+--------
+
+o If you want to be informed about new code releases, bug fixes and general
+ news and information about the Zorba XQuery Processor, subscribe to the
+ Zorba Users mailing list <zorba-users@xxxxxxxxxxxxxxxx>
+
+o If you have a concrete bug report for Zorba, please go to Zorba's Bug
+ Database and submit your report <https://bugs.launchpad.net/zorba>.
+
+o If you want to participate in actively developing or supporting Zorba,
+ please send an e-mail to <zorba-dev@xxxxxxxxxxxxxxxx>.
=== modified file 'include/zorba/zorba_string.h'
--- include/zorba/zorba_string.h 2013-02-07 17:24:36 +0000
+++ include/zorba/zorba_string.h 2013-08-15 00:15:23 +0000
@@ -239,7 +239,7 @@
* Appends a substring of the given string to this string.
*
* @param s The string to append.
- * @param s_pos The starting position is \a s.
+ * @param s_pos The starting position in \a s.
* @param s_n The number of characters of \a s to append.
* @return this string.
*/
@@ -257,7 +257,7 @@
* Appends a substring of the given string to this string.
*
* @param s The string to append.
- * @param s_pos The starting position is \a s.
+ * @param s_pos The starting position in \a s.
* @param s_n The number of characters of \a s to append.
* @return this string.
*/
@@ -1000,7 +1000,7 @@
* @param pos The position within this string to replace at.
* @param n The number of characters to replace.
* @param s The replacement string.
- * @param s_pos The starting position is \a s.
+ * @param s_pos The starting position in \a s.
* @param s_n The number of characters of \a s to use.
* @return this string.
*/
@@ -1014,7 +1014,7 @@
* @param pos The position within this string to replace at.
* @param n The number of characters to replace.
* @param s The replacement string.
- * @param s_pos The starting position is \a s.
+ * @param s_pos The starting position in \a s.
* @param s_n The number of characters of \a s to use.
* @return this string.
*/
=== modified file 'modules/w3c/pregenerated/xqt-errors.xq'
--- modules/w3c/pregenerated/xqt-errors.xq 2013-06-25 00:41:44 +0000
+++ modules/w3c/pregenerated/xqt-errors.xq 2013-08-15 00:15:23 +0000
@@ -1110,7 +1110,9 @@
(:~
:
- : String to be cast to decimal has too many digits of precision.
+ : Raised when casting a string to xs:decimal if the string has more
+ : digits of precision than the implementation can represent (the
+ : implementation also has the option of rounding).
:
: @see http://www.w3.org/2005/xqt-errors
:)
@@ -1166,7 +1168,8 @@
(:~
:
- : Function stability not defined.
+ : Raised by fn:doc, fn:collection to indicate that it is not possible to
+ : return a result that is guaranteed deterministic.
:
: @see http://www.w3.org/2005/xqt-errors
:)
=== modified file 'src/diagnostics/diagnostic_en.xml'
--- src/diagnostics/diagnostic_en.xml 2013-08-01 09:41:39 +0000
+++ src/diagnostics/diagnostic_en.xml 2013-08-15 00:15:23 +0000
@@ -1452,7 +1452,9 @@
<diagnostic code="FOCA0006">
<comment>
- String to be cast to decimal has too many digits of precision.
+ Raised when casting a string to xs:decimal if the string has more
+ digits of precision than the implementation can represent (the
+ implementation also has the option of rounding).
</comment>
<value>"$1": string to be cast to decimal has too many digits of precision</value>
</diagnostic>
@@ -1501,9 +1503,10 @@
<diagnostic code="FODC0003">
<comment>
- Function stability not defined.
+ Raised by fn:doc, fn:collection to indicate that it is not possible to
+ return a result that is guaranteed deterministic.
</comment>
- <value>function stability not defined</value>
+ <value>$1 function result not guaranteed deterministic</value>
</diagnostic>
<diagnostic code="FODC0004">
=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
--- src/diagnostics/pregenerated/dict_en.cpp 2013-08-01 09:41:39 +0000
+++ src/diagnostics/pregenerated/dict_en.cpp 2013-08-15 00:15:23 +0000
@@ -42,7 +42,7 @@
{ "FOCZ0001", "invalid content passed to $1: $2" },
{ "FODC0001", "no context document for $1() function" },
{ "FODC0002", "\"$1\": error retrieving resource${: 2}" },
- { "FODC0003", "function stability not defined" },
+ { "FODC0003", "$1 function result not guaranteed deterministic" },
{ "FODC0004", "\"$1\": invalid argument to fn:collection()${: 2}" },
{ "FODC0005", "\"$1\": invalid argument to fn:doc() or fn:doc-available()" },
{ "FODC0006", "invalid content passed to $1: $2" },
=== modified file 'src/util/string/rstring.h'
--- src/util/string/rstring.h 2013-06-01 00:30:39 +0000
+++ src/util/string/rstring.h 2013-08-15 00:15:23 +0000
@@ -447,7 +447,7 @@
* Appends a substring of the given string to this string.
*
* @param s The string to append.
- * @param s_pos The starting position is \a s.
+ * @param s_pos The starting position in \a s.
* @param s_n The number of characters of \a s to append.
* @return Returns this string.
*/
@@ -459,7 +459,7 @@
*
* @tparam RepType2 The string representation of \a s.
* @param s The string to append.
- * @param s_pos The starting position is \a s.
+ * @param s_pos The starting position in \a s.
* @param s_n The number of characters of \a s to append.
* @return Returns this string.
*/
@@ -480,7 +480,7 @@
* Appends a substring of the given string to this string.
*
* @param s The string to append.
- * @param s_pos The starting position is \a s.
+ * @param s_pos The starting position in \a s.
* @param s_n The number of characters of \a s to append.
* @return Returns this string.
*/
@@ -1579,7 +1579,7 @@
* @param pos The position within this string to replace at.
* @param n The number of characters to replace.
* @param s The replacement string.
- * @param s_pos The starting position is \a s.
+ * @param s_pos The starting position in \a s.
* @param s_n The number of characters of \a s to use.
* @return Returns this string.
*/
@@ -1595,7 +1595,7 @@
* @param pos The position within this string to replace at.
* @param n The number of characters to replace.
* @param s The replacement string.
- * @param s_pos The starting position is \a s.
+ * @param s_pos The starting position in \a s.
* @param s_n The number of characters of \a s to use.
* @return Returns this string.
*/
@@ -1611,7 +1611,7 @@
* @param pos The position within this string to replace at.
* @param n The number of characters to replace.
* @param s The replacement string.
- * @param s_pos The starting position is \a s.
+ * @param s_pos The starting position in \a s.
* @param s_n The number of characters of \a s to use.
* @return Returns this string.
*/
=== modified file 'src/zorbaserialization/CMakeLists.txt'
--- src/zorbaserialization/CMakeLists.txt 2013-02-07 17:24:36 +0000
+++ src/zorbaserialization/CMakeLists.txt 2013-08-15 00:15:23 +0000
@@ -23,5 +23,4 @@
bin_archiver.cpp
serialize_basic_types.cpp
serialize_zorba_types.cpp
- base64impl.cpp
)
=== removed file 'src/zorbaserialization/base64impl.cpp'
--- src/zorbaserialization/base64impl.cpp 2013-02-07 17:24:36 +0000
+++ src/zorbaserialization/base64impl.cpp 1970-01-01 00:00:00 +0000
@@ -1,176 +0,0 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "stdafx.h"
-
-#include "zorbaserialization/base64impl.h"
-
-
-namespace zorba{
- namespace serialization{
-
-////Base64
-
-const char Base64Impl::base64chars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-
-/*
- Transform each 6 bits into a character
-
- dataout len must be 8/6*datalen+2
- return dataoutlen
-*/
-size_t
-Base64Impl::Encode(const unsigned char *datain, size_t datalen,
- char *dataout)///pre-allocated at the right size
-{
- unsigned char rembits6;
- unsigned char rembits8;
- unsigned char temp6;
- unsigned char temp8;
- unsigned int index;
- char *orig_dataout = dataout;
-
- temp6 = 0;
- rembits6 = 6;
- rembits8 = 8;
- index = 0;
- temp8 = datain[0];
-
- while(index < datalen)
- {
- temp6 <<= 1;
- if(temp8 & 0x80)
- temp6 |= 1;
- temp8 <<= 1;
- rembits8--;
- if(rembits8 == 0)
- {
- rembits8 = 8;
- datain++;
- temp8 = datain[0];
- index++;
- }
- rembits6--;
- if(rembits6 == 0)
- {
- rembits6 = 6;
- dataout[0] = base64chars[temp6];
- dataout++;
- temp6 = 0;
- }
- }
- if(rembits6 != 6)
- {
- temp6 <<= rembits6;
- rembits6 = 0;
- dataout[0] = base64chars[temp6];
- dataout++;
- }
- if((datalen%3) == 1)
- {
- ///add two more 6bit bytes
- dataout[0] = dataout[1] = '=';
- dataout += 2;
- }
- if((datalen%3) == 2)
- {
- ///add two more 6bit bytes
- dataout[0] = '=';
- dataout++;
- }
- dataout[0] = 0;
-
- return dataout - orig_dataout;
-}
-
-//static const char base64chars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-unsigned char
-Base64Impl::getChar6BitIndex(char c)
-{
- if((c >= 'A') && (c <= 'Z'))
- return c-'A';
- if((c >= 'a') && (c <= 'z'))
- return c-'a' + 'Z' - 'A' + 1;
- if((c >= '0') && (c <= '9'))
- return c-'0' + 'Z' - 'A' + 1 + 'z' - 'a' + 1;
- if(c == '+')
- return 62;
- if(c == '/')
- return 63;
- return 0xFF;///special case for '='
-}
-
-/*
- dataout must be pre-allocated for 6/8*datalen
-return dataoutlen
-*/
-size_t
-Base64Impl::Decode(const unsigned char *datain, size_t datalen,
- unsigned char *dataout)
-{
- unsigned char *orig_dataout = dataout;
- unsigned char rembits6;
- unsigned char rembits8;
- unsigned char temp8;
- unsigned char temp6;
-
- rembits6 = 6;
- rembits8 = 8;
- temp8 = 0;
- temp6 = getChar6BitIndex(datain[0]);
-
- while(datalen)
- {
- temp8 <<= 1;
- if(temp6 & 0x20)
- temp8 |= 1;
- temp6 <<= 1;
- rembits8--;
- if(rembits8 == 0)
- {
- dataout[0] = temp8;
- dataout++;
- rembits8 = 8;
- temp8 = 0;
- }
- rembits6--;
- if(rembits6 == 0)
- {
- do{
- datain++;
- datalen--;
- }while(((datain[0] == '\r')||(datain[0] == '\n'))&&datalen);
- if(!datalen)
- break;
- if(datain[0] == '=')
- break;
- temp6 = getChar6BitIndex(datain[0]);
- if(temp6 > 0x40)
- break;
- rembits6 = 6;
- }
- }
-
- if(rembits8 != 8)
- {
- ///something wrong here, but ignore partially written last byte at returning len
- }
-
- return dataout - orig_dataout;
-
-}
-
-}}
-/* vim:set et sw=2 ts=2: */
=== removed file 'src/zorbaserialization/base64impl.h'
--- src/zorbaserialization/base64impl.h 2013-02-07 17:24:36 +0000
+++ src/zorbaserialization/base64impl.h 1970-01-01 00:00:00 +0000
@@ -1,40 +0,0 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#pragma once
-#ifndef ZORBA_BASE64_IMPLEMENTATION
-#define ZORBA_BASE64_IMPLEMENTATION
-
-#include <stdlib.h>
-
-namespace zorba{
- namespace serialization{
-
-class Base64Impl
-{
-public:
- static const char base64chars[];
-public:
- static size_t Encode(const unsigned char *datain, size_t datalen,
- char *dataout);///pre-allocated at the right size
- static size_t Decode(const unsigned char *datain, size_t datalen,
- unsigned char *dataout);
-protected:
- static unsigned char getChar6BitIndex(char c);
-};
-
-}}
-#endif
-/* vim:set et sw=2 ts=2: */
=== modified file 'src/zorbaserialization/serialize_basic_types.cpp'
--- src/zorbaserialization/serialize_basic_types.cpp 2013-06-18 23:53:59 +0000
+++ src/zorbaserialization/serialize_basic_types.cpp 2013-08-15 00:15:23 +0000
@@ -20,7 +20,6 @@
#include "zorbaserialization/serialize_basic_types.h"
#include "zorbaserialization/archiver.h"
-#include "zorbaserialization/base64impl.h"
#include "zorbatypes/m_apm.h"
#include "zorbatypes/float.h"
Follow ups