# HG changeset patch # User Sean Halle # Date 1374589967 25200 # Node ID 8166ea441cb533aeff9c86cb4b3daa0f89e1895c # Parent bd09836570584fc3938c9c1b130d30d5b658561f changed headers and PR_int__malloc to PR__malloc diff -r bd0983657058 -r 8166ea441cb5 DblHist.c --- a/DblHist.c Mon Jul 22 06:21:53 2013 -0700 +++ b/DblHist.c Tue Jul 23 07:32:47 2013 -0700 @@ -28,8 +28,8 @@ DblHist *hist; int i; - hist = PR_int__malloc( sizeof(DblHist) ); - hist->bins = PR_int__malloc( numBins * sizeof(int) ); + hist = PR__malloc( sizeof(DblHist) ); + hist->bins = PR__malloc( numBins * sizeof(int) ); hist->numBins = numBins; hist->binWidth = binWidth; @@ -102,6 +102,6 @@ void freeDblHist( DblHist *hist ) { - PR_int__free( hist->bins ); - PR_int__free( hist ); + PR__free( hist->bins ); + PR__free( hist ); } diff -r bd0983657058 -r 8166ea441cb5 FloatHist.c --- a/FloatHist.c Mon Jul 22 06:21:53 2013 -0700 +++ b/FloatHist.c Tue Jul 23 07:32:47 2013 -0700 @@ -26,8 +26,8 @@ FloatHist *hist; int i; - hist = PR_int__malloc( sizeof(FloatHist) ); - hist->bins = PR_int__malloc( numBins * sizeof(int) ); + hist = PR__malloc( sizeof(FloatHist) ); + hist->bins = PR__malloc( numBins * sizeof(int) ); hist->numBins = numBins; hist->binWidth = binWidth; @@ -100,6 +100,6 @@ void freeFloatHist( FloatHist *hist ) { - PR_int__free( hist->bins ); - PR_int__free( hist ); + PR__free( hist->bins ); + PR__free( hist ); } diff -r bd0983657058 -r 8166ea441cb5 Histogram.c --- a/Histogram.c Mon Jul 22 06:21:53 2013 -0700 +++ b/Histogram.c Tue Jul 23 07:32:47 2013 -0700 @@ -8,7 +8,7 @@ #include #include #include "Histogram.h" - +#include "PR__common_includes/Services_offered_by_PR/Memory_Handling/vmalloc__wrapper_library.h" /*This Histogram Abstract Data Type has a number of bins plus a range of * values that the bins span, both chosen at creation. @@ -29,8 +29,8 @@ int32 i; - hist = PR_int__malloc( sizeof(Histogram) ); - hist->bins = PR_int__malloc( numBins * sizeof(int32) ); + hist = PR__malloc( sizeof(Histogram) ); + hist->bins = PR__malloc( numBins * sizeof(int32) ); hist->numBins = numBins; hist->binWidth = (endOfRange - startOfRange) / numBins; @@ -66,8 +66,8 @@ { Histogram *hist; - hist = PR_int__malloc( sizeof(Histogram) ); - hist->bins = PR_int__malloc( numBins * sizeof(int32) ); + hist = PR__malloc( sizeof(Histogram) ); + hist->bins = PR__malloc( numBins * sizeof(int32) ); char *nameCopy = (char *)PR_int__strDup(name); makeHist_helper( hist, numBins, startOfRange, binWidth, nameCopy); @@ -298,9 +298,9 @@ void freeHist( Histogram *hist ) { - PR_int__free( hist->bins ); - PR_int__free( hist->name ); - PR_int__free( hist ); + PR__free( hist->bins ); + PR__free( hist->name ); + PR__free( hist ); } void freeHistExt( Histogram *hist ) diff -r bd0983657058 -r 8166ea441cb5 Histogram.h --- a/Histogram.h Mon Jul 22 06:21:53 2013 -0700 +++ b/Histogram.h Tue Jul 23 07:32:47 2013 -0700 @@ -6,11 +6,13 @@ * */ -#include "PR__application_includes/PR__application.h" #ifndef _HISTOGRAM_H #define _HISTOGRAM_H +#include "PR__common_includes/PR__primitive_data_types.h" + + typedef struct { char *name;