| 137 |
|
sprintf(errmsg, "can't open file \"%s\"", fname); |
| 138 |
|
quiterr(errmsg); |
| 139 |
|
} |
| 140 |
< |
} else |
| 141 |
< |
goto userr; |
| 142 |
< |
|
| 140 |
> |
} |
| 141 |
|
/* get header */ |
| 142 |
|
getheader(fin, headline); |
| 143 |
|
/* get picture dimensions */ |
| 345 |
|
int x, y; |
| 346 |
|
int w, h; |
| 347 |
|
{ |
| 348 |
< |
if (map_rcolors(ourras) == NULL) { |
| 348 |
> |
if (ourras->ncolors && map_rcolors(ourras) == NULL) { |
| 349 |
|
fprintf(stderr, "%s: cannot allocate colors\n", progname); |
| 350 |
|
return(-1); |
| 351 |
|
} |
| 429 |
|
getras(); |
| 430 |
|
/* fall through */ |
| 431 |
|
case CTRL(R): /* redraw */ |
| 432 |
+ |
case CTRL(L): |
| 433 |
|
XClear(wind); |
| 434 |
|
return(redraw(0, 0, width, height)); |
| 435 |
|
case ' ': /* clear */ |
| 689 |
|
} |
| 690 |
|
|
| 691 |
|
|
| 692 |
< |
picreadcm(map) /* do gamcor correction */ |
| 692 |
> |
picreadcm(map) /* do gamma correction */ |
| 693 |
|
colormap map; |
| 694 |
|
{ |
| 695 |
|
extern double pow(); |