more types, more coverage more problems fixed Daniel

* gentest.py testapi.c: more types, more coverage
* parser.c parserInternals.c relaxng.c valid.c xmlIO.c
  xmlschemastypes.c: more problems fixed
Daniel
diff --git a/gentest.py b/gentest.py
index 77e81a0..927ecd8 100755
--- a/gentest.py
+++ b/gentest.py
@@ -35,6 +35,11 @@
 "htmlIORead", "htmlReadIO", "htmlCtxtReadIO",
 "xmlReaderNewIO", "xmlBufferDump", "xmlNanoFTPConnect",
 "xmlNanoFTPConnectTo",
+# Complex I/O APIs
+"xmlCreateIOParserCtxt", "xmlParserInputBufferCreateIO",
+"xmlRegisterInputCallbacks", "xmlReaderForIO",
+"xmlOutputBufferCreateIO", "xmlRegisterOutputCallbacks",
+"xmlSaveToIO",
 # library state cleanup, generate false leak informations and other
 # troubles, heavillyb tested otherwise.
 "xmlCleanupParser", "xmlRelaxNGCleanupTypes", "xmlSetListDoc",
@@ -64,7 +69,8 @@
    "xmlNanoHTTPScanProxy", "xmlResetLastError", "xmlCatalogConvert",
    "xmlCatalogRemove", "xmlLoadCatalogs", "xmlCleanupCharEncodingHandlers",
    "xmlInitCharEncodingHandlers", "xmlCatalogCleanup",
-   "htmlParseFile" # loads the catalogs
+   "xmlSchemaGetBuiltInType",
+   "htmlParseFile", # loads the catalogs
 ]
 
 #
@@ -126,6 +132,7 @@
    "xmlCopyNamespaceList": "if (ret_val != NULL) xmlFreeNsList(ret_val);",
    "xmlNewTextWriter": "if (ret_val != NULL) out = NULL;",
    "xmlNewTextWriterPushParser": "if (ret_val != NULL) ctxt = NULL;",
+   "xmlNewIOInputStream": "if (ret_val != NULL) input = NULL;",
 }
 
 modules = []
@@ -440,17 +447,17 @@
 static int
 testlibxml2(void)
 {
-    int ret = 0;
+    int test_ret = 0;
 
 """)
 
 for module in modules:
-    test.write("    ret += test_%s();\n" % module)
+    test.write("    test_ret += test_%s();\n" % module)
 
 test.write("""
     printf("Total: %d functions, %d tests, %d errors\\n",
-           function_tests, call_tests, ret);
-    return(ret);
+           function_tests, call_tests, test_ret);
+    return(test_ret);
 }
 
 """)
@@ -513,7 +520,7 @@
     test.write("""
 static int
 test_%s(void) {
-    int ret = 0;
+    int test_ret = 0;
 
 """ % (name))
 
@@ -521,7 +528,7 @@
         add_missing_functions(name, module)
 	test.write("""
     /* missing type support */
-    return(ret);
+    return(test_ret);
 }
 
 """)
@@ -623,7 +630,7 @@
 	test.write("""        if (mem_base != xmlMemBlocks()) {
             printf("Leak of %%d blocks found in %s",
 	           xmlMemBlocks() - mem_base);
-	    ret++;
+	    test_ret++;
 """ % (name));
 	for arg in t_args:
 	    (nam, type, rtype, info) = arg;
@@ -645,7 +652,7 @@
 
     test.write("""
     function_tests++;
-    return(ret);
+    return(test_ret);
 }
 
 """)
@@ -671,7 +678,7 @@
     # header
     test.write("""static int
 test_%s(void) {
-    int ret = 0;
+    int test_ret = 0;
 
     printf("Testing %s : %d of %d functions ...\\n");
 """ % (module, module, nb_tests - nb_tests_old, i))
@@ -681,13 +688,13 @@
         name = function.xpathEval('string(@name)')
 	if is_skipped_function(name):
 	    continue
-	test.write("    ret += test_%s();\n" % (name))
+	test.write("    test_ret += test_%s();\n" % (name))
 
     # footer
     test.write("""
-    if (ret != 0)
-	printf("Module %s: %%d errors\\n", ret);
-    return(ret);
+    if (test_ret != 0)
+	printf("Module %s: %%d errors\\n", test_ret);
+    return(test_ret);
 }
 """ % (module))