version 1.216, 2008/09/26 13:52:31
|
version 1.217, 2008/12/09 15:16:23
|
Line 1235 char *GetBaseURL (Document doc)
|
Line 1235 char *GetBaseURL (Document doc)
|
AttributeType attrType; |
AttributeType attrType; |
Attribute attr; |
Attribute attr; |
char *ptr, *basename, *utf8path; |
char *ptr, *basename, *utf8path; |
|
char documentname[MAX_LENGTH]; |
int length; |
int length; |
ThotBool hasDocBase; |
ThotBool hasDocBase; |
|
|
Line 1280 char *GetBaseURL (Document doc)
|
Line 1281 char *GetBaseURL (Document doc)
|
TtaGiveTextAttributeValue (attr, basename, &length); |
TtaGiveTextAttributeValue (attr, basename, &length); |
utf8path = (char *)TtaConvertMbsToByte ((unsigned char *)basename, |
utf8path = (char *)TtaConvertMbsToByte ((unsigned char *)basename, |
TtaGetDefaultCharset ()); |
TtaGetDefaultCharset ()); |
strncpy (basename, utf8path, MAX_LENGTH-1); |
if (IsW3Path (DocumentURLs[doc]) && utf8path[0] == '/') |
|
NormalizeURL (utf8path, 0, basename, documentname, DocumentURLs[doc]); |
|
else |
|
strncpy (basename, utf8path, MAX_LENGTH-1); |
TtaFreeMemory (utf8path); |
TtaFreeMemory (utf8path); |
} |
} |
} |
} |
Line 1618 void NormalizeURL (char *orgName, Docume
|
Line 1622 void NormalizeURL (char *orgName, Docume
|
basename = TtaStrdup (SavedDocumentURL); |
basename = TtaStrdup (SavedDocumentURL); |
else if (doc > 0) |
else if (doc > 0) |
basename = GetBaseURL (doc); |
basename = GetBaseURL (doc); |
else if (otherPath != NULL) |
else if (otherPath) |
basename = TtaStrdup (otherPath); |
basename = TtaStrdup (otherPath); |
else |
else |
basename = NULL; |
basename = NULL; |