--- ray/src/px/biq.c 2003/02/22 02:07:27 2.2 +++ ray/src/px/biq.c 2004/03/28 20:33:13 2.5 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: biq.c,v 2.2 2003/02/22 02:07:27 greg Exp $"; +static const char RCSid[] = "$Id: biq.c,v 2.5 2004/03/28 20:33:13 schorsch Exp $"; #endif /* * biq.c - simple greyscale quantization. @@ -7,16 +7,22 @@ static const char RCSid[] = "$Id: biq.c,v 2.2 2003/02/ * 9/19/88 */ +#include + #include "standard.h" #include "ciq.h" +static void draw_grey(colormap ocm); -biq(dith,nw,synth,cm) -int dith; /* is dithering desired? 0=no, 1=yes */ -int nw; /* number of colors wanted in output image */ -int synth; /* synthesize colormap? 0=no, 1=yes */ -colormap cm; /* quantization colormap */ - /* read if synth=0; always written */ + + +void +biq( + int dith, /* is dithering desired? 0=no, 1=yes */ + int nw, /* number of colors wanted in output image */ + int synth, /* synthesize colormap? 0=no, 1=yes */ + colormap cm /* quantization colormap */ +) /* read if synth=0; always written */ { colormap ocm; @@ -29,13 +35,15 @@ colormap cm; /* quantization colormap */ draw_grey(ocm); - bcopy((char *)color,(char *)cm,sizeof color); + memcpy((void *)cm,(void *)color,sizeof color); } /*----------------------------------------------------------------------*/ -draw_grey(ocm) -colormap ocm; +static void +draw_grey( + colormap ocm +) { register rgbpixel *linin; register pixel *linout;