MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlNewInputIO

Function xmlNewInputIO

ThirdParty/libxml2/vtklibxml2/parserInternals.c:1759–1782  ·  view source on GitHub ↗

* xmlNewInputIO: * @ctxt: parser context * @url: base URL (optional) * @ioRead: read callback * @ioClose: close callback (optional) * @ioCtxt: IO context * @encoding: character encoding (optional) * @flags: unused, pass 0 * * Creates a new parser input to read from input callbacks and * cintext. * * @url is used as base to resolve external entities and for * error reporting. *

Source from the content-addressed store, hash-verified

1757 * Returns a new parser input.
1758 */
1759xmlParserInputPtr
1760xmlNewInputIO(xmlParserCtxtPtr ctxt, const char *url,
1761 xmlInputReadCallback ioRead, xmlInputCloseCallback ioClose,
1762 void *ioCtxt,
1763 const char *encoding, int flags ATTRIBUTE_UNUSED) {
1764 xmlParserInputBufferPtr buf;
1765
1766 if ((ctxt == NULL) || (ioRead == NULL))
1767 return(NULL);
1768
1769 buf = xmlAllocParserInputBuffer(XML_CHAR_ENCODING_NONE);
1770 if (buf == NULL) {
1771 xmlCtxtErrMemory(ctxt);
1772 if (ioClose != NULL)
1773 ioClose(ioCtxt);
1774 return(NULL);
1775 }
1776
1777 buf->context = ioCtxt;
1778 buf->readcallback = ioRead;
1779 buf->closecallback = ioClose;
1780
1781 return(xmlNewInputInternal(ctxt, buf, url, encoding));
1782}
1783
1784/**
1785 * xmlNewInputPush:

Callers 5

htmlReadIOFunction · 0.85
htmlCtxtReadIOFunction · 0.85
xmlCreateIOParserCtxtFunction · 0.85
xmlReadIOFunction · 0.85
xmlCtxtReadIOFunction · 0.85

Calls 3

xmlCtxtErrMemoryFunction · 0.85
xmlNewInputInternalFunction · 0.85

Tested by

no test coverage detected