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

Linked-list functions

Filename: sfllist.h
Package: Standard Function Library (SFL)
Written: 97/07/28 iMatix SFL project team sfl@imatix.com
Revised: 98/02/27
Copyright: Copyright (c) 1991-98 iMatix

Synopsis

Provides functions to maintain doubly-linked lists. You can use these functions to work with lists of any structure. To make this work, all structures must start with two pointers, "void *next, *prev;". When you want to attach a linked-list to another structure, declare the list head as a list. You can then refer to this variable when you attach items to the list head. The code sets the global list_unsafe to TRUE whenever it is changing a list.

List of Functions

List of Symbol Definitions

sfllist.h defines these symbols, possibly conditionally:
Symbol: Defined as:
FORLIST(node,root) for ((node) = (root).next;
_SFLLIST_INCLUDED TRUE
list_create(node,size) if (((node) = mem_alloc (size)) != NULL)
list_empty(list) ((list)-> prev == (list))
list_relink_after(l,a) (list_relink (a, l, ((LIST *) a)-> next))
list_relink_before(l,b) (list_relink (((LIST *) b)-> prev, l, b))
list_reset(list) (list)-> prev = (list)-> next = (list)


| << | < | > | >> iMatix Copyright © 1996-98 iMatix