source: trunk/Jgraph/list.h@ 418

Last change on this file since 418 was 418, checked in by Nicholas Riley, 16 years ago

Jgraph 8.3 from http://www.cs.utk.edu/~plank/plank/jgraph/jgraph.tar.gz

File size: 991 bytes
RevLine 
[418]1/*
2 * $Source: /tmp_mnt/n/fs/grad1/jsp/src/jgraph/RCS/list.h,v $
3 * $Revision: 8.3 $
4 * $Date: 92/11/30 11:42:27 $
5 * $Author: jsp $
6 */
7
8/* This is the header file for the list manipulation routines in list.c.
9 * Any struct can be turned into a list as long as its first two fields are
10 * flink and blink. */
11
12typedef struct list {
13 struct list *flink;
14 struct list *blink;
15} *List;
16
17/* Nil, first, next, and prev are macro expansions for list traversal
18 * primitives. */
19
20#define nil(l) (l)
21#define first(l) (l->flink)
22#define last(l) (l->blink)
23#define next(n) (n->flink)
24#define prev(n) (n->blink)
25
26/* These are the routines for manipluating lists */
27
28/* void insert(node list); Inserts a node to the end of a list */
29/* void delete_item(node); Deletes an arbitrary node */
30/* List make_list(node_size); Creates a new list */
31/* List get_node(list); Allocates a node to be inserted into the list */
32/* void free_node(node, list); Deallocates a node from the list */
33
Note: See TracBrowser for help on using the repository browser.