| 65 |
|
rotate(fp) /* rotate picture */ |
| 66 |
|
FILE *fp; |
| 67 |
|
{ |
| 68 |
< |
register COLR *inline; |
| 68 |
> |
register COLR *inln; |
| 69 |
|
register int xoff, inx, iny; |
| 70 |
|
long start, ftell(); |
| 71 |
|
|
| 72 |
< |
if ((inline = (COLR *)malloc(xres*sizeof(COLR))) == NULL) { |
| 72 |
> |
if ((inln = (COLR *)malloc(xres*sizeof(COLR))) == NULL) { |
| 73 |
|
fprintf(stderr, "%s: out of memory\n", progname); |
| 74 |
|
exit(1); |
| 75 |
|
} |
| 80 |
|
exit(1); |
| 81 |
|
} |
| 82 |
|
for (iny = yres-1; iny >= 0; iny--) { |
| 83 |
< |
if (freadcolrs(inline, xres, fp) < 0) { |
| 83 |
> |
if (freadcolrs(inln, xres, fp) < 0) { |
| 84 |
|
fprintf(stderr, "%s: read error\n", progname); |
| 85 |
|
exit(1); |
| 86 |
|
} |
| 87 |
|
for (inx = 0; inx < nrows && xoff+inx < xres; inx++) |
| 88 |
< |
bcopy((char *)inline[xoff+inx], |
| 88 |
> |
bcopy((char *)inln[xoff+inx], |
| 89 |
|
(char *)scanbar[inx*yres+iny], |
| 90 |
|
sizeof(COLR)); |
| 91 |
|
} |
| 95 |
|
exit(1); |
| 96 |
|
} |
| 97 |
|
} |
| 98 |
< |
free((char *)inline); |
| 98 |
> |
free((char *)inln); |
| 99 |
|
} |