|
| iMatix home page | << | < | > | >> |
SFLVersion 2.11 |
#include "sfllist.h"
void *
list_relink (
void *left,
void *list,
void *right)
Links the list into a linked list. This is a general-purpose function that can be used to attach and remove lists anywhere in a list. Sets the global variable 'list_unsafe' while the list is being changed. Returns the address of list.
{
LIST *swap;
list_unsafe = TRUE;
swap = ((LIST *) left)-> next; /* Exchange left pointers */
((LIST *) left)-> next = list;
((LIST *) ((LIST *) list)-> prev)-> next = swap;
swap = ((LIST *) right)-> prev; /* Exchange right pointers */
((LIST *) right)-> prev = ((LIST *) list)-> prev;
((LIST *) list)-> prev = swap;
list_unsafe = FALSE;
return (list);
}
| | << | < | > | >> |
|