From: wessels <> Date: Sun, 7 Dec 1997 02:02:33 +0000 (+0000) Subject: add automatically-growning strings X-Git-Tag: SQUID_3_0_PRE1~4375 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22d15f81112c447a1cff29ba2ba80137fca4a296;p=thirdparty%2Fsquid.git add automatically-growning strings --- diff --git a/include/util.h b/include/util.h index 41438f1a11..4e7f4a0766 100644 --- a/include/util.h +++ b/include/util.h @@ -1,5 +1,5 @@ /* - * $Id: util.h,v 1.35 1997/11/15 06:02:04 wessels Exp $ + * $Id: util.h,v 1.36 1997/12/06 19:03:12 wessels Exp $ * * AUTHOR: Harvest Derived * @@ -159,4 +159,16 @@ extern int safe_inet_addr(const char *, SIA *); extern time_t parse_iso3307_time(const char *buf); extern char *base64_decode(const char *coded); +typedef struct _String { + char *buf; + off_t off; + size_t len; + int refcount; +} String; + +extern String *stringCreate(size_t); +extern void stringAppend(String *, const char *, size_t); +extern void stringFree(String *); +#define stringLength(S) (S)->off + #endif /* ndef _UTIL_H_ */ diff --git a/lib/Makefile.in b/lib/Makefile.in index 00c314e842..fd57dd702d 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -1,5 +1,5 @@ # -# $Id: Makefile.in,v 1.28 1997/12/03 01:27:40 wessels Exp $ +# $Id: Makefile.in,v 1.29 1997/12/06 19:02:33 wessels Exp $ # prefix = @prefix@ srcdir = @srcdir@ @@ -33,6 +33,7 @@ UTILOBJS = rfc1123.o \ snprintf.o \ sha.o \ md5.o \ + String.o \ $(LIBOBJS) REGEXOBJS = GNUregex.o LIBS = libmiscutil.a @LIBREGEX@