Sync usage with man page.
[netbsd-mini2440.git] / dist / ntp / libntp / lib_strbuf.h
blob8cefe64da140a7aab3f949c5c4b8db3d4d91a5ad
1 /* $NetBSD: lib_strbuf.h,v 1.2 2003/12/04 16:23:36 drochner Exp $ */
3 /*
4 * lib_strbuf.h - definitions for routines which use the common string buffers
5 */
7 #include <ntp_types.h>
9 /*
10 * Sizes of things
12 #define LIB_NUMBUFS 200
13 #define LIB_BUFLENGTH 80
16 * Macro to get a pointer to the next buffer
18 #define LIB_GETBUF(buf) \
19 do { \
20 if (!lib_inited) \
21 init_lib(); \
22 buf = &lib_stringbuf[lib_nextbuf][0]; \
23 if (++lib_nextbuf >= LIB_NUMBUFS) \
24 lib_nextbuf = 0; \
25 memset(buf, 0, LIB_BUFLENGTH); \
26 } while (0)
28 extern char lib_stringbuf[LIB_NUMBUFS][LIB_BUFLENGTH];
29 extern int lib_nextbuf;
30 extern int lib_inited;