mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-16 07:21:58 +03:00
@ -1,3 +1,10 @@
|
|||||||
|
Thu Feb 3 15:59:37 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
|
||||||
|
|
||||||
|
* nanoftp.c nanohttp.c tree.c HTMLtree.[ch] debugXML.c xpath.c: Fixed
|
||||||
|
compilation warnings on various platforms.
|
||||||
|
* parser.c: Fixed #5281 validity error callbacks are now desactived
|
||||||
|
by default if not validating.
|
||||||
|
|
||||||
Thu Feb 3 13:46:14 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
|
Thu Feb 3 13:46:14 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
|
||||||
|
|
||||||
* nanoftp.c, win32config.h.in: patches to compile on WIN32
|
* nanoftp.c, win32config.h.in: patches to compile on WIN32
|
||||||
|
19
HTMLtree.c
19
HTMLtree.c
@ -265,6 +265,25 @@ htmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* htmlNodeDumpFile:
|
||||||
|
* @out: the FILE pointer
|
||||||
|
* @doc: the document
|
||||||
|
* @cur: the current node
|
||||||
|
*
|
||||||
|
* Dump an HTML node, recursive behaviour,children are printed too.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
htmlNodeDumpFile(FILE *out, xmlDocPtr doc, xmlNodePtr cur) {
|
||||||
|
xmlBufferPtr buf;
|
||||||
|
|
||||||
|
buf = xmlBufferCreate();
|
||||||
|
if (buf == NULL) return;
|
||||||
|
htmlNodeDump(buf, doc, cur);
|
||||||
|
xmlBufferDump(out, buf);
|
||||||
|
xmlBufferFree(buf);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* htmlDocContentDump:
|
* htmlDocContentDump:
|
||||||
* @buf: the HTML buffer output
|
* @buf: the HTML buffer output
|
||||||
|
@ -25,6 +25,8 @@ extern "C" {
|
|||||||
void htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size);
|
void htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size);
|
||||||
void htmlDocDump(FILE *f, xmlDocPtr cur);
|
void htmlDocDump(FILE *f, xmlDocPtr cur);
|
||||||
int htmlSaveFile(const char *filename, xmlDocPtr cur);
|
int htmlSaveFile(const char *filename, xmlDocPtr cur);
|
||||||
|
void htmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur);
|
||||||
|
void htmlNodeDumpFile(FILE *out, xmlDocPtr doc, xmlNodePtr cur);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,9 @@
|
|||||||
#ifdef HAVE_STDLIB_H
|
#ifdef HAVE_STDLIB_H
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_STRING_H
|
||||||
|
#include <string.h>
|
||||||
|
#endif
|
||||||
#include "xmlmemory.h"
|
#include "xmlmemory.h"
|
||||||
#include "tree.h"
|
#include "tree.h"
|
||||||
#include "parser.h"
|
#include "parser.h"
|
||||||
@ -677,7 +680,7 @@ xmlShellCat(xmlShellCtxtPtr ctxt, char *arg, xmlNodePtr node,
|
|||||||
if (node->type == XML_HTML_DOCUMENT_NODE)
|
if (node->type == XML_HTML_DOCUMENT_NODE)
|
||||||
htmlDocDump(stdout, (htmlDocPtr) node);
|
htmlDocDump(stdout, (htmlDocPtr) node);
|
||||||
else
|
else
|
||||||
htmlNodeDump(stdout, ctxt->doc, node);
|
htmlNodeDumpFile(stdout, ctxt->doc, node);
|
||||||
} else {
|
} else {
|
||||||
if (node->type == XML_DOCUMENT_NODE)
|
if (node->type == XML_DOCUMENT_NODE)
|
||||||
xmlDocDump(stdout, (xmlDocPtr) node);
|
xmlDocDump(stdout, (xmlDocPtr) node);
|
||||||
|
@ -25,6 +25,8 @@ extern "C" {
|
|||||||
void htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size);
|
void htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size);
|
||||||
void htmlDocDump(FILE *f, xmlDocPtr cur);
|
void htmlDocDump(FILE *f, xmlDocPtr cur);
|
||||||
int htmlSaveFile(const char *filename, xmlDocPtr cur);
|
int htmlSaveFile(const char *filename, xmlDocPtr cur);
|
||||||
|
void htmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur);
|
||||||
|
void htmlNodeDumpFile(FILE *out, xmlDocPtr doc, xmlNodePtr cur);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -56,6 +56,9 @@
|
|||||||
#ifdef HAVE_STDLIB_H
|
#ifdef HAVE_STDLIB_H
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_STRINGS_H
|
||||||
|
#include <strings.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "xmlmemory.h"
|
#include "xmlmemory.h"
|
||||||
#include "nanoftp.h"
|
#include "nanoftp.h"
|
||||||
@ -1039,7 +1042,7 @@ xmlNanoFTPConnect(void *ctx) {
|
|||||||
res = xmlNanoFTPGetResponse(ctxt);
|
res = xmlNanoFTPGetResponse(ctxt);
|
||||||
switch (res) {
|
switch (res) {
|
||||||
case 2:
|
case 2:
|
||||||
return(0);
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
fprintf(stderr, "FTP server asking for ACCNT on anonymous\n");
|
fprintf(stderr, "FTP server asking for ACCNT on anonymous\n");
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -55,6 +55,9 @@
|
|||||||
#ifdef HAVE_SYS_SELECT_H
|
#ifdef HAVE_SYS_SELECT_H
|
||||||
#include <sys/select.h>
|
#include <sys/select.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_STRINGS_H
|
||||||
|
#include <strings.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "xmlmemory.h"
|
#include "xmlmemory.h"
|
||||||
#include "nanohttp.h"
|
#include "nanohttp.h"
|
||||||
|
9
parser.c
9
parser.c
@ -685,8 +685,13 @@ xmlInitParserCtxt(xmlParserCtxtPtr ctxt)
|
|||||||
ctxt->valid = 1;
|
ctxt->valid = 1;
|
||||||
ctxt->validate = xmlDoValidityCheckingDefaultValue;
|
ctxt->validate = xmlDoValidityCheckingDefaultValue;
|
||||||
ctxt->vctxt.userData = ctxt;
|
ctxt->vctxt.userData = ctxt;
|
||||||
ctxt->vctxt.error = xmlParserValidityError;
|
if (ctxt->validate) {
|
||||||
ctxt->vctxt.warning = xmlParserValidityWarning;
|
ctxt->vctxt.error = xmlParserValidityError;
|
||||||
|
ctxt->vctxt.warning = xmlParserValidityWarning;
|
||||||
|
} else {
|
||||||
|
ctxt->vctxt.error = NULL;
|
||||||
|
ctxt->vctxt.warning = NULL;
|
||||||
|
}
|
||||||
ctxt->replaceEntities = xmlSubstituteEntitiesDefaultValue;
|
ctxt->replaceEntities = xmlSubstituteEntitiesDefaultValue;
|
||||||
ctxt->record_info = 0;
|
ctxt->record_info = 0;
|
||||||
ctxt->nbChars = 0;
|
ctxt->nbChars = 0;
|
||||||
|
Reference in New Issue
Block a user