Merge lp:~paul-lucas/zorba/pjl-misc into lp:zorba

Proposed by Paul J. Lucas
Status: Merged
Approved by: Paul J. Lucas
Approved revision: 11317
Merged at revision: 11598
Proposed branch: lp:~paul-lucas/zorba/pjl-misc
Merge into: lp:zorba
Diff against target: 565 lines (+77/-291)
13 files modified
CMakeLists.txt (+7/-7)
NOTICE.txt (+1/-1)
NOTICE.xml (+1/-1)
README.txt (+46/-48)
include/zorba/zorba_string.h (+4/-4)
modules/w3c/pregenerated/xqt-errors.xq (+5/-2)
src/diagnostics/diagnostic_en.xml (+6/-3)
src/diagnostics/pregenerated/dict_en.cpp (+1/-1)
src/util/string/rstring.h (+6/-6)
src/zorbaserialization/CMakeLists.txt (+0/-1)
src/zorbaserialization/base64impl.cpp (+0/-176)
src/zorbaserialization/base64impl.h (+0/-40)
src/zorbaserialization/serialize_basic_types.cpp (+0/-1)
To merge this branch: bzr merge lp:~paul-lucas/zorba/pjl-misc
Reviewer Review Type Date Requested Status
Matthias Brantner Approve
Paul J. Lucas Approve
Review via email: mp+180271@code.launchpad.net

Commit message

Fixed stemmer files location in NOTICE.
Removed unused base64 class.
Fixed typos in comments.
Clean-up.

Description of the change

Fixed stemmer files location in NOTICE.
Removed unused base64 class.
Fixed typos in comments.
Clean-up.

To post a comment you must log in.
Revision history for this message
Paul J. Lucas (paul-lucas) :
review: Approve
Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue starting for the following merge proposals:
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/180271

Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue succeeded - proposal merged!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2013-05-07 08:39:33 +0000
3+++ CMakeLists.txt 2013-08-15 00:15:23 +0000
4@@ -150,17 +150,17 @@
5 "int main() { static_assert(1,\"\"); }" ZORBA_CXX_STATIC_ASSERT)
6
7 # C++11 standard library types
8-CHECK_CXX_SOURCE_COMPILES (
9- "#include <type_traits>
10+CHECK_CXX_SOURCE_COMPILES("
11+ #include <type_traits>
12 int main() { std::enable_if<true,int> x; }" ZORBA_HAVE_ENABLE_IF)
13-CHECK_CXX_SOURCE_COMPILES ("
14+CHECK_CXX_SOURCE_COMPILES("
15 #include <memory>
16 int main() { std::unique_ptr<int> p; }" ZORBA_HAVE_UNIQUE_PTR)
17-CHECK_CXX_SOURCE_COMPILES (
18- "#include <unordered_map>
19+CHECK_CXX_SOURCE_COMPILES("
20+ #include <unordered_map>
21 int main() { std::unordered_map<int,int> m; }" ZORBA_HAVE_UNORDERED_MAP)
22-CHECK_CXX_SOURCE_COMPILES (
23- "#include <unordered_set>
24+CHECK_CXX_SOURCE_COMPILES("
25+ #include <unordered_set>
26 int main() { std::unordered_set<int> s; }" ZORBA_HAVE_UNORDERED_SET)
27
28 ################################################################################
29
30=== modified file 'NOTICE.txt'
31--- NOTICE.txt 2013-05-07 08:39:33 +0000
32+++ NOTICE.txt 2013-08-15 00:15:23 +0000
33@@ -83,7 +83,7 @@
34
35 ----------------------------------------------------
36
37-src/zorbautils/stemmer/
38+src/runtime/full_text/stemmer/
39
40 Copyright: 2001 Dr. Martin Porter
41
42
43=== modified file 'NOTICE.xml'
44--- NOTICE.xml 2013-08-09 09:04:36 +0000
45+++ NOTICE.xml 2013-08-15 00:15:23 +0000
46@@ -71,7 +71,7 @@
47 </foreign-notice>
48 </foreign-files>
49 <foreign-files>
50- <file>src/zorbautils/stemmer/</file>
51+ <file>src/runtime/full_text/stemmer/</file>
52 <copyright>2001 Dr. Martin Porter</copyright>
53 <foreign-notice>
54 All the software given out on this Snowball site is covered by the BSD
55
56=== modified file 'README.txt'
57--- README.txt 2013-08-09 09:04:36 +0000
58+++ README.txt 2013-08-15 00:15:23 +0000
59@@ -1,48 +1,46 @@
60- --------------------------------------------------------------
61- Zorba - The XQuery Processor developed by the FLWOR Foundation
62- --------------------------------------------------------------
63-
64- The Latest Version
65- ------------------
66-
67- The latest version can be found at http://www.zorba.io/.
68-
69- Documentation
70- -------------
71-
72- The documentation is included in the doc directory, as well as
73- on the website of the project at http://www.zorba-xquery.org/html/documentation
74-
75- Build & Installation
76- --------------------
77-
78- Please see the documentation on the web site or in the doc directory
79- of the package.
80-
81- Bugs and errors
82- ---------------
83-
84- Bug or error reports should be sent to
85- https://bugs.launchpad.net/zorba.
86-
87-
88- Licensing
89- ---------
90-
91- Please see the file called LICENSE.txt.
92-
93-
94- Contacts
95- --------
96-
97- o If you want to be informed about new code releases, bug fixes
98- and general news and information about the Zorba XQuery Processor
99- subscribe to the Zorba Users mailing list as described under
100- <zorba-users@lists.sourceforge.net>
101-
102- o If you have a concrete bug report for Zorba please go to the
103- Zorba's Bug Database and submit your report:
104- https://bugs.launchpad.net/zorba.
105-
106- o If you want to participate in actively developing Zorba or
107- support Zorba, please write a mail to: zorba-dev@googlegroups.com
108+--------------------------------------------------------------
109+Zorba - The XQuery Processor developed by the FLWOR Foundation
110+--------------------------------------------------------------
111+
112+The Latest Version
113+------------------
114+
115+The latest version can be found at <http://www.zorba.io/>.
116+
117+Documentation
118+-------------
119+
120+The documentation is included in the doc directory as well as on the web site
121+of the project at <http://www.zorba-xquery.org/html/documentation>.
122+
123+Build & Installation
124+--------------------
125+
126+Please see the documentation on the web site or in the doc directory of the
127+package.
128+
129+Bugs and errors
130+---------------
131+
132+Bug or error reports should be sent to
133+<https://bugs.launchpad.net/zorba>.
134+
135+
136+Licensing
137+---------
138+
139+Please see the file called LICENSE.txt.
140+
141+
142+Contacts
143+--------
144+
145+o If you want to be informed about new code releases, bug fixes and general
146+ news and information about the Zorba XQuery Processor, subscribe to the
147+ Zorba Users mailing list <zorba-users@googlegroups.com>
148+
149+o If you have a concrete bug report for Zorba, please go to Zorba's Bug
150+ Database and submit your report <https://bugs.launchpad.net/zorba>.
151+
152+o If you want to participate in actively developing or supporting Zorba,
153+ please send an e-mail to <zorba-dev@googlegroups.com>.
154
155=== modified file 'include/zorba/zorba_string.h'
156--- include/zorba/zorba_string.h 2013-02-07 17:24:36 +0000
157+++ include/zorba/zorba_string.h 2013-08-15 00:15:23 +0000
158@@ -239,7 +239,7 @@
159 * Appends a substring of the given string to this string.
160 *
161 * @param s The string to append.
162- * @param s_pos The starting position is \a s.
163+ * @param s_pos The starting position in \a s.
164 * @param s_n The number of characters of \a s to append.
165 * @return this string.
166 */
167@@ -257,7 +257,7 @@
168 * Appends a substring of the given string to this string.
169 *
170 * @param s The string to append.
171- * @param s_pos The starting position is \a s.
172+ * @param s_pos The starting position in \a s.
173 * @param s_n The number of characters of \a s to append.
174 * @return this string.
175 */
176@@ -1000,7 +1000,7 @@
177 * @param pos The position within this string to replace at.
178 * @param n The number of characters to replace.
179 * @param s The replacement string.
180- * @param s_pos The starting position is \a s.
181+ * @param s_pos The starting position in \a s.
182 * @param s_n The number of characters of \a s to use.
183 * @return this string.
184 */
185@@ -1014,7 +1014,7 @@
186 * @param pos The position within this string to replace at.
187 * @param n The number of characters to replace.
188 * @param s The replacement string.
189- * @param s_pos The starting position is \a s.
190+ * @param s_pos The starting position in \a s.
191 * @param s_n The number of characters of \a s to use.
192 * @return this string.
193 */
194
195=== modified file 'modules/w3c/pregenerated/xqt-errors.xq'
196--- modules/w3c/pregenerated/xqt-errors.xq 2013-06-25 00:41:44 +0000
197+++ modules/w3c/pregenerated/xqt-errors.xq 2013-08-15 00:15:23 +0000
198@@ -1110,7 +1110,9 @@
199
200 (:~
201 :
202- : String to be cast to decimal has too many digits of precision.
203+ : Raised when casting a string to xs:decimal if the string has more
204+ : digits of precision than the implementation can represent (the
205+ : implementation also has the option of rounding).
206 :
207 : @see http://www.w3.org/2005/xqt-errors
208 :)
209@@ -1166,7 +1168,8 @@
210
211 (:~
212 :
213- : Function stability not defined.
214+ : Raised by fn:doc, fn:collection to indicate that it is not possible to
215+ : return a result that is guaranteed deterministic.
216 :
217 : @see http://www.w3.org/2005/xqt-errors
218 :)
219
220=== modified file 'src/diagnostics/diagnostic_en.xml'
221--- src/diagnostics/diagnostic_en.xml 2013-08-01 09:41:39 +0000
222+++ src/diagnostics/diagnostic_en.xml 2013-08-15 00:15:23 +0000
223@@ -1452,7 +1452,9 @@
224
225 <diagnostic code="FOCA0006">
226 <comment>
227- String to be cast to decimal has too many digits of precision.
228+ Raised when casting a string to xs:decimal if the string has more
229+ digits of precision than the implementation can represent (the
230+ implementation also has the option of rounding).
231 </comment>
232 <value>"$1": string to be cast to decimal has too many digits of precision</value>
233 </diagnostic>
234@@ -1501,9 +1503,10 @@
235
236 <diagnostic code="FODC0003">
237 <comment>
238- Function stability not defined.
239+ Raised by fn:doc, fn:collection to indicate that it is not possible to
240+ return a result that is guaranteed deterministic.
241 </comment>
242- <value>function stability not defined</value>
243+ <value>$1 function result not guaranteed deterministic</value>
244 </diagnostic>
245
246 <diagnostic code="FODC0004">
247
248=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
249--- src/diagnostics/pregenerated/dict_en.cpp 2013-08-01 09:41:39 +0000
250+++ src/diagnostics/pregenerated/dict_en.cpp 2013-08-15 00:15:23 +0000
251@@ -42,7 +42,7 @@
252 { "FOCZ0001", "invalid content passed to $1: $2" },
253 { "FODC0001", "no context document for $1() function" },
254 { "FODC0002", "\"$1\": error retrieving resource${: 2}" },
255- { "FODC0003", "function stability not defined" },
256+ { "FODC0003", "$1 function result not guaranteed deterministic" },
257 { "FODC0004", "\"$1\": invalid argument to fn:collection()${: 2}" },
258 { "FODC0005", "\"$1\": invalid argument to fn:doc() or fn:doc-available()" },
259 { "FODC0006", "invalid content passed to $1: $2" },
260
261=== modified file 'src/util/string/rstring.h'
262--- src/util/string/rstring.h 2013-06-01 00:30:39 +0000
263+++ src/util/string/rstring.h 2013-08-15 00:15:23 +0000
264@@ -447,7 +447,7 @@
265 * Appends a substring of the given string to this string.
266 *
267 * @param s The string to append.
268- * @param s_pos The starting position is \a s.
269+ * @param s_pos The starting position in \a s.
270 * @param s_n The number of characters of \a s to append.
271 * @return Returns this string.
272 */
273@@ -459,7 +459,7 @@
274 *
275 * @tparam RepType2 The string representation of \a s.
276 * @param s The string to append.
277- * @param s_pos The starting position is \a s.
278+ * @param s_pos The starting position in \a s.
279 * @param s_n The number of characters of \a s to append.
280 * @return Returns this string.
281 */
282@@ -480,7 +480,7 @@
283 * Appends a substring of the given string to this string.
284 *
285 * @param s The string to append.
286- * @param s_pos The starting position is \a s.
287+ * @param s_pos The starting position in \a s.
288 * @param s_n The number of characters of \a s to append.
289 * @return Returns this string.
290 */
291@@ -1579,7 +1579,7 @@
292 * @param pos The position within this string to replace at.
293 * @param n The number of characters to replace.
294 * @param s The replacement string.
295- * @param s_pos The starting position is \a s.
296+ * @param s_pos The starting position in \a s.
297 * @param s_n The number of characters of \a s to use.
298 * @return Returns this string.
299 */
300@@ -1595,7 +1595,7 @@
301 * @param pos The position within this string to replace at.
302 * @param n The number of characters to replace.
303 * @param s The replacement string.
304- * @param s_pos The starting position is \a s.
305+ * @param s_pos The starting position in \a s.
306 * @param s_n The number of characters of \a s to use.
307 * @return Returns this string.
308 */
309@@ -1611,7 +1611,7 @@
310 * @param pos The position within this string to replace at.
311 * @param n The number of characters to replace.
312 * @param s The replacement string.
313- * @param s_pos The starting position is \a s.
314+ * @param s_pos The starting position in \a s.
315 * @param s_n The number of characters of \a s to use.
316 * @return Returns this string.
317 */
318
319=== modified file 'src/zorbaserialization/CMakeLists.txt'
320--- src/zorbaserialization/CMakeLists.txt 2013-02-07 17:24:36 +0000
321+++ src/zorbaserialization/CMakeLists.txt 2013-08-15 00:15:23 +0000
322@@ -23,5 +23,4 @@
323 bin_archiver.cpp
324 serialize_basic_types.cpp
325 serialize_zorba_types.cpp
326- base64impl.cpp
327 )
328
329=== removed file 'src/zorbaserialization/base64impl.cpp'
330--- src/zorbaserialization/base64impl.cpp 2013-02-07 17:24:36 +0000
331+++ src/zorbaserialization/base64impl.cpp 1970-01-01 00:00:00 +0000
332@@ -1,176 +0,0 @@
333-/*
334- * Copyright 2006-2008 The FLWOR Foundation.
335- *
336- * Licensed under the Apache License, Version 2.0 (the "License");
337- * you may not use this file except in compliance with the License.
338- * You may obtain a copy of the License at
339- *
340- * http://www.apache.org/licenses/LICENSE-2.0
341- *
342- * Unless required by applicable law or agreed to in writing, software
343- * distributed under the License is distributed on an "AS IS" BASIS,
344- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
345- * See the License for the specific language governing permissions and
346- * limitations under the License.
347- */
348-#include "stdafx.h"
349-
350-#include "zorbaserialization/base64impl.h"
351-
352-
353-namespace zorba{
354- namespace serialization{
355-
356-////Base64
357-
358-const char Base64Impl::base64chars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
359-
360-/*
361- Transform each 6 bits into a character
362-
363- dataout len must be 8/6*datalen+2
364- return dataoutlen
365-*/
366-size_t
367-Base64Impl::Encode(const unsigned char *datain, size_t datalen,
368- char *dataout)///pre-allocated at the right size
369-{
370- unsigned char rembits6;
371- unsigned char rembits8;
372- unsigned char temp6;
373- unsigned char temp8;
374- unsigned int index;
375- char *orig_dataout = dataout;
376-
377- temp6 = 0;
378- rembits6 = 6;
379- rembits8 = 8;
380- index = 0;
381- temp8 = datain[0];
382-
383- while(index < datalen)
384- {
385- temp6 <<= 1;
386- if(temp8 & 0x80)
387- temp6 |= 1;
388- temp8 <<= 1;
389- rembits8--;
390- if(rembits8 == 0)
391- {
392- rembits8 = 8;
393- datain++;
394- temp8 = datain[0];
395- index++;
396- }
397- rembits6--;
398- if(rembits6 == 0)
399- {
400- rembits6 = 6;
401- dataout[0] = base64chars[temp6];
402- dataout++;
403- temp6 = 0;
404- }
405- }
406- if(rembits6 != 6)
407- {
408- temp6 <<= rembits6;
409- rembits6 = 0;
410- dataout[0] = base64chars[temp6];
411- dataout++;
412- }
413- if((datalen%3) == 1)
414- {
415- ///add two more 6bit bytes
416- dataout[0] = dataout[1] = '=';
417- dataout += 2;
418- }
419- if((datalen%3) == 2)
420- {
421- ///add two more 6bit bytes
422- dataout[0] = '=';
423- dataout++;
424- }
425- dataout[0] = 0;
426-
427- return dataout - orig_dataout;
428-}
429-
430-//static const char base64chars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
431-unsigned char
432-Base64Impl::getChar6BitIndex(char c)
433-{
434- if((c >= 'A') && (c <= 'Z'))
435- return c-'A';
436- if((c >= 'a') && (c <= 'z'))
437- return c-'a' + 'Z' - 'A' + 1;
438- if((c >= '0') && (c <= '9'))
439- return c-'0' + 'Z' - 'A' + 1 + 'z' - 'a' + 1;
440- if(c == '+')
441- return 62;
442- if(c == '/')
443- return 63;
444- return 0xFF;///special case for '='
445-}
446-
447-/*
448- dataout must be pre-allocated for 6/8*datalen
449-return dataoutlen
450-*/
451-size_t
452-Base64Impl::Decode(const unsigned char *datain, size_t datalen,
453- unsigned char *dataout)
454-{
455- unsigned char *orig_dataout = dataout;
456- unsigned char rembits6;
457- unsigned char rembits8;
458- unsigned char temp8;
459- unsigned char temp6;
460-
461- rembits6 = 6;
462- rembits8 = 8;
463- temp8 = 0;
464- temp6 = getChar6BitIndex(datain[0]);
465-
466- while(datalen)
467- {
468- temp8 <<= 1;
469- if(temp6 & 0x20)
470- temp8 |= 1;
471- temp6 <<= 1;
472- rembits8--;
473- if(rembits8 == 0)
474- {
475- dataout[0] = temp8;
476- dataout++;
477- rembits8 = 8;
478- temp8 = 0;
479- }
480- rembits6--;
481- if(rembits6 == 0)
482- {
483- do{
484- datain++;
485- datalen--;
486- }while(((datain[0] == '\r')||(datain[0] == '\n'))&&datalen);
487- if(!datalen)
488- break;
489- if(datain[0] == '=')
490- break;
491- temp6 = getChar6BitIndex(datain[0]);
492- if(temp6 > 0x40)
493- break;
494- rembits6 = 6;
495- }
496- }
497-
498- if(rembits8 != 8)
499- {
500- ///something wrong here, but ignore partially written last byte at returning len
501- }
502-
503- return dataout - orig_dataout;
504-
505-}
506-
507-}}
508-/* vim:set et sw=2 ts=2: */
509
510=== removed file 'src/zorbaserialization/base64impl.h'
511--- src/zorbaserialization/base64impl.h 2013-02-07 17:24:36 +0000
512+++ src/zorbaserialization/base64impl.h 1970-01-01 00:00:00 +0000
513@@ -1,40 +0,0 @@
514-/*
515- * Copyright 2006-2008 The FLWOR Foundation.
516- *
517- * Licensed under the Apache License, Version 2.0 (the "License");
518- * you may not use this file except in compliance with the License.
519- * You may obtain a copy of the License at
520- *
521- * http://www.apache.org/licenses/LICENSE-2.0
522- *
523- * Unless required by applicable law or agreed to in writing, software
524- * distributed under the License is distributed on an "AS IS" BASIS,
525- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
526- * See the License for the specific language governing permissions and
527- * limitations under the License.
528- */
529-#pragma once
530-#ifndef ZORBA_BASE64_IMPLEMENTATION
531-#define ZORBA_BASE64_IMPLEMENTATION
532-
533-#include <stdlib.h>
534-
535-namespace zorba{
536- namespace serialization{
537-
538-class Base64Impl
539-{
540-public:
541- static const char base64chars[];
542-public:
543- static size_t Encode(const unsigned char *datain, size_t datalen,
544- char *dataout);///pre-allocated at the right size
545- static size_t Decode(const unsigned char *datain, size_t datalen,
546- unsigned char *dataout);
547-protected:
548- static unsigned char getChar6BitIndex(char c);
549-};
550-
551-}}
552-#endif
553-/* vim:set et sw=2 ts=2: */
554
555=== modified file 'src/zorbaserialization/serialize_basic_types.cpp'
556--- src/zorbaserialization/serialize_basic_types.cpp 2013-06-18 23:53:59 +0000
557+++ src/zorbaserialization/serialize_basic_types.cpp 2013-08-15 00:15:23 +0000
558@@ -20,7 +20,6 @@
559
560 #include "zorbaserialization/serialize_basic_types.h"
561 #include "zorbaserialization/archiver.h"
562-#include "zorbaserialization/base64impl.h"
563
564 #include "zorbatypes/m_apm.h"
565 #include "zorbatypes/float.h"

Subscribers

People subscribed via source and target branches