1 /* hello world - Using a single piece of data (no data copying) */
2 
3 #include "ex_hello_world.h" /* helper functions */
4 
main(void)5 int main(void)
6 {
7   Vstr_base *s1 = hw_init();
8 
9   vstr_add_cstr_buf(s1, s1->len, "Hello World\n");
10 
11   if (s1->conf->malloc_bad)
12     errno = ENOMEM, err(EXIT_FAILURE, "Add string data");
13 
14   while (io_put(s1, STDOUT_FILENO) != IO_NONE) {}
15 
16   exit (hw_exit(s1));
17 }
18