8 if(( first == NULL )||( current == NULL )) {
11 if( *first == NULL ) {
12 *first = *current = calloc( 1,
sizeof(
JST_List ));
15 if( *current == NULL ) {
18 (*current)->next = calloc( 1,
sizeof(
JST_List ));
19 *current = (*current)->
next;
21 (*current)->
item = data;
26 if(( from == NULL )||( dest == NULL )||( assign == NULL )) {
30 for(
unsigned i = 0; iter; ++i ) {
31 assign( dest, i, iter->
item );
void(* LST_assign_t)(void *dest, unsigned index, void *src)
JST_Error JST_List_push_back(JST_List **first, JST_List **current, void *data)
JST_Error JST_List_move_to(JST_List *from, void *dest, LST_assign_t assign)
For each item in list, call assign to transfert ownership of items and free the list, node by node.
const JST_List JST_List_Zero