home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / bsd_srcs / sys / hp300 / hpux / hpux_termio.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-05-08  |  6.3 KB  |  164 lines

  1. /*
  2.  * Copyright (c) 1988 University of Utah.
  3.  * Copyright (c) 1990 The Regents of the University of California.
  4.  * All rights reserved.
  5.  *
  6.  * This code is derived from software contributed to Berkeley by
  7.  * the Systems Programming Group of the University of Utah Computer
  8.  * Science Department.
  9.  *
  10.  * Redistribution and use in source and binary forms, with or without
  11.  * modification, are permitted provided that the following conditions
  12.  * are met:
  13.  * 1. Redistributions of source code must retain the above copyright
  14.  *    notice, this list of conditions and the following disclaimer.
  15.  * 2. Redistributions in binary form must reproduce the above copyright
  16.  *    notice, this list of conditions and the following disclaimer in the
  17.  *    documentation and/or other materials provided with the distribution.
  18.  * 3. All advertising materials mentioning features or use of this software
  19.  *    must display the following acknowledgement:
  20.  *    This product includes software developed by the University of
  21.  *    California, Berkeley and its contributors.
  22.  * 4. Neither the name of the University nor the names of its contributors
  23.  *    may be used to endorse or promote products derived from this software
  24.  *    without specific prior written permission.
  25.  *
  26.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  27.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  28.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  29.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  30.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  31.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  32.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  33.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  34.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  35.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  36.  * SUCH DAMAGE.
  37.  *
  38.  * from: Utah $Hdr: hpux_termio.h 1.1 90/07/09$
  39.  *
  40.  *    @(#)hpux_termio.h    7.3 (Berkeley) 10/24/90
  41.  */
  42.  
  43. /* HP-UX termio stuff */
  44.  
  45. #define    HPUXNCC    8
  46.  
  47. /* control characters */
  48. #define    HPUXVINTR    0
  49. #define    HPUXVQUIT    1
  50. #define    HPUXVERASE    2
  51. #define    HPUXVKILL    3
  52. #define    HPUXVEOF    4
  53. #define    HPUXVEOL    5
  54. #define    HPUXVMIN    4
  55. #define    HPUXVTIME    5
  56.  
  57. /* input modes */
  58. #define    TIO_IGNBRK    0x00000001    /* 0000001 */
  59. #define    TIO_BRKINT    0x00000002    /* 0000002 */
  60. #define    TIO_IGNPAR    0x00000004    /* 0000004 */
  61. #define    TIO_PARMRK    0x00000008    /* 0000010 */
  62. #define    TIO_INPCK    0x00000010    /* 0000020 */
  63. #define    TIO_ISTRIP    0x00000020    /* 0000040 */
  64. #define    TIO_INLCR    0x00000040    /* 0000100 */
  65. #define    TIO_IGNCR    0x00000080    /* 0000200 */
  66. #define    TIO_ICRNL    0x00000100    /* 0000400 */
  67. #define    TIO_IUCLC    0x00000200    /* 0001000 */
  68. #define    TIO_IXON    0x00000400    /* 0002000 */
  69. #define    TIO_IXANY    0x00000800    /* 0004000 */
  70. #define    TIO_IXOFF    0x00001000    /* 0010000 */
  71. #define    TIO_IENQAK    0x00002000    /* 0020000 */
  72.  
  73. /* output modes */
  74. #define    TIO_OPOST    0x00000001    /* 0000001 */
  75. #define    TIO_OLCUC    0x00000002    /* 0000002 */
  76. #define    TIO_ONLCR    0x00000004    /* 0000004 */
  77. #define    TIO_OCRNL    0x00000008    /* 0000010 */
  78. #define    TIO_ONOCR    0x00000010    /* 0000020 */
  79. #define    TIO_ONLRET    0x00000020    /* 0000040 */
  80. #define    TIO_OFILL    0x00000040    /* 0000100 */
  81. #define    TIO_OFDEL    0x00000080    /* 0000200 */
  82. #define    TIO_NLDLY    0x00000100    /* 0000400 */
  83. #define    TIO_NL0        0
  84. #define    TIO_NL1        0x00000100    /* 0000400 */
  85. #define    TIO_CRDLY    0x00000600    /* 0003000 */
  86. #define    TIO_CR0        0
  87. #define    TIO_CR1        0x00000200    /* 0001000 */
  88. #define    TIO_CR2        0x00000400    /* 0002000 */
  89. #define    TIO_CR3        0x00000600    /* 0003000 */
  90. #define    TIO_TABDLY    0x00001800    /* 0014000 */
  91. #define    TIO_TAB0    0
  92. #define    TIO_TAB1    0x00000800    /* 0004000 */
  93. #define    TIO_TAB2    0x00001000    /* 0010000 */
  94. #define    TIO_TAB3    0x00001800    /* 0014000 */
  95. #define    TIO_BSDLY    0x00002000    /* 0020000 */
  96. #define    TIO_BS0        0
  97. #define    TIO_BS1        0x00002000    /* 0020000 */
  98. #define    TIO_VTDLY    0x00004000    /* 0040000 */
  99. #define    TIO_VT0        0
  100. #define    TIO_VT1        0x00004000    /* 0040000 */
  101. #define    TIO_FFDLY    0x00008000    /* 0100000 */
  102. #define    TIO_FF0        0
  103. #define    TIO_FF1        0x00008000    /* 0100000 */
  104.  
  105. /* control modes */
  106. #define    TIO_CBAUD    0x0000001f    /* 0000037 */
  107. #define    TIO_B0        0
  108. #define    TIO_B50        0x00000001    /* 0000001 */
  109. #define    TIO_B75        0x00000002    /* 0000002 */
  110. #define    TIO_B110    0x00000003    /* 0000003 */
  111. #define    TIO_B134    0x00000004    /* 0000004 */
  112. #define    TIO_B150    0x00000005    /* 0000005 */
  113. #define    TIO_B200    0x00000006    /* 0000006 */
  114. #define    TIO_B300    0x00000007    /* 0000007 */
  115. #define    TIO_B600    0x00000008    /* 0000010 */
  116. #define    TIO_B900    0x00000009    /* 0000011 */
  117. #define    TIO_B1200    0x0000000a    /* 0000012 */
  118. #define    TIO_B1800    0x0000000b    /* 0000013 */
  119. #define    TIO_B2400    0x0000000c    /* 0000014 */
  120. #define    TIO_B3600    0x0000000d    /* 0000015 */
  121. #define    TIO_B4800    0x0000000e    /* 0000016 */
  122. #define    TIO_B7200    0x0000000f    /* 0000017 */
  123. #define    TIO_B9600    0x00000010    /* 0000020 */
  124. #define    TIO_B19200    0x00000011    /* 0000021 */
  125. #define    TIO_B38400    0x00000012    /* 0000022 */
  126. #define    TIO_EXTA    0x0000001e    /* 0000036 */
  127. #define    TIO_EXTB    0x0000001f    /* 0000037 */
  128. #define    TIO_CSIZE    0x00000060    /* 0000140 */
  129. #define    TIO_CS5        0
  130. #define    TIO_CS6        0x00000020    /* 0000040 */
  131. #define    TIO_CS7        0x00000040    /* 0000100 */
  132. #define    TIO_CS8        0x00000060    /* 0000140 */
  133. #define    TIO_CSTOPB    0x00000080    /* 0000200 */
  134. #define    TIO_CREAD    0x00000100    /* 0000400 */
  135. #define    TIO_PARENB    0x00000200    /* 0001000 */
  136. #define    TIO_PARODD    0x00000400    /* 0002000 */
  137. #define    TIO_HUPCL    0x00000800    /* 0004000 */
  138. #define    TIO_CLOCAL    0x00001000    /* 0010000 */
  139. #define TIO_CRTS       0x00002000    /* 0020000 */ /* Obsolete */
  140.  
  141. /* line discipline 0 modes */
  142. #define    TIO_ISIG    0x00000001    /* 0000001 */
  143. #define    TIO_ICANON    0x00000002    /* 0000002 */
  144. #define    TIO_XCASE    0x00000004    /* 0000004 */
  145. #define    TIO_ECHO    0x00000008    /* 0000010 */
  146. #define    TIO_ECHOE    0x00000010    /* 0000020 */
  147. #define    TIO_ECHOK    0x00000020    /* 0000040 */
  148. #define    TIO_ECHONL    0x00000040    /* 0000100 */
  149. #define    TIO_NOFLSH    0x00000080    /* 0000200 */
  150.  
  151. struct hpuxtermio {
  152.     u_short    c_iflag;    /* input modes */
  153.     u_short    c_oflag;    /* output modes */
  154.     u_short    c_cflag;    /* control modes */
  155.     u_short    c_lflag;    /* line discipline modes */
  156.     char    c_line;        /* line discipline */
  157.     u_char    c_cc[HPUXNCC];    /* control chars */
  158. };
  159.  
  160. #define    HPUXTCGETA    _IOR('T', 1, struct hpuxtermio)
  161. #define    HPUXTCSETA    _IOW('T', 2, struct hpuxtermio)
  162. #define    HPUXTCSETAW    _IOW('T', 3, struct hpuxtermio)
  163. #define    HPUXTCSETAF    _IOW('T', 4, struct hpuxtermio)
  164.