118 |
|
VIEW *getview(); |
119 |
|
char *getexp(); |
120 |
|
|
121 |
+ |
extern time_t fdate(), time(); |
122 |
|
|
123 |
+ |
|
124 |
|
main(argc, argv) |
125 |
|
int argc; |
126 |
|
char *argv[]; |
192 |
|
|
193 |
|
getastat() /* check/set animation status */ |
194 |
|
{ |
195 |
< |
char buf[256]; |
195 |
> |
char sfname[256]; |
196 |
|
FILE *fp; |
197 |
|
|
198 |
< |
sprintf(buf, "%s/%s", vval(DIRECTORY), SFNAME); |
199 |
< |
if ((fp = fopen(buf, "r")) == NULL) { |
198 |
> |
sprintf(sfname, "%s/%s", vval(DIRECTORY), SFNAME); |
199 |
> |
if ((fp = fopen(sfname, "r")) == NULL) { |
200 |
|
if (errno != ENOENT) { |
201 |
< |
perror(buf); |
201 |
> |
perror(sfname); |
202 |
|
return(-1); |
203 |
|
} |
204 |
|
astat.rnext = astat.fnext = astat.tnext = 0; |
236 |
|
progname, astat.cfname); |
237 |
|
return(-1); |
238 |
|
} |
239 |
+ |
/* check control file mods. */ |
240 |
+ |
if (!nowarn && fdate(cfname) > fdate(sfname)) |
241 |
+ |
fprintf(stderr, |
242 |
+ |
"%s: warning - control file modified since last run\n", |
243 |
+ |
progname); |
244 |
|
setours: /* set our values */ |
245 |
|
strcpy(astat.host, myhostname()); |
246 |
|
astat.pid = getpid(); |
248 |
|
return(0); |
249 |
|
fmterr: |
250 |
|
fprintf(stderr, "%s: format error in status file \"%s\"\n", |
251 |
< |
progname, buf); |
251 |
> |
progname, sfname); |
252 |
|
fclose(fp); |
253 |
|
return(-1); |
254 |
|
} |
512 |
|
/* figure # frames per batch */ |
513 |
|
d1 = mult*xres*mult*yres*4; /* space for orig. picture */ |
514 |
|
if ((i=vint(INTERP)) || atoi(vval(MBLUR))) |
515 |
< |
d1 += mult*xres*mult*yres*4; /* space for z-buffer */ |
515 |
> |
d1 += mult*xres*mult*yres*sizeof(float); /* Z-buffer */ |
516 |
|
d2 = xres*yres*4; /* space for final picture */ |
517 |
|
frames_batch = (i+1)*(vflt(DISKSPACE)*1048576.-d1)/(d1+i*d2); |
518 |
|
if (frames_batch < i+2) { |
841 |
|
while (*arcnext) arcnext++; |
842 |
|
strcpy(arcnext, ".unf"); |
843 |
|
arcnext += 4; |
844 |
< |
if (usepinterp || vint(INTERP)) { /* and z-buf */ |
844 |
> |
if (usepinterp || vint(INTERP)) { /* and Z-buf */ |
845 |
|
*arcnext++ = ' '; |
846 |
|
sprintf(arcnext, vval(BASENAME), |
847 |
|
frame-vint(INTERP)-1); |