[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash/libbase URL.cpp
From: |
Vitaly Alexeev |
Subject: |
[Gnash-commit] gnash/libbase URL.cpp |
Date: |
Sun, 06 Aug 2006 18:49:50 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Vitaly Alexeev <alexeev> 06/08/06 18:49:50
Modified files:
libbase : URL.cpp
Log message:
added win32 local path parsing
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/URL.cpp?cvsroot=gnash&r1=1.14&r2=1.15
Patches:
Index: URL.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/URL.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- URL.cpp 30 Jul 2006 00:11:49 -0000 1.14
+++ URL.cpp 6 Aug 2006 18:49:50 -0000 1.15
@@ -117,9 +117,10 @@
_path = in;
}
- assert ( _path[0] == '/' );
-
+#if ! (defined(_WIN32) || defined(WIN32))
+ assert ( _path[0] == '/');
normalize_path(_path);
+#endif
}
/*public*/
@@ -127,7 +128,8 @@
{
//cerr << "URL(" << absolute_url << ")" << endl;
if ( ( absolute_url.size() && absolute_url[0] == '/' )
- || absolute_url.find("://") != string::npos )
+ || absolute_url.find("://") != string::npos
+ || ( absolute_url.size() > 1 && absolute_url[1] == ':' ))
//for win32
{
//cerr << "It's absolute" << endl;
init_absolute(absolute_url);
@@ -160,12 +162,14 @@
};
/*private*/
+//vv only for UNIX
void
URL::normalize_path(string& path)
{
assert(path[0] == '/');
+
//cerr << "path=" << path << endl;
vector<string> components;
@@ -175,7 +179,7 @@
curr != path.end();
++curr )
{
- if ( *curr == '/' )
+ if ( *curr == '/')
{
string comp = string(prev+1, curr);
//cerr << "comp:" << comp << endl;
- [Gnash-commit] gnash/libbase URL.cpp,
Vitaly Alexeev <=