mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-01-26 10:03:34 +03:00
parent
f341f93011
commit
5feb8495f4
@ -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>
|
||||
|
||||
* 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:
|
||||
* @buf: the HTML buffer output
|
||||
|
@ -25,6 +25,8 @@ extern "C" {
|
||||
void htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size);
|
||||
void htmlDocDump(FILE *f, 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
|
||||
}
|
||||
|
@ -16,6 +16,9 @@
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
#include "xmlmemory.h"
|
||||
#include "tree.h"
|
||||
#include "parser.h"
|
||||
@ -677,7 +680,7 @@ xmlShellCat(xmlShellCtxtPtr ctxt, char *arg, xmlNodePtr node,
|
||||
if (node->type == XML_HTML_DOCUMENT_NODE)
|
||||
htmlDocDump(stdout, (htmlDocPtr) node);
|
||||
else
|
||||
htmlNodeDump(stdout, ctxt->doc, node);
|
||||
htmlNodeDumpFile(stdout, ctxt->doc, node);
|
||||
} else {
|
||||
if (node->type == XML_DOCUMENT_NODE)
|
||||
xmlDocDump(stdout, (xmlDocPtr) node);
|
||||
|
@ -25,6 +25,8 @@ extern "C" {
|
||||
void htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size);
|
||||
void htmlDocDump(FILE *f, 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
|
||||
}
|
||||
|
@ -56,6 +56,9 @@
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#include "xmlmemory.h"
|
||||
#include "nanoftp.h"
|
||||
@ -1039,7 +1042,7 @@ xmlNanoFTPConnect(void *ctx) {
|
||||
res = xmlNanoFTPGetResponse(ctxt);
|
||||
switch (res) {
|
||||
case 2:
|
||||
return(0);
|
||||
break;
|
||||
case 3:
|
||||
fprintf(stderr, "FTP server asking for ACCNT on anonymous\n");
|
||||
case 1:
|
||||
|
@ -55,6 +55,9 @@
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#include "xmlmemory.h"
|
||||
#include "nanohttp.h"
|
||||
|
9
parser.c
9
parser.c
@ -685,8 +685,13 @@ xmlInitParserCtxt(xmlParserCtxtPtr ctxt)
|
||||
ctxt->valid = 1;
|
||||
ctxt->validate = xmlDoValidityCheckingDefaultValue;
|
||||
ctxt->vctxt.userData = ctxt;
|
||||
ctxt->vctxt.error = xmlParserValidityError;
|
||||
ctxt->vctxt.warning = xmlParserValidityWarning;
|
||||
if (ctxt->validate) {
|
||||
ctxt->vctxt.error = xmlParserValidityError;
|
||||
ctxt->vctxt.warning = xmlParserValidityWarning;
|
||||
} else {
|
||||
ctxt->vctxt.error = NULL;
|
||||
ctxt->vctxt.warning = NULL;
|
||||
}
|
||||
ctxt->replaceEntities = xmlSubstituteEntitiesDefaultValue;
|
||||
ctxt->record_info = 0;
|
||||
ctxt->nbChars = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user