* xmlOutputBufferCreateIO: * @iowrite: an I/O write function * @ioclose: an I/O close function * @ioctx: an I/O handler * @encoder: the charset encoding if known * * Create a buffered output for the progressive saving * to an I/O handler * * Returns the new parser output or NULL */
| 2195 | * Returns the new parser output or NULL |
| 2196 | */ |
| 2197 | xmlOutputBufferPtr |
| 2198 | xmlOutputBufferCreateIO(xmlOutputWriteCallback iowrite, |
| 2199 | xmlOutputCloseCallback ioclose, void *ioctx, |
| 2200 | xmlCharEncodingHandlerPtr encoder) { |
| 2201 | xmlOutputBufferPtr ret; |
| 2202 | |
| 2203 | if (iowrite == NULL) return(NULL); |
| 2204 | |
| 2205 | ret = xmlAllocOutputBufferInternal(encoder); |
| 2206 | if (ret != NULL) { |
| 2207 | ret->context = (void *) ioctx; |
| 2208 | ret->writecallback = iowrite; |
| 2209 | ret->closecallback = ioclose; |
| 2210 | } |
| 2211 | |
| 2212 | return(ret); |
| 2213 | } |
| 2214 | #endif /* LIBXML_OUTPUT_ENABLED */ |
| 2215 | |
| 2216 | /** |
no test coverage detected