fixed problem reported on the mailing list by Melvyn Sopacua - wrong

* entities.c, valid.c: fixed problem reported on the mailing
  list by Melvyn Sopacua - wrong argument order on functions
  called through xmlHashScan.
diff --git a/ChangeLog b/ChangeLog
index 34801d2..0f7be2c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sun Oct 20 22:37:03 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+	* entities.c, valid.c: fixed problem reported on the mailing
+	  list by Melvyn Sopacua - wrong argument order on functions
+	  called through xmlHashScan.
+
 Sun Oct 19 23:57:45 CEST 2003 Daniel Veillard <daniel@veillard.com>
 
 	* valid.c xmlIO.c: fixes for compiling using --with-minimum
diff --git a/entities.c b/entities.c
index cac5823..fb58205 100644
--- a/entities.c
+++ b/entities.c
@@ -828,6 +828,18 @@
 }
 
 /**
+ * xmlDumpEntityDeclScan:
+ * @ent:  An entity table
+ * @buf:  An XML buffer.
+ *
+ * When using the hash table scan function, arguments need to be reversed
+ */
+static void
+xmlDumpEntityDeclScan(xmlEntityPtr ent, xmlBufferPtr buf) {
+    xmlDumpEntityDecl(buf, ent);
+}
+      
+/**
  * xmlDumpEntitiesTable:
  * @buf:  An XML buffer.
  * @table:  An entity table
@@ -836,6 +848,6 @@
  */
 void
 xmlDumpEntitiesTable(xmlBufferPtr buf, xmlEntitiesTablePtr table) {
-    xmlHashScan(table, (xmlHashScanner)xmlDumpEntityDecl, buf);
+    xmlHashScan(table, (xmlHashScanner)xmlDumpEntityDeclScan, buf);
 }
 #endif /* LIBXML_OUTPUT_ENABLED */
diff --git a/valid.c b/valid.c
index de441c2..0a2cedc 100644
--- a/valid.c
+++ b/valid.c
@@ -1531,6 +1531,19 @@
 }
 
 /**
+ * xmlDumpElementDeclScan:
+ * @elem:  An element table
+ * @buf:  the XML buffer output
+ *
+ * This routine is used by the hash scan function.  It just reverses
+ * the arguments.
+ */
+static void
+xmlDumpElementDeclScan(xmlElementPtr elem, xmlBufferPtr buf) {
+    xmlDumpElementDecl(buf, elem);
+}
+
+/**
  * xmlDumpElementTable:
  * @buf:  the XML buffer output
  * @table:  An element table
@@ -1539,7 +1552,7 @@
  */
 void
 xmlDumpElementTable(xmlBufferPtr buf, xmlElementTablePtr table) {
-    xmlHashScan(table, (xmlHashScanner) xmlDumpElementDecl, buf);
+    xmlHashScan(table, (xmlHashScanner) xmlDumpElementDeclScan, buf);
 }
 #endif /* LIBXML_OUTPUT_ENABLED */
 
@@ -2096,6 +2109,18 @@
 }
 
 /**
+ * xmlDumpAttributeDeclScan:
+ * @attr:  An attribute declaration
+ * @buf:  the XML buffer output
+ *
+ * This is used with the hash scan function - just reverses arguments
+ */
+static void
+xmlDumpAttributeDeclScan(xmlAttributePtr attr, xmlBufferPtr buf) {
+    xmlDumpAttributeDecl(buf, attr);
+}
+
+/**
  * xmlDumpAttributeTable:
  * @buf:  the XML buffer output
  * @table:  An attribute table
@@ -2104,7 +2129,7 @@
  */
 void
 xmlDumpAttributeTable(xmlBufferPtr buf, xmlAttributeTablePtr table) {
-    xmlHashScan(table, (xmlHashScanner) xmlDumpAttributeDecl, buf);
+    xmlHashScan(table, (xmlHashScanner) xmlDumpAttributeDeclScan, buf);
 }
 #endif /* LIBXML_OUTPUT_ENABLED */
 
@@ -2304,6 +2329,18 @@
 }
 
 /**
+ * xmlDumpNotationDeclScan:
+ * @nota:  A notation declaration
+ * @buf:  the XML buffer output
+ *
+ * This is called with the hash scan function, and just reverses args
+ */
+static void
+xmlDumpNotationDeclScan(xmlNotationPtr nota, xmlBufferPtr buf) {
+    xmlDumpNotationDecl(buf, nota);
+}
+
+/**
  * xmlDumpNotationTable:
  * @buf:  the XML buffer output
  * @table:  A notation table
@@ -2312,7 +2349,7 @@
  */
 void
 xmlDumpNotationTable(xmlBufferPtr buf, xmlNotationTablePtr table) {
-    xmlHashScan(table, (xmlHashScanner) xmlDumpNotationDecl, buf);
+    xmlHashScan(table, (xmlHashScanner) xmlDumpNotationDeclScan, buf);
 }
 #endif /* LIBXML_OUTPUT_ENABLED */