--- ray/src/px/pinterp.c 2003/06/26 00:58:10 2.34 +++ ray/src/px/pinterp.c 2003/07/21 22:30:18 2.36 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: pinterp.c,v 2.34 2003/06/26 00:58:10 schorsch Exp $"; +static const char RCSid[] = "$Id: pinterp.c,v 2.36 2003/07/21 22:30:18 schorsch Exp $"; #endif /* * Interpolate and extrapolate pictures with different view parameters. @@ -10,6 +10,7 @@ static const char RCSid[] = "$Id: pinterp.c,v 2.34 200 #include "copyright.h" #include +#include #include "standard.h" #include "rtprocess.h" /* Windows: must come before color.h */ @@ -231,7 +232,7 @@ char *argv[]; fillo &= ~F_BACK; if (doavg < 0) doavg = (argc-an) > 2; - if (expcomp != NULL) + if (expcomp != NULL) { if (expcomp[0] == '+' | expcomp[0] == '-') { expadj = atof(expcomp) + (expcomp[0]=='+' ? .5 : -.5); if (doavg | doblur) @@ -246,6 +247,7 @@ char *argv[]; if (!(doavg | doblur)) rexpadj = pow(2.0, (double)expadj); } + } /* set view */ if (nextview(doblur ? stdin : (FILE *)NULL) == EOF) { fprintf(stderr, "%s: no view on standard input!\n", @@ -277,7 +279,7 @@ char *argv[]; fputnow(stdout); /* run pictures */ do { - bzero((char *)ourzbuf, hresolu*vresolu*sizeof(float)); + memset((char *)ourzbuf, '\0', hresolu*vresolu*sizeof(float)); for (i = an; i < argc; i += 2) addpicture(argv[i], argv[i+1]); if (fillo&F_BACK) /* fill in spaces */ @@ -373,7 +375,7 @@ FILE *fp; exit(1); } if (!nvavg) { /* first view */ - copystruct(&avgview, &ourview); + avgview = ourview; return(nvavg++); } /* add to average view */ @@ -412,7 +414,7 @@ compavgview() /* compute average view */ avgview.vfore *= f; avgview.vaft *= f; if (setview(&avgview) != NULL) /* in case of emergency... */ - copystruct(&avgview, &ourview); + avgview = ourview; pixaspect = viewaspect(&avgview) * hresolu / vresolu; } @@ -433,7 +435,7 @@ char *pfile, *zspec; syserror(pfile); /* get header with exposure and view */ theirexp = 1.0; - copystruct(&theirview, &stdview); + theirview = stdview; gotview = 0; if (nvavg < 2) printf("%s:\n", pfile); @@ -802,13 +804,13 @@ int zfd; xl[y-1].max = xl[y-step].max; } for (x = 2; x < step; x++) - copystruct(xl+y-x, xl+y-1); + *(xl+y-x) = *(xl+y-1); } if (yl->max >= numscans(&tresolu)) yl->max = numscans(&tresolu) - 1; y -= step; for (x = numscans(&tresolu) - 1; x > y; x--) /* fill bottom rows */ - copystruct(xl+x, xl+y); + *(xl+x) = *(xl+y); return(yl->max >= yl->min); } @@ -961,9 +963,9 @@ clipaft() /* perform aft clipping as indicated */ continue; } if (averaging) - bzero(sscan(y)[x], sizeof(COLOR)); + memset(sscan(y)[x], '\0', sizeof(COLOR)); else - bzero(pscan(y)[x], sizeof(COLR)); + memset(pscan(y)[x], '\0', sizeof(COLR)); zscan(y)[x] = 0.0; } } @@ -1167,7 +1169,7 @@ clearqueue() /* process queue */ *fbp++ = dir[0]; *fbp++ = dir[1]; *fbp++ = dir[2]; } /* mark end and get results */ - bzero((char *)fbp, 6*sizeof(float)); + memset((char *)fbp, '\0', 6*sizeof(float)); if (process(&PDesc, (char *)fbuf, (char *)fbuf, 4*sizeof(float)*(queuesiz+1), 6*sizeof(float)*(queuesiz+1)) !=