ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/px/pinterp.c
(Generate patch)

Comparing ray/src/px/pinterp.c (file contents):
Revision 2.4 by greg, Thu Mar 26 13:03:34 1992 UTC vs.
Revision 2.7 by greg, Fri Jun 19 12:54:41 1992 UTC

# Line 161 | Line 161 | char   *argv[];
161                          vresolu = atoi(argv[++i]);
162                          break;
163                  case 'p':                               /* pixel aspect */
164 <                        check(2,"f");
164 >                        if (argv[i][2] != 'a')
165 >                                goto badopt;
166 >                        check(3,"f");
167                          pixaspect = atof(argv[++i]);
168                          break;
169                  case 'v':                               /* view file */
# Line 197 | Line 199 | char   *argv[];
199          }
200          normaspect(viewaspect(&ourview), &pixaspect, &hresolu, &vresolu);
201                                                  /* allocate frame */
202 <        ourpict = (COLR *)malloc(hresolu*vresolu*sizeof(COLR));
203 <        ourzbuf = (float *)calloc(hresolu*vresolu,sizeof(float));
202 >        ourpict = (COLR *)bmalloc(hresolu*vresolu*sizeof(COLR));
203 >        ourzbuf = (float *)bmalloc(hresolu*vresolu*sizeof(float));
204          if (ourpict == NULL || ourzbuf == NULL)
205                  syserror();
206 +        bzero((char *)ourzbuf, hresolu*vresolu*sizeof(float));
207                                                          /* get input */
208          for ( ; i < argc; i += 2)
209                  addpicture(argv[i], argv[i+1]);
# Line 243 | Line 246 | userr:
246   headline(s)                             /* process header string */
247   char    *s;
248   {
246        static char     *altname[] = {VIEWSTR,"rpict","rview","pinterp",NULL};
247        register char   **an;
249          char    fmt[32];
250  
251          if (isformat(s)) {
# Line 259 | Line 260 | char   *s;
260                  theirexp *= exposval(s);
261                  return;
262          }
263 <        for (an = altname; *an != NULL; an++)
264 <                if (!strncmp(*an, s, strlen(*an))) {
264 <                        if (sscanview(&theirview, s+strlen(*an)) > 0)
265 <                                gotview++;
266 <                        break;
267 <                }
263 >        if (isview(s) && sscanview(&theirview, s) > 0)
264 >                gotview++;
265   }
266  
267  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines