added a GROW when parsing complex comments (bug #405666) added a hack to

* parser.c: added a GROW when parsing complex comments (bug #405666)
* gentest.py, testapi.c: added a hack to prevent destruction of any
  param with 'destroy' in it's description (i.e. param destroyed by
  the routine under test, so shouldn't be destroyed by testapi)
* xmlreader.c: added freeing of 'input' param even on error

svn path=/trunk/; revision=3579
diff --git a/xmlreader.c b/xmlreader.c
index 1dc5af1..fe19875 100644
--- a/xmlreader.c
+++ b/xmlreader.c
@@ -4167,9 +4167,9 @@
  *
  * Use RelaxNG to validate the document as it is processed.
  * Activation is only possible before the first Read().
- * if @rng is NULL, then RelaxNG validation is desactivated.
+ * if @rng is NULL, then RelaxNG validation is deactivated.
  *
- * Returns 0 in case the RelaxNG validation could be (des)activated and
+ * Returns 0 in case the RelaxNG validation could be (de)activated and
  *         -1 in case of error.
  */
 int
@@ -4207,8 +4207,8 @@
 			 xmlTextReaderValidityWarningRelay,
 			 reader);
     }
-	if (reader->sErrorFunc != NULL) {
-		xmlRelaxNGSetValidStructuredErrors(reader->rngValidCtxt, 
+    if (reader->sErrorFunc != NULL) {
+	xmlRelaxNGSetValidStructuredErrors(reader->rngValidCtxt, 
 			xmlTextReaderValidityStructuredRelay,
 			reader);
     }
@@ -4861,8 +4861,11 @@
                    xmlParserInputBufferPtr input, const char *URL,
                    const char *encoding, int options)
 {
-    if (reader == NULL)
-        return (-1);
+    if (reader == NULL) {
+/*        if (input != NULL)
+	    xmlFreeParserInputBuffer(input);
+*/        return (-1);
+    }
 
     /*
      * we force the generation of compact text nodes on the reader