| iMatix home page
| << | < | > | >>
SFL Logo SFL
Version 2.11

 

list_unlink

#include "sfllist.h"
void *
list_unlink (
    void *list)

Synopsis

Unlinks the list from any list it may be in. Returns list.

Source Code - (sfllist.c)

{
    list_unsafe = TRUE;

    /*  Join together next and previous nodes */
    ((LIST *) ((LIST *) list)-> prev)-> next = ((LIST *) list)-> next;
    ((LIST *) ((LIST *) list)-> next)-> prev = ((LIST *) list)-> prev;

    /*  The list is now empty */
    list_reset ((LIST *) list);

    list_unsafe = FALSE;
    return (list);
}

| << | < | > | >> iMatix Copyright © 1996-2000 iMatix Corporation