20 |
|
#define DEVPATH getenv("PATH") /* device search path */ |
21 |
|
#endif |
22 |
|
|
23 |
+ |
#ifndef DELAY |
24 |
+ |
#define DELAY 20 /* seconds to wait for response */ |
25 |
+ |
#endif |
26 |
+ |
|
27 |
|
#ifndef BSD |
28 |
|
#define vfork fork |
29 |
|
#endif |
78 |
|
goto syserr; |
79 |
|
if ((devin = fdopen(p2[0], "r")) == NULL) |
80 |
|
goto syserr; |
81 |
< |
/* verify & get resolution */ |
81 |
> |
/* verify initialization */ |
82 |
|
putw(COM_SENDM, devout); |
83 |
|
fflush(devout); |
84 |
|
if (getw(devin) != COM_RECVM) |
85 |
|
return(NULL); |
86 |
< |
fread((char *)&comm_driver.pixaspect, |
87 |
< |
sizeof(comm_driver.pixaspect), 1, devin); |
84 |
< |
comm_driver.xsiz = getw(devin); |
85 |
< |
comm_driver.ysiz = getw(devin); |
86 |
> |
/* get driver parameters */ |
87 |
> |
comm_flush(); |
88 |
|
/* set error vectors */ |
89 |
|
cmdvec = comm_comout; |
90 |
|
if (wrnvec != NULL) |
143 |
|
fflush(devout); |
144 |
|
if (getc(devin) != COM_FLUSH) |
145 |
|
reply_error("flush"); |
146 |
+ |
fread((char *)&comm_driver.pixaspect, |
147 |
+ |
sizeof(comm_driver.pixaspect), 1, devin); |
148 |
+ |
comm_driver.xsiz = getw(devin); |
149 |
+ |
comm_driver.ysiz = getw(devin); |
150 |
|
comm_driver.inpready = getw(devin); |
151 |
|
} |
152 |
|
|