modified: diffout.py
[GalaxyCodeBases.git] / c_cpp / lib / uthash / libut / tests / test10.c
blob7db9555cbb20f643615bedfe796c406c6d20a39f
1 #include <stdio.h>
2 #include "utvector.h"
4 int main() {
5 int *p;
6 UT_vector v;
7 utvector_init(&v, utmm_int);
9 printf("extend\n");
10 p = (int*)utvector_extend(&v);
11 *p = 1000;
12 p=NULL;
13 while ( (p=(int*)utvector_next(&v,p))) printf("%d\n",*p);
15 printf("pop\n");
16 p = (int*)utvector_pop(&v);
17 printf("result: %s %d\n", p ? "non-null" : "null", p ? *p : 0);
19 printf("pop\n");
20 p = (int*)utvector_pop(&v);
21 printf("result: %s %d\n", p ? "non-null" : "null", p ? *p : 0);
23 utvector_fini(&v);
24 return 0;