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.
This commit is contained in:
William M. Brack 2003-10-20 14:56:06 +00:00
parent d61e8fbc73
commit 9e66059f08
3 changed files with 59 additions and 4 deletions

View File

@ -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

View File

@ -827,6 +827,18 @@ xmlDumpEntityDecl(xmlBufferPtr buf, xmlEntityPtr ent) {
}
}
/**
* 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.
@ -836,6 +848,6 @@ xmlDumpEntityDecl(xmlBufferPtr buf, xmlEntityPtr ent) {
*/
void
xmlDumpEntitiesTable(xmlBufferPtr buf, xmlEntitiesTablePtr table) {
xmlHashScan(table, (xmlHashScanner)xmlDumpEntityDecl, buf);
xmlHashScan(table, (xmlHashScanner)xmlDumpEntityDeclScan, buf);
}
#endif /* LIBXML_OUTPUT_ENABLED */

43
valid.c
View File

@ -1530,6 +1530,19 @@ xmlDumpElementDecl(xmlBufferPtr buf, xmlElementPtr elem) {
}
}
/**
* 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
@ -1539,7 +1552,7 @@ xmlDumpElementDecl(xmlBufferPtr buf, xmlElementPtr elem) {
*/
void
xmlDumpElementTable(xmlBufferPtr buf, xmlElementTablePtr table) {
xmlHashScan(table, (xmlHashScanner) xmlDumpElementDecl, buf);
xmlHashScan(table, (xmlHashScanner) xmlDumpElementDeclScan, buf);
}
#endif /* LIBXML_OUTPUT_ENABLED */
@ -2095,6 +2108,18 @@ xmlDumpAttributeDecl(xmlBufferPtr buf, xmlAttributePtr attr) {
xmlBufferWriteChar(buf, ">\n");
}
/**
* 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
@ -2104,7 +2129,7 @@ xmlDumpAttributeDecl(xmlBufferPtr buf, xmlAttributePtr attr) {
*/
void
xmlDumpAttributeTable(xmlBufferPtr buf, xmlAttributeTablePtr table) {
xmlHashScan(table, (xmlHashScanner) xmlDumpAttributeDecl, buf);
xmlHashScan(table, (xmlHashScanner) xmlDumpAttributeDeclScan, buf);
}
#endif /* LIBXML_OUTPUT_ENABLED */
@ -2303,6 +2328,18 @@ xmlDumpNotationDecl(xmlBufferPtr buf, xmlNotationPtr nota) {
xmlBufferWriteChar(buf, " >\n");
}
/**
* 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
@ -2312,7 +2349,7 @@ xmlDumpNotationDecl(xmlBufferPtr buf, xmlNotationPtr nota) {
*/
void
xmlDumpNotationTable(xmlBufferPtr buf, xmlNotationTablePtr table) {
xmlHashScan(table, (xmlHashScanner) xmlDumpNotationDecl, buf);
xmlHashScan(table, (xmlHashScanner) xmlDumpNotationDeclScan, buf);
}
#endif /* LIBXML_OUTPUT_ENABLED */