Mercurial > cgi-bin > hgwebdir.cgi > VMS > C_Libraries > Histogram
diff Histogram.c @ 34:8166ea441cb5
changed headers and PR_int__malloc to PR__malloc
| author | Sean Halle <seanhalle@yahoo.com> |
|---|---|
| date | Tue, 23 Jul 2013 07:32:47 -0700 |
| parents | 84601ecae690 |
| children | eb23eeae4198 |
line diff
1.1 --- a/Histogram.c Mon Jul 22 06:21:53 2013 -0700 1.2 +++ b/Histogram.c Tue Jul 23 07:32:47 2013 -0700 1.3 @@ -8,7 +8,7 @@ 1.4 #include <stdio.h> 1.5 #include <string.h> 1.6 #include "Histogram.h" 1.7 - 1.8 +#include "PR__common_includes/Services_offered_by_PR/Memory_Handling/vmalloc__wrapper_library.h" 1.9 1.10 /*This Histogram Abstract Data Type has a number of bins plus a range of 1.11 * values that the bins span, both chosen at creation. 1.12 @@ -29,8 +29,8 @@ 1.13 int32 i; 1.14 1.15 1.16 - hist = PR_int__malloc( sizeof(Histogram) ); 1.17 - hist->bins = PR_int__malloc( numBins * sizeof(int32) ); 1.18 + hist = PR__malloc( sizeof(Histogram) ); 1.19 + hist->bins = PR__malloc( numBins * sizeof(int32) ); 1.20 1.21 hist->numBins = numBins; 1.22 hist->binWidth = (endOfRange - startOfRange) / numBins; 1.23 @@ -66,8 +66,8 @@ 1.24 { 1.25 Histogram *hist; 1.26 1.27 - hist = PR_int__malloc( sizeof(Histogram) ); 1.28 - hist->bins = PR_int__malloc( numBins * sizeof(int32) ); 1.29 + hist = PR__malloc( sizeof(Histogram) ); 1.30 + hist->bins = PR__malloc( numBins * sizeof(int32) ); 1.31 1.32 char *nameCopy = (char *)PR_int__strDup(name); 1.33 makeHist_helper( hist, numBins, startOfRange, binWidth, nameCopy); 1.34 @@ -298,9 +298,9 @@ 1.35 void 1.36 freeHist( Histogram *hist ) 1.37 { 1.38 - PR_int__free( hist->bins ); 1.39 - PR_int__free( hist->name ); 1.40 - PR_int__free( hist ); 1.41 + PR__free( hist->bins ); 1.42 + PR__free( hist->name ); 1.43 + PR__free( hist ); 1.44 } 1.45 void 1.46 freeHistExt( Histogram *hist )
