Main Page   File List   File Members  

mxml_refil.c File Reference

#include <mxml.h>
#include <stdio.h>

Functions

MXML_REFIL * mxml_refil_new (MXML_REFIL_FUNC func, char *buf, int buflen, int bufsize)
MXML_STATUS mxml_refil_setup (MXML_REFIL *ref, MXML_REFIL_FUNC func, char *buf, int buflen, int bufsize)
void mxml_refil_destroy (MXML_REFIL *ref)
int mxml_refil_getc (MXML_REFIL *ref)
void mxml_refill_from_stream_func (MXML_REFIL *ref)
void mxml_refill_from_handle_func (MXML_REFIL *ref)

Function Documentation

void mxml_refil_destroy MXML_REFIL *    ref
 

int mxml_refil_getc MXML_REFIL *    ref
 

MXML_REFIL* mxml_refil_new MXML_REFIL_FUNC    func,
char *    buf,
int    buflen,
int    bufsize
 

Creates a new refiller object. If buf is null, then buflen is ignored and set to 0; the first retrival of a character will then lead to refil func calling. If the function is null, once the data has been read the reader returns eof. If both func and buf are NULL, the creation fails, and the function retunrs NULL.

MXML_STATUS mxml_refil_setup MXML_REFIL *    ref,
MXML_REFIL_FUNC    func,
char *    buf,
int    buflen,
int    bufsize
 

Sets up refiller parameters. If buf is null, then buflen is ignored and set to 0; the first retrival of a character will then lead to refil func calling. Bufsize is the size of the allocated memory, while buflen is the count of currently valid characters in that buffer. If the function is null, once the data has been read the reader returns eof. If both func and buf are NULL, the function fails and returns MXML_STATUS_ERROR. On success, returns MXML_STATUS_OK. Notice: ref->data member is left to fill to the calling program, if this is needed.

void mxml_refill_from_handle_func MXML_REFIL *    ref
 

Useful "fill" function that reads from a file handle

void mxml_refill_from_stream_func MXML_REFIL *    ref
 

Useful "fill" function that reads from a stream


Generated on Tue Jul 8 23:44:29 2003 for MXML by doxygen1.2.18