Changeset 420 for trunk/Jgraph/prio_list.c
- Timestamp:
- 02/27/08 07:13:31 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Jgraph/prio_list.c
r418 r420 10 10 #include <stdio.h> 11 11 12 typedef int Boolean;13 14 /* A prioirity list is any list with the first three fields being flink,15 * blink and prio. Use the routines of list.c to do everything except16 * insertion */17 18 typedef struct prio_list {19 struct prio_list *flink;20 struct prio_list *blink;21 int prio;22 } *Prio_list;23 12 24 13 /* Prio_insert inserts nodes into their proper places in priority lists. It first … … 26 15 * Thus, it is worst case linear, but for most cases constant time (right). */ 27 16 28 prio_insert(node, list, desc) 29 Prio_list node; 30 Prio_list list; 31 Boolean desc; 17 void prio_insert(void *n, void *l, Boolean desc) 32 18 { 33 Prio_list p ;19 Prio_list p, node = (Prio_list)n, list = (Prio_list)l; 34 20 35 21 /* Check nil and head of list */
Note:
See TracChangeset
for help on using the changeset viewer.