Last change
on this file since 660 was 420, checked in by Nicholas Riley, 17 years ago |
Jgraph: my changes - ANSIfication, few minor bug fixes; works on OS X 10.5 now
|
File size:
993 bytes
|
Rev | Line | |
---|
[418] | 1 | /*
|
---|
| 2 | * $Source: /tmp_mnt/n/fs/grad1/jsp/src/jgraph/RCS/prio_list.h,v $
|
---|
| 3 | * $Revision: 8.3 $
|
---|
| 4 | * $Date: 92/11/30 11:42:34 $
|
---|
| 5 | * $Author: jsp $
|
---|
| 6 | */
|
---|
| 7 |
|
---|
[420] | 8 | /* Priority lists are just like normal lists of list.h and list.c,
|
---|
| 9 | * except that their third field is a (int) priority. The routines of
|
---|
| 10 | * list.c should all be used except for insert, because it will always
|
---|
| 11 | * put an item at the end of a list. Instead, use prio_insert, which
|
---|
| 12 | * will put the item into its proper place in the list. The last
|
---|
| 13 | * argument of prio_insert should be TRUE if the list is to be kept in
|
---|
| 14 | * descending order; it should be FALSE for ascending order.
|
---|
| 15 | */
|
---|
[418] | 16 |
|
---|
[420] | 17 | /* A priority list is any list with the first three fields being flink,
|
---|
| 18 | * blink and prio. Use the routines of list.c to do everything except
|
---|
| 19 | * insertion */
|
---|
| 20 |
|
---|
| 21 | typedef struct prio_list {
|
---|
[418] | 22 | struct prio_list *flink;
|
---|
| 23 | struct prio_list *blink;
|
---|
| 24 | int prio;
|
---|
[420] | 25 | /* ... */
|
---|
| 26 | } *Prio_list;
|
---|
[418] | 27 |
|
---|
[420] | 28 | typedef int Boolean;
|
---|
[418] | 29 |
|
---|
[420] | 30 | void prio_insert(void *node, void *list, Boolean descending);
|
---|
[418] | 31 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.