File: stralloc_buffer.c

package info (click to toggle)
libowfat 0.22-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,148 kB
  • ctags: 976
  • sloc: ansic: 10,424; makefile: 42
file content (13 lines) | stat: -rw-r--r-- 345 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include "stralloc.h"
#include "buffer.h"

int main() {
  static stralloc sa;
  /* static makes sure sa is initialized and empty;
   * use stralloc_init to initialize and stralloc_copys(&sa,"") to empty */
  if (buffer_get_token_sa(buffer_0,&sa," \t\n",3)==0) {
    buffer_putsa(buffer_1,&sa);
    buffer_putnlflush(buffer_1);
  }
  return 0;
}