comparison Histogram.c @ 30:0369391d1ff0

Renamed VMS to PR, in new branch
author Sean Halle <seanhalle@yahoo.com>
date Mon, 03 Sep 2012 15:08:41 -0700
parents 6cee2e00eacb
children 84601ecae690
comparison
equal deleted inserted replaced
15:b122b7590653 21:4d787bf99c16
27 { 27 {
28 Histogram *hist; 28 Histogram *hist;
29 int32 i; 29 int32 i;
30 30
31 31
32 hist = VMS_int__malloc( sizeof(Histogram) ); 32 hist = PR_int__malloc( sizeof(Histogram) );
33 hist->bins = VMS_int__malloc( numBins * sizeof(int32) ); 33 hist->bins = PR_int__malloc( numBins * sizeof(int32) );
34 34
35 hist->numBins = numBins; 35 hist->numBins = numBins;
36 hist->binWidth = (endOfRange - startOfRange) / numBins; 36 hist->binWidth = (endOfRange - startOfRange) / numBins;
37 hist->endOfRange = startOfRange + hist->binWidth * numBins; 37 hist->endOfRange = startOfRange + hist->binWidth * numBins;
38 hist->startOfRange = startOfRange; 38 hist->startOfRange = startOfRange;
64 char *name ) 64 char *name )
65 65
66 { 66 {
67 Histogram *hist; 67 Histogram *hist;
68 68
69 hist = VMS_int__malloc( sizeof(Histogram) ); 69 hist = PR_int__malloc( sizeof(Histogram) );
70 hist->bins = VMS_int__malloc( numBins * sizeof(int32) ); 70 hist->bins = PR_int__malloc( numBins * sizeof(int32) );
71 71
72 char *nameCopy = (char *)VMS_int__strDup(name); 72 char *nameCopy = (char *)PR_int__strDup(name);
73 makeHist_helper( hist, numBins, startOfRange, binWidth, nameCopy); 73 makeHist_helper( hist, numBins, startOfRange, binWidth, nameCopy);
74 74
75 return hist; 75 return hist;
76 } 76 }
77 77
296 } 296 }
297 297
298 void 298 void
299 freeHist( Histogram *hist ) 299 freeHist( Histogram *hist )
300 { 300 {
301 VMS_int__free( hist->bins ); 301 PR_int__free( hist->bins );
302 VMS_int__free( hist->name ); 302 PR_int__free( hist->name );
303 VMS_int__free( hist ); 303 PR_int__free( hist );
304 } 304 }
305 void 305 void
306 freeHistExt( Histogram *hist ) 306 freeHistExt( Histogram *hist )
307 { 307 {
308 free( hist->bins ); 308 free( hist->bins );