mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-02-11 13:50:39 +08:00
16 lines
455 B
C
16 lines
455 B
C
/* @(#) vstring.h 1.2 92/01/15 21:53:19 */
|
|
|
|
struct vstring {
|
|
char *str; /* string value */
|
|
char *last; /* last position */
|
|
};
|
|
|
|
extern struct vstring *vs_alloc(); /* initial allocation */
|
|
extern char *vs_realloc(); /* string extension */
|
|
extern char *vs_strcpy(); /* copy string */
|
|
|
|
/* macro to add one character to auto-resized string */
|
|
|
|
#define VS_ADDCH(vs,wp,c) \
|
|
((wp < (vs)->last || (wp = vs_realloc(vs,wp))) ? (*wp++ = c) : 0)
|