Ignore:
Timestamp:
2002-01-30T15:40:53+13:00 (22 years ago)
Author:
jrm21
Message:

replaced bzero and bcopy with memset and memcpy in the src, even though it was
already done in the headers, just to make the code a bit clearer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/mgpp/lib/huffman.cpp

    r2468 r2928  
    5252      *mem += num * sizeof (char);
    5353    }
    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));
    5656
    5757  /* Initialise the pointers to the leaves */
     
    147147
    148148  /* zero the lencount's array */
    149   bzero ((char *) hd->lencount, sizeof (hd->lencount));
     149  memset (hd->lencount, '\0', sizeof (hd->lencount));
    150150  hd->maxcodelen = 0;
    151151  hd->mincodelen = 100;
     
    203203  if (mem)
    204204    *mem += data->num_codes * sizeof (*codes);
    205   bcopy ((void *) data->min_code, (void *) mc, sizeof (mc));
     205  memcpy (mc, data->min_code, sizeof (mc));
    206206  for (i = 0; i < data->num_codes; i++)
    207207    if (data->clens[i])
     
    230230    }
    231231
    232   bzero ((char *) values, (MAX_HUFFCODE_LEN + 1) * sizeof (unsigned long *));
     232  memset (values, '\0', (MAX_HUFFCODE_LEN + 1) * sizeof (unsigned long *));
    233233
    234234  if (mem)
     
    343343      int i;  /* [RPAP - Jan 97: Endian Ordering] */
    344344
    345       bzero ((char *) (hd->lencount), sizeof (hd->lencount));
     345      memset (hd->lencount, '\0', sizeof (hd->lencount));
    346346      if (fread (hd->lencount + hd->mincodelen, sizeof (*hd->lencount),
    347347          hd->maxcodelen - hd->mincodelen + 1, f) !=
     
    356356    (*disk) += sizeof (*hd->lencount) * (hd->maxcodelen - hd->mincodelen + 1);
    357357
    358       bzero ((char *) (hd->min_code), sizeof (hd->min_code));
     358      memset (hd->min_code, '\0', sizeof (hd->min_code));
    359359
    360360      if (fread (hd->min_code, sizeof (*hd->min_code), hd->maxcodelen + 1, f) !=
Note: See TracChangeset for help on using the changeset viewer.