--- embedaddon/libxml2/include/libxml/parser.h 2013/07/22 01:22:22 1.1.1.2 +++ embedaddon/libxml2/include/libxml/parser.h 2014/06/15 19:53:38 1.1.1.3 @@ -80,7 +80,7 @@ struct _xmlParserInput { * xmlParserNodeInfo: * * The parser can be asked to collect Node informations, i.e. at what - * place in the file they were detected. + * place in the file they were detected. * NOTE: This is off by default and not very well tested. */ typedef struct _xmlParserNodeInfo xmlParserNodeInfo; @@ -125,9 +125,9 @@ typedef enum { XML_PARSER_ENTITY_VALUE, /* within an entity value in a decl */ XML_PARSER_ATTRIBUTE_VALUE, /* within an attribute value */ XML_PARSER_SYSTEM_LITERAL, /* within a SYSTEM value */ - XML_PARSER_EPILOG, /* the Misc* after the last end tag */ + XML_PARSER_EPILOG, /* the Misc* after the last end tag */ XML_PARSER_IGNORE, /* within an IGNORED section */ - XML_PARSER_PUBLIC_LITERAL /* within a PUBLIC value */ + XML_PARSER_PUBLIC_LITERAL /* within a PUBLIC value */ } xmlParserInputState; /** @@ -221,7 +221,7 @@ struct _xmlParserCtxt { xmlValidCtxt vctxt; /* The validity context */ xmlParserInputState instate; /* current type of input */ - int token; /* next char look-ahead */ + int token; /* next char look-ahead */ char *directory; /* the data directory */ @@ -310,6 +310,7 @@ struct _xmlParserCtxt { xmlParserNodeInfo *nodeInfoTab; /* array of nodeInfos */ int input_id; /* we need to label inputs */ + unsigned long sizeentcopy; /* volume of entity copy */ }; /** @@ -400,8 +401,8 @@ typedef xmlEntityPtr (*getParameterEntitySAXFunc) (voi /** * entityDeclSAXFunc: * @ctx: the user data (XML parser context) - * @name: the entity name - * @type: the entity type + * @name: the entity name + * @type: the entity type * @publicId: The public ID of the entity * @systemId: The system ID of the entity * @content: the entity value (without processing). @@ -431,8 +432,8 @@ typedef void (*notationDeclSAXFunc)(void *ctx, * attributeDeclSAXFunc: * @ctx: the user data (XML parser context) * @elem: the name of the element - * @fullname: the attribute name - * @type: the attribute type + * @fullname: the attribute name + * @type: the attribute type * @def: the type of default value * @defaultValue: the attribute default value * @tree: the tree of enumerated value set @@ -449,8 +450,8 @@ typedef void (*attributeDeclSAXFunc)(void *ctx, /** * elementDeclSAXFunc: * @ctx: the user data (XML parser context) - * @name: the element name - * @type: the element type + * @name: the element name + * @type: the element type * @content: the element value tree * * An element definition has been parsed. @@ -537,7 +538,7 @@ typedef void (*attributeSAXFunc) (void *ctx, * @ctx: the user data (XML parser context) * @name: The entity name * - * Called when an entity reference is detected. + * Called when an entity reference is detected. */ typedef void (*referenceSAXFunc) (void *ctx, const xmlChar *name); @@ -601,7 +602,7 @@ typedef void (*cdataBlockSAXFunc) ( * @ctx: an XML parser context * @msg: the message to display/transmit * @...: extra parameters for the message display - * + * * Display and format a warning messages, callback. */ typedef void (XMLCDECL *warningSAXFunc) (void *ctx, @@ -611,7 +612,7 @@ typedef void (XMLCDECL *warningSAXFunc) (void *ctx, * @ctx: an XML parser context * @msg: the message to display/transmit * @...: extra parameters for the message display - * + * * Display and format an error messages, callback. */ typedef void (XMLCDECL *errorSAXFunc) (void *ctx, @@ -621,7 +622,7 @@ typedef void (XMLCDECL *errorSAXFunc) (void *ctx, * @ctx: an XML parser context * @msg: the message to display/transmit * @...: extra parameters for the message display - * + * * Display and format fatal error messages, callback. * Note: so far fatalError() SAX callbacks are not used, error() * get all the callbacks for errors. @@ -697,7 +698,7 @@ typedef void (*startElementNsSAX2Func) (void *ctx, int nb_attributes, int nb_defaulted, const xmlChar **attributes); - + /** * endElementNsSAX2Func: * @ctx: the user data (XML parser context) @@ -792,7 +793,7 @@ struct _xmlSAXHandlerV1 { * xmlExternalEntityLoader: * @URL: The System ID of the resource requested * @ID: The Public ID of the resource requested - * @context: the XML parser context + * @context: the XML parser context * * External entity loaders types. * @@ -818,18 +819,18 @@ extern "C" { /* * Init/Cleanup */ -XMLPUBFUN void XMLCALL +XMLPUBFUN void XMLCALL xmlInitParser (void); -XMLPUBFUN void XMLCALL +XMLPUBFUN void XMLCALL xmlCleanupParser (void); /* * Input functions */ -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlParserInputRead (xmlParserInputPtr in, int len); -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlParserInputGrow (xmlParserInputPtr in, int len); @@ -837,101 +838,101 @@ XMLPUBFUN int XMLCALL * Basic parsing Interfaces */ #ifdef LIBXML_SAX1_ENABLED -XMLPUBFUN xmlDocPtr XMLCALL +XMLPUBFUN xmlDocPtr XMLCALL xmlParseDoc (const xmlChar *cur); -XMLPUBFUN xmlDocPtr XMLCALL +XMLPUBFUN xmlDocPtr XMLCALL xmlParseFile (const char *filename); -XMLPUBFUN xmlDocPtr XMLCALL +XMLPUBFUN xmlDocPtr XMLCALL xmlParseMemory (const char *buffer, int size); #endif /* LIBXML_SAX1_ENABLED */ -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlSubstituteEntitiesDefault(int val); -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlKeepBlanksDefault (int val); -XMLPUBFUN void XMLCALL +XMLPUBFUN void XMLCALL xmlStopParser (xmlParserCtxtPtr ctxt); -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlPedanticParserDefault(int val); -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlLineNumbersDefault (int val); #ifdef LIBXML_SAX1_ENABLED /* - * Recovery mode + * Recovery mode */ -XMLPUBFUN xmlDocPtr XMLCALL +XMLPUBFUN xmlDocPtr XMLCALL xmlRecoverDoc (const xmlChar *cur); -XMLPUBFUN xmlDocPtr XMLCALL +XMLPUBFUN xmlDocPtr XMLCALL xmlRecoverMemory (const char *buffer, int size); -XMLPUBFUN xmlDocPtr XMLCALL +XMLPUBFUN xmlDocPtr XMLCALL xmlRecoverFile (const char *filename); #endif /* LIBXML_SAX1_ENABLED */ /* * Less common routines and SAX interfaces */ -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlParseDocument (xmlParserCtxtPtr ctxt); -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt); #ifdef LIBXML_SAX1_ENABLED -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlSAXUserParseFile (xmlSAXHandlerPtr sax, void *user_data, const char *filename); -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlSAXUserParseMemory (xmlSAXHandlerPtr sax, void *user_data, const char *buffer, int size); -XMLPUBFUN xmlDocPtr XMLCALL +XMLPUBFUN xmlDocPtr XMLCALL xmlSAXParseDoc (xmlSAXHandlerPtr sax, const xmlChar *cur, int recovery); -XMLPUBFUN xmlDocPtr XMLCALL +XMLPUBFUN xmlDocPtr XMLCALL xmlSAXParseMemory (xmlSAXHandlerPtr sax, const char *buffer, - int size, + int size, int recovery); -XMLPUBFUN xmlDocPtr XMLCALL +XMLPUBFUN xmlDocPtr XMLCALL xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax, const char *buffer, - int size, + int size, int recovery, void *data); -XMLPUBFUN xmlDocPtr XMLCALL +XMLPUBFUN xmlDocPtr XMLCALL xmlSAXParseFile (xmlSAXHandlerPtr sax, const char *filename, int recovery); -XMLPUBFUN xmlDocPtr XMLCALL +XMLPUBFUN xmlDocPtr XMLCALL xmlSAXParseFileWithData (xmlSAXHandlerPtr sax, const char *filename, int recovery, void *data); -XMLPUBFUN xmlDocPtr XMLCALL +XMLPUBFUN xmlDocPtr XMLCALL xmlSAXParseEntity (xmlSAXHandlerPtr sax, const char *filename); -XMLPUBFUN xmlDocPtr XMLCALL +XMLPUBFUN xmlDocPtr XMLCALL xmlParseEntity (const char *filename); #endif /* LIBXML_SAX1_ENABLED */ #ifdef LIBXML_VALID_ENABLED -XMLPUBFUN xmlDtdPtr XMLCALL +XMLPUBFUN xmlDtdPtr XMLCALL xmlSAXParseDTD (xmlSAXHandlerPtr sax, const xmlChar *ExternalID, const xmlChar *SystemID); -XMLPUBFUN xmlDtdPtr XMLCALL +XMLPUBFUN xmlDtdPtr XMLCALL xmlParseDTD (const xmlChar *ExternalID, const xmlChar *SystemID); -XMLPUBFUN xmlDtdPtr XMLCALL +XMLPUBFUN xmlDtdPtr XMLCALL xmlIOParseDTD (xmlSAXHandlerPtr sax, xmlParserInputBufferPtr input, xmlCharEncoding enc); #endif /* LIBXML_VALID_ENABLE */ #ifdef LIBXML_SAX1_ENABLED -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlParseBalancedChunkMemory(xmlDocPtr doc, xmlSAXHandlerPtr sax, void *user_data, @@ -946,7 +947,7 @@ XMLPUBFUN xmlParserErrors XMLCALL int options, xmlNodePtr *lst); #ifdef LIBXML_SAX1_ENABLED -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc, xmlSAXHandlerPtr sax, void *user_data, @@ -954,7 +955,7 @@ XMLPUBFUN int XMLCALL const xmlChar *string, xmlNodePtr *lst, int recover); -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlParseExternalEntity (xmlDocPtr doc, xmlSAXHandlerPtr sax, void *user_data, @@ -963,7 +964,7 @@ XMLPUBFUN int XMLCALL const xmlChar *ID, xmlNodePtr *lst); #endif /* LIBXML_SAX1_ENABLED */ -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx, const xmlChar *URL, const xmlChar *ID, @@ -972,35 +973,35 @@ XMLPUBFUN int XMLCALL /* * Parser contexts handling. */ -XMLPUBFUN xmlParserCtxtPtr XMLCALL +XMLPUBFUN xmlParserCtxtPtr XMLCALL xmlNewParserCtxt (void); -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlInitParserCtxt (xmlParserCtxtPtr ctxt); -XMLPUBFUN void XMLCALL +XMLPUBFUN void XMLCALL xmlClearParserCtxt (xmlParserCtxtPtr ctxt); -XMLPUBFUN void XMLCALL +XMLPUBFUN void XMLCALL xmlFreeParserCtxt (xmlParserCtxtPtr ctxt); #ifdef LIBXML_SAX1_ENABLED -XMLPUBFUN void XMLCALL +XMLPUBFUN void XMLCALL xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt, const xmlChar* buffer, const char *filename); #endif /* LIBXML_SAX1_ENABLED */ -XMLPUBFUN xmlParserCtxtPtr XMLCALL +XMLPUBFUN xmlParserCtxtPtr XMLCALL xmlCreateDocParserCtxt (const xmlChar *cur); #ifdef LIBXML_LEGACY_ENABLED /* * Reading/setting optional parsing features. */ -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlGetFeaturesList (int *len, const char **result); -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlGetFeature (xmlParserCtxtPtr ctxt, const char *name, void *result); -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlSetFeature (xmlParserCtxtPtr ctxt, const char *name, void *value); @@ -1010,13 +1011,13 @@ XMLPUBFUN int XMLCALL /* * Interfaces for the Push mode. */ -XMLPUBFUN xmlParserCtxtPtr XMLCALL +XMLPUBFUN xmlParserCtxtPtr XMLCALL xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, void *user_data, const char *chunk, int size, const char *filename); -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlParseChunk (xmlParserCtxtPtr ctxt, const char *chunk, int size, @@ -1027,7 +1028,7 @@ XMLPUBFUN int XMLCALL * Special I/O mode. */ -XMLPUBFUN xmlParserCtxtPtr XMLCALL +XMLPUBFUN xmlParserCtxtPtr XMLCALL xmlCreateIOParserCtxt (xmlSAXHandlerPtr sax, void *user_data, xmlInputReadCallback ioread, @@ -1035,7 +1036,7 @@ XMLPUBFUN xmlParserCtxtPtr XMLCALL void *ioctx, xmlCharEncoding enc); -XMLPUBFUN xmlParserInputPtr XMLCALL +XMLPUBFUN xmlParserInputPtr XMLCALL xmlNewIOInputStream (xmlParserCtxtPtr ctxt, xmlParserInputBufferPtr input, xmlCharEncoding enc); @@ -1046,14 +1047,14 @@ XMLPUBFUN xmlParserInputPtr XMLCALL XMLPUBFUN const xmlParserNodeInfo* XMLCALL xmlParserFindNodeInfo (const xmlParserCtxtPtr ctxt, const xmlNodePtr node); -XMLPUBFUN void XMLCALL +XMLPUBFUN void XMLCALL xmlInitNodeInfoSeq (xmlParserNodeInfoSeqPtr seq); -XMLPUBFUN void XMLCALL +XMLPUBFUN void XMLCALL xmlClearNodeInfoSeq (xmlParserNodeInfoSeqPtr seq); -XMLPUBFUN unsigned long XMLCALL +XMLPUBFUN unsigned long XMLCALL xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeqPtr seq, const xmlNodePtr node); -XMLPUBFUN void XMLCALL +XMLPUBFUN void XMLCALL xmlParserAddNodeInfo (xmlParserCtxtPtr ctxt, const xmlParserNodeInfoPtr info); @@ -1061,7 +1062,7 @@ XMLPUBFUN void XMLCALL * External entities handling actually implemented in xmlIO. */ -XMLPUBFUN void XMLCALL +XMLPUBFUN void XMLCALL xmlSetExternalEntityLoader(xmlExternalEntityLoader f); XMLPUBFUN xmlExternalEntityLoader XMLCALL xmlGetExternalEntityLoader(void); @@ -1109,7 +1110,8 @@ typedef enum { XML_PARSE_NOBASEFIX = 1<<18,/* do not fixup XINCLUDE xml:base uris */ XML_PARSE_HUGE = 1<<19,/* relax any hardcoded limit from the parser */ XML_PARSE_OLDSAX = 1<<20,/* parse using SAX2 interface before 2.7.0 */ - XML_PARSE_IGNORE_ENC= 1<<21 /* ignore internal document encoding hint */ + XML_PARSE_IGNORE_ENC= 1<<21,/* ignore internal document encoding hint */ + XML_PARSE_BIG_LINES = 1<<22 /* Store big lines numbers in text PSVI field */ } xmlParserOption; XMLPUBFUN void XMLCALL