-
Notifications
You must be signed in to change notification settings - Fork 0
dll_findkey
Taras Maliukh edited this page Apr 12, 2020
·
4 revisions
dll_obj_t *dll_findkey(const dll_t *restrict dll,
f_dll_obj_handler fn_serach,
void *restrict any_data);
dll_obj_t *dll_findkeyr(const dll_t *restrict dll,
f_dll_obj_handler fn_serach,
void *restrict any_data);-
dll_findkey: Find object by data(key) from start -
dll_findkeyr: Find object by data(key) from end
The third argument(any_data) provided for more flexible use. It's just will be the second argument to your fn_search handler
Pointer to desired object:
- when
fn_searchreturns a zero.
NULL:
- when
fn_serachreturns a negative value or if the desired object doesn't exist in the list -
dllis NULL - if
DLL_BIT_EIGNis not specified:-
fn_searchis NULL - list
dllhasn't any objects -
datainside at least 1 object is pointed to NULL
-