| 22 |
|
|
| 23 |
|
int (*wrnvec)(), (*errvec)(), (*cmdvec)(); /* error vectors, unused */ |
| 24 |
|
|
| 25 |
+ |
long nrays = 0; /* fake it */ |
| 26 |
+ |
|
| 27 |
|
struct driver *dev = NULL; /* output device */ |
| 28 |
|
|
| 29 |
|
FILE *devin, *devout; /* communications channels */ |
| 59 |
|
quit(1); |
| 60 |
|
} |
| 61 |
|
/* open device */ |
| 62 |
< |
if ((dev = dinit(argv[0], argv[3])) == NULL) { |
| 61 |
< |
stderr_v("initialization failure\n"); |
| 62 |
> |
if ((dev = dinit(argv[0], argv[3])) == NULL) |
| 63 |
|
quit(1); |
| 63 |
– |
} |
| 64 |
|
putw(COM_RECVM, devout); /* verify initialization */ |
| 65 |
+ |
fwrite(&dev->pixaspect, sizeof(dev->pixaspect), 1, devout); |
| 66 |
|
putw(dev->xsiz, devout); |
| 67 |
|
putw(dev->ysiz, devout); |
| 68 |
|
fflush(devout); |
| 102 |
|
COLOR col; |
| 103 |
|
int xmin, ymin, xmax, ymax; |
| 104 |
|
|
| 105 |
+ |
nrays += 5; /* pretend */ |
| 106 |
|
fread(col, sizeof(COLOR), 1, devin); |
| 107 |
|
xmin = getw(devin); ymin = getw(devin); |
| 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); |
| 111 |
– |
notified = dev->inpready; |
| 114 |
|
} |
| 115 |
|
} |
| 116 |
|
|
| 177 |
|
do |
| 178 |
|
putc(*s, fp); |
| 179 |
|
while (*s++); |
| 178 |
– |
} |
| 179 |
– |
|
| 180 |
– |
|
| 181 |
– |
repaint(xmin, ymin, xmax, ymax) /* repaint section of display */ |
| 182 |
– |
int xmin, ymin, xmax, ymax; |
| 183 |
– |
{ |
| 184 |
– |
stderr_v("repaint called!\n"); /* no can do! */ |
| 180 |
|
} |
| 181 |
|
|
| 182 |
|
|