* xmlOutputBufferCreateFile: * @file: a FILE* * @encoder: the encoding converter or NULL * * Create a buffered output for the progressive saving to a FILE * * buffered C I/O * * Returns the new parser output or NULL */
| 2637 | * Returns the new parser output or NULL |
| 2638 | */ |
| 2639 | xmlOutputBufferPtr |
| 2640 | xmlOutputBufferCreateFile(FILE *file, xmlCharEncodingHandlerPtr encoder) { |
| 2641 | xmlOutputBufferPtr ret; |
| 2642 | |
| 2643 | if (xmlOutputCallbackInitialized == 0) |
| 2644 | xmlRegisterDefaultOutputCallbacks(); |
| 2645 | |
| 2646 | if (file == NULL) return(NULL); |
| 2647 | |
| 2648 | ret = xmlAllocOutputBuffer(encoder); |
| 2649 | if (ret != NULL) { |
| 2650 | ret->context = file; |
| 2651 | ret->writecallback = xmlFileWrite; |
| 2652 | ret->closecallback = xmlFileFlush; |
| 2653 | } |
| 2654 | |
| 2655 | return(ret); |
| 2656 | } |
| 2657 | |
| 2658 | /** |
| 2659 | * xmlOutputBufferCreateBuffer: |