Mercurial > cgi-bin > hgwebdir.cgi > VMS > C_Libraries > Histogram
diff Histogram.c @ 14:1fbaedaac2c7
made defualt brch pure C (no VMS__malloc..)
| author | Me@portablequad |
|---|---|
| date | Sat, 11 Feb 2012 19:19:06 -0800 |
| parents | 31a248920429 |
| children | 32489b8b763c |
line diff
1.1 --- a/Histogram.c Thu Feb 09 15:53:03 2012 +0100 1.2 +++ b/Histogram.c Sat Feb 11 19:19:06 2012 -0800 1.3 @@ -7,9 +7,6 @@ 1.4 */ 1.5 #include <stdio.h> 1.6 #include "Histogram.h" 1.7 -#include "../VMS.h" 1.8 -#include "../vutilities.h" 1.9 -#include "../vmalloc.h" 1.10 1.11 //External variables for saving of the histogram 1.12 //These have to be defined by to plugins in order to enable VMS to print this 1.13 @@ -38,8 +35,8 @@ 1.14 int32 i; 1.15 1.16 1.17 - hist = VMS__malloc( sizeof(Histogram) ); 1.18 - hist->bins = VMS__malloc( numBins * sizeof(int32) ); 1.19 + hist = malloc( sizeof(Histogram) ); 1.20 + hist->bins = malloc( numBins * sizeof(int32) ); 1.21 1.22 hist->numBins = numBins; 1.23 hist->binWidth = (endOfRange - startOfRange) / numBins; 1.24 @@ -75,16 +72,16 @@ 1.25 { 1.26 Histogram *hist; 1.27 1.28 - hist = VMS__malloc( sizeof(Histogram) ); 1.29 - hist->bins = VMS__malloc( numBins * sizeof(int32) ); 1.30 + hist = malloc( sizeof(Histogram) ); 1.31 + hist->bins = malloc( numBins * sizeof(int32) ); 1.32 1.33 - makeHist_helper( hist, numBins, startOfRange, binWidth,VMS__strDup(name)); 1.34 + makeHist_helper( hist, numBins, startOfRange, binWidth,strDup(name)); 1.35 1.36 return hist; 1.37 } 1.38 1.39 Histogram * 1.40 -makeFixedBinHistExt( int32 numBins, int32 startOfRange, int32 binWidth, 1.41 +makeFixedBinHist( int32 numBins, int32 startOfRange, int32 binWidth, 1.42 char *name ) 1.43 1.44 { 1.45 @@ -349,13 +346,6 @@ 1.46 void 1.47 freeHist( Histogram *hist ) 1.48 { 1.49 - VMS__free( hist->bins ); 1.50 - VMS__free( hist->name ); 1.51 - VMS__free( hist ); 1.52 - } 1.53 -void 1.54 -freeHistExt( Histogram *hist ) 1.55 - { 1.56 free( hist->bins ); 1.57 free( hist->name ); 1.58 free( hist );
