| 34 |
|
|
| 35 |
|
#define FONTNAME "8x13" /* text font we'll use */ |
| 36 |
|
|
| 37 |
< |
#define CTRL(c) ('c'-'@') |
| 37 |
> |
#define CTRL(c) ((c)-'@') |
| 38 |
|
|
| 39 |
|
#define BORWIDTH 5 /* border width */ |
| 40 |
|
|
| 105 |
|
|
| 106 |
|
extern char *malloc(), *calloc(); |
| 107 |
|
|
| 108 |
< |
extern double atof(), pow(), log(); |
| 108 |
> |
extern double pow(), log(); |
| 109 |
|
|
| 110 |
|
Display *thedisplay; |
| 111 |
|
|
| 419 |
|
com = buf[0]; |
| 420 |
|
switch (com) { /* interpret command */ |
| 421 |
|
case 'q': |
| 422 |
< |
case CTRL(D): /* quit */ |
| 422 |
> |
case CTRL('D'): /* quit */ |
| 423 |
|
quit(0); |
| 424 |
|
case '\n': |
| 425 |
|
case '\r': |
| 493 |
|
free_raster(ourras); |
| 494 |
|
getras(); |
| 495 |
|
/* fall through */ |
| 496 |
< |
case CTRL(R): /* redraw */ |
| 497 |
< |
case CTRL(L): |
| 496 |
> |
case CTRL('R'): /* redraw */ |
| 497 |
> |
case CTRL('L'): |
| 498 |
|
unmap_rcolors(ourras); |
| 499 |
|
XClearWindow(thedisplay, wind); |
| 500 |
|
map_rcolors(ourras, wind); |