modified: diffout.py
[GalaxyCodeBases.git] / c_cpp / lib / uthash / libut / tests / test12.c
blob5141d0f44bf4b626e03d5372727088847ddf3614
1 #include <stdio.h>
2 #include "utvector.h"
4 int main() {
5 int i,*p=NULL;
6 UT_vector v;
7 utvector_init(&v, utmm_int);
8 for(i=0; i<16; i++) utvector_push(&v, &i);
10 p=NULL; while ( (p=(int*)utvector_next(&v,p))) printf("%d\n",*p);
13 p = (int*)utvector_head(&v);
14 printf("head: (%s) %d\n", p?"non-null":"null", p?*p:0);
16 p = (int*)utvector_tail(&v);
17 printf("tail: (%s) %d\n", p?"non-null":"null", p?*p:0);
19 utvector_fini(&v);
20 return 0;