summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2001-09-09 08:38:09 +0000
committerDaniel Veillard <veillard@src.gnome.org>2001-09-09 08:38:09 +0000
commit05c13a20b9ac8153adb9158359e2aa09bfe965d0 (patch)
treef98f71e46d070bd5b9a5fcb8566b578e18a38059
parent5eb9dea8be2fcf18fee419ee740b09e405a61efd (diff)
downloadlibxml2-05c13a20b9ac8153adb9158359e2aa09bfe965d0.tar.gz
John Fleck fixed typos in the options output fix ignorable white space SAX
* xmllint.c: John Fleck fixed typos in the options output * parser.c SAX.c: fix ignorable white space SAX selection * entities.c: Steve Underwood found the possibility of an ininite loop in case of error. Daniel
-rw-r--r--ChangeLog10
-rw-r--r--SAX.c9
-rw-r--r--entities.c1
-rw-r--r--parser.c6
-rw-r--r--xmllint.c4
5 files changed, 22 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 7632a71f..78edee40 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+Sun Sep 9 10:33:15 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: John Fleck fixed typos in the options output
+ * parser.c SAX.c: fix ignorable white space SAX selection
+
+Sat Sep 8 11:43:53 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * entities.c: Steve Underwood found the possibility of an
+ ininite loop in case of error.
+
Fri Sep 7 11:35:00 CEST 2001 Daniel Veillard <daniel@veillard.com>
* Makefile.am: Need $(ICONV_LIBS) in libxml2_la_LIBADD
diff --git a/SAX.c b/SAX.c
index 05d70ab0..4dab41e8 100644
--- a/SAX.c
+++ b/SAX.c
@@ -1258,7 +1258,6 @@ reference(void *ctx, const xmlChar *name)
* @len: the number of xmlChar
*
* receiving some chars from the parser.
- * Question: how much at a time ???
*/
void
characters(void *ctx, const xmlChar *ch, int len)
@@ -1364,7 +1363,7 @@ characters(void *ctx, const xmlChar *ch, int len)
* @len: the number of xmlChar
*
* receiving some ignorable whitespaces from the parser.
- * Question: how much at a time ???
+ * UNUSED: by default the DOM building will use characters
*/
void
ignorableWhitespace(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch ATTRIBUTE_UNUSED, int len ATTRIBUTE_UNUSED)
@@ -1682,7 +1681,7 @@ xmlSAXHandler xmlDefaultSAXHandler = {
endElement,
reference,
characters,
- ignorableWhitespace,
+ characters,
processingInstruction,
comment,
xmlParserWarning,
@@ -1726,7 +1725,7 @@ xmlDefaultSAXHandlerInit(void)
xmlDefaultSAXHandler.reference = reference;
xmlDefaultSAXHandler.characters = characters;
xmlDefaultSAXHandler.cdataBlock = cdataBlock;
- xmlDefaultSAXHandler.ignorableWhitespace = ignorableWhitespace;
+ xmlDefaultSAXHandler.ignorableWhitespace = characters;
xmlDefaultSAXHandler.processingInstruction = processingInstruction;
xmlDefaultSAXHandler.comment = comment;
if (xmlGetWarningsDefaultValue == 0)
@@ -1762,7 +1761,7 @@ xmlSAXHandler htmlDefaultSAXHandler = {
endElement,
NULL,
characters,
- ignorableWhitespace,
+ characters,
NULL,
comment,
xmlParserWarning,
diff --git a/entities.c b/entities.c
index 1d0700d9..afa871b6 100644
--- a/entities.c
+++ b/entities.c
@@ -669,6 +669,7 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
buf[sizeof(buf) - 1] = 0;
ptr = buf;
while (*ptr != 0) *out++ = *ptr++;
+ cur++;
continue;
} else if (*cur < 0xE0) {
val = (cur[0]) & 0x1F;
diff --git a/parser.c b/parser.c
index c445d789..6510a49c 100644
--- a/parser.c
+++ b/parser.c
@@ -1475,7 +1475,11 @@ static int areBlanks(xmlParserCtxtPtr ctxt, const xmlChar *str, int len) {
int i, ret;
xmlNodePtr lastChild;
- if (ctxt->keepBlanks)
+ /*
+ * Don't spend time trying to differentiate them, the same callback is
+ * used !
+ */
+ if (ctxt->sax->ignorableWhitespace == ctxt->sax->characters)
return(0);
/*
diff --git a/xmllint.c b/xmllint.c
index 944be456..d249edbe 100644
--- a/xmllint.c
+++ b/xmllint.c
@@ -780,7 +780,7 @@ static void usage(const char *name) {
printf("\t--noent : substitute entity references by their value\n");
printf("\t--noout : don't output the result tree\n");
printf("\t--htmlout : output results as HTML\n");
- printf("\t--nowarp : do not put HTML doc wrapper\n");
+ printf("\t--nowrap : do not put HTML doc wrapper\n");
printf("\t--valid : validate the document in addition to std well-formed check\n");
printf("\t--postvalid : do a posteriori validation, i.e after parsing\n");
printf("\t--dtdvalid URL : do a posteriori validation against a given DTD\n");
@@ -803,7 +803,7 @@ static void usage(const char *name) {
#ifdef LIBXML_CATALOG_ENABLED
printf("\t--catalogs : use the catalogs from $SGML_CATALOG_FILES\n");
printf("\t otherwise /etc/xml/catalog is activated by default\n");
- printf("\t--nocatalogs: desactivate all catalogs\n");
+ printf("\t--nocatalogs: deactivate all catalogs\n");
#endif
printf("\t--auto : generate a small doc on the fly\n");
#ifdef LIBXML_XINCLUDE_ENABLED