| 18 |
|
|
| 19 |
|
#include "standard.h" |
| 20 |
|
|
| 21 |
+ |
#include <string.h> |
| 22 |
|
#include <signal.h> |
| 23 |
|
#include <X11/Xlib.h> |
| 24 |
|
#include <X11/cursorfont.h> |
| 384 |
|
register int es; |
| 385 |
|
int cs; |
| 386 |
|
|
| 387 |
< |
if (es = err != NULL) |
| 387 |
> |
if ( (es = err != NULL) ) |
| 388 |
|
fprintf(stderr, "%s: %s: %s\n", progname, |
| 389 |
|
fname==NULL?"<stdin>":fname, err); |
| 390 |
|
if (thedisplay != NULL) |
| 391 |
|
XCloseDisplay(thedisplay); |
| 392 |
< |
if (parent < 0 & sigrecv == 0) |
| 392 |
> |
if ((parent < 0) & (sigrecv == 0)) |
| 393 |
|
kill(getppid(), SIGCONT); |
| 394 |
|
while (parent > 0 && wait(&cs) != -1) { /* wait for any children */ |
| 395 |
|
if (es == 0) |
| 494 |
|
if (viscmp(&xvi[i],&ourvis) > 0) |
| 495 |
|
quiterr("inadequate visuals on this screen"); |
| 496 |
|
/* OK, we'll use it */ |
| 497 |
< |
copystruct(&ourvis, &xvi[i]); |
| 497 |
> |
ourvis = xvi[i]; |
| 498 |
|
#ifdef DEBUG |
| 499 |
|
fprintf(stderr, "Selected visual type %s, depth %d\n", |
| 500 |
|
vistype[ourvis.class], ourvis.depth); |
| 537 |
|
if (ourras == NULL) |
| 538 |
|
goto fail; |
| 539 |
|
getmono(); |
| 540 |
< |
} else if (ourvis.class == TrueColor | ourvis.class == DirectColor) { |
| 540 |
> |
} else if ((ourvis.class == TrueColor) | (ourvis.class == DirectColor)) { |
| 541 |
|
int datsiz = ourvis.depth>16 ? sizeof(int32) : sizeof(int16); |
| 542 |
|
ourdata = (unsigned char *)malloc(datsiz*xmax*ymax); |
| 543 |
|
if (ourdata == NULL) |
| 585 |
|
map_rcolors(ourras, wind); |
| 586 |
|
if (fast) |
| 587 |
|
make_rpixmap(ourras, wind); |
| 588 |
< |
if (!sequential & parent < 0 & sigrecv == 0) { |
| 588 |
> |
if ((!sequential) & (parent < 0) & (sigrecv == 0)) { |
| 589 |
|
kill(getppid(), SIGCONT); |
| 590 |
|
sigrecv--; |
| 591 |
|
} |
| 794 |
|
free_rpixmap(ourras); |
| 795 |
|
return(0); |
| 796 |
|
case '0': /* recenter origin */ |
| 797 |
< |
if (xoff == 0 & yoff == 0) |
| 797 |
> |
if ((xoff == 0) & (yoff == 0)) |
| 798 |
|
return(0); |
| 799 |
|
xoff = yoff = 0; |
| 800 |
|
XClearWindow(thedisplay, wind); |
| 892 |
|
} |
| 893 |
|
|
| 894 |
|
|
| 895 |
< |
int |
| 895 |
> |
void |
| 896 |
|
colavg(scn, n, cavg) |
| 897 |
|
register COLR *scn; |
| 898 |
|
register int n; |
| 926 |
|
|
| 927 |
|
int |
| 928 |
|
dobox(f, p) /* run function over bbox */ |
| 929 |
< |
int (*f)(); /* function to call for each subscan */ |
| 929 |
> |
void (*f)(); /* function to call for each subscan */ |
| 930 |
|
char *p; /* pointer to private data */ |
| 931 |
|
{ |
| 932 |
|
int left, right, top, bottom; |
| 957 |
|
} |
| 958 |
|
|
| 959 |
|
|
| 960 |
< |
int |
| 960 |
> |
void |
| 961 |
|
addfix(scn, n) /* add fixation points to histogram */ |
| 962 |
|
COLR *scn; |
| 963 |
|
int n; |
| 1310 |
|
static int trunced = -1; /* truncated file? */ |
| 1311 |
|
skipit: |
| 1312 |
|
if (trunced >= 0 && y >= trunced) { |
| 1313 |
< |
bzero(scanline, xmax*sizeof(COLR)); |
| 1313 |
> |
memset(scanline, '\0', xmax*sizeof(COLR)); |
| 1314 |
|
return(-1); |
| 1315 |
|
} |
| 1316 |
|
if (y != cury) { |