--- ray/src/px/x11image.c 1992/10/12 12:59:22 2.13 +++ ray/src/px/x11image.c 1992/10/13 16:43:39 2.15 @@ -109,10 +109,9 @@ extern long ftell(); extern char *malloc(), *calloc(); -extern double pow(), log(); - Display *thedisplay; + main(argc, argv) int argc; char *argv[]; @@ -308,20 +307,6 @@ char *err; } -eputs(s) -char *s; -{ - fputs(s, stderr); -} - - -quit(code) -int code; -{ - exit(code); -} - - static int viscmp(v1,v2) /* compare visual to see which is better, descending */ register XVisualInfo *v1, *v2; @@ -740,7 +725,7 @@ COLOR clr; return(-1); if (left == ll && right == lr && top == lt && bottom == lb) { copycolor(clr, lc); - return; + return(0); } for (y = top; y < bottom; y++) { if (getscan(y) == -1) @@ -769,8 +754,7 @@ getmono() /* get monochrome data */ quiterr("out of memory in getmono"); dp = ourdata - 1; for (y = 0; y < ymax; y++) { - if (getscan(y) < 0) - quiterr("seek error in getmono"); + getscan(y); normcolrs(scanline, xmax, scale); add2icon(y, scanline); err = 0; @@ -850,8 +834,7 @@ getfull() /* get full (24-bit) data */ /* read and convert file */ dp = (unsigned long *)ourdata; for (y = 0; y < ymax; y++) { - if (getscan(y) < 0) - quiterr("seek error in getfull"); + getscan(y); if (scale) shiftcolrs(scanline, xmax, scale); colrs_gambs(scanline, xmax); @@ -880,8 +863,7 @@ getgrey() /* get greyscale data */ /* read and convert file */ dp = ourdata; for (y = 0; y < ymax; y++) { - if (getscan(y) < 0) - quiterr("seek error in getgrey"); + getscan(y); if (scale) shiftcolrs(scanline, xmax, scale); colrs_gambs(scanline, xmax); @@ -896,7 +878,7 @@ getgrey() /* get greyscale data */ } for (x = 0; x < maxcolors; x++) clrtab[x][RED] = clrtab[x][GRN] = - clrtab[x][BLU] = (x*256+maxcolors/2)/maxcolors; + clrtab[x][BLU] = ((long)x*256+maxcolors/2)/maxcolors; }