| 32 |
|
|
| 33 |
|
char *progname; /* driver name */ |
| 34 |
|
|
| 35 |
< |
int r_clear(), r_paintr(), r_getcur(), r_comout(), r_comin(); |
| 35 |
> |
int r_clear(), r_paintr(), r_getcur(), r_comout(), r_comin(), r_mycomin(); |
| 36 |
|
|
| 37 |
|
int (*dev_func[NREQUESTS])() = { /* request handlers */ |
| 38 |
|
r_clear, r_paintr, |
| 64 |
|
putw(COM_RECVM, devout); /* verify initialization */ |
| 65 |
|
putw(dev->xsiz, devout); |
| 66 |
|
putw(dev->ysiz, devout); |
| 67 |
+ |
fwrite(dev->pixaspect, sizeof(dev->pixaspect), 1, devout); |
| 68 |
|
fflush(devout); |
| 69 |
|
/* loop on requests */ |
| 70 |
|
while ((com = getc(devin)) != EOF) { |
| 108 |
|
xmax = getw(devin); ymax = getw(devin); |
| 109 |
|
(*dev->paintr)(col, xmin, ymin, xmax, ymax); |
| 110 |
|
/* check for input */ |
| 111 |
< |
if (dev->inpready > notified) { |
| 111 |
> |
if (!notified && dev->inpready > 0) { |
| 112 |
> |
notified = 1; |
| 113 |
|
kill(getppid(), SIGIO); |
| 112 |
– |
notified = dev->inpready; |
| 114 |
|
} |
| 115 |
|
} |
| 116 |
|
|
| 177 |
|
do |
| 178 |
|
putc(*s, fp); |
| 179 |
|
while (*s++); |
| 179 |
– |
} |
| 180 |
– |
|
| 181 |
– |
|
| 182 |
– |
repaint(xmin, ymin, xmax, ymax) /* repaint section of display */ |
| 183 |
– |
int xmin, ymin, xmax, ymax; |
| 184 |
– |
{ |
| 185 |
– |
/* no can do! */ |
| 180 |
|
} |
| 181 |
|
|
| 182 |
|
|