Bug 63560, XML content sink was not adding script element contents to the content model. Includes also minor optimizations and fixes 2 compiler warnings. r=harishd, a=vidur.

git-svn-id: svn://10.0.0.236/trunk@84335 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
heikki%netscape.com
2001-01-04 00:30:11 +00:00
parent 34de3b15eb
commit 42e783bf26
6 changed files with 42 additions and 92 deletions

View File

@@ -1055,7 +1055,7 @@ const XML_LChar *XML_ErrorString(int code)
XML_T("error in processing external entity reference"),
XML_T("document is not standalone")
};
if (code > 0 && code < sizeof(message)/sizeof(message[0]))
if (code > 0 && (unsigned int)code < sizeof(message)/sizeof(message[0]))
return message[code];
return 0;
}
@@ -2122,14 +2122,14 @@ processXmlDecl(XML_Parser parser, int isGeneralTextEntity,
}
else if (encodingName) {
enum XML_Error result;
const XML_Char *s = poolStoreString(&tempPool,
const XML_Char *s2 = poolStoreString(&tempPool,
encoding,
encodingName,
encodingName
+ XmlNameLength(encoding, encodingName));
if (!s)
if (!s2)
return XML_ERROR_NO_MEMORY;
result = handleUnknownEncoding(parser, s);
result = handleUnknownEncoding(parser, s2);
poolDiscard(&tempPool);
if (result == XML_ERROR_UNKNOWN_ENCODING)
eventPtr = encodingName;