Commit aecc0dc1 authored by Daniel Veillard's avatar Daniel Veillard
Browse files

fixes the use of 'list' as a parameter added xmlPopInputCallback for Matt

* valid.c include/libxml/valid.h: fixes the use of 'list' as a parameter
* xmlIO.c include/libxml/xmlIO.h: added xmlPopInputCallback for
  Matt Sergeant
Daniel
parent 51c2cfa0
Fri May 7 22:31:54 CEST 2004 Daniel Veillard <daniel@veillard.com>
* valid.c include/libxml/valid.h: fixes the use of 'list' as a parameter
* xmlIO.c include/libxml/xmlIO.h: added xmlPopInputCallback for
Matt Sergeant
Thu May 6 21:14:38 PDT 2004 William Brack <wbrack@mmm.com.hk>
 
* xmlregexp.c: enhanced the handling of subexpression ranges
......
......@@ -25,7 +25,7 @@ There is the list of public releases:
dependancy, XML Schemas union support (Kasimier Buchcik), warning removal
clanup (William), keep ChangeLog compressed when installing from RPMs
- documentation: examples and xmlDocDumpMemory docs (John Fleck), new
example (load, xpath, modify, save), xmlCatalogDump() comments,
example (load, xpath, modify, save), xmlCatalogDump() comments,
- Windows: Borland C++ builder (Eric Zurcher), work around Microsoft
compiler NaN handling bug (Mark Vakoc)
......
......@@ -363,7 +363,7 @@ XMLPUBFUN xmlElementPtr XMLCALL
XMLPUBFUN int XMLCALL
xmlValidGetValidElements(xmlNode *prev,
xmlNode *next,
const xmlChar **list,
const xmlChar **names,
int max);
XMLPUBFUN int XMLCALL
xmlValidGetPotentialChildren(xmlElementContent *ctree,
......
......@@ -158,6 +158,9 @@ struct _xmlOutputBuffer {
XMLPUBFUN void XMLCALL
xmlCleanupInputCallbacks (void);
XMLPUBFUN int XMLCALL
xmlPopInputCallbacks (void);
XMLPUBFUN void XMLCALL
xmlRegisterDefaultInputCallbacks (void);
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
......
......@@ -6586,7 +6586,7 @@ xmlValidGetPotentialChildren(xmlElementContent *ctree, const xmlChar **list,
* xmlValidGetValidElements:
* @prev: an element to insert after
* @next: an element to insert next
* @list: an array to store the list of child names
* @names: an array to store the list of child names
* @max: the size of the array
*
* This function returns the list of authorized children to insert
......@@ -6608,7 +6608,7 @@ xmlValidGetPotentialChildren(xmlElementContent *ctree, const xmlChar **list,
*/
int
xmlValidGetValidElements(xmlNode *prev, xmlNode *next, const xmlChar **list,
xmlValidGetValidElements(xmlNode *prev, xmlNode *next, const xmlChar **names,
int max) {
xmlValidCtxt vctxt;
int nb_valid_elements = 0;
......@@ -6632,7 +6632,7 @@ xmlValidGetValidElements(xmlNode *prev, xmlNode *next, const xmlChar **list,
if (prev == NULL && next == NULL)
return(-1);
if (list == NULL) return(-1);
if (names == NULL) return(-1);
if (max <= 0) return(-1);
nb_valid_elements = 0;
......@@ -6686,8 +6686,8 @@ xmlValidGetValidElements(xmlNode *prev, xmlNode *next, const xmlChar **list,
int j;
for (j = 0; j < nb_valid_elements;j++)
if (xmlStrEqual(elements[i], list[j])) break;
list[nb_valid_elements++] = elements[i];
if (xmlStrEqual(elements[i], names[j])) break;
names[nb_valid_elements++] = elements[i];
if (nb_valid_elements >= max) break;
}
}
......
......@@ -475,6 +475,32 @@ xmlCleanupInputCallbacks(void)
xmlInputCallbackInitialized = 0;
}
/**
* xmlPopInputCallback:
*
* Clear the top input callback from the input stack. this includes the
* compiled-in I/O.
*
* Returns the number of input callback registered or -1 in case of error.
*/
int
xmlPopInputCallbacks(void)
{
if (!xmlInputCallbackInitialized)
return(-1);
if (xmlInputCallbackNr <= 0)
return(-1);
xmlInputCallbackNr--;
xmlInputCallbackTable[xmlInputCallbackNr].matchcallback = NULL;
xmlInputCallbackTable[xmlInputCallbackNr].opencallback = NULL;
xmlInputCallbackTable[xmlInputCallbackNr].readcallback = NULL;
xmlInputCallbackTable[xmlInputCallbackNr].closecallback = NULL;
return(xmlInputCallbackNr);
}
#ifdef LIBXML_OUTPUT_ENABLED
/**
* xmlCleanupOutputCallbacks:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment