home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 5 / FreshFish_July-August1994.bin / bbs / gnu / ixemul-39.47-env-bin.lha / include / sys / ioctl_compat.h < prev    next >
C/C++ Source or Header  |  1993-09-05  |  7KB  |  163 lines

  1. /*
  2.  * Copyright (c) 1990 The Regents of the University of California.
  3.  * All rights reserved.
  4.  *
  5.  * Redistribution and use in source and binary forms, with or without
  6.  * modification, are permitted provided that the following conditions
  7.  * are met:
  8.  * 1. Redistributions of source code must retain the above copyright
  9.  *    notice, this list of conditions and the following disclaimer.
  10.  * 2. Redistributions in binary form must reproduce the above copyright
  11.  *    notice, this list of conditions and the following disclaimer in the
  12.  *    documentation and/or other materials provided with the distribution.
  13.  * 3. All advertising materials mentioning features or use of this software
  14.  *    must display the following acknowledgement:
  15.  *    This product includes software developed by the University of
  16.  *    California, Berkeley and its contributors.
  17.  * 4. Neither the name of the University nor the names of its contributors
  18.  *    may be used to endorse or promote products derived from this software
  19.  *    without specific prior written permission.
  20.  *
  21.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  22.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  23.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  24.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  25.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  26.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  27.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  28.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  29.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  30.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  31.  * SUCH DAMAGE.
  32.  *
  33.  *    @(#)ioctl_compat.h    7.4 (Berkeley) 2/5/91
  34.  */
  35.  
  36. #ifndef _IOCTL_COMPAT_H_
  37. #define    _IOCTL_COMPAT_H_
  38.  
  39. #include <sys/ttychars.h>
  40. #include <sys/ttydev.h>
  41.  
  42. struct tchars {
  43.     char    t_intrc;    /* interrupt */
  44.     char    t_quitc;    /* quit */
  45.     char    t_startc;    /* start output */
  46.     char    t_stopc;    /* stop output */
  47.     char    t_eofc;        /* end-of-file */
  48.     char    t_brkc;        /* input delimiter (like nl) */
  49. };
  50.  
  51. struct ltchars {
  52.     char    t_suspc;    /* stop process signal */
  53.     char    t_dsuspc;    /* delayed stop process signal */
  54.     char    t_rprntc;    /* reprint line */
  55.     char    t_flushc;    /* flush output (toggles) */
  56.     char    t_werasc;    /* word erase */
  57.     char    t_lnextc;    /* literal next character */
  58. };
  59.  
  60. /*
  61.  * Structure for TIOCGETP and TIOCSETP ioctls.
  62.  */
  63. #ifndef _SGTTYB_
  64. #define    _SGTTYB_
  65. struct sgttyb {
  66.     char    sg_ispeed;        /* input speed */
  67.     char    sg_ospeed;        /* output speed */
  68.     char    sg_erase;        /* erase character */
  69.     char    sg_kill;        /* kill character */
  70.     short    sg_flags;        /* mode flags */
  71. };
  72. #endif
  73.  
  74. #ifdef USE_OLD_TTY
  75. # undef  TIOCGETD
  76. # define TIOCGETD    _IOR('t', 0, int)    /* get line discipline */
  77. # undef  TIOCSETD
  78. # define TIOCSETD    _IOW('t', 1, int)    /* set line discipline */
  79. #else
  80. # define OTIOCGETD    _IOR('t', 0, int)    /* get line discipline */
  81. # define OTIOCSETD    _IOW('t', 1, int)    /* set line discipline */
  82. #endif
  83. #define    TIOCHPCL    _IO('t', 2)        /* hang up on last close */
  84. #define    TIOCGETP    _IOR('t', 8,struct sgttyb)/* get parameters -- gtty */
  85. #define    TIOCSETP    _IOW('t', 9,struct sgttyb)/* set parameters -- stty */
  86. #define    TIOCSETN    _IOW('t',10,struct sgttyb)/* as above, but no flushtty*/
  87. #define    TIOCSETC    _IOW('t',17,struct tchars)/* set special characters */
  88. #define    TIOCGETC    _IOR('t',18,struct tchars)/* get special characters */
  89. #define        TANDEM        0x00000001    /* send stopc on out q full */
  90. #define        CBREAK        0x00000002    /* half-cooked mode */
  91. #define        LCASE        0x00000004    /* simulate lower case */
  92. #define        ECHO        0x00000008    /* echo input */
  93. #define        CRMOD        0x00000010    /* map \r to \r\n on output */
  94. #define        RAW        0x00000020    /* no i/o processing */
  95. #define        ODDP        0x00000040    /* get/send odd parity */
  96. #define        EVENP        0x00000080    /* get/send even parity */
  97. #define        ANYP        0x000000c0    /* get any parity/send none */
  98. #define        NLDELAY        0x00000300    /* \n delay */
  99. #define            NL0    0x00000000
  100. #define            NL1    0x00000100    /* tty 37 */
  101. #define            NL2    0x00000200    /* vt05 */
  102. #define            NL3    0x00000300
  103. #define        TBDELAY        0x00000c00    /* horizontal tab delay */
  104. #define            TAB0    0x00000000
  105. #define            TAB1    0x00000400    /* tty 37 */
  106. #define            TAB2    0x00000800
  107. #define        XTABS        0x00000c00    /* expand tabs on output */
  108. #define        CRDELAY        0x00003000    /* \r delay */
  109. #define            CR0    0x00000000
  110. #define            CR1    0x00001000    /* tn 300 */
  111. #define            CR2    0x00002000    /* tty 37 */
  112. #define            CR3    0x00003000    /* concept 100 */
  113. #define        VTDELAY        0x00004000    /* vertical tab delay */
  114. #define            FF0    0x00000000
  115. #define            FF1    0x00004000    /* tty 37 */
  116. #define        BSDELAY        0x00008000    /* \b delay */
  117. #define            BS0    0x00000000
  118. #define            BS1    0x00008000
  119. #define        ALLDELAY    (NLDELAY|TBDELAY|CRDELAY|VTDELAY|BSDELAY)
  120. #define        CRTBS        0x00010000    /* do backspacing for crt */
  121. #define        PRTERA        0x00020000    /* \ ... / erase */
  122. #define        CRTERA        0x00040000    /* " \b " to wipe out char */
  123. #define        TILDE        0x00080000    /* hazeltine tilde kludge */
  124. #define        MDMBUF        0x00100000    /*start/stop output on carrier*/
  125. #define        LITOUT        0x00200000    /* literal output */
  126. #define        TOSTOP        0x00400000    /*SIGSTOP on background output*/
  127. #define        FLUSHO        0x00800000    /* flush output to terminal */
  128. #define        NOHANG        0x01000000    /* (no-op) was no SIGHUP on carrier drop */
  129. #define        L001000        0x02000000
  130. #define        CRTKIL        0x04000000    /* kill line with " \b " */
  131. #define        PASS8        0x08000000
  132. #define        CTLECH        0x10000000    /* echo control chars as ^X */
  133. #define        PENDIN        0x20000000    /* tp->t_rawq needs reread */
  134. #define        DECCTQ        0x40000000    /* only ^Q starts after ^S */
  135. #define        NOFLSH        0x80000000    /* no output flush on signal */
  136. #define    TIOCLBIS    _IOW('t', 127, int)    /* bis local mode bits */
  137. #define    TIOCLBIC    _IOW('t', 126, int)    /* bic local mode bits */
  138. #define    TIOCLSET    _IOW('t', 125, int)    /* set entire local mode word */
  139. #define    TIOCLGET    _IOR('t', 124, int)    /* get local modes */
  140. #define        LCRTBS        (CRTBS>>16)
  141. #define        LPRTERA        (PRTERA>>16)
  142. #define        LCRTERA        (CRTERA>>16)
  143. #define        LTILDE        (TILDE>>16)
  144. #define        LMDMBUF        (MDMBUF>>16)
  145. #define        LLITOUT        (LITOUT>>16)
  146. #define        LTOSTOP        (TOSTOP>>16)
  147. #define        LFLUSHO        (FLUSHO>>16)
  148. #define        LNOHANG        (NOHANG>>16)
  149. #define        LCRTKIL        (CRTKIL>>16)
  150. #define        LPASS8        (PASS8>>16)
  151. #define        LCTLECH        (CTLECH>>16)
  152. #define        LPENDIN        (PENDIN>>16)
  153. #define        LDECCTQ        (DECCTQ>>16)
  154. #define        LNOFLSH        (NOFLSH>>16)
  155. #define    TIOCSLTC    _IOW('t',117,struct ltchars)/* set local special chars*/
  156. #define    TIOCGLTC    _IOR('t',116,struct ltchars)/* get local special chars*/
  157. #define OTIOCCONS    _IO('t', 98)    /* for hp300 -- sans int arg */
  158. #define    OTTYDISC    0
  159. #define    NETLDISC    1
  160. #define    NTTYDISC    2
  161.  
  162. #endif /* !_IOCTL_COMPAT_H_ */
  163.