Skip to content

dll_print*

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

Synopsis:

int dll_printone(const dll_obj_t *restrict dll_obj,
    f_dll_obj_handler_index fn_print_idx,
    size_t idx);

bool dll_print(const dll_t *restrict dll,
    f_dll_obj_handler_index fn_print_idx);
bool dll_printr(const dll_t *restrict dll,
    f_dll_obj_handler_index fn_print_idx);

size_t dll_printn(const dll_t *restrict dll,
    f_dll_obj_handler_index fn_print_idx,
    size_t start,
    size_t n);
size_t dll_printnr(const dll_t *restrict dll,
    f_dll_obj_handler_index fn_print_idx,
    size_t start,
    size_t n);

Description:

  • dll_print: Print all objects via fn_print_idx from begin
  • dll_printr: Print all objects via fn_print_idx from end
  • dll_printn: Printing at most n objects starts from index start via fn_print_idx to end of list
  • dll_printnr: Printing at most n objects starts from index start via fn_print_idx to start of list

Return value:

true or count of printed objects otherwise false if:

  • dll is NULL
  • if DLL_BIT_EIGN is not specified:
    • fn_print_idx is NULL
    • list dll hasn't any objects
    • data inside at least 1 object is pointed to NULL
    • fn_print_idx handler returns a negative value
Clone this wiki locally