From b513f5a00d1de585ffbdc59339f1611cae486b39 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Sun, 10 Sep 2000 14:01:12 +0000 Subject: [PATCH] Added a _private for hooking up users data to a parser context, Daniel. --- ChangeLog | 4 ++++ include/libxml/parser.h | 6 ++++-- parser.h | 6 ++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 98635d6b..3e0c1932 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sun Sep 10 15:59:58 CEST 2000 Daniel Veillard + + * parser.h: added a _private field for linking user's data + Sun Sep 10 15:14:43 CEST 2000 Daniel Veillard * parser.c parserInternals.h: demacroified most of the IS_XXX diff --git a/include/libxml/parser.h b/include/libxml/parser.h index 5c49eb4d..1c704eff 100644 --- a/include/libxml/parser.h +++ b/include/libxml/parser.h @@ -116,14 +116,14 @@ typedef struct _xmlParserCtxt xmlParserCtxt; typedef xmlParserCtxt *xmlParserCtxtPtr; struct _xmlParserCtxt { struct _xmlSAXHandler *sax; /* The SAX handler */ - void *userData; /* the document being built */ + void *userData; /* For SAX interface only, used by DOM build */ xmlDocPtr myDoc; /* the document being built */ int wellFormed; /* is the document well formed */ int replaceEntities; /* shall we replace entities ? */ const xmlChar *version; /* the XML version string */ const xmlChar *encoding; /* the declared encoding, if any */ int standalone; /* standalone document */ - int html; /* are we parsing an HTML document */ + int html; /* an HTML(1)/Docbook(2) document */ /* Input stream stack */ xmlParserInputPtr input; /* Current input stream */ @@ -183,6 +183,7 @@ struct _xmlParserCtxt { int nodelen; /* Those two fields are there to */ int nodemem; /* Speed up large node parsing */ int pedantic; /* signal pedantic warnings */ + void *_private; /* For user data, libxml won't touch it */ }; /** @@ -298,6 +299,7 @@ extern const char *xmlParserVersion; extern xmlSAXLocator xmlDefaultSAXLocator; extern xmlSAXHandler xmlDefaultSAXHandler; extern xmlSAXHandler htmlDefaultSAXHandler; +extern xmlSAXHandler sgmlDefaultSAXHandler; /** * entity substitution default behaviour. diff --git a/parser.h b/parser.h index 5c49eb4d..1c704eff 100644 --- a/parser.h +++ b/parser.h @@ -116,14 +116,14 @@ typedef struct _xmlParserCtxt xmlParserCtxt; typedef xmlParserCtxt *xmlParserCtxtPtr; struct _xmlParserCtxt { struct _xmlSAXHandler *sax; /* The SAX handler */ - void *userData; /* the document being built */ + void *userData; /* For SAX interface only, used by DOM build */ xmlDocPtr myDoc; /* the document being built */ int wellFormed; /* is the document well formed */ int replaceEntities; /* shall we replace entities ? */ const xmlChar *version; /* the XML version string */ const xmlChar *encoding; /* the declared encoding, if any */ int standalone; /* standalone document */ - int html; /* are we parsing an HTML document */ + int html; /* an HTML(1)/Docbook(2) document */ /* Input stream stack */ xmlParserInputPtr input; /* Current input stream */ @@ -183,6 +183,7 @@ struct _xmlParserCtxt { int nodelen; /* Those two fields are there to */ int nodemem; /* Speed up large node parsing */ int pedantic; /* signal pedantic warnings */ + void *_private; /* For user data, libxml won't touch it */ }; /** @@ -298,6 +299,7 @@ extern const char *xmlParserVersion; extern xmlSAXLocator xmlDefaultSAXLocator; extern xmlSAXHandler xmlDefaultSAXHandler; extern xmlSAXHandler htmlDefaultSAXHandler; +extern xmlSAXHandler sgmlDefaultSAXHandler; /** * entity substitution default behaviour.