prelude-list

## prelude-list prelude-list |

## Synopsis

    #define             PRELUDE_LIST                        (item)
                        prelude_list_t;
    #define             prelude_list_entry                  (item, type, member)
    #define             prelude_list_for_each               (list, pos)
    #define             prelude_list_for_each_safe          (list, pos, bkp)
    #define             prelude_list_for_each_reversed      (list, pos)
    #define             prelude_list_for_each_reversed_safe (list, pos, bkp)
    #define             prelude_list_for_each_continue      (list, pos)
    #define             prelude_list_for_each_continue_safe (list, pos, bkp)
    #define             prelude_list_get_next               (list, pos, class, member)
    #define             prelude_list_get_next_safe          (list, pos, bkp, class, member)

## Description

## Details

### PRELUDE_LIST()

    #define PRELUDE_LIST(item) prelude_list_t (item) = { &(item), &(item) }

`item` : |

### prelude_list_t

    typedef struct {
            struct prelude_list *next;
            struct prelude_list *prev;
    } prelude_list_t;

### prelude_list_entry()

    #define             prelude_list_entry(item, type, member)

Retrieve the entry of type `type` from the prelude_list_t object `tmp`, using the item list member `member`. Returns the entry associated with `item`.

`item` : | Pointer to a prelude_list_t object to retrieve the entry from.
`type` : | Type of the entry to retrieve.
`member` : | List member in `type` used to link it to a list.

### prelude_list_for_each()

    #define             prelude_list_for_each(list, pos)

Iterate through all `list` entry. `prelude_list_entry()` can be used to retrieve and entry from the `pos` pointer. It is not safe to call `prelude_list_del()` while iterating using this function, see `prelude_list_for_each_safe()`.

`list` : | Pointer to a prelude_list_t list.
`pos` : | Pointer to a prelude_list_t object pointing to the current list member.

### prelude_list_for_each_safe()

    #define             prelude_list_for_each_safe(list, pos, bkp)

Iterate through all `list` entry. `prelude_list_entry()` can be used to retrieve and entry from the `pos` pointer. Calling `prelude_list_del()` while iterating the list is safe.

`list` : | Pointer to a prelude_list_t list.
`pos` : | Pointer to a prelude_list_t object pointing to the current list member.
`bkp` : | Pointer to a prelude_list_t object pointing to the next list member.

### prelude_list_for_each_reversed()

    #define             prelude_list_for_each_reversed(list, pos)

Iterate through all `list` entry in reverse order. `prelude_list_entry()` can be used to retrieve and entry from the `pos` pointer. It is not safe to call `prelude_list_del()` while iterating using this function, see `prelude_list_for_each_reversed_safe()`.

`list` : | Pointer to a prelude_list_t list.
`pos` : | Pointer to a prelude_list_t object pointing to the current list member.

### prelude_list_for_each_reversed_safe()

    #define             prelude_list_for_each_reversed_safe(list, pos, bkp)

Iterate through all `list` entry in reverse order. `prelude_list_entry()` can be used to retrieve and entry from the `pos` pointer. Calling `prelude_list_del()` while iterating the list is safe.

`list` : | Pointer to a prelude_list_t list.
`pos` : | Pointer to a prelude_list_t object pointing to the current list member.
`bkp` : | Pointer to a prelude_list_t object pointing to the next list member.

### prelude_list_for_each_continue()

    #define             prelude_list_for_each_continue(list, pos)

Iterate through all `list` entry starting from `pos` if it is not NULL, or from the start of `list` if it is. `prelude_list_entry()` can be used to retrieve and entry from the `pos` pointer. Calling `prelude_list_del()` while iterating the list is not safe.

`list` : | Pointer to a prelude_list_t list.
`pos` : | Pointer to a prelude_list_t object pointing to the current list member.

### prelude_list_for_each_continue_safe()

    #define             prelude_list_for_each_continue_safe(list, pos, bkp)

Iterate through all `list` entry starting from `pos` if it is not NULL, or from the start of `list` if it is. `prelude_list_entry()` can be used to retrieve and entry from the `pos` pointer. Calling `prelude_list_del()` while iterating the list is safe.

`list` : | Pointer to a prelude_list_t list.
`pos` : | Pointer to a prelude_list_t object pointing to the current list member.
`bkp` : | Pointer to a prelude_list_t object pointing to the next list member.

### prelude_list_get_next()

    #define             prelude_list_get_next(list, pos, class, member)

`list` : |
`pos` : |
`class` : |
`member` : |

### prelude_list_get_next_safe()

    #define             prelude_list_get_next_safe(list, pos, bkp, class, member)

`list` : |
`pos` : |
`bkp` : |
`class` : |
`member` : |