]> git.sur5r.net Git - openldap/blob - build/unproto/vstring.h
Initial revision
[openldap] / build / unproto / vstring.h
1 /* @(#) vstring.h 1.2 92/01/15 21:53:19 */
2
3 struct vstring {
4     char   *str;                        /* string value */
5     char   *last;                       /* last position */
6 };
7
8 extern struct vstring *vs_alloc();      /* initial allocation */
9 extern char *vs_realloc();              /* string extension */
10 extern char *vs_strcpy();               /* copy string */
11
12 /* macro to add one character to auto-resized string */
13
14 #define VS_ADDCH(vs,wp,c) \
15     ((wp < (vs)->last || (wp = vs_realloc(vs,wp))) ? (*wp++ = c) : 0)