| 153 |
|
{ |
| 154 |
|
extern char *rindex(), *strncpy(), *strcat(), *strcpy(); |
| 155 |
|
char fbuf[128], fbuf2[128]; |
| 156 |
+ |
int npicts; |
| 157 |
|
register char *cp; |
| 158 |
|
RESOLU rs; |
| 159 |
|
double pa; |
| 198 |
|
} |
| 199 |
|
} |
| 200 |
|
} |
| 201 |
< |
/* render sequence */ |
| 201 |
> |
npicts = 0; /* render sequence */ |
| 202 |
|
do { |
| 203 |
|
if (seq && nextview(stdin) == EOF) |
| 204 |
|
break; |
| 205 |
|
pctdone = 0.0; |
| 206 |
|
if (pout != NULL) { |
| 207 |
|
sprintf(fbuf, pout, seq); |
| 208 |
+ |
if (prvr == NULL && access(fbuf, F_OK) == 0) |
| 209 |
+ |
continue; /* don't clobber */ |
| 210 |
|
if (freopen(fbuf, "w", stdout) == NULL) { |
| 211 |
|
sprintf(errmsg, |
| 212 |
|
"cannot open output file \"%s\"", fbuf); |
| 254 |
|
cp = NULL; |
| 255 |
|
render(cp, prvr); |
| 256 |
|
prvr = NULL; |
| 257 |
+ |
npicts++; |
| 258 |
|
} while (seq++); |
| 259 |
+ |
/* check that we did something */ |
| 260 |
+ |
if (npicts == 0) |
| 261 |
+ |
error(WARNING, "no output produced"); |
| 262 |
|
} |
| 263 |
|
|
| 264 |
|
|
| 304 |
|
sampdens[i] = hstep; |
| 305 |
|
} else |
| 306 |
|
sampdens = NULL; |
| 307 |
< |
/* open z file */ |
| 307 |
> |
/* open z-file */ |
| 308 |
|
if (zfile != NULL) { |
| 309 |
|
if ((zfd = open(zfile, O_WRONLY|O_CREAT, 0666)) == -1) { |
| 310 |
< |
sprintf(errmsg, "cannot open z file \"%s\"", zfile); |
| 310 |
> |
sprintf(errmsg, "cannot open z-file \"%s\"", zfile); |
| 311 |
|
error(SYSTEM, errmsg); |
| 312 |
|
} |
| 313 |
|
#ifdef MSDOS |
| 329 |
|
i = salvage(oldfile); |
| 330 |
|
if (zfd != -1 && i > 0 && |
| 331 |
|
lseek(zfd, (long)i*hres*sizeof(float), 0) == -1) |
| 332 |
< |
error(SYSTEM, "z file seek error in render"); |
| 332 |
> |
error(SYSTEM, "z-file seek error in render"); |
| 333 |
|
pctdone = 100.0*i/vres; |
| 334 |
|
if (ralrm > 0) /* report init stats */ |
| 335 |
|
report(); |