version 1.221, 2009/01/13 11:32:34
|
version 1.222, 2009/02/09 13:49:20
|
Line 2336 void SimplifyUrl (char **url)
|
Line 2336 void SimplifyUrl (char **url)
|
path += 2; |
path += 2; |
else |
else |
path = *url; |
path = *url; |
|
#ifndef _WINDOWS |
if (*path == used_sep && *(path+1) == used_sep) |
if (*path == used_sep && *(path+1) == used_sep) |
/* Some URLs start //<foo> */ |
/* Some URLs start //<foo> */ |
path += 1; |
path += 1; |
else if (IsFilePath (path)) |
else |
|
#endif /* _WINDOWS */ |
|
if (IsFilePath (path)) |
{ |
{ |
/* doesn't need to do anything more */ |
/* doesn't need to do anything more */ |
return; |
return; |
Line 2387 void SimplifyUrl (char **url)
|
Line 2390 void SimplifyUrl (char **url)
|
if (!ddot_simplify && *p != '.' && *p != used_sep) |
if (!ddot_simplify && *p != '.' && *p != used_sep) |
ddot_simplify = TRUE; |
ddot_simplify = TRUE; |
|
|
if (*p==used_sep) |
if (*p == used_sep) |
{ |
{ |
if (p > *url && *(p+1) == '.' && (*(p+2) == used_sep || !*(p+2))) |
if (p > *url && *(p+1) == '.' && (*(p+2) == used_sep || !*(p+2))) |
{ |
{ |
Line 2412 void SimplifyUrl (char **url)
|
Line 2415 void SimplifyUrl (char **url)
|
/* Start again with prev slash */ |
/* Start again with prev slash */ |
p = newptr; |
p = newptr; |
} |
} |
else if (*(p+1) == used_sep) |
else if (p != path && *(p+1) == used_sep) |
{ |
{ |
while (*(p+1) == used_sep) |
while (*(p+1) == used_sep) |
{ |
{ |
Line 2472 ThotBool NormalizeFile (char *src, char
|
Line 2475 ThotBool NormalizeFile (char *src, char
|
if (strncmp (&src[start_index], "//localhost/", 12) == 0) |
if (strncmp (&src[start_index], "//localhost/", 12) == 0) |
start_index += 11; |
start_index += 11; |
|
|
#ifdef _IV |
|
/* remove the first two slashes in / / /path */ |
/* remove the first two slashes in / / /path */ |
while (src[start_index] && |
if (src[start_index] == '/' && src[start_index + 1] == '/') |
src[start_index] == '/' |
start_index +=2; |
&& src[start_index + 1] == '/') |
#ifdef _WINDOWS |
start_index++; |
|
#endif /* IV */ |
|
|
|
#ifdef _IV |
|
/* remove any extra slash before the drive name */ |
/* remove any extra slash before the drive name */ |
if (src[start_index] == '/' &&src[start_index+2] == ':') |
if (src[start_index] == '/' && src[start_index+2] == ':') |
start_index++; |
start_index++; |
#endif /* _WINDOWS */ |
#endif /* _WINDOWS */ |
|
|