2 * lib_strbuf.h - definitions for routines which use the common string buffers
8 #include <ntp_malloc.h> /* for ZERO() */
14 #define LIB_BUFLENGTH 128
16 typedef char libbufstr[LIB_BUFLENGTH];
17 extern libbufstr lib_stringbuf[LIB_NUMBUF];
18 extern int lib_nextbuf;
19 extern int lib_inited;
23 * Macro to get a pointer to the next buffer
25 #define LIB_GETBUF(bufp) \
27 ZERO(lib_stringbuf[lib_nextbuf]); \
28 (bufp) = &lib_stringbuf[lib_nextbuf++][0]; \
29 lib_nextbuf %= COUNTOF(lib_stringbuf); \
32 #endif /* LIB_STRBUF_H */