summaryrefslogtreecommitdiff
path: root/unproto/vstring.h
diff options
context:
space:
mode:
authorRobert de Bath <rdebath@poboxes.com>1996-03-24 17:45:55 +0100
committerLubomir Rintel <lkundrak@v3.sk>2013-10-23 23:29:43 +0200
commitfe22c37817ce338fbbc90b239320248c270957fa (patch)
treed9550410c4a20bdd382fcc58d2d3d7c5e04e5245 /unproto/vstring.h
parenta7aba15e8efffb1c5d3097656f1a93955a64f01f (diff)
parent42192453ea219b80d0bf9f41e51e36d3d4d0740b (diff)
downloaddev86-fe22c37817ce338fbbc90b239320248c270957fa.tar.gz
Import Dev86-0.0.4.tar.gzv0.0.4
Diffstat (limited to 'unproto/vstring.h')
-rw-r--r--unproto/vstring.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/unproto/vstring.h b/unproto/vstring.h
new file mode 100644
index 0000000..ec02a6e
--- /dev/null
+++ b/unproto/vstring.h
@@ -0,0 +1,14 @@
+/* @(#) vstring.h 1.1 91/09/01 23:08:42 */
+
+struct vstring {
+ char *str; /* string value */
+ char *last; /* last position */
+};
+
+extern struct vstring *vs_alloc(); /* initial allocation */
+extern char *vs_realloc(); /* string extension */
+
+/* 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)