279 |
|
normaspect(viewaspect(&ourview)*hmult/vmult, &pixaspect, &hres, &vres); |
280 |
|
if (!nowarn && (hr != hres*hmult) | (vr != vres*vmult)) |
281 |
|
fprintf(stderr, |
282 |
< |
"%s: warning - resolution changed from %dx%d to %dx%d\n", |
282 |
> |
"%s: warning - changed resolution from %dx%d to %dx%d\n", |
283 |
|
progname, hr, vr, hres*hmult, vres*vmult); |
284 |
|
sprintf(hrbuf, "%d", hres); |
285 |
|
rpargv[rpargc++] = "-x"; rpargv[rpargc++] = hrbuf; |
402 |
|
{ |
403 |
|
static char *pdone = NULL; /* which pieces are done */ |
404 |
|
static long readpos = -1; /* how far we've read */ |
405 |
< |
int i; |
405 |
> |
int px, py, i; |
406 |
|
/* |
407 |
|
* This routine is called by nextpiece() with an |
408 |
|
* exclusive lock on syncfp and the file pointer at the |
411 |
|
if (rvrlim < 0) |
412 |
|
return(0); /* only check if asked */ |
413 |
|
if (pdone == NULL) /* first call */ |
414 |
< |
pdone = calloc(hmult*vmult, sizeof(char)); |
414 |
> |
pdone = (char *)calloc(hmult*vmult, sizeof(char)); |
415 |
|
if (pdone == NULL) { |
416 |
|
fprintf(stderr, "%s: out of memory\n", progname); |
417 |
|
exit(1); |
418 |
|
} |
419 |
|
if (readpos != -1) /* mark what's been done */ |
420 |
|
fseek(syncfp, readpos, 0); |
421 |
< |
while (fscanf(syncfp, "%d %d", xp, yp) == 2) |
422 |
< |
pdone[*xp*vmult+*yp] = 1; |
421 |
> |
while (fscanf(syncfp, "%d %d", &px, &py) == 2) |
422 |
> |
pdone[px*vmult+py] = 1; |
423 |
|
if (!feof(syncfp)) { |
424 |
|
fprintf(stderr, "%s: format error in sync file\n", progname); |
425 |
|
exit(1); |