ecutermio.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. /*+-------------------------------------------------------------------------
  2. ecutermio.h
  3. An attempt to mask the differences between posix termios and sysv termio.
  4. Daniel Harris.
  5. --------------------------------------------------------------------------*/
  6. /*+:EDITS:*/
  7. /*:04-26-2000-11:15-wht@bob-RELEASE 4.42 */
  8. /*:02-26-1998-03:08-wht@kepler-LINUX 2/Redhat */
  9. /*:01-24-1997-02:37-wht@yuriatin-SOURCE RELEASE 4.00 */
  10. /*:09-11-1996-20:00-wht@yuriatin-3.48-major telnet,curses,structural overhaul */
  11. /*:11-23-1995-11:20-wht@kepler-source control 3.37 for tsx-11 */
  12. /*:11-14-1995-10:23-wht@kepler-3.37.80-source control point: SOCKETS */
  13. /*:10-21-1995-12:40-wht@wwtp1-bad dup/edit on TERMIO for termio */
  14. /*:10-15-1995-15:23-wht@calvin-exclude sys/ioctl.h include */
  15. /*:10-15-1995-15:14-wht@jonah-undef NL0, etc before inc termios.h */
  16. /*:04-09-1995-03:10-wht@gyro-fix Solaris NCC et al redef warnings */
  17. /*:05-04-1994-04:39-wht@n4hgf-ECU release 3.30 */
  18. /*:01-23-1994-14:57-wht@n4hgf-fix type in #undef */
  19. /*:01-16-1994-16:48-wht@n4hgf-organize after new ports */
  20. /*:12-18-1993-??:??-daniel@reubio-transplanted into 3.28.06 */
  21. /*:12-15-1993-??:??-daniel@reubio-moved NCC -> NCCS #define here from ecu.h */
  22. /*:11-27-1993-??:??-daniel@reubio-created */
  23. #ifndef _ecutermio_h
  24. #define _ecutermio_h
  25. #if defined(CFG_TermiosLineio)
  26. /* #include <sys/ioctl.h> */
  27. #if defined(sun)
  28. #undef NL0
  29. #undef NL1
  30. #undef CR0
  31. #undef CR1
  32. #undef CR2
  33. #undef CR3
  34. #undef TAB0
  35. #undef TAB1
  36. #undef TAB2
  37. #undef XTABS
  38. #undef BS0
  39. #undef BS1
  40. #undef FF0
  41. #undef FF1
  42. #undef ECHO
  43. #undef NOFLSH
  44. #undef TOSTOP
  45. #undef FLUSHO
  46. #undef PENDIN
  47. #endif /* sun */
  48. #include <termios.h>
  49. #define TERMIO termios
  50. #undef NCC
  51. #define NCC NCCS
  52. #undef TCSETA
  53. #define TCSETA TCSANOW
  54. #undef TCSETAF
  55. #define TCSETAF TCSAFLUSH
  56. #undef TCSETAW
  57. #define TCSETAW TCSADRAIN
  58. #else /* use termio */
  59. #include <termio.h>
  60. #define TERMIO termio
  61. /* ecutermio.c and it's callers need these for termio base */
  62. #if !defined(TCOFF)
  63. #define TCOOFF 0
  64. #endif
  65. #if !defined(TCOON)
  66. #define TCOON 1
  67. #endif
  68. #if !defined(TCIFLUSH)
  69. #define TCIFLUSH 0
  70. #endif
  71. #if !defined(TCOFLUSH)
  72. #define TCOFLUSH 1
  73. #endif
  74. #if !defined(TCIOFLUSH)
  75. #define TCIOFLUSH 2
  76. #endif
  77. #endif /* CFG_TermiosLineio */
  78. #ifdef sun
  79. #include <sys/ttold.h>
  80. #if defined (SVR4)
  81. #include <sys/ttydev.h> /* To pick up EXTA EXTB */
  82. #endif
  83. #endif /* sun */
  84. #if defined(SVR4)
  85. #include <sys/termios.h>
  86. #include <sys/termiox.h>
  87. extern int hx_flag;
  88. #endif
  89. /*
  90. * Linux has an unbelievable hack for baud values above
  91. * 38400. ("baud rate" is a redundant, meaningless term).
  92. *
  93. * If you use TIOCGSERIAL/TIOCSSERIAL to get the tty's
  94. * Linux-specific struct serial structure, and set bits
  95. * in it and plug it back with TIOCSSERIAL, then you
  96. * can make Linux treat B38400 as 57600 or 115200.
  97. */
  98. #if defined(linux)
  99. #include <linux/serial.h>
  100. #if defined(ASYNC_SPD_MASK) && !defined(B115200) && defined(TIOCGSERIAL)
  101. #define LINUX_ASYNC_HACK
  102. #endif /* ASYNC_SPD_MASK/B115200/TIOCGSERIAL */
  103. #endif /* linux */
  104. #endif /* _ecutermio_h */
  105. /* vi: set tabstop=4 shiftwidth=4: */
  106. /* end of ecutermio.h */