1: #include <stdio.h>
2: #include <stdlib.h>
3: #include <string.h>
4: #include <elwix.h>
5:
6:
7: int
8: main(int argc, char **argv)
9: {
10: array_t *arr;
11: register int i;
12:
13: arr = ait_array2vars((const char**) argv, 42);
14: if (!arr)
15: return 1;
16:
17: for (i = 0; i < array_Size(arr); i++) {
18: if (AIT_TYPE(array(arr, i, ait_val_t*)) == string)
19: printf("arr[%d]=%s\n", i, AIT_ADDR(array(arr, i, ait_val_t*)));
20: else
21: printf("arr[%d]#%ld\n", i, AIT_RAW(array(arr, i, ait_val_t*)));
22: }
23:
24: ait_freeVars(&arr);
25: return 0;
26: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>