52 |
|
#define MINPIX 8 /* minimum hardware color */ |
53 |
|
|
54 |
|
#define NCOLS 512 /* maximum # columns for output */ |
55 |
< |
#define NROWS 512-COMHT /* maximum # rows for output */ |
55 |
> |
#define NROWS 483-COMHT /* maximum # rows for output */ |
56 |
|
#define COMHT 16 /* height of command line */ |
57 |
|
#define COMCW 63 /* maximum chars on command line */ |
58 |
|
|
59 |
– |
int anewcolr(); |
60 |
– |
|
59 |
|
int aed_close(), aed_clear(), aed_paintr(), |
60 |
|
aed_getcur(), aed_comout(), aed_errout(); |
61 |
|
|
62 |
|
static struct driver aed_driver = { |
63 |
|
aed_close, aed_clear, aed_paintr, aed_getcur, |
64 |
< |
aed_comout, NULL, |
65 |
< |
NCOLS, NROWS |
64 |
> |
aed_comout, NULL, NULL, |
65 |
> |
1.0, NCOLS, NROWS |
66 |
|
}; |
67 |
|
|
68 |
|
|
69 |
|
struct driver * |
70 |
< |
aed_init(name) /* open AED */ |
71 |
< |
char *name; |
70 |
> |
aed_init(name, id) /* open AED */ |
71 |
> |
char *name, *id; |
72 |
|
{ |
73 |
|
if (ttyset(&aed_driver, fileno(stdin)) < 0) { /* set tty driver */ |
74 |
|
stderr_v("cannot access terminal\n"); |
86 |
|
byte(BLK); byte(WHT); byte(15); |
87 |
|
command(SCP); |
88 |
|
byte('+'); byte(0); byte(1); |
89 |
< |
make_cmap(GAMMA); /* make color map */ |
89 |
> |
make_gmap(GAMMA); /* make color map */ |
90 |
|
errvec = aed_errout; /* set error vector */ |
91 |
|
cmdvec = aed_errout; |
92 |
|
if (wrnvec != NULL) |
117 |
|
int x, y; |
118 |
|
{ |
119 |
|
command(FFD); |
120 |
< |
new_ctab(NCOLORS, anewcolr); /* init color table */ |
120 |
> |
new_ctab(NCOLORS); /* init color table */ |
121 |
|
flush(); |
122 |
|
} |
123 |
|
|
127 |
|
COLOR col; |
128 |
|
int xmin, ymin, xmax, ymax; |
129 |
|
{ |
130 |
+ |
extern int anewcolr(); |
131 |
|
int ndx; |
132 |
|
|
133 |
< |
ndx = get_pixel(col); /* may call anewcolr() */ |
133 |
> |
ndx = get_pixel(col, anewcolr); /* calls anewcolr() */ |
134 |
|
command(SEC); /* draw rectangle */ |
135 |
|
byte(ndx+MINPIX); |
136 |
|
aedsetcap(xmin, ymin+COMHT); |