diff options
Diffstat (limited to 'libraries/eina/src/examples/eina_list_03.c')
-rw-r--r-- | libraries/eina/src/examples/eina_list_03.c | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/libraries/eina/src/examples/eina_list_03.c b/libraries/eina/src/examples/eina_list_03.c deleted file mode 100644 index db53148..0000000 --- a/libraries/eina/src/examples/eina_list_03.c +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -g eina_list_03.c -o eina_list_03 `pkg-config --cflags --libs eina` | ||
3 | |||
4 | #include <stdio.h> | ||
5 | #include <Eina.h> | ||
6 | |||
7 | int | ||
8 | main(int argc, char **argv) | ||
9 | { | ||
10 | Eina_List *list = NULL, *r_list; | ||
11 | Eina_List *l; | ||
12 | Eina_Iterator *itr; | ||
13 | void *list_data; | ||
14 | |||
15 | eina_init(); | ||
16 | |||
17 | list = eina_list_append(list, "caprica"); | ||
18 | list = eina_list_append(list, "sagitarius"); | ||
19 | list = eina_list_append(list, "aerilon"); | ||
20 | list = eina_list_append(list, "gemenon"); | ||
21 | |||
22 | list = eina_list_promote_list(list, eina_list_nth_list(list, 2)); | ||
23 | list = eina_list_demote_list(list, eina_list_nth_list(list, 2)); | ||
24 | |||
25 | list = eina_list_remove(list, "sagitarius"); | ||
26 | |||
27 | l = eina_list_data_find_list(list, "aerilon"); | ||
28 | eina_list_data_set(l, "aquarius"); | ||
29 | |||
30 | printf("size: %d\n", eina_list_count(list)); | ||
31 | |||
32 | r_list = eina_list_reverse_clone(list); | ||
33 | |||
34 | itr = eina_list_iterator_new(r_list); | ||
35 | EINA_ITERATOR_FOREACH(itr, list_data) | ||
36 | printf("%s\n", (char*)list_data); | ||
37 | eina_iterator_free(itr); | ||
38 | |||
39 | eina_list_free(list); | ||
40 | eina_list_free(r_list); | ||
41 | |||
42 | eina_shutdown(); | ||
43 | |||
44 | return 0; | ||
45 | } | ||