version 1.210, 2008/06/06 16:23:04
|
version 1.211, 2008/08/21 12:54:13
|
Line 101 char *EscapeURL (const char *url)
|
Line 101 char *EscapeURL (const char *url)
|
url_len = strlen (url); |
url_len = strlen (url); |
buffer_free_mem = url_len + 20; |
buffer_free_mem = url_len + 20; |
// a patch for sweetwiki |
// a patch for sweetwiki |
server = "http://sweetwiki.inria.fr/"; |
server = TtaStrdup ("http://sweetwiki.inria.fr/"); |
param = "?templateoff=true"; //&xslname=queryoff"; |
param = TtaStrdup ("?templateoff=true"); //&xslname=queryoff"; |
len = strlen(server); |
len = strlen(server); |
par_len = strlen (param); |
par_len = strlen (param); |
if (strncmp (url, server, len) || |
if (strncmp (url, server, len) || |
Line 175 char *EscapeURL (const char *url)
|
Line 175 char *EscapeURL (const char *url)
|
} |
} |
} |
} |
buffer[buffer_len] = EOS; |
buffer[buffer_len] = EOS; |
|
TtaFreeMemory (server); |
|
TtaFreeMemory (param); |
} |
} |
else |
else |
buffer = NULL; |
buffer = NULL; |
Line 1679 void NormalizeURL (char *orgName, Docume
|
Line 1681 void NormalizeURL (char *orgName, Docume
|
{ |
{ |
length = strlen (tempOrgName); |
length = strlen (tempOrgName); |
for (ndx = 0; ndx < length; ndx++) |
for (ndx = 0; ndx < length; ndx++) |
if (tempOrgName [ndx] == '/') |
if (tempOrgName[ndx] == '/') |
tempOrgName [ndx] = '\\'; |
tempOrgName[ndx] = '\\'; |
} |
} |
#endif /* _WINDOWS */ |
#endif /* _WINDOWS */ |
ptr = AmayaParseUrl (tempOrgName, basename, AMAYA_PARSE_ALL); |
ptr = AmayaParseUrl (tempOrgName, basename, AMAYA_PARSE_ALL); |
Line 1885 static void scan (char *name, HTURI *par
|
Line 1887 static void scan (char *name, HTURI *par
|
char * p; |
char * p; |
char * after_access = name; |
char * after_access = name; |
|
|
memset (parts, '\0', sizeof (HTURI)); |
memset (parts, 0, sizeof (HTURI)); |
/* Look for fragment identifier */ |
/* Look for fragment identifier */ |
if ((p = strchr(name, '#')) != NULL) |
if ((p = strchr(name, '#')) != NULL) |
{ |
{ |
*p++ = '\0'; |
*p++ = EOS; |
parts->fragment = p; |
parts->fragment = p; |
} |
} |
|
|
Line 2001 char *AmayaParseUrl (const char *aName
|
Line 2003 char *AmayaParseUrl (const char *aName
|
if (access) |
if (access) |
{ |
{ |
strcat (result, access); |
strcat (result, access); |
if(wanted & AMAYA_PARSE_PUNCTUATION) |
if (wanted & AMAYA_PARSE_PUNCTUATION) |
strcat (result, ":"); |
strcat (result, ":"); |
} |
} |
|
|
Line 2016 char *AmayaParseUrl (const char *aName
|
Line 2018 char *AmayaParseUrl (const char *aName
|
} |
} |
|
|
if (wanted & AMAYA_PARSE_HOST) |
if (wanted & AMAYA_PARSE_HOST) |
if(given.host || related.host) |
if (given.host || related.host) |
{ |
{ |
if(wanted & AMAYA_PARSE_PUNCTUATION) |
if (wanted & AMAYA_PARSE_PUNCTUATION) |
strcat (result, "//"); |
strcat (result, "//"); |
strcat (result, given.host ? given.host : related.host); |
strcat (result, given.host ? given.host : related.host); |
} |
} |
Line 2456 ThotBool NormalizeFile (char *src, char
|
Line 2458 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] && |
while (src[start_index] && |
src[start_index] == '/' |
src[start_index] == '/' |
&& src[start_index + 1] == '/') |
&& src[start_index + 1] == '/') |
start_index++; |
start_index++; |
|
#endif /* IV */ |
|
|
#ifdef _WINDOWS |
#ifdef _IV |
/* remove any extra slash before the drive name */ |
/* remove any extra slash before the drive name */ |
if (src[start_index] == '/' |
if (src[start_index] == '/' &&src[start_index+2] == ':') |
&&src[start_index+2] == ':') |
|
start_index++; |
start_index++; |
#endif /* _WINDOWS */ |
#endif /* _WINDOWS */ |
|
|
Line 2486 ThotBool NormalizeFile (char *src, char
|
Line 2489 ThotBool NormalizeFile (char *src, char
|
CleanCopyFileURL (target, src, convertion); |
CleanCopyFileURL (target, src, convertion); |
} |
} |
#ifdef _WINDOWS |
#ifdef _WINDOWS |
|
#ifdef IV |
else if (src[0] == DIR_SEP && src[1] == DIR_SEP) |
else if (src[0] == DIR_SEP && src[1] == DIR_SEP) |
{ |
{ |
s = getenv ("HOMEDRIVE"); |
s = getenv ("HOMEDRIVE"); |
Line 2494 ThotBool NormalizeFile (char *src, char
|
Line 2498 ThotBool NormalizeFile (char *src, char
|
strcpy (&target[i], &src[1]); |
strcpy (&target[i], &src[1]); |
change = TRUE; |
change = TRUE; |
} |
} |
|
#endif /* IV */ |
#else /* _WINDOWS */ |
#else /* _WINDOWS */ |
else if (src[0] == '~') |
else if (src[0] == '~') |
{ |
{ |