diff options
Diffstat (limited to 'libraries/eina/src/examples/eina_list_04.c')
-rw-r--r-- | libraries/eina/src/examples/eina_list_04.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/libraries/eina/src/examples/eina_list_04.c b/libraries/eina/src/examples/eina_list_04.c deleted file mode 100644 index d92a607..0000000 --- a/libraries/eina/src/examples/eina_list_04.c +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -g eina_list_04.c -o eina_list_04 `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; | ||
11 | Eina_List *l; | ||
12 | void *list_data; | ||
13 | |||
14 | eina_init(); | ||
15 | |||
16 | list = eina_list_append(list, eina_stringshare_add("calvin")); | ||
17 | list = eina_list_append(list, eina_stringshare_add("Leoben")); | ||
18 | list = eina_list_append(list, eina_stringshare_add("D'Anna")); | ||
19 | list = eina_list_append(list, eina_stringshare_add("Simon")); | ||
20 | list = eina_list_append(list, eina_stringshare_add("Doral")); | ||
21 | list = eina_list_append(list, eina_stringshare_add("Six")); | ||
22 | list = eina_list_append(list, eina_stringshare_add("Sharon")); | ||
23 | |||
24 | for(l = list; l; l = eina_list_next(l)) | ||
25 | printf("%s\n", (char*)l->data); | ||
26 | |||
27 | for(l = eina_list_last(list); l; l = eina_list_prev(l)) | ||
28 | printf("%s\n", (char*)eina_list_data_get(l)); | ||
29 | |||
30 | EINA_LIST_FREE(list, list_data) | ||
31 | eina_stringshare_del(list_data); | ||
32 | |||
33 | eina_shutdown(); | ||
34 | |||
35 | return 0; | ||
36 | } | ||