128 |
|
|
129 |
|
void onsig(int i) { sigrecv++; } |
130 |
|
|
131 |
+ |
static gethfunc headline; |
132 |
|
|
133 |
+ |
|
134 |
|
main(argc, argv) |
135 |
|
int argc; |
136 |
|
char *argv[]; |
137 |
|
{ |
136 |
– |
int headline(); |
138 |
|
int i; |
139 |
|
int pid; |
140 |
|
|
247 |
|
} |
248 |
|
|
249 |
|
|
250 |
< |
int |
251 |
< |
headline(s) /* get relevant info from header */ |
252 |
< |
char *s; |
250 |
> |
static int |
251 |
> |
headline( /* get relevant info from header */ |
252 |
> |
char *s, |
253 |
> |
void *p |
254 |
> |
) |
255 |
|
{ |
256 |
|
char fmt[32]; |
257 |
|
|
387 |
|
register int es; |
388 |
|
int cs; |
389 |
|
|
390 |
< |
if (es = err != NULL) |
390 |
> |
if ( (es = err != NULL) ) |
391 |
|
fprintf(stderr, "%s: %s: %s\n", progname, |
392 |
|
fname==NULL?"<stdin>":fname, err); |
393 |
|
if (thedisplay != NULL) |
394 |
|
XCloseDisplay(thedisplay); |
395 |
< |
if (parent < 0 & sigrecv == 0) |
395 |
> |
if ((parent < 0) & (sigrecv == 0)) |
396 |
|
kill(getppid(), SIGCONT); |
397 |
|
while (parent > 0 && wait(&cs) != -1) { /* wait for any children */ |
398 |
|
if (es == 0) |
540 |
|
if (ourras == NULL) |
541 |
|
goto fail; |
542 |
|
getmono(); |
543 |
< |
} else if (ourvis.class == TrueColor | ourvis.class == DirectColor) { |
543 |
> |
} else if ((ourvis.class == TrueColor) | (ourvis.class == DirectColor)) { |
544 |
|
int datsiz = ourvis.depth>16 ? sizeof(int32) : sizeof(int16); |
545 |
|
ourdata = (unsigned char *)malloc(datsiz*xmax*ymax); |
546 |
|
if (ourdata == NULL) |
588 |
|
map_rcolors(ourras, wind); |
589 |
|
if (fast) |
590 |
|
make_rpixmap(ourras, wind); |
591 |
< |
if (!sequential & parent < 0 & sigrecv == 0) { |
591 |
> |
if ((!sequential) & (parent < 0) & (sigrecv == 0)) { |
592 |
|
kill(getppid(), SIGCONT); |
593 |
|
sigrecv--; |
594 |
|
} |
797 |
|
free_rpixmap(ourras); |
798 |
|
return(0); |
799 |
|
case '0': /* recenter origin */ |
800 |
< |
if (xoff == 0 & yoff == 0) |
800 |
> |
if ((xoff == 0) & (yoff == 0)) |
801 |
|
return(0); |
802 |
|
xoff = yoff = 0; |
803 |
|
XClearWindow(thedisplay, wind); |