]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
add automatically-growning strings
authorwessels <>
Sun, 7 Dec 1997 02:02:33 +0000 (02:02 +0000)
committerwessels <>
Sun, 7 Dec 1997 02:02:33 +0000 (02:02 +0000)
include/util.h
lib/Makefile.in

index 41438f1a1190f48b0180a71195890ae113a19f9b..4e7f4a07663efe9e2b27201ec4813dceed95daea 100644 (file)
@@ -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_ */
index 00c314e8424f90028251cd264f439180f0016b32..fd57dd702df34faf75e42057d8fa6873a872f94b 100644 (file)
@@ -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@