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

patch from Robert Schwebel , allows to compile the example if configured

* doc/examples/reader3.c: patch from  Robert Schwebel , allows to
  compile the example if configured without output support fixes
  #545582
* Makefile.am: add testrecurse to the make check tests
* HTMLparser.c: if the parser got a encoding argument it should be
  used over what the meta specifies, patch fixing #536346
Daniel

svn path=/trunk/; revision=3785
This commit is contained in:
Daniel Veillard
2008-08-29 19:58:23 +00:00
parent cba68396ac
commit 4cc67bb77e
4 changed files with 20 additions and 5 deletions

View File

@ -1,7 +1,17 @@
Fri Aug 29 21:53:12 CEST 2008 Daniel Veillard <daniel@veillard.com>
* doc/examples/reader3.c: patch from Robert Schwebel , allows to
compile the example if configured without output support fixes
#545582
* Makefile.am: add testrecurse to the make check tests
* HTMLparser.c: if the parser got a encoding argument it should be
used over what the meta specifies, patch fixing #536346
Fri Aug 29 14:41:38 CEST 2008 Daniel Veillard <daniel@veillard.com>
* parser.c: a couple more fixes
* nanohttp.c nanoftp.c: patch from Andreas Färber to compile on Haiku
* nanohttp.c nanoftp.c: patch from Andreas Färber to compile on Haiku
fixes #527880
* doc/examples/*: regenerated
Thu Aug 28 17:31:46 CEST 2008 Daniel Veillard <daniel@veillard.com>

View File

@ -5973,8 +5973,12 @@ htmlDoRead(htmlParserCtxtPtr ctxt, const char *URL, const char *encoding,
xmlCharEncodingHandlerPtr hdlr;
hdlr = xmlFindCharEncodingHandler(encoding);
if (hdlr != NULL)
if (hdlr != NULL) {
xmlSwitchToEncoding(ctxt, hdlr);
if (ctxt->input->encoding != NULL)
xmlFree((xmlChar *) ctxt->input->encoding);
ctxt->input->encoding = xmlStrdup((xmlChar *)encoding);
}
}
if ((URL != NULL) && (ctxt->input != NULL) &&
(ctxt->input->filename == NULL))

View File

@ -177,7 +177,7 @@ runxmlconf_LDADD= $(LDADDS)
#testOOM_LDADD= $(LDADDS)
runtests:
$(CHECKER) ./runtest$(EXEEXT) && $(CHECKER) ./testapi$(EXEEXT) && $(CHECKER) ./testchar$(EXEEXT)&& $(CHECKER) ./testdict$(EXEEXT) && $(CHECKER) ./runxmlconf$(EXEEXT)
$(CHECKER) ./runtest$(EXEEXT) && $(CHECKER) ./testrecurse$(EXEEXT) &&$(CHECKER) ./testapi$(EXEEXT) && $(CHECKER) ./testchar$(EXEEXT)&& $(CHECKER) ./testdict$(EXEEXT) && $(CHECKER) ./runxmlconf$(EXEEXT)
check: all runtests

View File

@ -15,7 +15,8 @@
#include <stdio.h>
#include <libxml/xmlreader.h>
#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_PATTERN_ENABLED)
#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_PATTERN_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
/**
* streamFile:
@ -113,7 +114,7 @@ int main(int argc, char **argv) {
#else
int main(void) {
fprintf(stderr, "Reader or Pattern support not compiled in\n");
fprintf(stderr, "Reader, Pattern or output support not compiled in\n");
exit(1);
}
#endif