libowfat/test/stralloc_buffer.c

14 lines
345 B
C
Raw Normal View History

2002-10-17 20:32:25 +00:00
#include "stralloc.h"
#include "buffer.h"
2004-11-25 21:52:35 +00:00
int main() {
2002-10-17 20:32:25 +00:00
static stralloc sa;
/* static makes sure sa is initialized and empty;
* use stralloc_init to initialize and stralloc_copys(&sa,"") to empty */
2002-10-17 20:32:25 +00:00
if (buffer_get_token_sa(buffer_0,&sa," \t\n",3)==0) {
buffer_putsa(buffer_1,&sa);
buffer_putnlflush(buffer_1);
}
2004-11-25 21:52:35 +00:00
return 0;
2002-10-17 20:32:25 +00:00
}