| 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); |
| 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 */ |
| 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 |
|
} |