/* Move a node before an other node in the same linked list  */
void _lv_ll_move_before(lv_ll_t *ll_p, void *n_act, void *n_after)
/* Move a node before an other node in the same linked list  */
void _lv_ll_move_before(lv_ll_t *ll_p, void *n_act, void *n_after)
{
    if(n_act == n_after) return;
    void * n_before;
    if(n_after != NULL)
        n_before = _lv_ll_get_prev(ll_p, n_after);
    else
        n_before = _lv_ll_get_tail(ll_p);
    if(n_act == n_before) return;
    _lv_ll_remove(ll_p, n_act);
    node_set_next(ll_p, n_before, n_act);
    node_set_prev(ll_p, n_act, n_before);
    node_set_prev(ll_p, n_after, n_act);
    node_set_next(ll_p, n_act, n_after);
    if(n_after == NULL) ll_p->tail = n_act;
    if(n_before == NULL) ll_p->head = n_act;
}