version 1.175, 2004/01/06 17:03:54
|
version 1.176, 2004/01/19 13:53:05
|
Line 1
|
Line 1
|
/* |
/* |
* |
* |
* (c) COPYRIGHT INRIA and W3C, 1996-2003 |
* (c) COPYRIGHT INRIA and W3C, 1996-2004 |
* Please first read the full copyright statement in file COPYRIGHT. |
* Please first read the full copyright statement in file COPYRIGHT. |
* |
* |
*/ |
*/ |
Line 430 ThotBool ImageElement (Document doc, cha
|
Line 430 ThotBool ImageElement (Document doc, cha
|
Attribute attr, srcAttr; |
Attribute attr, srcAttr; |
AttributeType attrType; |
AttributeType attrType; |
int length; |
int length; |
char *value; |
char *utf8value; |
|
|
if (DocumentTypes[doc] != docImage) |
if (DocumentTypes[doc] != docImage) |
return FALSE; |
return FALSE; |
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 = (char *)TtaGetMemory (length); |
utf8value = (char *)TtaGetMemory (length); |
TtaGiveTextAttributeValue (srcAttr, value, &length); |
TtaGiveTextAttributeValue (srcAttr, utf8value, &length); |
*url = value; |
*url = (char *)TtaConvertMbsToByte ((unsigned char *)utf8value, |
|
TtaGetDefaultCharset ()); |
|
TtaFreeMemory (utf8value); |
} |
} |
return TRUE; |
return TRUE; |
} |
} |
Line 989 char *GetBaseURL (Document doc)
|
Line 991 char *GetBaseURL (Document doc)
|
ElementType elType; |
ElementType elType; |
AttributeType attrType; |
AttributeType attrType; |
Attribute attr; |
Attribute attr; |
char *ptr, *basename; |
char *ptr, *basename, *utf8path; |
int length; |
int length; |
ThotBool hasDocBase; |
ThotBool hasDocBase; |
|
|
Line 1033 char *GetBaseURL (Document doc)
|
Line 1035 char *GetBaseURL (Document doc)
|
{ |
{ |
/* Use the base path of the document */ |
/* Use the base path of the document */ |
TtaGiveTextAttributeValue (attr, basename, &length); |
TtaGiveTextAttributeValue (attr, basename, &length); |
|
utf8path = basename; |
|
basename = (char *)TtaConvertMbsToByte ((unsigned char *)utf8path, |
|
TtaGetDefaultCharset ()); |
|
TtaFreeMemory (utf8path); |
} |
} |
} |
} |
} |
} |