version 1.170, 2003/10/02 15:06:50
|
version 1.171, 2003/11/18 08:10:23
|
Line 102 char *EscapeURL (const char *url)
|
Line 102 char *EscapeURL (const char *url)
|
if (url && *url) |
if (url && *url) |
{ |
{ |
buffer_free_mem = strlen (url) + 20; |
buffer_free_mem = strlen (url) + 20; |
buffer = TtaGetMemory (buffer_free_mem + 1); |
buffer = (char *)TtaGetMemory (buffer_free_mem + 1); |
ptr = (char *) url; |
ptr = (char *) url; |
buffer_len = 0; |
buffer_len = 0; |
|
|
Line 184 char *EscapeXML (const char *string)
|
Line 184 char *EscapeXML (const char *string)
|
if (string && *string) |
if (string && *string) |
{ |
{ |
buffer_free_mem = strlen (string) + 20; |
buffer_free_mem = strlen (string) + 20; |
buffer = TtaGetMemory (buffer_free_mem + 1); |
buffer = (char *)TtaGetMemory (buffer_free_mem + 1); |
ptr = (char *) string; |
ptr = (char *) string; |
buffer_len = 0; |
buffer_len = 0; |
|
|
Line 449 ThotBool ImageElement (Document doc, cha
|
Line 449 ThotBool ImageElement (Document doc, cha
|
{ |
{ |
attr = TtaGetAttribute (imgEl, attrType); |
attr = TtaGetAttribute (imgEl, attrType); |
length = TtaGetTextAttributeLength (srcAttr) + 1; |
length = TtaGetTextAttributeLength (srcAttr) + 1; |
value = TtaGetMemory (length); |
value = (char *)TtaGetMemory (length); |
TtaGiveTextAttributeValue (srcAttr, value, &length); |
TtaGiveTextAttributeValue (srcAttr, value, &length); |
*url = value; |
*url = value; |
} |
} |
Line 963 char *GetBaseURL (Document doc)
|
Line 963 char *GetBaseURL (Document doc)
|
if (doc == 0 || !DocumentURLs[doc]) |
if (doc == 0 || !DocumentURLs[doc]) |
return NULL; |
return NULL; |
/* the other functions expect basename to have no more than MAX_LENGTH chars */ |
/* the other functions expect basename to have no more than MAX_LENGTH chars */ |
basename = TtaGetMemory (MAX_LENGTH); |
basename = (char *)TtaGetMemory (MAX_LENGTH); |
basename[0] = EOS; |
basename[0] = EOS; |
length = MAX_LENGTH -1; |
length = MAX_LENGTH -1; |
hasDocBase = FALSE; |
hasDocBase = FALSE; |
Line 1106 char *GetLocalPath (Document doc, char
|
Line 1106 char *GetLocalPath (Document doc, char
|
noFile = (url[len] == url_sep); |
noFile = (url[len] == url_sep); |
if (noFile) |
if (noFile) |
url[len] = EOS; |
url[len] = EOS; |
ptr = TtaGetMemory (MAX_LENGTH); |
ptr = (char *)TtaGetMemory (MAX_LENGTH); |
documentname = TtaGetMemory (MAX_LENGTH); |
documentname = (char *)TtaGetMemory (MAX_LENGTH); |
TtaExtractName (url, ptr, documentname); |
TtaExtractName (url, ptr, documentname); |
sprintf (ptr, "%s%s%d%s", TempFileDirectory, DIR_STR, doc, DIR_STR); |
sprintf (ptr, "%s%s%d%s", TempFileDirectory, DIR_STR, doc, DIR_STR); |
if (!TtaCheckDirectory (ptr)) |
if (!TtaCheckDirectory (ptr)) |
Line 1815 char *AmayaParseUrl (const char *aName
|
Line 1815 char *AmayaParseUrl (const char *aName
|
} |
} |
} |
} |
len = strlen (result); |
len = strlen (result); |
if ((return_value = TtaGetMemory (len + 1)) != NULL) |
if ((return_value = (char *)TtaGetMemory (len + 1)) != NULL) |
strcpy (return_value, result); |
strcpy (return_value, result); |
return (return_value); /* exactly the right length */ |
return (return_value); /* exactly the right length */ |
} |
} |
Line 2244 char *MakeRelativeURL (char *aName,
|
Line 2244 char *MakeRelativeURL (char *aName,
|
/* New name is a subset of the related name */ |
/* New name is a subset of the related name */ |
/* exactly the right length */ |
/* exactly the right length */ |
len = strlen (p); |
len = strlen (p); |
if ((return_value = TtaGetMemory (len + 1)) != NULL) |
if ((return_value = (char *)TtaGetMemory (len + 1)) != NULL) |
strcpy (return_value, p); |
strcpy (return_value, p); |
} |
} |
else if ((slashes < 2 && after_access == NULL) |
else if ((slashes < 2 && after_access == NULL) |
Line 2253 char *MakeRelativeURL (char *aName,
|
Line 2253 char *MakeRelativeURL (char *aName,
|
/* Two names whitout common path */ |
/* Two names whitout common path */ |
/* exactly the right length */ |
/* exactly the right length */ |
len = strlen (aName); |
len = strlen (aName); |
if ((return_value = TtaGetMemory (len + 1)) != NULL) |
if ((return_value = (char *)TtaGetMemory (len + 1)) != NULL) |
strcpy (return_value, aName); |
strcpy (return_value, aName); |
} |
} |
else |
else |
Line 2280 char *MakeRelativeURL (char *aName,
|
Line 2280 char *MakeRelativeURL (char *aName,
|
|
|
/* exactly the right length */ |
/* exactly the right length */ |
len = strlen (result); |
len = strlen (result); |
if ((return_value = TtaGetMemory (len + 1)) != NULL) |
if ((return_value = (char *)TtaGetMemory (len + 1)) != NULL) |
strcpy (return_value, result); |
strcpy (return_value, result); |
|
|
} |
} |