--- ray/src/util/ranimove1.c 2003/02/25 02:47:24 3.2 +++ ray/src/util/ranimove1.c 2003/07/21 22:30:19 3.5 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: ranimove1.c,v 3.2 2003/02/25 02:47:24 greg Exp $"; +static const char RCSid[] = "$Id: ranimove1.c,v 3.5 2003/07/21 22:30:19 schorsch Exp $"; #endif /* * ranimove1.c @@ -11,6 +11,9 @@ static const char RCSid[] = "$Id: ranimove1.c,v 3.2 20 #include "copyright.h" +#include + +#include "platform.h" #include "ranimove.h" #include "otypes.h" #include "random.h" @@ -76,9 +79,9 @@ next_frame() /* prepare next frame buffer */ char *err; /* get previous view */ if (vw.type != 0) - copystruct(&vwprev, &vw); + vwprev = vw; else if (fcur > 1 && (fv = getview(fcur-1)) != NULL) { - copystruct(&vwprev, fv); + vwprev = *fv; if (setview(&vwprev) != NULL) vwprev.type = 0; } @@ -87,7 +90,7 @@ next_frame() /* prepare next frame buffer */ sprintf(errmsg, "cannot get view for frame %d", fcur); error(USER, errmsg); } - copystruct(&vw, fv); + vw = *fv; if ((err = setview(&vw)) != NULL) { sprintf(errmsg, "view error at frame %d: %s", fcur, err); error(USER, errmsg); @@ -138,8 +141,8 @@ next_frame() /* prepare next frame buffer */ fp = zprev; zprev = zbuffer; zbuffer = fp; op = oprev; oprev = obuffer; obuffer = op; bp = aprev; aprev = abuffer; abuffer = bp; - bzero(abuffer, sizeof(BYTE)*hres*vres); - bzero(sbuffer, sizeof(BYTE)*hres*vres); + memset(abuffer, '\0', sizeof(BYTE)*hres*vres); + memset(sbuffer, '\0', sizeof(BYTE)*hres*vres); frm_stop += rtperfrm; } cerrmap = NULL; @@ -637,11 +640,12 @@ init_frame() /* render base (low quality) frame */ restart = (!nobjects || vdef(MOVE)); if (!restart && curparams != &lorendparams && nprocs > 1) restart = -1; - if (restart > 0) + if (restart > 0) { if (nprocs > 1) ray_pdone(1); else ray_done(1); + } /* post low quality parameters */ if (curparams != &lorendparams) ray_restore(curparams = &lorendparams); @@ -756,8 +760,8 @@ write_map(cerrmap, "outcmap.pic"); int n2; int cnt; /* sum in motion streaks */ - bzero(outbuffer, sizeof(COLOR)*hres*vres); - bzero(wbuffer, sizeof(float)*hres*vres); + memset(outbuffer, '\0', sizeof(COLOR)*hres*vres); + memset(wbuffer, '\0', sizeof(float)*hres*vres); for (y = vres; y--; ) for (x = hres; x--; ) { n = fndx(x, y); @@ -873,9 +877,7 @@ send_frame() /* send frame to destination */ sprintf(errmsg, "cannot open output frame \"%s\"", pfname); error(SYSTEM, errmsg); } -#ifdef MSDOS - setmode(fileno(fp), O_BINARY); -#endif + SET_FILE_BINARY(fp); if (!silent) { printf("\tWriting to \"%s\"\n", pfname); fflush(stdout);