home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume10 / cbw / part01 / pqueue.h < prev    next >
Encoding:
C/C++ Source or Header  |  1987-06-16  |  555 b   |  25 lines

  1. /*
  2.  * Priority queue declarations.
  3.  *
  4.  * Bob Baldwin, February, 1985.
  5.  */
  6.  
  7. extern    int        pque_full(/* pque_hdr */);
  8. extern            pque_add(/* pque_hdr */);
  9. extern            pque_init(/* pque_hdr, min_score, pque_tab, pque_size */);
  10.  
  11. #define    pqueue_ent    struct xpqueue_ent
  12. pqueue_ent    {
  13.         float    score;
  14.         int        value1;
  15.         int        value2;
  16.         };
  17.  
  18. #define    pqueue_hdr    struct xpqueue_hdr
  19. pqueue_hdr    {
  20.         int            next_index;        /* Next free entry. */
  21.         int            pque_size;        /* Number of entries. */
  22.         float        max_score;        /* Score < max */
  23.         pqueue_ent    *pque_tab;        /* Ptr to first entry. */
  24.         };
  25.