engine/source/scriptlib/List.c
/* build indices for entire list
   the indices will be destroyed whenever an element is either
   inserted or removed from the list,
   except if it was the last node/inserted after the last node */
build indices for entire list
the indices will be destroyed whenever an element is either
inserted or removed from the list,
except if it was the last node/inserted after the last node
build indices for entire list the indices will be destroyed whenever an element is either inserted or removed from the list except if it was the last node / inserted after the last node
void List_CreateIndices(List *list)
{
#ifdef DEBUG
    chklist((List *)list);
#endif
    Node *n = list->first;
    size_t index = 0;
    while(n)
    {
        List_AddIndex(list, n, index);
        index++;
        n = n->next;
    }
}
void List_CreateIndices ( List * list ) { #ifdef DEBUG chklist ( ( List * ) list ) ; #endif Node * n = list -> first ; size_t index = 0 ; while ( n ) { List_AddIndex ( list , n , index ) ; index ++ ; n = n -> next ; } }
build indices for entire list
the indices will be destroyed whenever an element is either
inserted or removed from the list,
except if it was the last node/inserted after the last node
build indices for entire list the indices will be destroyed whenever an element is either inserted or removed from the list except if it was the last node / inserted after the last node