mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-08 06:29:23 +00:00
The previous checkin of expat.h.in broke the build for Windows (now everyone
will just have to wonder how I got anything at all working on Windows). Since we do not want to place the XMLPARSEAPI marker in the middle of a type name, always tack it onto the beginning -- anywhere else seems fragile at best.
This commit is contained in:
parent
84ec06ca9c
commit
a0f045d46d
1 changed files with 55 additions and 50 deletions
|
@ -80,7 +80,7 @@ typedef void (*XML_ElementDeclHandler) (void *userData,
|
|||
const XML_Char *name,
|
||||
XML_Content *model);
|
||||
|
||||
void XMLPARSEAPI
|
||||
XMLPARSEAPI void
|
||||
XML_SetElementDeclHandler(XML_Parser parser,
|
||||
XML_ElementDeclHandler eldecl);
|
||||
|
||||
|
@ -101,7 +101,7 @@ typedef void (*XML_AttlistDeclHandler) (void *userData,
|
|||
const XML_Char *dflt,
|
||||
int isrequired);
|
||||
|
||||
void XMLPARSEAPI
|
||||
XMLPARSEAPI void
|
||||
XML_SetAttlistDeclHandler(XML_Parser parser,
|
||||
XML_AttlistDeclHandler attdecl);
|
||||
|
||||
|
@ -119,7 +119,7 @@ typedef void (*XML_XmlDeclHandler) (void *userData,
|
|||
const XML_Char *encoding,
|
||||
int standalone);
|
||||
|
||||
void XMLPARSEAPI
|
||||
XMLPARSEAPI void
|
||||
XML_SetXmlDeclHandler(XML_Parser parser,
|
||||
XML_XmlDeclHandler xmldecl);
|
||||
|
||||
|
@ -133,7 +133,7 @@ typedef struct {
|
|||
/* Constructs a new parser; encoding is the encoding specified by the
|
||||
external protocol or null if there is none specified. */
|
||||
|
||||
XML_Parser XMLPARSEAPI
|
||||
XMLPARSEAPI XML_Parser
|
||||
XML_ParserCreate(const XML_Char *encoding);
|
||||
|
||||
/* Constructs a new parser and namespace processor. Element type
|
||||
|
@ -146,7 +146,7 @@ separator is '\0' then the namespace URI and the local part will be
|
|||
concatenated without any separator. When a namespace is not declared,
|
||||
the name and prefix will be passed through without expansion. */
|
||||
|
||||
XML_Parser XMLPARSEAPI
|
||||
XMLPARSEAPI XML_Parser
|
||||
XML_ParserCreateNS(const XML_Char *encoding, XML_Char namespaceSeparator);
|
||||
|
||||
|
||||
|
@ -160,7 +160,7 @@ XML_ParserCreateNS(const XML_Char *encoding, XML_Char namespaceSeparator);
|
|||
the given suite.
|
||||
*/
|
||||
|
||||
XML_Parser XMLPARSEAPI
|
||||
XMLPARSEAPI XML_Parser
|
||||
XML_ParserCreate_MM(const XML_Char *encoding,
|
||||
const XML_Memory_Handling_Suite *memsuite,
|
||||
const XML_Char *namespaceSeparator);
|
||||
|
@ -249,7 +249,7 @@ typedef void (*XML_EntityDeclHandler) (void *userData,
|
|||
const XML_Char *publicId,
|
||||
const XML_Char *notationName);
|
||||
|
||||
void XMLPARSEAPI
|
||||
XMLPARSEAPI void
|
||||
XML_SetEntityDeclHandler(XML_Parser parser,
|
||||
XML_EntityDeclHandler handler);
|
||||
|
||||
|
@ -330,6 +330,11 @@ typedef int (*XML_ExternalEntityRefHandler)(XML_Parser parser,
|
|||
const XML_Char *systemId,
|
||||
const XML_Char *publicId);
|
||||
|
||||
typedef int (*XML_InternalEntityRefHandler)(XML_Parser parser,
|
||||
const XML_Char *context,
|
||||
const XML_Char *name,
|
||||
const XML_Char *text);
|
||||
|
||||
/* This structure is filled in by the XML_UnknownEncodingHandler
|
||||
to provide information to the parser about encodings that are unknown
|
||||
to the parser.
|
||||
|
@ -394,38 +399,38 @@ typedef int (*XML_UnknownEncodingHandler)(void *encodingHandlerData,
|
|||
const XML_Char *name,
|
||||
XML_Encoding *info);
|
||||
|
||||
void XMLPARSEAPI
|
||||
XMLPARSEAPI void
|
||||
XML_SetElementHandler(XML_Parser parser,
|
||||
XML_StartElementHandler start,
|
||||
XML_EndElementHandler end);
|
||||
|
||||
void XMLPARSEAPI
|
||||
XMLPARSEAPI void
|
||||
XML_SetStartElementHandler(XML_Parser, XML_StartElementHandler);
|
||||
|
||||
void XMLPARSEAPI
|
||||
XMLPARSEAPI void
|
||||
XML_SetEndElementHandler(XML_Parser, XML_EndElementHandler);
|
||||
|
||||
void XMLPARSEAPI
|
||||
XMLPARSEAPI void
|
||||
XML_SetCharacterDataHandler(XML_Parser parser,
|
||||
XML_CharacterDataHandler handler);
|
||||
|
||||
void XMLPARSEAPI
|
||||
XMLPARSEAPI void
|
||||
XML_SetProcessingInstructionHandler(XML_Parser parser,
|
||||
XML_ProcessingInstructionHandler handler);
|
||||
void XMLPARSEAPI
|
||||
XMLPARSEAPI void
|
||||
XML_SetCommentHandler(XML_Parser parser,
|
||||
XML_CommentHandler handler);
|
||||
|
||||
void XMLPARSEAPI
|
||||
XMLPARSEAPI void
|
||||
XML_SetCdataSectionHandler(XML_Parser parser,
|
||||
XML_StartCdataSectionHandler start,
|
||||
XML_EndCdataSectionHandler end);
|
||||
|
||||
void XMLPARSEAPI
|
||||
XMLPARSEAPI void
|
||||
XML_SetStartCdataSectionHandler(XML_Parser parser,
|
||||
XML_StartCdataSectionHandler start);
|
||||
|
||||
void XMLPARSEAPI
|
||||
XMLPARSEAPI void
|
||||
XML_SetEndCdataSectionHandler(XML_Parser parser,
|
||||
XML_EndCdataSectionHandler end);
|
||||
|
||||
|
@ -433,7 +438,7 @@ XML_SetEndCdataSectionHandler(XML_Parser parser,
|
|||
internal entities. The entity reference will be passed to the default
|
||||
handler. */
|
||||
|
||||
void XMLPARSEAPI
|
||||
XMLPARSEAPI void
|
||||
XML_SetDefaultHandler(XML_Parser parser,
|
||||
XML_DefaultHandler handler);
|
||||
|
||||
|
@ -441,59 +446,59 @@ XML_SetDefaultHandler(XML_Parser parser,
|
|||
internal entities. The entity reference will not be passed to the
|
||||
default handler. */
|
||||
|
||||
void XMLPARSEAPI
|
||||
XMLPARSEAPI void
|
||||
XML_SetDefaultHandlerExpand(XML_Parser parser,
|
||||
XML_DefaultHandler handler);
|
||||
|
||||
void XMLPARSEAPI
|
||||
XMLPARSEAPI void
|
||||
XML_SetDoctypeDeclHandler(XML_Parser parser,
|
||||
XML_StartDoctypeDeclHandler start,
|
||||
XML_EndDoctypeDeclHandler end);
|
||||
|
||||
void XMLPARSEAPI
|
||||
XMLPARSEAPI void
|
||||
XML_SetStartDoctypeDeclHandler(XML_Parser parser,
|
||||
XML_StartDoctypeDeclHandler start);
|
||||
|
||||
void XMLPARSEAPI
|
||||
XMLPARSEAPI void
|
||||
XML_SetEndDoctypeDeclHandler(XML_Parser parser,
|
||||
XML_EndDoctypeDeclHandler end);
|
||||
|
||||
void XMLPARSEAPI
|
||||
XMLPARSEAPI void
|
||||
XML_SetUnparsedEntityDeclHandler(XML_Parser parser,
|
||||
XML_UnparsedEntityDeclHandler handler);
|
||||
|
||||
void XMLPARSEAPI
|
||||
XMLPARSEAPI void
|
||||
XML_SetNotationDeclHandler(XML_Parser parser,
|
||||
XML_NotationDeclHandler handler);
|
||||
|
||||
void XMLPARSEAPI
|
||||
XMLPARSEAPI void
|
||||
XML_SetNamespaceDeclHandler(XML_Parser parser,
|
||||
XML_StartNamespaceDeclHandler start,
|
||||
XML_EndNamespaceDeclHandler end);
|
||||
|
||||
void XMLPARSEAPI
|
||||
XMLPARSEAPI void
|
||||
XML_SetStartNamespaceDeclHandler(XML_Parser parser,
|
||||
XML_StartNamespaceDeclHandler start);
|
||||
|
||||
void XMLPARSEAPI
|
||||
XMLPARSEAPI void
|
||||
XML_SetEndNamespaceDeclHandler(XML_Parser parser,
|
||||
XML_EndNamespaceDeclHandler end);
|
||||
|
||||
void XMLPARSEAPI
|
||||
XMLPARSEAPI void
|
||||
XML_SetNotStandaloneHandler(XML_Parser parser,
|
||||
XML_NotStandaloneHandler handler);
|
||||
|
||||
void XMLPARSEAPI
|
||||
XMLPARSEAPI void
|
||||
XML_SetExternalEntityRefHandler(XML_Parser parser,
|
||||
XML_ExternalEntityRefHandler handler);
|
||||
|
||||
/* If a non-null value for arg is specified here, then it will be passed
|
||||
as the first argument to the external entity ref handler instead
|
||||
of the parser object. */
|
||||
void XMLPARSEAPI
|
||||
XMLPARSEAPI void
|
||||
XML_SetExternalEntityRefHandlerArg(XML_Parser, void *arg);
|
||||
|
||||
void XMLPARSEAPI
|
||||
XMLPARSEAPI void
|
||||
XML_SetUnknownEncodingHandler(XML_Parser parser,
|
||||
XML_UnknownEncodingHandler handler,
|
||||
void *encodingHandlerData);
|
||||
|
@ -501,7 +506,7 @@ XML_SetUnknownEncodingHandler(XML_Parser parser,
|
|||
/* This can be called within a handler for a start element, end element,
|
||||
processing instruction or character data. It causes the corresponding
|
||||
markup to be passed to the default handler. */
|
||||
void XMLPARSEAPI
|
||||
XMLPARSEAPI void
|
||||
XML_DefaultCurrent(XML_Parser parser);
|
||||
|
||||
/* If do_nst is non-zero, and namespace processing is in effect, and
|
||||
|
@ -515,11 +520,11 @@ XML_DefaultCurrent(XML_Parser parser);
|
|||
has a prefix.
|
||||
*/
|
||||
|
||||
void XMLPARSEAPI
|
||||
XMLPARSEAPI void
|
||||
XML_SetReturnNSTriplet(XML_Parser parser, int do_nst);
|
||||
|
||||
/* This value is passed as the userData argument to callbacks. */
|
||||
void XMLPARSEAPI
|
||||
XMLPARSEAPI void
|
||||
XML_SetUserData(XML_Parser parser, void *userData);
|
||||
|
||||
/* Returns the last value set by XML_SetUserData or null. */
|
||||
|
@ -529,7 +534,7 @@ XML_SetUserData(XML_Parser parser, void *userData);
|
|||
to XML_ParserCreate. It must not be called after XML_Parse
|
||||
or XML_ParseBuffer. */
|
||||
|
||||
int XMLPARSEAPI
|
||||
XMLPARSEAPI int
|
||||
XML_SetEncoding(XML_Parser parser, const XML_Char *encoding);
|
||||
|
||||
/* If this function is called, then the parser will be passed
|
||||
|
@ -546,10 +551,10 @@ argument to the XML_ExternalEntityRefHandler, XML_NotationDeclHandler
|
|||
and XML_UnparsedEntityDeclHandler. The base argument will be copied.
|
||||
Returns zero if out of memory, non-zero otherwise. */
|
||||
|
||||
int XMLPARSEAPI
|
||||
XMLPARSEAPI int
|
||||
XML_SetBase(XML_Parser parser, const XML_Char *base);
|
||||
|
||||
const XML_Char * XMLPARSEAPI
|
||||
XMLPARSEAPI const XML_Char *
|
||||
XML_GetBase(XML_Parser parser);
|
||||
|
||||
/* Returns the number of the attribute/value pairs passed in last call
|
||||
|
@ -558,7 +563,7 @@ rather than defaulted. Each attribute/value pair counts as 2; thus
|
|||
this correspondds to an index into the atts array passed to the
|
||||
XML_StartElementHandler. */
|
||||
|
||||
int XMLPARSEAPI
|
||||
XMLPARSEAPI int
|
||||
XML_GetSpecifiedAttributeCount(XML_Parser parser);
|
||||
|
||||
/* Returns the index of the ID attribute passed in the last call to
|
||||
|
@ -566,19 +571,19 @@ XML_StartElementHandler, or -1 if there is no ID attribute. Each
|
|||
attribute/value pair counts as 2; thus this correspondds to an index
|
||||
into the atts array passed to the XML_StartElementHandler. */
|
||||
|
||||
int XMLPARSEAPI
|
||||
XMLPARSEAPI int
|
||||
XML_GetIdAttributeIndex(XML_Parser parser);
|
||||
|
||||
/* Parses some input. Returns 0 if a fatal error is detected.
|
||||
The last call to XML_Parse must have isFinal true;
|
||||
len may be zero for this call (or any other). */
|
||||
int XMLPARSEAPI
|
||||
XMLPARSEAPI int
|
||||
XML_Parse(XML_Parser parser, const char *s, int len, int isFinal);
|
||||
|
||||
void * XMLPARSEAPI
|
||||
XMLPARSEAPI void *
|
||||
XML_GetBuffer(XML_Parser parser, int len);
|
||||
|
||||
int XMLPARSEAPI
|
||||
XMLPARSEAPI int
|
||||
XML_ParseBuffer(XML_Parser parser, int len, int isFinal);
|
||||
|
||||
/* Creates an XML_Parser object that can parse an external general
|
||||
|
@ -596,7 +601,7 @@ freed. The new parser is completely independent and may safely be
|
|||
used in a separate thread. The handlers and userData are initialized
|
||||
from the parser argument. Returns 0 if out of memory. Otherwise
|
||||
returns a new XML_Parser object. */
|
||||
XML_Parser XMLPARSEAPI
|
||||
XMLPARSEAPI XML_Parser
|
||||
XML_ExternalEntityParserCreate(XML_Parser parser,
|
||||
const XML_Char *context,
|
||||
const XML_Char *encoding);
|
||||
|
@ -626,7 +631,7 @@ parsing (ie without XML_DTD being defined), then
|
|||
XML_SetParamEntityParsing will return 0 if parsing of parameter
|
||||
entities is requested; otherwise it will return non-zero. */
|
||||
|
||||
int XMLPARSEAPI
|
||||
XMLPARSEAPI int
|
||||
XML_SetParamEntityParsing(XML_Parser parser,
|
||||
enum XML_ParamEntityParsing parsing);
|
||||
|
||||
|
@ -660,7 +665,7 @@ enum XML_Error {
|
|||
/* If XML_Parse or XML_ParseBuffer have returned 0, then XML_GetErrorCode
|
||||
returns information about the error. */
|
||||
|
||||
enum XML_Error XMLPARSEAPI
|
||||
XMLPARSEAPI enum XML_Error
|
||||
XML_GetErrorCode(XML_Parser parser);
|
||||
|
||||
/* These functions return information about the current parse location.
|
||||
|
@ -678,7 +683,7 @@ long XMLPARSEAPI XML_GetCurrentByteIndex(XML_Parser parser);
|
|||
/* Return the number of bytes in the current event.
|
||||
Returns 0 if the event is in an internal entity. */
|
||||
|
||||
int XMLPARSEAPI
|
||||
XMLPARSEAPI int
|
||||
XML_GetCurrentByteCount(XML_Parser parser);
|
||||
|
||||
/* If XML_CONTEXT_BYTES is defined, returns the input buffer, sets
|
||||
|
@ -691,7 +696,7 @@ XML_GetCurrentByteCount(XML_Parser parser);
|
|||
NOTE: The character pointer returned should not be used outside
|
||||
the handler that makes the call. */
|
||||
|
||||
const char * XMLPARSEAPI
|
||||
XMLPARSEAPI const char *
|
||||
XML_GetInputContext(XML_Parser parser,
|
||||
int *offset,
|
||||
int *size);
|
||||
|
@ -702,15 +707,15 @@ XML_GetInputContext(XML_Parser parser,
|
|||
#define XML_GetErrorByteIndex XML_GetCurrentByteIndex
|
||||
|
||||
/* Frees memory used by the parser. */
|
||||
void XMLPARSEAPI
|
||||
XMLPARSEAPI void
|
||||
XML_ParserFree(XML_Parser parser);
|
||||
|
||||
/* Returns a string describing the error. */
|
||||
const XML_LChar * XMLPARSEAPI
|
||||
XMLPARSEAPI const XML_LChar *
|
||||
XML_ErrorString(int code);
|
||||
|
||||
/* Return a string containing the version number of this expat */
|
||||
const XML_LChar * XMLPARSEAPI
|
||||
XMLPARSEAPI const XML_LChar *
|
||||
XML_ExpatVersion(void);
|
||||
|
||||
typedef struct {
|
||||
|
@ -722,7 +727,7 @@ typedef struct {
|
|||
/* Return an XML_Expat_Version structure containing numeric version
|
||||
number information for this version of expat */
|
||||
|
||||
XML_Expat_Version XMLPARSEAPI
|
||||
XMLPARSEAPI XML_Expat_Version
|
||||
XML_ExpatVersionInfo(void);
|
||||
|
||||
#define XML_MAJOR_VERSION @EXPAT_MAJOR_VERSION@
|
||||
|
|
Loading…
Add table
Reference in a new issue