#include <stdio.h>
struct my_struct {
int a, b;
};
int
main(void)
{
struct my_struct *d, *cur;
int i;
for (i = 0; i < 100; i++)
{
d = malloc(sizeof(*d));
d->a = i;
d->b = i * 10;
if ((i % 2) == 0)
}
printf("inlist=%p\n", inlist);
printf("\ta=%d, b=%d\n", cur->a, cur->b);
printf("list=%p\n", list);
printf("\ta=%d, b=%d\n", cur->a, cur->b);
{
if ((cur->a % 3) == 0)
}
while (inlist)
{
struct my_struct);
free(aux);
}
return 0;
}
EINA_API unsigned int eina_inlist_count(const Eina_Inlist *list)
Gets the count of the number of items in a list.
Definition: eina_inlist.c:448
#define EINA_INLIST_GET(Inlist)
Utility macro to get the inlist object of a struct.
Definition: eina_inlist.h:413
#define EINA_INLIST_FOREACH(list, it)
Definition: eina_inlist.h:832
#define EINA_INLIST_CONTAINER_GET(ptr, type)
Utility macro to get the container object of an inlist.
Definition: eina_inlist.h:415
#define EINA_INLIST
Used for declaring an inlist member in a struct.
Definition: eina_inlist.h:411
EINA_API Eina_Inlist * eina_inlist_append(Eina_Inlist *list, Eina_Inlist *new_l)
Adds a new node to end of a list.
Definition: eina_inlist.c:227
EINA_API Eina_Inlist * eina_inlist_remove(Eina_Inlist *list, Eina_Inlist *item)
Removes node from list.
Definition: eina_inlist.c:335
static unsigned int eina_list_count(const Eina_List *list)
Gets the count of the number of items in a list.
EINA_API Eina_List * eina_list_prepend(Eina_List *list, const void *data)
Prepends the given data to the given linked list.
Definition: eina_list.c:618
#define EINA_LIST_FOREACH_SAFE(list, l, l_next, data)
Definition for the macro to iterate over a list with support for node deletion.
Definition: eina_list.h:1526
EINA_API Eina_List * eina_list_free(Eina_List *list)
Frees an entire list and all the nodes, ignoring the data contained.
Definition: eina_list.c:823
#define EINA_LIST_FOREACH(list, l, _data)
Definition for the macro to iterate over a list.
Definition: eina_list.h:1415
EINA_API Eina_List * eina_list_remove_list(Eina_List *list, Eina_List *remove_list)
Removes the specified list node.
Definition: eina_list.c:786
EINA_API int eina_shutdown(void)
Shuts down the Eina library.
Definition: eina_main.c:379
EINA_API int eina_init(void)
Initializes the Eina library.
Definition: eina_main.c:291
Inlined list type.
Definition: eina_inlist.h:405
Type for a generic double linked list.
Definition: eina_list.h:318