Mercurial > cgi-bin > hgwebdir.cgi > VMS > C_Libraries > Histogram
comparison Histogram.c @ 22:6cee2e00eacb
added casts to fix compile warnings
| author | Some Random Person <seanhalle@yahoo.com> |
|---|---|
| date | Mon, 12 Mar 2012 05:40:42 -0700 |
| parents | 4d9af65ad3df |
| children | a9e071e01e07 ff7dedcd2e3f 5d1597d9b24a |
comparison
equal
deleted
inserted
replaced
| 14:6d346538f788 | 15:b122b7590653 |
|---|---|
| 4 * | 4 * |
| 5 * Author: seanhalle@yahoo.com | 5 * Author: seanhalle@yahoo.com |
| 6 * | 6 * |
| 7 */ | 7 */ |
| 8 #include <stdio.h> | 8 #include <stdio.h> |
| 9 #include <string.h> | |
| 9 #include "Histogram.h" | 10 #include "Histogram.h" |
| 10 | 11 |
| 11 | 12 |
| 12 /*This Histogram Abstract Data Type has a number of bins plus a range of | 13 /*This Histogram Abstract Data Type has a number of bins plus a range of |
| 13 * values that the bins span, both chosen at creation. | 14 * values that the bins span, both chosen at creation. |
| 66 Histogram *hist; | 67 Histogram *hist; |
| 67 | 68 |
| 68 hist = VMS_int__malloc( sizeof(Histogram) ); | 69 hist = VMS_int__malloc( sizeof(Histogram) ); |
| 69 hist->bins = VMS_int__malloc( numBins * sizeof(int32) ); | 70 hist->bins = VMS_int__malloc( numBins * sizeof(int32) ); |
| 70 | 71 |
| 71 makeHist_helper( hist, numBins, startOfRange, binWidth,VMS_int__strDup(name)); | 72 char *nameCopy = (char *)VMS_int__strDup(name); |
| 73 makeHist_helper( hist, numBins, startOfRange, binWidth, nameCopy); | |
| 72 | 74 |
| 73 return hist; | 75 return hist; |
| 74 } | 76 } |
| 75 | 77 |
| 76 Histogram * | 78 Histogram * |
