]> asedeno.scripts.mit.edu Git - 1ts-debian.git/blob - zephyr/zwgc/buffer.c
r4264@bucket (orig r254): kcr | 2008-01-20 22:11:44 -0500
[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
28 buffer_to_string(void)
29 {
30     return(buffer);
31 }
32
33 void
34 clear_buffer(void)
35 {
36     if (buffer)
37       free(buffer);
38
39     buffer = string_Copy("");
40 }
41
42 void
43 append_buffer(char *str)
44 {
45     buffer = string_Concat2(buffer, str);
46 }