From 845cce4cf1930d2ab9953ac1a345c5d3bed1ed94 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Wed, 9 Jan 2002 11:51:37 +0000 Subject: [PATCH] Anthony Jones pointed a bug in xmlCopyEntity() Daniel * entities.c: Anthony Jones pointed a bug in xmlCopyEntity() Daniel --- ChangeLog | 4 ++++ doc/index.html | 4 +++- doc/xml.html | 8 ++++++-- doc/xmlio.html | 1 + entities.c | 2 +- xmllint.c | 8 +++++--- 6 files changed, 20 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index abab49f6..8f4d19e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Wed Jan 9 12:50:39 CET 2002 Daniel Veillard + + * entities.c: Anthony Jones pointed a bug in xmlCopyEntity() + Tue Jan 8 14:23:22 CET 2002 Daniel Veillard * doc/*.html doc/site.xsl doc/Makefile: renamed XML.html diff --git a/doc/index.html b/doc/index.html index 01630226..58fd8d0d 100644 --- a/doc/index.html +++ b/doc/index.html @@ -124,7 +124,9 @@ other specification but don't claim to implement them:

  • DocBook SGML v4: libxml2 includes a hackish parser to transition to XML
  • -

    +

    Libxml2 is known to be very portable, should build and work without +serious troubles on a variety of systems (Linux, Unix, Windows, CygWin, +MacOs, MacOsX, RISC Os, OS/2, VMS, QNX, MVS, ...)

    Separate documents:

    • diff --git a/doc/xml.html b/doc/xml.html index 38bbae5c..172df601 100644 --- a/doc/xml.html +++ b/doc/xml.html @@ -70,7 +70,9 @@ other specification but don't claim to implement them:

      XML
    -

    +

    Libxml2 is known to be very portable, should build and work without +serious troubles on a variety of systems (Linux, Unix, Windows, CygWin, +MacOs, MacOsX, RISC Os, OS/2, VMS, QNX, MVS, ...)

    Separate documents:

      @@ -410,7 +412,8 @@ pnode=pxmlDoc->children->children;
    • Read the 1.x to 2.x upgrade path. If you are starting a new project using libxml you should really use the 2.x version.
    • -
    • And don't forget to look at the mailing-list archive.
    • +
    • And don't forget to look at the mailing-list archive.
    • Reporting bugs and getting help

      @@ -2180,6 +2183,7 @@ xmlOutputBufferCreateOwn(FILE *file, xmlCharEncodingHandlerPtr encoder) { + }
    • And then use it to save the document: diff --git a/doc/xmlio.html b/doc/xmlio.html index 02b63be2..4cb8f54e 100644 --- a/doc/xmlio.html +++ b/doc/xmlio.html @@ -222,6 +222,7 @@ xmlOutputBufferCreateOwn(FILE *file, xmlCharEncodingHandlerPtr encoder) { + }
    • And then use it to save the document: diff --git a/entities.c b/entities.c index 4cef5d24..b2cb3d46 100644 --- a/entities.c +++ b/entities.c @@ -865,7 +865,7 @@ xmlCopyEntity(xmlEntityPtr ent) { return(NULL); } memset(cur, 0, sizeof(xmlEntity)); - cur->type = XML_ELEMENT_DECL; + cur->type = XML_ENTITY_DECL; cur->etype = ent->etype; if (ent->name != NULL) diff --git a/xmllint.c b/xmllint.c index 70ec276e..782d8cbc 100644 --- a/xmllint.c +++ b/xmllint.c @@ -991,6 +991,7 @@ int main(int argc, char **argv) { int i, count; int files = 0; + int version = 0; if (argc <= 1) { usage(argv[0]); @@ -1021,10 +1022,11 @@ main(int argc, char **argv) { (!strcmp(argv[i], "--noent"))) noent++; else if ((!strcmp(argv[i], "-version")) || - (!strcmp(argv[i], "--version"))) + (!strcmp(argv[i], "--version"))) { fprintf(stderr, "xmllint: using libxml version %s\n", xmlParserVersion); - else if ((!strcmp(argv[i], "-noout")) || + version = 1; + } else if ((!strcmp(argv[i], "-noout")) || (!strcmp(argv[i], "--noout"))) noout++; else if ((!strcmp(argv[i], "-o")) || @@ -1230,7 +1232,7 @@ main(int argc, char **argv) { if ((htmlout) && (!nowrap)) { xmlGenericError(xmlGenericErrorContext, "\n"); } - if ((files == 0) && (!generate)) { + if ((files == 0) && (!generate) && (version == 0)) { usage(argv[0]); } xmlCleanupParser();