t_bool set_tail_pipe(i_set setid, s_iterator* iterator) { if (set_tail_ll(setid, iterator) != TRUE) CORE_FALSE(); CORE_TRUE(); }
/* * this function returns an iterator on the last node of the pipe. * * useful for the for_each macro. */ t_error set_tail_pipe(i_set setid, t_iterator* iterator) { t_error retval; SET_ENTER(set); retval = set_tail_ll(setid, iterator); SET_LEAVE(set, retval); }
t_error set_pop_pipe(i_set setid) { t_error retval; t_iterator iterator; SET_ENTER(set); if ((retval = set_tail_ll(setid, &iterator)) != ERROR_NONE) SET_LEAVE(set, retval); retval = set_delete_ll(setid, iterator); SET_LEAVE(set, retval); }
t_error set_pick_pipe(i_set setid, void** data) { t_error retval; t_iterator iterator; SET_ENTER(set); if ((retval = set_tail_ll(setid, &iterator)) != ERROR_NONE) SET_LEAVE(set, retval); retval = set_object_ll(setid, iterator, data); SET_LEAVE(set, retval); }
t_status set_pop_pipe(i_set setid) { s_iterator iterator; /* * 1) */ if (set_tail_ll(setid, &iterator) != TRUE) CORE_ESCAPE("unable to locate the tail object in the linked-list set"); /* * 2) */ if (set_delete_ll(setid, iterator) != STATUS_OK) CORE_ESCAPE("unable to delete the object"); CORE_LEAVE(); }
t_status set_pick_pipe(i_set setid, void** data) { s_iterator iterator; /* * 1) */ if (set_tail_ll(setid, &iterator) != TRUE) CORE_ESCAPE("unable to locate the tail object in the linked-list set"); /* * 2) */ if (set_object_ll(setid, iterator, data) != STATUS_OK) CORE_ESCAPE("unable to retrieve the object"); CORE_LEAVE(); }