From ae347fc87a55e1c3a6dc4debce62ee1faceaf81a Mon Sep 17 00:00:00 2001 From: Robert James Kaes Date: Fri, 31 Mar 2000 20:09:19 +0000 Subject: Added the working_* fields as a scratch pad for readline(). --- src/buffer.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/buffer.c') 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); } -- cgit v1.2.3