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.18 by greg, Mon Jul 8 14:53:17 1996 UTC vs.
Revision 2.20 by greg, Wed Jul 17 17:45:11 1996 UTC

# Line 230 | Line 230 | getastat()                     /* check/set animation status */
230                  }
231                  /* assume it is dead */
232          }
233 <        if (strcmp(cfname, astat.cfname) && astat.tnext != 0) { /* other's */
233 >        if (strcmp(cfname, astat.cfname) && astat.pid != 0) {   /* other's */
234                  fprintf(stderr, "%s: unfinished job \"%s\"\n",
235                                  progname, astat.cfname);
236                  return(-1);
# Line 300 | Line 300 | checkdir()                     /* make sure we have our directory */
300   setdefaults()                   /* set default values */
301   {
302          extern char     *atos();
303 +        int     decades;
304          char    buf[256];
305  
306          if (vdef(ANIMATE)) {
# Line 333 | Line 334 | setdefaults()                  /* set default values */
334                  quit(1);
335          }
336          if (!vdef(BASENAME)) {
337 <                sprintf(buf, "%s/frame%%03d", vval(DIRECTORY));
337 >                decades = (int)log10((double)vint(END)) + 1;
338 >                if (decades < 3) decades = 3;
339 >                sprintf(buf, "%s/frame%%0%dd", vval(DIRECTORY), decades);
340                  vval(BASENAME) = savqstr(buf);
341                  vdef(BASENAME)++;
342          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines