… | |
… | |
260 | |
260 | |
261 | int tmphist[256]; |
261 | int tmphist[256]; |
262 | char *hist; |
262 | char *hist; |
263 | |
263 | |
264 | SV *histsv = newSV (257); |
264 | SV *histsv = newSV (257); |
265 | sv_upgrade (histsv, SVt_PV); |
265 | SvPOK_on (histsv); |
266 | SvCUR_set (histsv, 256); |
266 | SvCUR_set (histsv, 256); |
267 | hist = SvPV_nolen (histsv); |
267 | hist = SvPVX (histsv); |
268 | |
268 | |
269 | Zero (tmphist, 256, int); |
269 | Zero (tmphist, 256, int); |
270 | |
270 | |
271 | while (len--) |
271 | while (len--) |
272 | ++tmphist[(unsigned char)*buf++]; |
272 | ++tmphist[(unsigned char)*buf++]; |