--- ray/src/px/pinterp.c 1992/04/28 09:40:39 2.5 +++ ray/src/px/pinterp.c 1992/10/02 16:24:22 2.9 @@ -12,8 +12,6 @@ static char SCCSid[] = "$SunId$ LBL"; #include "standard.h" -#include - #include #include "view.h" @@ -161,7 +159,9 @@ char *argv[]; vresolu = atoi(argv[++i]); break; case 'p': /* pixel aspect */ - check(2,"f"); + if (argv[i][2] != 'a') + goto badopt; + check(3,"f"); pixaspect = atof(argv[++i]); break; case 'v': /* view file */ @@ -197,10 +197,11 @@ char *argv[]; } normaspect(viewaspect(&ourview), &pixaspect, &hresolu, &vresolu); /* allocate frame */ - ourpict = (COLR *)malloc(hresolu*vresolu*sizeof(COLR)); - ourzbuf = (float *)calloc(hresolu*vresolu,sizeof(float)); + ourpict = (COLR *)bmalloc(hresolu*vresolu*sizeof(COLR)); + ourzbuf = (float *)bmalloc(hresolu*vresolu*sizeof(float)); if (ourpict == NULL || ourzbuf == NULL) syserror(); + bzero((char *)ourzbuf, hresolu*vresolu*sizeof(float)); /* get input */ for ( ; i < argc; i += 2) addpicture(argv[i], argv[i+1]); @@ -385,7 +386,6 @@ COLR *pline; float *zline; struct position *lasty; /* input/output */ { - extern double sqrt(); FVECT pos; struct position lastx, newpos; register int x; @@ -633,7 +633,6 @@ writepicture() /* write out picture */ writedistance(fname) /* write out z file */ char *fname; { - extern double sqrt(); int donorm = normdist && ourview.type == VT_PER; int fd; int y;