Skip to content

dll_findkey

Taras Maliukh edited this page Apr 11, 2020 · 4 revisions

Synopsis:

dll_obj_t *dll_findkey(dll_t *restrict dll,
    f_dll_obj_handler fn_serach);
dll_obj_t *dll_findkeyr(dll_t *restrict dll,
    f_dll_obj_handler fn_serach);

Description:

  • dll_findkey: Find object by data(key) from start
  • dll_findkeyr: Find object by data(key) from end

Return value:

Pointer to desired object:

  • when fn_search returns a zero.

NULL:

  • when fn_serach returns a negative value or if the desired object doesn't exist in the list
  • dll is NULL
  • if DLL_BIT_EIGN is not specified:
    • fn_search is NULL
    • list dll hasn't any objects
    • data inside at least 1 object is pointed to NULL
Clone this wiki locally