Fixes/enhancements: - tree.[ch] xmlIO.c: added xmlDocDumpMemoryEnc() from

Fixes/enhancements:
- tree.[ch] xmlIO.c: added xmlDocDumpMemoryEnc() from John Kroll
- error.c: applied fix suggested by "Leo Davidson" <leo@ox.compsoc.net>
Daniel
diff --git a/error.c b/error.c
index 806cdad..cf76016 100644
--- a/error.c
+++ b/error.c
@@ -62,10 +62,11 @@
  */
 void
 xmlSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler) {
-    if (ctx != NULL)
-	xmlGenericErrorContext = ctx;
+    xmlGenericErrorContext = ctx;
     if (handler != NULL)
 	xmlGenericError = handler;
+    else
+	xmlGenericError = xmlGenericErrorDefaultFunc;
 }
 
 /************************************************************************