summaryrefslogtreecommitdiff
path: root/src/buffer.c
diff options
context:
space:
mode:
authorRobert James Kaes <rjkaes@users.sourceforge.net>2000-03-31 20:09:19 +0000
committerRobert James Kaes <rjkaes@users.sourceforge.net>2000-03-31 20:09:19 +0000
commitae347fc87a55e1c3a6dc4debce62ee1faceaf81a (patch)
tree96f247bd2818bca001c8a901198d8aef84dc8a38 /src/buffer.c
parent0edeabbd63b5524ee27a8123015f08a477e6929c (diff)
downloadtinyproxy-ae347fc87a55e1c3a6dc4debce62ee1faceaf81a.tar.gz
tinyproxy-ae347fc87a55e1c3a6dc4debce62ee1faceaf81a.zip
Added the working_* fields as a scratch pad for readline().
Diffstat (limited to '')
-rw-r--r--src/buffer.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 8e76e26..2111034 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1,4 +1,4 @@
-/* $Id: buffer.c,v 1.1.1.1 2000-02-16 17:32:22 sdyoung Exp $
+/* $Id: buffer.c,v 1.2 2000-03-31 20:09:19 rjkaes Exp $
*
* The buffer used in each connection is a linked list of lines. As the lines
* are read in and written out the buffer expands and contracts. Basically,
@@ -72,6 +72,9 @@ struct buffer_s *new_buffer(void)
buffptr->head = buffptr->tail = NULL;
buffptr->size = 0;
+ buffptr->working_string = NULL;
+ buffptr->working_length = 0;
+
return buffptr;
}
@@ -92,6 +95,9 @@ void delete_buffer(struct buffer_s *buffptr)
buffer_head(buffptr) = NULL;
buffer_tail(buffptr) = NULL;
+ buffptr->working_length = 0;
+ safefree(buffptr->working_string);
+
safefree(buffptr);
}