16 |
|
|
17 |
|
#include "driver.h" |
18 |
|
|
19 |
+ |
#include "vfork.h" |
20 |
+ |
|
21 |
|
#ifndef DEVPATH |
22 |
|
#define DEVPATH getenv("PATH") /* device search path */ |
23 |
|
#endif |
26 |
|
#define DELAY 20 /* seconds to wait for response */ |
27 |
|
#endif |
28 |
|
|
27 |
– |
#ifndef BSD |
28 |
– |
#define vfork fork |
29 |
– |
#endif |
30 |
– |
|
31 |
– |
extern char *getpath(), *getenv(); |
32 |
– |
|
29 |
|
static int comm_close(), comm_clear(), comm_paintr(), comm_errout(), |
30 |
|
comm_getcur(), comm_comout(), comm_comin(), comm_flush(); |
31 |
|
|
47 |
|
int p1[2], p2[2]; |
48 |
|
char pin[16], pout[16]; |
49 |
|
/* find driver program */ |
50 |
< |
if ((devname = getpath(dname, DEVPATH, 1)) == NULL) { |
50 |
> |
if ((devname = getpath(dname, DEVPATH, X_OK)) == NULL) { |
51 |
|
stderr_v(dname); |
52 |
|
stderr_v(": not found\n"); |
53 |
|
return(NULL); |