modified: diffout.py
[GalaxyCodeBases.git] / c_cpp / lib / uthash / libut / tests / test18.c
blob6cc974cdda0b720f6519c4b878a55886c9070b8e
1 #include <stdio.h>
2 #include "libut.h"
4 int main() {
5 int i; UT_string *p;
6 UT_vector v; utvector_init(&v, utstring_mm);
7 UT_string s; utstring_init(&s);
8 for(i=0; i<10; i++) {
9 utstring_printf(&s, ".");
10 utvector_push(&v, &s);
12 p=NULL;
13 while ( (p=(UT_string*)utvector_next(&v,p))) printf("%s\n",utstring_body(p));
15 utvector_erase(&v, 9);
16 p=NULL;
17 while ( (p=(UT_string*)utvector_next(&v,p))) printf("%s\n",utstring_body(p));
19 utvector_erase(&v, 9);
20 p=NULL;
21 while ( (p=(UT_string*)utvector_next(&v,p))) printf("%s\n",utstring_body(p));
24 utvector_fini(&v);
25 utstring_done(&s);
26 return 0;