changeset 34:8166ea441cb5 PR_univ

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 bd0983657058
children eb23eeae4198
files DblHist.c FloatHist.c Histogram.c Histogram.h
diffstat 4 files changed, 19 insertions(+), 17 deletions(-) [+]
line diff
     1.1 --- a/DblHist.c	Mon Jul 22 06:21:53 2013 -0700
     1.2 +++ b/DblHist.c	Tue Jul 23 07:32:47 2013 -0700
     1.3 @@ -28,8 +28,8 @@
     1.4     DblHist *hist;
     1.5     int i;
     1.6  
     1.7 -   hist = PR_int__malloc( sizeof(DblHist) );
     1.8 -   hist->bins = PR_int__malloc( numBins * sizeof(int) );
     1.9 +   hist = PR__malloc( sizeof(DblHist) );
    1.10 +   hist->bins = PR__malloc( numBins * sizeof(int) );
    1.11  
    1.12     hist->numBins      = numBins;
    1.13     hist->binWidth     = binWidth;
    1.14 @@ -102,6 +102,6 @@
    1.15  void
    1.16  freeDblHist( DblHist *hist )
    1.17   {
    1.18 -   PR_int__free( hist->bins );
    1.19 -   PR_int__free( hist );
    1.20 +   PR__free( hist->bins );
    1.21 +   PR__free( hist );
    1.22   }
     2.1 --- a/FloatHist.c	Mon Jul 22 06:21:53 2013 -0700
     2.2 +++ b/FloatHist.c	Tue Jul 23 07:32:47 2013 -0700
     2.3 @@ -26,8 +26,8 @@
     2.4     FloatHist *hist;
     2.5     int i;
     2.6  
     2.7 -   hist = PR_int__malloc( sizeof(FloatHist) );
     2.8 -   hist->bins = PR_int__malloc( numBins * sizeof(int) );
     2.9 +   hist = PR__malloc( sizeof(FloatHist) );
    2.10 +   hist->bins = PR__malloc( numBins * sizeof(int) );
    2.11  
    2.12     hist->numBins      = numBins;
    2.13     hist->binWidth     = binWidth;
    2.14 @@ -100,6 +100,6 @@
    2.15  void
    2.16  freeFloatHist( FloatHist *hist )
    2.17   {
    2.18 -   PR_int__free( hist->bins );
    2.19 -   PR_int__free( hist );
    2.20 +   PR__free( hist->bins );
    2.21 +   PR__free( hist );
    2.22   }
     3.1 --- a/Histogram.c	Mon Jul 22 06:21:53 2013 -0700
     3.2 +++ b/Histogram.c	Tue Jul 23 07:32:47 2013 -0700
     3.3 @@ -8,7 +8,7 @@
     3.4  #include <stdio.h>
     3.5  #include <string.h>
     3.6  #include "Histogram.h"
     3.7 -
     3.8 +#include "PR__common_includes/Services_offered_by_PR/Memory_Handling/vmalloc__wrapper_library.h"
     3.9  
    3.10  /*This Histogram Abstract Data Type has a number of bins plus a range of
    3.11   * values that the bins span, both chosen at creation.
    3.12 @@ -29,8 +29,8 @@
    3.13     int32 i;
    3.14  
    3.15  
    3.16 -   hist = PR_int__malloc( sizeof(Histogram) );
    3.17 -   hist->bins = PR_int__malloc( numBins * sizeof(int32) );
    3.18 +   hist = PR__malloc( sizeof(Histogram) );
    3.19 +   hist->bins = PR__malloc( numBins * sizeof(int32) );
    3.20  
    3.21     hist->numBins      = numBins;
    3.22     hist->binWidth     = (endOfRange - startOfRange) / numBins;
    3.23 @@ -66,8 +66,8 @@
    3.24   {
    3.25     Histogram *hist;
    3.26  
    3.27 -   hist = PR_int__malloc( sizeof(Histogram) );
    3.28 -   hist->bins = PR_int__malloc( numBins * sizeof(int32) );
    3.29 +   hist = PR__malloc( sizeof(Histogram) );
    3.30 +   hist->bins = PR__malloc( numBins * sizeof(int32) );
    3.31  
    3.32     char *nameCopy = (char *)PR_int__strDup(name);
    3.33     makeHist_helper( hist, numBins, startOfRange, binWidth, nameCopy);
    3.34 @@ -298,9 +298,9 @@
    3.35  void
    3.36  freeHist( Histogram *hist )
    3.37   {
    3.38 -   PR_int__free( hist->bins );
    3.39 -   PR_int__free( hist->name );
    3.40 -   PR_int__free( hist );
    3.41 +   PR__free( hist->bins );
    3.42 +   PR__free( hist->name );
    3.43 +   PR__free( hist );
    3.44   }
    3.45  void
    3.46  freeHistExt( Histogram *hist )
     4.1 --- a/Histogram.h	Mon Jul 22 06:21:53 2013 -0700
     4.2 +++ b/Histogram.h	Tue Jul 23 07:32:47 2013 -0700
     4.3 @@ -6,11 +6,13 @@
     4.4   * 
     4.5   */
     4.6  
     4.7 -#include "PR__application_includes/PR__application.h"
     4.8  
     4.9  #ifndef _HISTOGRAM_H
    4.10  #define	_HISTOGRAM_H
    4.11  
    4.12 +#include "PR__common_includes/PR__primitive_data_types.h"
    4.13 +
    4.14 +
    4.15  typedef struct
    4.16   {
    4.17     char  *name;