1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-28 00:21:53 +03:00

Jumbo patch, resync of W3C/Gnome CVS trees:

- uri.c tree.c SAX.c parser.c entities.c debugXML.c: finished
  the cleanup of the computation of URI references when seeking
  external entities. The URI reference string and the resulting
  URI are both stored now.
- parser.c HTMLparser.c valid.c nanoftp.c nanohttp.c xpath.c:
  large s(n)printf checks and cleanup from Denis Barbier
  <barbier@imacs.polytechnique.fr>
- xmlversion.h.in tree.h: couple of SGML declarations for a
  possible docbook module.
- result/VC/ : a couple of test output changed due to the change
  of the entities URI
Daniel
This commit is contained in:
Daniel Veillard
2000-09-10 16:14:55 +00:00
parent b513f5a00d
commit 39c7d71a3b
29 changed files with 605 additions and 246 deletions

View File

@ -630,7 +630,7 @@ htmlTagLookup(const xmlChar *tag) {
int
htmlCheckAutoClose(const xmlChar *newtag, const xmlChar *oldtag) {
int i, index;
char **close;
char **close = NULL;
if (htmlStartCloseIndexinitialized == 0) htmlInitAutoClose();
@ -3535,6 +3535,10 @@ htmlInitParserCtxt(htmlParserCtxtPtr ctxt)
xmlMalloc(5 * sizeof(htmlParserInputPtr));
if (ctxt->inputTab == NULL) {
fprintf(stderr, "htmlInitParserCtxt: out of memory\n");
ctxt->inputNr = 0;
ctxt->inputMax = 0;
ctxt->input = NULL;
return;
}
ctxt->inputNr = 0;
ctxt->inputMax = 5;
@ -3546,12 +3550,35 @@ htmlInitParserCtxt(htmlParserCtxtPtr ctxt)
/* Allocate the Node stack */
ctxt->nodeTab = (htmlNodePtr *) xmlMalloc(10 * sizeof(htmlNodePtr));
if (ctxt->nodeTab == NULL) {
fprintf(stderr, "htmlInitParserCtxt: out of memory\n");
ctxt->nodeNr = 0;
ctxt->nodeMax = 0;
ctxt->node = NULL;
ctxt->inputNr = 0;
ctxt->inputMax = 0;
ctxt->input = NULL;
return;
}
ctxt->nodeNr = 0;
ctxt->nodeMax = 10;
ctxt->node = NULL;
/* Allocate the Name stack */
ctxt->nameTab = (xmlChar **) xmlMalloc(10 * sizeof(xmlChar *));
if (ctxt->nameTab == NULL) {
fprintf(stderr, "htmlInitParserCtxt: out of memory\n");
ctxt->nameNr = 0;
ctxt->nameMax = 10;
ctxt->name = NULL;
ctxt->nodeNr = 0;
ctxt->nodeMax = 0;
ctxt->node = NULL;
ctxt->inputNr = 0;
ctxt->inputMax = 0;
ctxt->input = NULL;
return;
}
ctxt->nameNr = 0;
ctxt->nameMax = 10;
ctxt->name = NULL;