autogenerate a minimal NULL value sequence for unknown pointer types This

* gentest.py testapi.c: autogenerate a minimal NULL value sequence
  for unknown pointer types
* HTMLparser.c SAX2.c chvalid.c encoding.c entities.c parser.c
  parserInternals.c relaxng.c valid.c xmlIO.c xmlreader.c
  xmlsave.c xmlschemas.c xmlschemastypes.c xmlstring.c xpath.c
  xpointer.c: This uncovered an impressive amount of entry points
  not checking for NULL pointers when they ought to, closing all
  the open gaps.
Daniel
diff --git a/xmlsave.c b/xmlsave.c
index fd02735..72ad699 100644
--- a/xmlsave.c
+++ b/xmlsave.c
@@ -1436,6 +1436,7 @@
 {
     long ret = 0;
 
+    if ((ctxt == NULL) || (doc == NULL)) return(-1);
     xmlDocContentDumpOutput(ctxt, doc);
     return(ret);
 }
@@ -1456,6 +1457,7 @@
 {
     long ret = 0;
 
+    if ((ctxt == NULL) || (node == NULL)) return(-1);
     xmlNodeDumpOutputInternal(ctxt, node);
     return(ret);
 }