diff options
author | Marc Horowitz <marc@mit.edu> | 1989-11-01 20:02:01 +0000 |
---|---|---|
committer | Marc Horowitz <marc@mit.edu> | 1989-11-01 20:02:01 +0000 |
commit | d13d8a046838ce3d0e2643bb5b49f2ff77d679ca (patch) | |
tree | 05737bc11e3461836ce817939b9129ed58545ac7 /zwgc/buffer.c | |
parent | fd994e4099ad66fb3bf26cd636ca5d5cae72da68 (diff) |
Initial revision
Diffstat (limited to 'zwgc/buffer.c')
-rw-r--r-- | zwgc/buffer.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/zwgc/buffer.c b/zwgc/buffer.c new file mode 100644 index 0000000..f3d583d --- /dev/null +++ b/zwgc/buffer.c @@ -0,0 +1,23 @@ +#include "new_memory.h" +#include "buffer.h" + +static char *buffer = 0; + +string buffer_to_string() +{ + return(buffer); +} + +void clear_buffer() +{ + if (buffer) + free(buffer); + + buffer = string_Copy(""); +} + +void append_buffer(str) + char *str; +{ + buffer = string_Concat2(buffer, str); +} |