]> asedeno.scripts.mit.edu Git - 1ts-debian.git/blob - zephyr/zwgc/buffer.c
4b46c2240a87a184d65bacdde39d988dfac50a4b
[1ts-debian.git] / zephyr / zwgc / buffer.c
1 /* This file is part of the Project Athena Zephyr Notification System.
2  * It is one of the source files comprising zwgc, the Zephyr WindowGram
3  * client.
4  *
5  *      Created by:     Marc Horowitz <marc@athena.mit.edu>
6  *
7  *      $Id$
8  *
9  *      Copyright (c) 1989 by the Massachusetts Institute of Technology.
10  *      For copying and distribution information, see the file
11  *      "mit-copyright.h".
12  */
13
14 #include <sysdep.h>
15
16 #if (!defined(lint) && !defined(SABER))
17 static const char rcsid_buffer_c[] = "$Id$";
18 #endif
19
20 #include <zephyr/mit-copyright.h>
21
22 #include "new_memory.h"
23 #include "buffer.h"
24
25 static char *buffer = 0;
26
27 string buffer_to_string()
28 {
29     return(buffer);
30 }
31
32 void clear_buffer()
33 {
34     if (buffer)
35       free(buffer);
36
37     buffer = string_Copy("");
38 }
39
40 void append_buffer(str)
41      char *str;
42 {
43     buffer = string_Concat2(buffer, str);
44 }