--- ray/src/px/pfilt.c 2003/06/08 12:03:10 2.24 +++ ray/src/px/pfilt.c 2004/01/02 12:47:01 2.28 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: pfilt.c,v 2.24 2003/06/08 12:03:10 schorsch Exp $"; +static const char RCSid[] = "$Id: pfilt.c,v 2.28 2004/01/02 12:47:01 schorsch Exp $"; #endif /* * pfilt.c - program to post-process picture file. @@ -8,10 +8,13 @@ static const char RCSid[] = "$Id: pfilt.c,v 2.24 2003/ * 6/23/93 Added additional buffers for value spreading */ +#include "copyright.h" + #include +#include -#include "standard.h" #include "platform.h" +#include "standard.h" #include "color.h" #include "view.h" #include "paths.h" @@ -80,12 +83,13 @@ int orad = 0; /* output window radius */ char *progname; +static gethfunc headline; + main(argc, argv) int argc; char **argv; { - extern int headline(); FILE *fin; float *lampcolor; char *lamptype = NULL; @@ -325,9 +329,11 @@ COLOR clr; double (*ourbright)() = rgb_bright; -int -headline(s) /* process line from header */ -char *s; +static int +headline( /* process line from header */ + char *s, + void *p +) { char fmt[32]; @@ -487,12 +493,12 @@ scan2init() /* prepare scanline arrays */ if (obarsize > 0) { scoutbar = (COLOR **)malloc(obarsize*sizeof(COLOR *)); greybar = (float **)malloc(obarsize*sizeof(float *)); - if (scoutbar == NULL | greybar == NULL) + if ((scoutbar == NULL) | (greybar == NULL)) goto memerr; for (i = 0; i < obarsize; i++) { scoutbar[i] = (COLOR *)malloc(ncols*sizeof(COLOR)); greybar[i] = (float *)malloc(ncols*sizeof(float)); - if (scoutbar[i] == NULL | greybar[i] == NULL) + if ((scoutbar[i] == NULL) | (greybar[i] == NULL)) goto memerr; } } else { @@ -541,7 +547,7 @@ int r; greybar[nextrow%obarsize][c] = (*ourbright)(ctmp); } /* and zero output scanline */ - bzero((char *)scoutbar[nextrow%obarsize], ncols*sizeof(COLOR)); + memset((char *)scoutbar[nextrow%obarsize], '\0', ncols*sizeof(COLOR)); nextrow++; } /* point to top scanline for output */