1
#ifndef _RECORD_H_INCLUDED_
2
#define _RECORD_H_INCLUDED_
8
/* simple typed record I/O
10
/* #include <record.h>
26
* Record type values are positive numbers 0..255. Negative record type
27
* values are reserved for diagnostics.
29
#define REC_TYPE_EOF -1 /* no record */
30
#define REC_TYPE_ERROR -2 /* bad record */
33
* Functional interface.
35
extern int rec_get(VSTREAM *, VSTRING *, int);
36
extern int rec_put(VSTREAM *, int, const char *, int);
37
extern int rec_put_type(VSTREAM *, int, long);
38
extern int PRINTFLIKE(3, 4) rec_fprintf(VSTREAM *, int, const char *,...);
39
extern int rec_fputs(VSTREAM *, int, const char *);
41
#define REC_PUT_BUF(v, t, b) rec_put((v), (t), vstring_str(b), VSTRING_LEN(b))
44
* Stuff that needs <stdarg.h>
46
extern int rec_vfprintf(VSTREAM *, int, const char *, va_list);
51
/* The Secure Mailer license must be distributed with this software.
54
/* IBM T.J. Watson Research
56
/* Yorktown Heights, NY 10598, USA