modified: diffout.py
[GalaxyCodeBases.git] / c_cpp / lib / uthash / libut / tests / test17.c
blob37d13539f8f71dddb8242588f4eb21cbe053bd65
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, 0);
16 p=NULL;
17 while ( (p=(UT_string*)utvector_next(&v,p))) printf("%s\n",utstring_body(p));
19 utvector_erase(&v, 1);
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;