| 109 |
|
|
| 110 |
|
extern char *malloc(), *calloc(); |
| 111 |
|
|
| 112 |
– |
extern double pow(), log(); |
| 113 |
– |
|
| 112 |
|
Display *thedisplay; |
| 113 |
|
|
| 114 |
+ |
|
| 115 |
|
main(argc, argv) |
| 116 |
|
int argc; |
| 117 |
|
char *argv[]; |
| 307 |
|
} |
| 308 |
|
|
| 309 |
|
|
| 311 |
– |
eputs(s) |
| 312 |
– |
char *s; |
| 313 |
– |
{ |
| 314 |
– |
fputs(s, stderr); |
| 315 |
– |
} |
| 316 |
– |
|
| 317 |
– |
|
| 318 |
– |
quit(code) |
| 319 |
– |
int code; |
| 320 |
– |
{ |
| 321 |
– |
exit(code); |
| 322 |
– |
} |
| 323 |
– |
|
| 324 |
– |
|
| 310 |
|
static int |
| 311 |
|
viscmp(v1,v2) /* compare visual to see which is better, descending */ |
| 312 |
|
register XVisualInfo *v1, *v2; |
| 725 |
|
return(-1); |
| 726 |
|
if (left == ll && right == lr && top == lt && bottom == lb) { |
| 727 |
|
copycolor(clr, lc); |
| 728 |
< |
return; |
| 728 |
> |
return(0); |
| 729 |
|
} |
| 730 |
|
for (y = top; y < bottom; y++) { |
| 731 |
|
if (getscan(y) == -1) |
| 754 |
|
quiterr("out of memory in getmono"); |
| 755 |
|
dp = ourdata - 1; |
| 756 |
|
for (y = 0; y < ymax; y++) { |
| 757 |
< |
if (getscan(y) < 0) |
| 773 |
< |
quiterr("seek error in getmono"); |
| 757 |
> |
getscan(y); |
| 758 |
|
normcolrs(scanline, xmax, scale); |
| 759 |
|
add2icon(y, scanline); |
| 760 |
|
err = 0; |
| 834 |
|
/* read and convert file */ |
| 835 |
|
dp = (unsigned long *)ourdata; |
| 836 |
|
for (y = 0; y < ymax; y++) { |
| 837 |
< |
if (getscan(y) < 0) |
| 854 |
< |
quiterr("seek error in getfull"); |
| 837 |
> |
getscan(y); |
| 838 |
|
if (scale) |
| 839 |
|
shiftcolrs(scanline, xmax, scale); |
| 840 |
|
colrs_gambs(scanline, xmax); |
| 863 |
|
/* read and convert file */ |
| 864 |
|
dp = ourdata; |
| 865 |
|
for (y = 0; y < ymax; y++) { |
| 866 |
< |
if (getscan(y) < 0) |
| 884 |
< |
quiterr("seek error in getgrey"); |
| 866 |
> |
getscan(y); |
| 867 |
|
if (scale) |
| 868 |
|
shiftcolrs(scanline, xmax, scale); |
| 869 |
|
colrs_gambs(scanline, xmax); |
| 878 |
|
} |
| 879 |
|
for (x = 0; x < maxcolors; x++) |
| 880 |
|
clrtab[x][RED] = clrtab[x][GRN] = |
| 881 |
< |
clrtab[x][BLU] = (x*256+maxcolors/2)/maxcolors; |
| 881 |
> |
clrtab[x][BLU] = ((long)x*256+maxcolors/2)/maxcolors; |
| 882 |
|
} |
| 883 |
|
|
| 884 |
|
|