1 /* 2 * 3 * Conditional compilation definitions needed in ifdef.c and postio.c. 4 * 5 */ 6 7 #ifdef SYSV 8 #include <termio.h> 9 10 #ifdef DKSTREAMS 11 #include <sys/stream.h> 12 #include <sys/stropts.h> 13 #endif 14 15 #endif 16 17 #ifdef V9 18 #include <sys/filio.h> 19 #include <sys/ttyio.h> 20 21 extern int tty_ld; 22 #endif 23 24 #ifdef BSD4_2 25 #include <sgtty.h> 26 #include <sys/time.h> 27 #include <errno.h> 28 29 #define FD_ZERO(s) (s) = 0 30 #define FD_SET(n,s) (s) |= 1 << (n) 31 32 extern int errno; 33 #endif 34 35 #ifdef DKHOST 36 #include <dk.h> 37 #include <sysexits.h> 38 39 extern char *dtnamer(); 40 extern int dkminor(); 41 #endif 42 43 /* 44 * 45 * External variable declarations - most (if not all) are defined in postio.c and 46 * needed by the routines in ifdef.c. 47 * 48 */ 49 50 extern char *line; /* printer is on this line */ 51 extern int ttyi; /* input */ 52 extern int ttyo; /* and output file descriptors */ 53 extern FILE *fp_log; /* just for DKHOST stuff */ 54 55 extern char mesg[]; /* exactly what came back on ttyi */ 56 extern char *endmesg; /* one in front of last free slot in mesg */ 57 extern int next; /* next character goes in mesg[next] */ 58 59 extern short baudrate; /* printer is running at this speed */ 60 extern int stopbits; /* and expects this many stop bits */ 61 extern int interactive; /* TRUE for interactive mode */ 62 63 extern int whatami; /* a READ or WRITE process - or both */ 64 extern int canread; /* allows reads */ 65 extern int canwrite; /* and writes if TRUE */ 66 67