gdl_swap 3 2016-03-06 genlist manual

NAME

gdl_swap - swap two elements on a list

SYNPOSIS

void gdl_swap(gdl_list_t *list, itemtype *elema, itemtype *elemb, fieldname *field)

DESCRIPTION

gdl_swap swaps elema and elemb. This changes only the order of elements on the list.

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

This call is implemented as function-like macro evaluating to void.

Arguments:
list A list of which elem should be removed from. May not be NULL.
elema, elemb The elements; pointers 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_swap 3 2016-03-06 genlist manual