1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-30 22:43:14 +03:00

- speedup of IS_CHAR like macros, significant overall improvement

- More interfaces for new I/O functions: xmlNewIOInputStream,
  xmlParserInputBufferCreateIO, xmlCreateIOParserCtxt
- added I/O test to xmllint
Daniel
This commit is contained in:
Daniel Veillard
2000-04-12 13:27:38 +00:00
parent fc708e2b7c
commit 5e873c4627
13 changed files with 936 additions and 683 deletions

29
xmlIO.c
View File

@ -635,6 +635,35 @@ xmlParserInputBufferCreateFd(int fd, xmlCharEncoding enc) {
return(ret);
}
/**
* xmlParserInputBufferCreateIO:
* @ioread: an I/O read function
* @ioclose: an I/O close function
* @ioctx: an I/O handler
* @enc: the charset encoding if known
*
* Create a buffered parser input for the progressive parsing for the input
* from a file descriptor
*
* Returns the new parser input or NULL
*/
xmlParserInputBufferPtr
xmlParserInputBufferCreateIO(xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose, void *ioctx, xmlCharEncoding enc) {
xmlParserInputBufferPtr ret;
if (ioread == NULL) return(NULL);
ret = xmlAllocParserInputBuffer(enc);
if (ret != NULL) {
ret->context = (void *) ioctx;
ret->readcallback = ioread;
ret->closecallback = ioclose;
}
return(ret);
}
/**
* xmlParserInputBufferPush:
* @in: a buffered parser input