You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							29 lines
						
					
					
						
							1.0 KiB
						
					
					
				
			
		
		
		
			
			
			
		
		
	
	
							29 lines
						
					
					
						
							1.0 KiB
						
					
					
				| /***************************************************************************** | |
| * Definitions, visible to others, of Priority Queue module:			  * | |
| *****************************************************************************/ | |
| 
 | |
| #ifndef PRIOR_Q_GH | |
| #define PRIOR_Q_GH | |
|  | |
| typedef struct PriorQue | |
| 	{ | |
| 	struct PriorQue *Right, *Left;	/* Pointers to two sons of this node. */ | |
| 	void * Data;				  /* Pointers to the data itself. */ | |
| 	} PriorQue; | |
| 
 | |
| typedef int (*PQCompFuncType)( void *, void *);	  /* Comparison function. */ | |
| 
 | |
| /* And global function prototypes: */ | |
| void PQInit(PriorQue **PQ); | |
| int PQEmpty(PriorQue *PQ); | |
| void PQCompFunc(PQCompFuncType NewCompFunc); | |
| void * PQFirst(PriorQue **PQ, int Delete); | |
| void * PQInsert(PriorQue **PQ, void * NewItem); | |
| void * PQDelete(PriorQue **PQ, void * NewItem); | |
| void * PQFind(PriorQue *PQ, void * OldItem); | |
| void * PQNext(PriorQue *PQ, void * CmpItem, void * BiggerThan); | |
| void PQPrint(PriorQue *PQ, void (*PrintFunc)()); | |
| void PQFree(PriorQue *PQ, int FreeItems); | |
| void PQFreeFunc(PriorQue *PQ, void (*FreeFunc)(void *)); | |
| 
 | |
| #endif /* PRIOR_Q_GH */
 |