Changeset 2928 for trunk/gsdl/src/mgpp/lib/huffman.cpp
- Timestamp:
- 2002-01-30T15:40:53+13:00 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/mgpp/lib/huffman.cpp
r2468 r2928 52 52 *mem += num * sizeof (char); 53 53 } 54 bcopy ((void *) freqs, (void *) &heap[num], num * sizeof (*heap));55 bzero ((char *) heap, num * sizeof (*heap));54 memcpy (&heap[num], freqs, num * sizeof (*heap)); 55 memset (heap, '\0', num * sizeof (*heap)); 56 56 57 57 /* Initialise the pointers to the leaves */ … … 147 147 148 148 /* zero the lencount's array */ 149 bzero ((char *) hd->lencount, sizeof (hd->lencount));149 memset (hd->lencount, '\0', sizeof (hd->lencount)); 150 150 hd->maxcodelen = 0; 151 151 hd->mincodelen = 100; … … 203 203 if (mem) 204 204 *mem += data->num_codes * sizeof (*codes); 205 bcopy ((void *) data->min_code, (void *) mc, sizeof (mc));205 memcpy (mc, data->min_code, sizeof (mc)); 206 206 for (i = 0; i < data->num_codes; i++) 207 207 if (data->clens[i]) … … 230 230 } 231 231 232 bzero ((char *) values, (MAX_HUFFCODE_LEN + 1) * sizeof (unsigned long *));232 memset (values, '\0', (MAX_HUFFCODE_LEN + 1) * sizeof (unsigned long *)); 233 233 234 234 if (mem) … … 343 343 int i; /* [RPAP - Jan 97: Endian Ordering] */ 344 344 345 bzero ((char *) (hd->lencount), sizeof (hd->lencount));345 memset (hd->lencount, '\0', sizeof (hd->lencount)); 346 346 if (fread (hd->lencount + hd->mincodelen, sizeof (*hd->lencount), 347 347 hd->maxcodelen - hd->mincodelen + 1, f) != … … 356 356 (*disk) += sizeof (*hd->lencount) * (hd->maxcodelen - hd->mincodelen + 1); 357 357 358 bzero ((char *) (hd->min_code), sizeof (hd->min_code));358 memset (hd->min_code, '\0', sizeof (hd->min_code)); 359 359 360 360 if (fread (hd->min_code, sizeof (*hd->min_code), hd->maxcodelen + 1, f) !=
Note:
See TracChangeset
for help on using the changeset viewer.