mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-06 05:34:59 +00:00
Define XML_Error enum before referencing it.
Make the arg to XML_ErrorString() an XML_Error value. Compatible since enums are binary compatible with ints.
This commit is contained in:
parent
a3e77face0
commit
325d6f339f
1 changed files with 31 additions and 31 deletions
|
@ -57,6 +57,36 @@ typedef unsigned char XML_Bool;
|
|||
#define XML_TRUE ((XML_Bool) 1)
|
||||
#define XML_FALSE ((XML_Bool) 0)
|
||||
|
||||
enum XML_Error {
|
||||
XML_ERROR_NONE,
|
||||
XML_ERROR_NO_MEMORY,
|
||||
XML_ERROR_SYNTAX,
|
||||
XML_ERROR_NO_ELEMENTS,
|
||||
XML_ERROR_INVALID_TOKEN,
|
||||
XML_ERROR_UNCLOSED_TOKEN,
|
||||
XML_ERROR_PARTIAL_CHAR,
|
||||
XML_ERROR_TAG_MISMATCH,
|
||||
XML_ERROR_DUPLICATE_ATTRIBUTE,
|
||||
XML_ERROR_JUNK_AFTER_DOC_ELEMENT,
|
||||
XML_ERROR_PARAM_ENTITY_REF,
|
||||
XML_ERROR_UNDEFINED_ENTITY,
|
||||
XML_ERROR_RECURSIVE_ENTITY_REF,
|
||||
XML_ERROR_ASYNC_ENTITY,
|
||||
XML_ERROR_BAD_CHAR_REF,
|
||||
XML_ERROR_BINARY_ENTITY_REF,
|
||||
XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF,
|
||||
XML_ERROR_MISPLACED_XML_PI,
|
||||
XML_ERROR_UNKNOWN_ENCODING,
|
||||
XML_ERROR_INCORRECT_ENCODING,
|
||||
XML_ERROR_UNCLOSED_CDATA_SECTION,
|
||||
XML_ERROR_EXTERNAL_ENTITY_HANDLING,
|
||||
XML_ERROR_NOT_STANDALONE,
|
||||
XML_ERROR_UNEXPECTED_STATE,
|
||||
XML_ERROR_ENTITY_DECLARED_IN_PE,
|
||||
XML_ERROR_FEATURE_REQUIRES_XML_DTD,
|
||||
XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING
|
||||
};
|
||||
|
||||
enum XML_Content_Type {
|
||||
XML_CTYPE_EMPTY = 1,
|
||||
XML_CTYPE_ANY,
|
||||
|
@ -771,36 +801,6 @@ XMLPARSEAPI(int)
|
|||
XML_SetParamEntityParsing(XML_Parser parser,
|
||||
enum XML_ParamEntityParsing parsing);
|
||||
|
||||
enum XML_Error {
|
||||
XML_ERROR_NONE,
|
||||
XML_ERROR_NO_MEMORY,
|
||||
XML_ERROR_SYNTAX,
|
||||
XML_ERROR_NO_ELEMENTS,
|
||||
XML_ERROR_INVALID_TOKEN,
|
||||
XML_ERROR_UNCLOSED_TOKEN,
|
||||
XML_ERROR_PARTIAL_CHAR,
|
||||
XML_ERROR_TAG_MISMATCH,
|
||||
XML_ERROR_DUPLICATE_ATTRIBUTE,
|
||||
XML_ERROR_JUNK_AFTER_DOC_ELEMENT,
|
||||
XML_ERROR_PARAM_ENTITY_REF,
|
||||
XML_ERROR_UNDEFINED_ENTITY,
|
||||
XML_ERROR_RECURSIVE_ENTITY_REF,
|
||||
XML_ERROR_ASYNC_ENTITY,
|
||||
XML_ERROR_BAD_CHAR_REF,
|
||||
XML_ERROR_BINARY_ENTITY_REF,
|
||||
XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF,
|
||||
XML_ERROR_MISPLACED_XML_PI,
|
||||
XML_ERROR_UNKNOWN_ENCODING,
|
||||
XML_ERROR_INCORRECT_ENCODING,
|
||||
XML_ERROR_UNCLOSED_CDATA_SECTION,
|
||||
XML_ERROR_EXTERNAL_ENTITY_HANDLING,
|
||||
XML_ERROR_NOT_STANDALONE,
|
||||
XML_ERROR_UNEXPECTED_STATE,
|
||||
XML_ERROR_ENTITY_DECLARED_IN_PE,
|
||||
XML_ERROR_FEATURE_REQUIRES_XML_DTD,
|
||||
XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING
|
||||
};
|
||||
|
||||
/* If XML_Parse or XML_ParseBuffer have returned 0, then
|
||||
XML_GetErrorCode returns information about the error.
|
||||
*/
|
||||
|
@ -852,7 +852,7 @@ XML_ParserFree(XML_Parser parser);
|
|||
|
||||
/* Returns a string describing the error. */
|
||||
XMLPARSEAPI(const XML_LChar *)
|
||||
XML_ErrorString(int code);
|
||||
XML_ErrorString(enum XML_Error code);
|
||||
|
||||
/* Return a string containing the version number of this expat */
|
||||
XMLPARSEAPI(const XML_LChar *)
|
||||
|
|
Loading…
Add table
Reference in a new issue