--- ray/src/px/pinterp.c 1992/03/26 13:03:34 2.4 +++ ray/src/px/pinterp.c 1992/06/19 12:54:41 2.7 @@ -161,7 +161,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 +199,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]); @@ -243,8 +246,6 @@ userr: headline(s) /* process header string */ char *s; { - static char *altname[] = {VIEWSTR,"rpict","rview","pinterp",NULL}; - register char **an; char fmt[32]; if (isformat(s)) { @@ -259,12 +260,8 @@ char *s; theirexp *= exposval(s); return; } - for (an = altname; *an != NULL; an++) - if (!strncmp(*an, s, strlen(*an))) { - if (sscanview(&theirview, s+strlen(*an)) > 0) - gotview++; - break; - } + if (isview(s) && sscanview(&theirview, s) > 0) + gotview++; }