home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 9.ddi / usr / include / sys / ttold.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  8.6 KB  |  259 lines

  1. /*    Copyright (c) 1990 UNIX System Laboratories, Inc.    */
  2. /*    Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T    */
  3. /*      All Rights Reserved      */
  4.  
  5. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF         */
  6. /*    UNIX System Laboratories, Inc.                         */
  7. /*    The copyright notice above does not evidence any       */
  8. /*    actual or intended publication of such source code.    */
  9.  
  10. #ifndef _SYS_TTOLD_H
  11. #define _SYS_TTOLD_H
  12.  
  13. #ident    "@(#)/usr/include/sys/ttold.h.sl 1.1 4.0 12/08/90 39750 AT&T-USL"
  14.  
  15. /*
  16.  * NOTE: if this file is included in the same program as sys/termios.h,
  17.  * then termios.h MUST be included before this one to avoid symbol
  18.  * redefinition warnings.
  19.  */
  20.  
  21. /* All the ioctls (BSD, V7, XENIX, S5) defines are in termios.h */
  22. /* this file has mostly BSD structures and flags */
  23.  
  24. /* BSD special characters. Structure for TIOCSTC/TIOCGTC */
  25. struct tchars {
  26.     char    t_intrc;    /* interrupt */
  27.     char    t_quitc;    /* quit */
  28.     char    t_startc;    /* start output */
  29.     char    t_stopc;    /* stop output */
  30.     char    t_eofc;        /* end-of-file */
  31.     char    t_brkc;        /* input delimiter (like nl) */
  32. };
  33.  
  34. /* note xenix defines tchars as tc */
  35. struct tc {
  36.     unsigned char    t_intrc;    /* interrupt */
  37.     unsigned char    t_quitc;    /* quit */
  38.     unsigned char    t_startc;    /* start output */
  39.     unsigned char    t_stopc;    /* stop output */
  40.     unsigned char    t_eofc;        /* end-of-file */
  41.     unsigned char    t_brkc;        /* input delimiter (like nl) */
  42. };
  43.  
  44. #ifdef i386
  45. #pragma pack()
  46. #endif
  47.  
  48. #ifndef _SGTTY_H
  49. /*
  50.  * Structure for TIOCGETP and TIOCSETP ioctls.
  51.  */
  52.  
  53.  
  54. /*  sg_flags value changed from short (in SUN/BSD) to int in System V to */
  55. /*  match sgtty.h definition */
  56. struct    sgttyb {
  57.     unsigned char    sg_ispeed;        /* input speed */
  58.     unsigned char    sg_ospeed;        /* output speed */
  59.     unsigned char    sg_erase;        /* erase character */
  60.     unsigned char    sg_kill;        /* kill character */
  61.     int    sg_flags;        /* mode flags */
  62. };
  63. /* BSD local special chars. Structure for TIOCSLTC/TIOCGLTC */
  64. struct ltchars {
  65.     char    t_suspc;    /* stop process signal */
  66.     char    t_dsuspc;   /* delayed stop process signal */
  67.     char    t_rprntc;   /* reprint line */
  68.     char    t_flushc;   /* flush output (toggles) */
  69.     char    t_werasc;   /* word erase */
  70.     char    t_lnextc;   /* literal next character */
  71. };
  72.  
  73. #endif /* _SGTTY_H */
  74.  
  75. /*
  76.  * 4.3BSD/XENIX tty ioctl commands that are either:
  77.  *  1) deprecated
  78.  *  2) not implemented (and never were implemented)
  79.  *  3) implemented on top of new-style "ioctl"s.
  80.  */
  81.  
  82. /*
  83.  * These ioctls are also defined in termios.h.
  84.  * because XENIX expects to see them in termio.h
  85.  */
  86.  
  87. #ifndef tIOC
  88. #define    tIOC    ('t'<<8)
  89. #endif
  90.  
  91. #ifndef _SYS_TERMIOS_H
  92. /* defined in termios.h also so that all the ioctl codes are visible*/
  93.  
  94. #define TIOCGETD    (tIOC|0)
  95. #define TIOCSETD    (tIOC|1)
  96. #ifndef _SGTTY_H
  97. #define TIOCHPCL    (tIOC|2)
  98. #define TIOCGETP    (tIOC|8)
  99. #define TIOCSETP      (tIOC|9)
  100. #endif /* _SGTTY_H */
  101. #define TIOCSETN    (tIOC|10)
  102. #ifndef _SGTTY_H
  103. #define TIOCEXCL    (tIOC|13)
  104. #define TIOCNXCL    (tIOC|14)
  105. #endif /* _SGTTY_H */
  106. #define    TIOCOUTQ    (tIOC|115)  /* driver output queue size */
  107. #define TIOCFLUSH    (tIOC|16)
  108. #define TIOCSETC    (tIOC|17)
  109. #define TIOCGETC    (tIOC|18)
  110.  
  111. /* BSD ioctls that are not the same as XENIX */
  112. #define    TIOCLBIS    (tIOC|127)    /* bis local mode bits */
  113. #define    TIOCLBIC    (tIOC|126)    /* bic local mode bits */
  114. #define    TIOCLSET    (tIOC|125)    /* set entire local mode word */
  115. #define    TIOCLGET    (tIOC|124)    /* get local modes */
  116. #define    TIOCSBRK    (tIOC|123)    /* set break bit */
  117. #define    TIOCCBRK    (tIOC|122)    /* clear break bit */
  118. #define    TIOCSDTR    (tIOC|121)    /* set data terminal ready */
  119. #define    TIOCCDTR    (tIOC|120)    /* clear data terminal ready */
  120. #define    TIOCSLTC    (tIOC|117)    /* set local special chars */
  121. #define    TIOCGLTC    (tIOC|116)    /* get local special chars */
  122. #define    TIOCNOTTY    (tIOC|113)    /* void tty association */
  123. #define    TIOCSTOP    (tIOC|111)    /* stop output, like ^S */
  124. #define    TIOCSTART    (tIOC|110)    /* start output, like ^Q */
  125.  
  126. #define    TIOCREMOTE    (tIOC|30)    /* remote input editing */
  127.  
  128. /* windowing ioctls and structure also defined in termios.h */
  129.  
  130. #define    TIOC    ('T'<<8)
  131.  
  132. #define TIOCGWINSZ (TIOC|104)
  133. #define TIOCSWINSZ (TIOC|103)
  134.  
  135. #ifndef _SYS_PTEM_H
  136. /* Windowing structure to support TIOCSWINSZ/TIOCGWINSZ */
  137. struct winsize {
  138.     unsigned short ws_row;       /* rows, in characters*/
  139.     unsigned short ws_col;       /* columns, in character */
  140.     unsigned short ws_xpixel;    /* horizontal size, pixels */
  141.     unsigned short ws_ypixel;    /* vertical size, pixels */
  142. };
  143.  
  144. #endif /* end _SYS_PTEM_H */
  145. #endif /* end _SYS_TERMIOS_H */
  146.  
  147. /* Old SVR3.0 flags - should be removed if there is no problem */
  148. /* note they are commented out */
  149.  
  150. #define O_HUPCL 01
  151. #define O_NOAL  004000
  152.  
  153. #if 0
  154.  
  155. #define O_CBREAK    02
  156. #define    O_XTABS    02
  157. #define    O_LCASE    04   /* simulate lower case */
  158. #define    O_ECHO    010  /* echo input */
  159. #define    O_CRMOD    020  /* map \r to \r\n on output */
  160. #define    O_RAW    040  /* no i/o processing */
  161. #define    O_ODDP    0100 /* get/send odd parity */
  162. #define    O_EVENP    0200 /* get/send even parity */
  163. #define    O_NLDELAY    001400    /* \n delay */
  164. #define    O_NL1    000400
  165. #define    O_NL2    001000
  166. #define    O_TBDELAY    002000    /* horizontal tab delay */
  167. #define    O_CRDELAY    030000    /* \r delay */
  168. #define    O_CR1    010000
  169. #define    O_CR2    020000
  170. #define    O_VTDELAY    040000    /* vertical tab delay */
  171. #define    O_BSDELAY    0100000 /* \b delay */
  172.  
  173. #endif
  174.  
  175. /* 4.3 BSD additions. These are new codes  and some of the
  176.  * flags that were there in SVR3.2 ttold.h have been given
  177.  * new codes. Otherwise they will not fit in a word.
  178.  */ 
  179.  
  180. #define        O_TANDEM    0x00000001    /* send stopc on out q full */
  181. #define        O_CBREAK    0x00000002    /* half-cooked mode */
  182. #define        O_LCASE        0x00000004    /* simulate lower case */
  183. #define        O_ECHO        0x00000008    /* echo input */
  184. #define        O_CRMOD        0x00000010    /* map \r to \r\n on output */
  185. #define        O_RAW        0x00000020    /* no i/o processing */
  186. #define        O_ODDP        0x00000040    /* get/send odd parity */
  187. #define        O_EVENP        0x00000080    /* get/send even parity */
  188. #define        O_ANYP        0x000000c0    /* get any parity/send none */
  189. #define        O_NLDELAY    0x00000300    /* \n delay */
  190. #define            O_NL0    0x00000000
  191. #define            O_NL1    0x00000100    /* tty 37 */
  192. #define            O_NL2    0x00000200    /* vt05 */
  193. #define            O_NL3    0x00000300
  194. #define        O_TBDELAY    0x00000c00    /* horizontal tab delay */
  195. #define            O_TAB0    0x00000000
  196. #define            O_TAB1    0x00000400    /* tty 37 */
  197. #define            O_TAB2    0x00000800
  198. #define        O_XTABS        0x00000c00    /* expand tabs on output */
  199. #define        O_CRDELAY    0x00003000    /* \r delay */
  200. #define            O_CR0    0x00000000
  201. #define            O_CR1    0x00001000    /* tn 300 */
  202. #define            O_CR2    0x00002000    /* tty 37 */
  203. #define            O_CR3    0x00003000    /* concept 100 */
  204. #define        O_VTDELAY    0x00004000    /* vertical tab delay */
  205. #define            O_FF0    0x00000000
  206. #define            O_FF1    0x00004000    /* tty 37 */
  207. #define        O_BSDELAY    0x00008000    /* \b delay */
  208. #define            O_BS0    0x00000000
  209. #define            O_BS1    0x00008000
  210. #define     O_ALLDELAY    (O_NLDELAY|O_TBDELAY|O_CRDELAY|O_VTDELAY|O_BSDELAY)
  211. #define        O_CRTBS        0x00010000    /* do backspacing for crt */
  212. #define        O_PRTERA    0x00020000    /* \ ... / erase */
  213. #define        O_CRTERA    0x00040000    /* " \b " to wipe out char */
  214. #define        O_TILDE        0x00080000    /* hazeltine tilde kludge */
  215. #define        O_MDMBUF    0x00100000    /* start/stop output on carrier intr */
  216. #define        O_LITOUT    0x00200000    /* literal output */
  217. #define        O_TOSTOP    0x00400000    /* SIGSTOP on background output */
  218. #define        O_FLUSHO    0x00800000    /* flush output to terminal */
  219. #define        O_NOHANG    0x01000000    /* no SIGHUP on carrier drop */
  220. #define        O_L001000    0x02000000
  221. #define        O_CRTKIL    0x04000000    /* kill line with " \b " */
  222. #define        O_PASS8        0x08000000
  223. #define        O_CTLECH    0x10000000    /* echo control chars as ^X */
  224. #define        O_PENDIN    0x20000000    /* tp->t_rawq needs reread */
  225. #define        O_DECCTQ    0x40000000    /* only ^Q starts after ^S */
  226. #define        O_NOFLSH    0x80000000    /* no output flush on signal */
  227.  
  228. /* more BSD flags */
  229. #define        LCRTBS        (O_CRTBS>>16)
  230. #define        LPRTERA        (O_PRTERA>>16)
  231. #define        LCRTERA        (O_CRTERA>>16)
  232. #define        LTILDE        (O_TILDE>>16)
  233. #define        LMDMBUF        (O_MDMBUF>>16)
  234. #define        LLITOUT        (O_LITOUT>>16)
  235. #define        LTOSTOP        (O_TOSTOP>>16)
  236. #define        LFLUSHO        (O_FLUSHO>>16)
  237. #define        LNOHANG        (O_NOHANG>>16)
  238. #define        LCRTKIL        (O_CRTKIL>>16)
  239. #define        LPASS8        (O_PASS8>>16)
  240. #define        LCTLECH        (O_CTLECH>>16)
  241. #define        LPENDIN        (O_PENDIN>>16)
  242. #define        LDECCTQ        (O_DECCTQ>>16)
  243. #define        LNOFLSH        (O_NOFLSH>>16)
  244.  
  245.  
  246. #define        NOPOST        0x00000001    /* no processing on output (LITOUT with 7 bits + parity) */
  247. #define        NOISIG        0x00000002    /* disable all signal-generating characters */
  248. #define        STOPB        0x00000004    /* two stop bits */
  249.  
  250. #define    OTTYDISC    0        /* old, v7 std tty driver */
  251. #define    NETLDISC    1        /* line discip for berk net */
  252. #define    NTTYDISC    2        /* new tty discipline */
  253. #define    TABLDISC    3        /* hitachi tablet discipline */
  254. #define    NTABLDISC    4        /* gtco tablet discipline */
  255. #define    MOUSELDISC    5        /* mouse discipline */
  256. #define    KBDLDISC    6        /* up/down keyboard trans (console) */
  257.  
  258. #endif    /* _SYS_TTOLD_H */
  259.