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;
|
2003-06-08 21:20:36 +00:00
|
|
|
/* 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
|
|
|
}
|