gdl_append, gdl_insert 3 2016-03-06 genlist manual

NAME

gdl_append, gdl_insert - enter new item as last or first of the list

SYNPOSIS

void gdl_append(gdl_list_t *list, itemtype *elem, fieldname *field)

void gdl_insert(gdl_list_t *list, itemtype *elem, fieldname *field)

DESCRIPTION

gdl_append appends elem at the end of the list, making it the last item on the list. gdl_insert inserts elem at the beginning of the list, making it the first item on the list.

The list must consists of items with the same link-offset; this is assured using field.

Both calls are implemented as function-like macros evaluating to void.

Arguments:
list A list of which elem should be appended or inserted to. May not be NULL.
elem The element; pointer to a struct with complete type (fields known); may not be NULL.
field Structure field name that is used for linking. The field must be of type gdl_elem_t (not a pointer).

SEE ALSO

gdl_append, gdl_insert 3 2016-03-06 genlist manual