Mercurial > cgi-bin > hgwebdir.cgi > VMS > C_Libraries > PriorityQueue
changeset 10:ee94893d2843 MC_shared
fixed includes for refactored VMS dir structure
| author | Some Random Person <seanhalle@yahoo.com> |
|---|---|
| date | Mon, 14 May 2012 16:24:26 -0700 |
| parents | 40cad2a2fffc |
| children | 0de14128ff68 |
| files | PriorityQueue.c PriorityQueue.h |
| diffstat | 2 files changed, 4 insertions(+), 12 deletions(-) [+] |
line diff
1.1 --- a/PriorityQueue.c Fri Mar 02 18:15:20 2012 +0100 1.2 +++ b/PriorityQueue.c Mon May 14 16:24:26 2012 -0700 1.3 @@ -10,20 +10,11 @@ 1.4 #include <string.h> 1.5 1.6 #include "PriorityQueue.h" 1.7 -#ifndef DEBUG 1.8 -#include "../../VMS_Implementations/VMS_impl/vmalloc.h" 1.9 -#endif 1.10 1.11 #define left(i) 2*i 1.12 #define right(i) 2*i+1 1.13 #define parent(i) i/2 1.14 1.15 -#ifdef DEBUG 1.16 -#include <stdlib.h> 1.17 -#define VMS_WL__malloc malloc 1.18 -#define VMS_WL__free free 1.19 -#endif 1.20 - 1.21 void swap (PrioQueueStruc *Q, int a, int b) { 1.22 void *valTmp; 1.23 int keyTmp; 1.24 @@ -69,13 +60,13 @@ 1.25 newSize= 2*oldSize; 1.26 1.27 Q->maxSize= newSize; 1.28 - newData= VMS_WL__malloc(Q->maxSize*sizeof(heapNode)); 1.29 + newData= VMS_PI__malloc(Q->maxSize*sizeof(heapNode)); 1.30 oldData= Q->data; 1.31 1.32 memcpy(newData,oldData,Q->maxSize*sizeof(heapNode)); 1.33 Q->data= newData; 1.34 1.35 - VMS_WL__free(oldData); 1.36 + VMS_PI__free(oldData); 1.37 } 1.38 1.39
2.1 --- a/PriorityQueue.h Fri Mar 02 18:15:20 2012 +0100 2.2 +++ b/PriorityQueue.h Mon May 14 16:24:26 2012 -0700 2.3 @@ -9,8 +9,9 @@ 2.4 #define _PRIORITY_QUEUE_H 2.5 2.6 #include <stdbool.h> 2.7 +#include <stdio.h> 2.8 2.9 -#include "../../VMS_Implementations/VMS_impl/VMS_primitive_data_types.h" 2.10 +#include "VMS_impl/Services_Offered_by_VMS/Memory_Handling/vmalloc.h" 2.11 2.12 typedef struct _PrioQueueStruc PrioQueueStruc; 2.13 typedef struct _heapNode heapNode;
