--- ray/src/hd/viewbeams.c 1999/03/04 10:30:04 3.1 +++ ray/src/hd/viewbeams.c 2003/06/30 14:59:12 3.5 @@ -1,13 +1,12 @@ -/* Copyright (c) 1999 Silicon Graphics, Inc. */ - #ifndef lint -static char SCCSid[] = "$SunId$ SGI"; +static const char RCSid[] = "$Id: viewbeams.c,v 3.5 2003/06/30 14:59:12 schorsch Exp $"; #endif - /* * Convert view to beam list. */ +#include + #include "rholo.h" #include "view.h" #include "random.h" @@ -40,7 +39,7 @@ int hd, bi, nr; } i = blist.nb++; /* else add beam to list */ if (i % BALLOCBLK == 0) { - blist.bl = (PACKHEAD *)realloc((char *)blist.bl, + blist.bl = (PACKHEAD *)realloc((void *)blist.bl, (i+BALLOCBLK)*sizeof(PACKHEAD)); CHECK(blist.bl==NULL, SYSTEM, "out of memory in add2blist"); } @@ -49,14 +48,14 @@ int hd, bi, nr; } -int2 * +int16 * viewbeams(vp, hr, vr, blp) /* convert view into sections/beams */ VIEW *vp; int hr, vr; BEAMLIST *blp; { - static int2 sectlist[HDMAX+1]; - int2 sectarr[MINRES+1][MINRES+1]; + static int16 sectlist[HDMAX+1]; + int16 sectarr[MINRES+1][MINRES+1]; double d0, d1, mindist; GCOORD gc[2]; FVECT rorg, rdir; @@ -64,7 +63,7 @@ BEAMLIST *blp; int v; register int h, hd; /* clear section flags */ - bzero((char *)sectlist, sizeof(sectlist)); + memset((char *)sectlist, '\0', sizeof(sectlist)); /* identify view sections */ for (v = 0; v <= MINRES; v++) for (h = 0; h <= MINRES; h++) {