Files
sics/tecs/buf.h
2000-03-08 13:41:57 +00:00

21 lines
589 B
C

typedef struct { char *buf; char *start; int size; int usize; int isize, dummy; } buf_type;
/* input */
void buf_reset(buf_type *buf);
int buf_get_int(buf_type *buf);
char *buf_get_str(buf_type *buf);
float buf_get_float(buf_type *buf);
int buf_size(buf_type *buf);
/* output */
void buf_put_start(buf_type *buf);
void buf_put_int(buf_type *buf, int val);
void buf_put_str(buf_type *buf, char *str);
void buf_put_float(buf_type *buf, float val);
void buf_put_end(buf_type *buf);
/* common */
buf_type *buf_create(size_t size);
void buf_free(buf_type *buf);
void buf_log(buf_type *buf);