-
Notifications
You must be signed in to change notification settings - Fork 0
dll_dup*
Taras Maliukh edited this page Apr 15, 2020
·
1 revision
dll_t *dll_dup(const dll_t *restrict dll,
size_t start,
size_t n);
dll_t *dll_dupkey(const dll_t *restrict dll,
dll_obj_handler_fn_t,
void *restrict any_data,
size_t start,
size_t n);
dll_dup: Creating a duplicate list with at most n
objects from dll
list, starting from start
indexed object.
dll_dupkey: The same as dll_dup, but duplicating only objects for which fn_match
handler returns a zero.
Pointer to new duplicated list otherwise NULL if:
-
dll
is NULL - failed to allocate memory for new list
- if
DLL_BIT_EIGN
is not specified:- list
dll
hasn't any objects - object with index
start
doesn't exit indll
list - failed to duplicate at least 1 object
- list