Mercurial > cgi-bin > hgwebdir.cgi > VMS > C_Libraries > PriorityQueue
comparison PriorityQueue.h @ 3:500d0e2fabfb
made pure C and added .brch__defaul and eol handling
| author | Me@portablequad |
|---|---|
| date | Sat, 11 Feb 2012 20:27:13 -0800 |
| parents | 9ecc993a29ea |
| children |
comparison
equal
deleted
inserted
replaced
| 0:a9b6426f2977 | 2:f12563e81194 |
|---|---|
| 7 | 7 |
| 8 #ifndef _PRIORITY_QUEUE_H | 8 #ifndef _PRIORITY_QUEUE_H |
| 9 #define _PRIORITY_QUEUE_H | 9 #define _PRIORITY_QUEUE_H |
| 10 | 10 |
| 11 #include <stdbool.h> | 11 #include <stdbool.h> |
| 12 | |
| 13 #include <limits.h> | |
| 14 #include <stdio.h> | |
| 15 #include <string.h> | |
| 12 | 16 |
| 13 typedef struct _PrioQueueStruc PrioQueueStruc; | 17 typedef struct _PrioQueueStruc PrioQueueStruc; |
| 14 typedef struct _heapNode heapNode; | 18 typedef struct _heapNode heapNode; |
| 15 | 19 |
| 16 struct _heapNode { | 20 struct _heapNode { |
| 23 int maxSize; | 27 int maxSize; |
| 24 | 28 |
| 25 heapNode *data; | 29 heapNode *data; |
| 26 }; | 30 }; |
| 27 | 31 |
| 28 PrioQueueStruc* makeVMSPrioQ(); | 32 PrioQueueStruc* makePrioQ(); |
| 29 void* getFirstPrioQ (PrioQueueStruc *Q); | 33 void* getFirstPrioQ (PrioQueueStruc *Q); |
| 30 void* popPrioQ (PrioQueueStruc *Q); | 34 void* popPrioQ (PrioQueueStruc *Q); |
| 31 bool insertPrioQ (void *val, int key, PrioQueueStruc *Q); | 35 bool insertPrioQ (void *val, int key, PrioQueueStruc *Q); |
| 32 void freePrioQ (PrioQueueStruc *Q); | 36 void freePrioQ (PrioQueueStruc *Q); |
| 33 | 37 |
