Restarted hacking :-) :
- xmllint.c: Made is so if the file name is "-" is will read form
  standard input. Sven Heinicke  <sven@zen.org>
- tree.c: fixed a problem when growing buffer
- tree.h: fixed the comment of the node types following andersca
  comment
- TODO: updated
Daniel
diff --git a/ChangeLog b/ChangeLog
index d1d2490..ac85c8c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Wed Jan  3 14:22:33 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+	* xmllint.c: Made is so if the file name is "-" is will read form
+	  standard input. Sven Heinicke  <sven@zen.org>
+	* tree.c: fixed a problem when growing buffer
+	* tree.h: fixed the comment of the node types following andersca
+	  comment
+	* TODO: updated
+
 Wed Dec 27 12:35:49 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
 
 	* HTMLparser.[ch]: added a way to avoid adding automatically
diff --git a/TODO b/TODO
index e83773a..dae2bfa 100644
--- a/TODO
+++ b/TODO
@@ -34,7 +34,8 @@
   data, close last element, etc
 - htmlParseDoc has parameter encoding which is not used.
   Function htmlCreateDocParserCtxt ignore it.
-
+- bug reported by Michael Meallin on validation problems
+- solve the problems related to post-validating of XInclude results.
 
 TODO:
 =====
diff --git a/include/libxml/tree.h b/include/libxml/tree.h
index 2dc3242..536f859 100644
--- a/include/libxml/tree.h
+++ b/include/libxml/tree.h
@@ -25,6 +25,9 @@
  *
  * NOTE: This is synchronized with DOM Level1 values
  *       See http://www.w3.org/TR/REC-DOM-Level-1/
+ *
+ * Actually this had diverged a bit, and now XML_DOCUMENT_TYPE_NODE should
+ * be deprecated to use an XML_DTD_NODE.
  */
 typedef enum {
     XML_ELEMENT_NODE=		1,
diff --git a/tree.c b/tree.c
index 8d24503..b0799be 100644
--- a/tree.c
+++ b/tree.c
@@ -4347,7 +4347,7 @@
 /**
  * xmlBufferGrow:
  * @buf:  the buffer
- * @len:  the minimum free sie to allocate
+ * @len:  the minimum free size to allocate
  *
  * Grow the available space of an XML buffer.
  *
@@ -4358,7 +4358,7 @@
     int size;
     xmlChar *newbuf;
 
-    if (len <= buf->use) return(0);
+    if (len + buf->use < buf->size) return(0);
 
     size = buf->use + len + 100;
 
diff --git a/tree.h b/tree.h
index 2dc3242..536f859 100644
--- a/tree.h
+++ b/tree.h
@@ -25,6 +25,9 @@
  *
  * NOTE: This is synchronized with DOM Level1 values
  *       See http://www.w3.org/TR/REC-DOM-Level-1/
+ *
+ * Actually this had diverged a bit, and now XML_DOCUMENT_TYPE_NODE should
+ * be deprecated to use an XML_DTD_NODE.
  */
 typedef enum {
     XML_ELEMENT_NODE=		1,
diff --git a/xmllint.c b/xmllint.c
index 3dd413a..7d6ec87 100644
--- a/xmllint.c
+++ b/xmllint.c
@@ -372,7 +372,9 @@
     return(fread(buffer, 1, len, f));
 }
 void myClose(FILE *f) {
+  if (f != stdin) {
     fclose(f);
+  }
 }
 
 /************************************************************************
@@ -394,7 +396,12 @@
 	if (push) {
 	    FILE *f;
 
-	    f = fopen(filename, "r");
+	    /* '-' Usually means stdin -<sven@zen.org> */
+	    if ((filename[0] == '-') && (filename[1] == 0)) {
+	      f = stdin;
+	    } else {
+	      f = fopen(filename, "r");
+	    }
 	    if (f != NULL) {
 		int ret;
 	        int res, size = 3;
@@ -424,7 +431,12 @@
 	    int ret;
 	    FILE *f;
 
-	    f = fopen(filename, "r");
+	    /* '-' Usually means stdin -<sven@zen.org> */
+	    if ((filename[0] == '-') && (filename[1] == 0)) {
+	      f = stdin;
+	    } else {
+	      f = fopen(filename, "r");
+	    }
 	    if (f != NULL) {
                 xmlParserCtxtPtr ctxt;
 
@@ -633,7 +645,8 @@
     xmlFreeDoc(doc);
 }
 
-int main(int argc, char **argv) {
+int
+main(int argc, char **argv) {
     int i, count;
     int files = 0;
 
@@ -766,7 +779,8 @@
 	    i++;
 	    continue;
         }
-	if (argv[i][0] != '-') {
+	/* Remember file names.  "-" means stding.  <sven@zen.org> */
+	if ((argv[i][0] != '-') || (strcmp(argv[i], "-") == 0)) {
 	    if (repeat) {
 		for (count = 0;count < 100 * repeat;count++)
 		    parseAndPrintFile(argv[i]);