Ignore:
Timestamp:
02/27/08 07:13:31 (16 years ago)
Author:
Nicholas Riley
Message:

Jgraph: my changes - ANSIfication, few minor bug fixes; works on OS X 10.5 now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Jgraph/prio_list.h

    r418 r420  
    66 */
    77
    8 /* Priority lists are just like normal lists of list.h and list.c, except
    9  * that their third field is a (int) prioriy.  The routines of list.c should all
    10  * be used except for insert, because it will always put an item at the
    11  * end of a list.  Instead, use prio_insert, which will put the item
    12  * into its proper place in the list.  The last argument of prio_insert should
    13  * be TRUE if the list is to be kept in descending order; it should be FALSE
    14  * for ascending order.
     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 */
    1516
    16  * Priority list should be:
    17 
    18 struct prio_list {
     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 
     21typedef struct prio_list {
    1922  struct prio_list *flink;
    2023  struct prio_list *blink;
    2124  int prio;
    22   ...
    23   }
     25  /* ... */
     26} *Prio_list;
    2427
    25 */
     28typedef int Boolean;
    2629
    27 /* void prio_insert(node, list, descending); */
     30void prio_insert(void *node, void *list, Boolean descending);
    2831
Note: See TracChangeset for help on using the changeset viewer.