--- ray/src/util/ranimate.c 2005/09/12 14:40:14 2.50 +++ ray/src/util/ranimate.c 2008/11/10 19:08:20 2.54 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: ranimate.c,v 2.50 2005/09/12 14:40:14 schorsch Exp $"; +static const char RCSid[] = "$Id: ranimate.c,v 2.54 2008/11/10 19:08:20 greg Exp $"; #endif /* * Radiance animation control program @@ -218,17 +218,19 @@ main( animate(); /* all done */ if (vdef(NEXTANIM)) { + char *fullp; argv[i] = vval(NEXTANIM); /* just change input file */ if (!silent) printargs(argc, argv, stdout); - if ((argv[0] = getpath(progname,getenv("PATH"),X_OK)) == NULL) - fprintf(stderr, "%s: command not found\n", progname); + fflush(stdout); + if ((fullp = getpath(argv[0],getenv("PATH"),X_OK)) == NULL) + fprintf(stderr, "%s: command not found\n", argv[0]); else - execv(progname, argv); + execv(fullp, argv); quit(1); } quit(0); - return 0; /* pro forma return */ + return(0); /* pro forma return */ userr: fprintf(stderr, "Usage: %s [-s][-n][-w][-e] anim_file\n", progname); quit(1); @@ -706,7 +708,7 @@ transferframes(void) /* catch up with picture transf *cp++ = ' '; sprintf(cp, fbase, i); while (*cp) cp++; - strcpy(cp, ".pic"); + strcpy(cp, ".hdr"); cp += 4; } if (runcom(combuf)) { /* transfer frames */ @@ -944,6 +946,13 @@ int rvr usepfilt |= nora_rgbe; } else if (frseq[0] == frame) { /* no interpolation needed */ if (!rvr && frame > 1+vint(INTERP)) { /* archive previous */ + if (arcnext - arcargs + + strlen(fbase) >= sizeof(arcargs)-8) { + fprintf(stderr, +"%s: too many filenames in archive command -- reduce %s variable\n", + progname, vnam(DISKSPACE)); + quit(1); + } *arcnext++ = ' '; sprintf(arcnext, fbase, frame-vint(INTERP)-1); while (*arcnext) arcnext++; @@ -1052,7 +1061,7 @@ int rvr } /* output file name */ sprintf(fname0, vval(BASENAME), frame); - sprintf(combuf+strlen(combuf), " > %s.pic", fname0); + sprintf(combuf+strlen(combuf), " > %s.hdr", fname0); if (rvr) /* in recovery */ return(runcom(combuf)); bruncom(combuf, frame, frecover); /* else run in background */ @@ -1125,7 +1134,6 @@ countviews(void) /* count views in view file */ static char * getexp(int n) /* get exposure for nth frame */ { - extern char *fskip(); static char expval[32]; static FILE *expfp = NULL; static long *exppos;