| 82 |
|
if (getw(devin) != COM_RECVM) |
| 83 |
|
return(NULL); |
| 84 |
|
/* get driver parameters */ |
| 85 |
< |
comm_flush(); |
| 85 |
> |
getstate(); |
| 86 |
|
/* set error vectors */ |
| 87 |
|
cmdvec = comm_comout; |
| 88 |
|
if (wrnvec != NULL) |
| 141 |
|
fflush(devout); |
| 142 |
|
if (getc(devin) != COM_FLUSH) |
| 143 |
|
reply_error("flush"); |
| 144 |
< |
fread((char *)&comm_driver.pixaspect, |
| 145 |
< |
sizeof(comm_driver.pixaspect), 1, devin); |
| 146 |
< |
comm_driver.xsiz = getw(devin); |
| 147 |
< |
comm_driver.ysiz = getw(devin); |
| 148 |
< |
comm_driver.inpready = getw(devin); |
| 144 |
> |
getstate(); |
| 145 |
|
} |
| 146 |
|
|
| 147 |
|
|
| 187 |
|
if (getc(devin) != COM_COMIN) |
| 188 |
|
reply_error("comin"); |
| 189 |
|
mygets(buf, devin); |
| 190 |
< |
comm_driver.inpready = getw(devin); |
| 190 |
> |
getstate(); |
| 191 |
|
} |
| 192 |
|
|
| 193 |
|
|
| 232 |
|
stderr_v(routine); |
| 233 |
|
stderr_v(": driver reply error\n"); |
| 234 |
|
quit(1); |
| 235 |
+ |
} |
| 236 |
+ |
|
| 237 |
+ |
|
| 238 |
+ |
static |
| 239 |
+ |
getstate() /* get driver state variables */ |
| 240 |
+ |
{ |
| 241 |
+ |
fread((char *)&comm_driver.pixaspect, |
| 242 |
+ |
sizeof(comm_driver.pixaspect), 1, devin); |
| 243 |
+ |
comm_driver.xsiz = getw(devin); |
| 244 |
+ |
comm_driver.ysiz = getw(devin); |
| 245 |
+ |
comm_driver.inpready = getw(devin); |
| 246 |
|
} |