ifdef.h 1.4 KB

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