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

Comparing ray/src/util/ranimate.c (file contents):
Revision 2.13 by greg, Tue May 21 14:27:19 1996 UTC vs.
Revision 2.16 by greg, Thu Jun 27 06:49:50 1996 UTC

# Line 482 | Line 482 | animate()                      /* run animation */
482          i = sscanf(vval(RESOLUTION), "%d %d %f", &xres, &yres, &pa);
483          mult = vflt(OVERSAMP);
484          if (i == 3) {
485 <                sprintf(rresopt, "-x %d -y %d -pa %f", (int)(mult*xres),
485 >                sprintf(rresopt, "-x %d -y %d -pa %.3f", (int)(mult*xres),
486                                  (int)(mult*yres), pa);
487 <                sprintf(fresopt, "-x %d -y %d -pa %f", xres, yres, pa);
487 >                sprintf(fresopt, "-x %d -y %d -pa %.3f", xres, yres, pa);
488          } else if (i) {
489                  if (i == 1) yres = xres;
490                  sprintf(rresopt, "-x %d -y %d", (int)(mult*xres),
# Line 987 | Line 987 | int    n;
987          }
988          while (n > viewnum) {           /* scan to desired view */
989                  if (fgets(linebuf, sizeof(linebuf), viewfp) == NULL)
990 <                        return(viewnum==1 ? &curview : NULL);
990 >                        return(viewnum==1 ? &curview : (VIEW *)NULL);
991                  if (isview(linebuf) && sscanview(&curview, linebuf) > 0)
992                          viewnum++;
993          }
# Line 1020 | Line 1020 | int    n;
1020          if (n == 0) {                           /* signal to close file */
1021                  if (expfp != NULL) {
1022                          fclose(expfp);
1023 +                        free((char *)exppos);
1024                          expfp = NULL;
1025                  }
1026                  return(NULL);
1027 <        }
1027 >        } else if (n > vint(END))               /* request past end (error?) */
1028 >                return(NULL);
1029          if (!vdef(EXPOSURE))                    /* no setting (auto) */
1030                  return(NULL);
1031          if (isflt(vval(EXPOSURE)))              /* always the same */
# Line 1061 | Line 1063 | int    n;
1063                  }
1064                  curfrm++;
1065                  cp = fskip(expval);                     /* check format */
1066 <                if (cp == NULL || *cp != '\n') {
1066 >                if (cp != NULL)
1067 >                        while (isspace(*cp))
1068 >                                *cp++ = '\0';
1069 >                if (cp == NULL || *cp) {
1070                          fprintf(stderr,
1071                                  "%s: exposure format error on line %d\n",
1072                                          vval(EXPOSURE), curfrm);
1073                          quit(1);
1074                  }
1070                *cp = '\0';
1075          }
1076          return(expval);                         /* return value */
1077   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines