zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #00060
[Merge] lp:~danielturcanu/zorba/mytrunk into lp:zorba
Daniel Turcanu has proposed merging lp:~danielturcanu/zorba/mytrunk into lp:zorba.
Requested reviews:
Zorba Coders (zorba-coders)
For more details, see:
https://code.launchpad.net/~danielturcanu/zorba/mytrunk/+merge/76577
Various fixes
--
https://code.launchpad.net/~danielturcanu/zorba/mytrunk/+merge/76577
Your team Zorba Coders is requested to review the proposed merge of lp:~danielturcanu/zorba/mytrunk into lp:zorba.
=== modified file 'src/diagnostics/dict_XX_cpp.xq'
--- src/diagnostics/dict_XX_cpp.xq 2011-08-05 02:21:55 +0000
+++ src/diagnostics/dict_XX_cpp.xq 2011-09-22 13:00:31 +0000
@@ -64,6 +64,7 @@
return string-join(
( util:copyright(),
'#include "stdafx.h"',
+ '#include "zorba/config.h"',
'#include "diagnostics/dict_impl.h"',
'',
'namespace zorba {',
=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
--- src/diagnostics/pregenerated/dict_en.cpp 2011-09-16 21:58:20 +0000
+++ src/diagnostics/pregenerated/dict_en.cpp 2011-09-22 13:00:31 +0000
@@ -20,6 +20,7 @@
*/
#include "stdafx.h"
+#include "zorba/config.h"
#include "diagnostics/dict_impl.h"
namespace zorba {
=== modified file 'src/runtime/strings/strings_impl.cpp'
--- src/runtime/strings/strings_impl.cpp 2011-08-10 18:58:11 +0000
+++ src/runtime/strings/strings_impl.cpp 2011-09-22 13:00:31 +0000
@@ -1688,7 +1688,7 @@
GENV_ITEMFACTORY->createString(strid_item, zstrid);
store::Item_t id_attrib_item;
GENV_ITEMFACTORY->createAttributeNode(id_attrib_item, group_elem.getp(), nr_attrib_name, untyped_type_name, strid_item);
- if(match_startg < 0)
+ if((match_startg < 0) || (match_startg < match_endgood))
continue;
match_endgood = match_endg;
if((i+1)<nr_pattern_groups)
=== modified file 'src/util/utf8_util_base.h'
--- src/util/utf8_util_base.h 2011-07-17 20:05:49 +0000
+++ src/util/utf8_util_base.h 2011-09-22 13:00:31 +0000
@@ -148,7 +148,6 @@
* @return Returns the Unicode code-point of the next character.
*/
template<class OctetIterator>
-ZORBA_DLL_PUBLIC
unicode::code_point next_char( OctetIterator &i );
/**
=== modified file 'src/zorbatypes/URI.cpp'
--- src/zorbatypes/URI.cpp 2011-06-24 23:00:33 +0000
+++ src/zorbatypes/URI.cpp 2011-09-22 13:00:31 +0000
@@ -1191,7 +1191,16 @@
return is_set(Scheme) && !theScheme.empty();
}
-
+bool URI::is_absolute_path(zstring &thePath)
+{
+#ifndef WIN32
+ return thePath[0] == '/';
+#else
+ return (thePath.length() > 2) &&
+ ((thePath[1] == ':') ||
+ ((thePath[1] == '%') && (thePath[2] == '3') && (thePath[3] == 'A')));
+#endif
+}
/*******************************************************************************
@@ -1331,7 +1340,7 @@
// If the path component begins with a slash character ("/"), then
// the reference is an absolute-path and we skip to step 7.
- if ( (is_set(Path)) && (thePath[0] =='/') )
+ if ( is_set(Path) && is_absolute_path(thePath) )
{
invalidate_text();
return;
@@ -1342,12 +1351,14 @@
if ( base_uri->is_set(Path) )
{
- zstring::size_type last_slash = base_path.rfind("/");
- if ( last_slash != zstring::npos )
- path = base_path.substr(0, last_slash+1);
-// else
-// path = "/";
-
+ if(!is_absolute_path(thePath))
+ {
+ zstring::size_type last_slash = base_path.rfind("/");
+ if ( last_slash != zstring::npos )
+ path = base_path.substr(0, last_slash+1);
+ // else
+ // path = "/";
+ }
}
// 6b - append the relative URI path
=== modified file 'src/zorbatypes/URI.h'
--- src/zorbatypes/URI.h 2011-06-14 17:26:33 +0000
+++ src/zorbatypes/URI.h 2011-09-22 13:00:31 +0000
@@ -190,6 +190,8 @@
void unset_state(uint32_t s) const { theState &= ~s; }
void invalidate_text() const;
+
+ bool is_absolute_path(zstring &thePath);
};
Follow ups