home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / IRIT / IRITS.ZIP / PRIORQG.H < prev    next >
Encoding:
C/C++ Source or Header  |  1990-05-05  |  1.1 KB  |  30 lines

  1. /*****************************************************************************
  2. *   "Irit" - the 3d polygonal solid modeller.                     *
  3. *                                         *
  4. * Written by:  Gershon Elber                Ver 0.2, Mar. 1990   *
  5. ******************************************************************************
  6. * Definitions, visible to others, of Priority Queue module:             *
  7. *****************************************************************************/
  8.  
  9. #ifndef PRIOR_Q_GH
  10. #define PRIOR_Q_GH
  11.  
  12. typedef struct PriorQue {
  13.     struct PriorQue *Right, *Left;     /* Pointers to two sons of this node. */
  14.     VoidPtr Data;                 /* Pointers to the data itself. */
  15. } PriorQue;
  16.  
  17. /* And global function prototypes: */
  18.  
  19. void PQInit(PriorQue **PQ);
  20. int PQEmpty(PriorQue *PQ);
  21. void PQCompFunc(int (*PQCompFunc)());
  22. VoidPtr PQFirst(PriorQue **PQ, int Delete);
  23. VoidPtr PQInsert(PriorQue **PQ, VoidPtr NewItem);
  24. VoidPtr PQDelete(PriorQue **PQ, VoidPtr NewItem);
  25. VoidPtr PQNext(PriorQue *PQ, VoidPtr CmpItem, VoidPtr BiggerThan);
  26. void PQPrint(PriorQue *PQ, void (*PrintFunc)());
  27. void PQFree(PriorQue *PQ, int FreeItems);
  28.  
  29. #endif /* PRIOR_Q_GH */
  30.