comparison DblHist.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
comparison
equal deleted inserted replaced
9:2517b24afafb 10:476a172f49fa
26 makeDblHistogram( int32 numBins, float64 startOfRange, float64 binWidth ) 26 makeDblHistogram( int32 numBins, float64 startOfRange, float64 binWidth )
27 { 27 {
28 DblHist *hist; 28 DblHist *hist;
29 int i; 29 int i;
30 30
31 hist = PR_int__malloc( sizeof(DblHist) ); 31 hist = PR__malloc( sizeof(DblHist) );
32 hist->bins = PR_int__malloc( numBins * sizeof(int) ); 32 hist->bins = PR__malloc( numBins * sizeof(int) );
33 33
34 hist->numBins = numBins; 34 hist->numBins = numBins;
35 hist->binWidth = binWidth; 35 hist->binWidth = binWidth;
36 hist->endOfRange = startOfRange + hist->binWidth * numBins; 36 hist->endOfRange = startOfRange + hist->binWidth * numBins;
37 hist->startOfRange = startOfRange; 37 hist->startOfRange = startOfRange;
100 100
101 101
102 void 102 void
103 freeDblHist( DblHist *hist ) 103 freeDblHist( DblHist *hist )
104 { 104 {
105 PR_int__free( hist->bins ); 105 PR__free( hist->bins );
106 PR_int__free( hist ); 106 PR__free( hist );
107 } 107 }