File: prio_list.h

package info (click to toggle)
jgraph 83-19
  • links: PTS
  • area: main
  • in suites: woody
  • size: 624 kB
  • ctags: 445
  • sloc: ansic: 4,728; makefile: 186; sh: 106; awk: 104
file content (28 lines) | stat: -rw-r--r-- 800 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* 
 * $Source: /tmp_mnt/n/fs/grad1/jsp/src/jgraph/RCS/prio_list.h,v $
 * $Revision: 8.3 $
 * $Date: 92/11/30 11:42:34 $
 * $Author: jsp $
 */

/* Priority lists are just like normal lists of list.h and list.c, except
 * that their third field is a (int) prioriy.  The routines of list.c should all
 * be used except for insert, because it will always put an item at the 
 * end of a list.  Instead, use prio_insert, which will put the item
 * into its proper place in the list.  The last argument of prio_insert should
 * be TRUE if the list is to be kept in descending order; it should be FALSE
 * for ascending order.

 * Priority list should be:

struct prio_list {
  struct prio_list *flink;
  struct prio_list *blink;
  int prio;
  ...
  }

*/

/* void prio_insert(node, list, descending); */