1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 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); }