Revision: 65317
http://sourceforge.net/p/brlcad/code/65317
Author: starseeker
Date: 2015-06-16 01:59:37 +0000 (Tue, 16 Jun 2015)
Log Message:
-----------
Needs double checking. Switch from bzero to memset.
Modified Paths:
--------------
brlcad/trunk/src/other/libutahrle/colorquant.c
brlcad/trunk/src/other/libutahrle/rle_getrow.c
Modified: brlcad/trunk/src/other/libutahrle/colorquant.c
===================================================================
--- brlcad/trunk/src/other/libutahrle/colorquant.c 2015-06-16 01:52:03 UTC
(rev 65316)
+++ brlcad/trunk/src/other/libutahrle/colorquant.c 2015-06-16 01:59:37 UTC
(rev 65317)
@@ -126,10 +126,6 @@
* The colorquant() routine has been tested on an Iris 4D70 workstation,
* a Sun 3/60 workstation, and (to some extent), a Macintosh.
*
- * Calls to bzero() may have to be replaced with the appropriate thing on
- * your system. (bzero(ptr, len) writes 'len' 0-bytes starting at the location
- * pointed to by ptr.)
- *
* Although I've tried to avoid integer overflow problems where ever possible,
* it's likely I've missed a spot where an 'int' should really be a 'long'.
* (On the machine this was developed on, an int == long == 32 bits.)
@@ -272,9 +268,9 @@
/*
* Zero-out the projected frequency arrays of the largest box.
*/
- bzero(Boxes->freq[0], ColormaxI * sizeof(unsigned long));
- bzero(Boxes->freq[1], ColormaxI * sizeof(unsigned long));
- bzero(Boxes->freq[2], ColormaxI * sizeof(unsigned long));
+ memset(Boxes->freq[0], 0, ColormaxI * sizeof(unsigned long));
+ memset(Boxes->freq[1], 0, ColormaxI * sizeof(unsigned long));
+ memset(Boxes->freq[2], 0, ColormaxI * sizeof(unsigned long));
SumPixels = 0;
}
@@ -554,9 +550,9 @@
register int b, g, r;
int roff;
- bzero(box1->freq[0], ColormaxI * sizeof(unsigned long));
- bzero(box1->freq[1], ColormaxI * sizeof(unsigned long));
- bzero(box1->freq[2], ColormaxI * sizeof(unsigned long));
+ memset(box1->freq[0], 0, ColormaxI * sizeof(unsigned long));
+ memset(box1->freq[1], 0, ColormaxI * sizeof(unsigned long));
+ memset(box1->freq[2], 0, ColormaxI * sizeof(unsigned long));
for (r = box1->low[0]; r < box1->high[0]; r++) {
roff = r << Bits;
Modified: brlcad/trunk/src/other/libutahrle/rle_getrow.c
===================================================================
--- brlcad/trunk/src/other/libutahrle/rle_getrow.c 2015-06-16 01:52:03 UTC
(rev 65316)
+++ brlcad/trunk/src/other/libutahrle/rle_getrow.c 2015-06-16 01:59:37 UTC
(rev 65317)
@@ -356,13 +356,13 @@
if ( the_hdr->background != 1 )
{
if ( the_hdr->alpha && RLE_BIT( *the_hdr, -1 ) )
- bzero( (char *)scanline[-1] + the_hdr->xmin,
- the_hdr->xmax - the_hdr->xmin + 1 );
+ memset( (char *)scanline[-1] + the_hdr->xmin,
+ 0, the_hdr->xmax - the_hdr->xmin + 1 );
for ( nc = 0; nc < the_hdr->ncolors; nc++ )
if ( RLE_BIT( *the_hdr, nc ) )
/* Unless bg color given explicitly, use 0. */
if ( the_hdr->background != 2 || the_hdr->bg_color[nc] == 0 )
- bzero( (char *)scanline[nc] + the_hdr->xmin,
+ memset( (char *)scanline[nc] + the_hdr->xmin, 0,
the_hdr->xmax - the_hdr->xmin + 1 );
else
bfill( (char *)scanline[nc] + the_hdr->xmin,
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits