#ifndef _ACCUM_H_22262839_ #define _ACCUM_H_22262839_ struct mm_accum; typedef struct mm_accum ACCUM; #define ACCUM_BINARY 1 /* random binary buffer */ #define ACCUM_NULLTERM 2 /* NUL-terminated string */ /* Starts a new accumulation. Argument is the type. */ extern ACCUM *accum_init(int); /* Adds a character to an accumulation. */ extern void accum_char(ACCUM *, int); /* Adds a bunch of characters to an accumulation. */ extern void accum_block(ACCUM *, const void *, int); /* Returns the accumulation buffer. */ extern void *accum_buf(ACCUM *); /* Returns the accumulation length. */ extern int accum_len(ACCUM *); /* Frees the accumulation. */ extern void accum_free(ACCUM *); #endif