1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 #ifndef _ALPHA_TERMBITS_H 3 #define _ALPHA_TERMBITS_H 4 5 #include <asm-generic/termbits-common.h> 6 7 typedef unsigned int tcflag_t; 8 9 /* 10 * termios type and macro definitions. Be careful about adding stuff 11 * to this file since it's used in GNU libc and there are strict rules 12 * concerning namespace pollution. 13 */ 14 15 #define NCCS 19 16 struct termios { 17 tcflag_t c_iflag; /* input mode flags */ 18 tcflag_t c_oflag; /* output mode flags */ 19 tcflag_t c_cflag; /* control mode flags */ 20 tcflag_t c_lflag; /* local mode flags */ 21 cc_t c_cc[NCCS]; /* control characters */ 22 cc_t c_line; /* line discipline (== c_cc[19]) */ 23 speed_t c_ispeed; /* input speed */ 24 speed_t c_ospeed; /* output speed */ 25 }; 26 27 /* Alpha has identical termios and termios2 */ 28 29 struct termios2 { 30 tcflag_t c_iflag; /* input mode flags */ 31 tcflag_t c_oflag; /* output mode flags */ 32 tcflag_t c_cflag; /* control mode flags */ 33 tcflag_t c_lflag; /* local mode flags */ 34 cc_t c_cc[NCCS]; /* control characters */ 35 cc_t c_line; /* line discipline (== c_cc[19]) */ 36 speed_t c_ispeed; /* input speed */ 37 speed_t c_ospeed; /* output speed */ 38 }; 39 40 /* Alpha has matching termios and ktermios */ 41 42 struct ktermios { 43 tcflag_t c_iflag; /* input mode flags */ 44 tcflag_t c_oflag; /* output mode flags */ 45 tcflag_t c_cflag; /* control mode flags */ 46 tcflag_t c_lflag; /* local mode flags */ 47 cc_t c_cc[NCCS]; /* control characters */ 48 cc_t c_line; /* line discipline (== c_cc[19]) */ 49 speed_t c_ispeed; /* input speed */ 50 speed_t c_ospeed; /* output speed */ 51 }; 52 53 /* c_cc characters */ 54 #define VEOF 0 55 #define VEOL 1 56 #define VEOL2 2 57 #define VERASE 3 58 #define VWERASE 4 59 #define VKILL 5 60 #define VREPRINT 6 61 #define VSWTC 7 62 #define VINTR 8 63 #define VQUIT 9 64 #define VSUSP 10 65 #define VSTART 12 66 #define VSTOP 13 67 #define VLNEXT 14 68 #define VDISCARD 15 69 #define VMIN 16 70 #define VTIME 17 71 72 /* c_iflag bits */ 73 #define IXON 0x0200 74 #define IXOFF 0x0400 75 #define IUCLC 0x1000 76 #define IMAXBEL 0x2000 77 #define IUTF8 0x4000 78 79 /* c_oflag bits */ 80 #define ONLCR 0x00002 81 #define OLCUC 0x00004 82 #define NLDLY 0x00300 83 #define NL0 0x00000 84 #define NL1 0x00100 85 #define NL2 0x00200 86 #define NL3 0x00300 87 #define TABDLY 0x00c00 88 #define TAB0 0x00000 89 #define TAB1 0x00400 90 #define TAB2 0x00800 91 #define TAB3 0x00c00 92 #define CRDLY 0x03000 93 #define CR0 0x00000 94 #define CR1 0x01000 95 #define CR2 0x02000 96 #define CR3 0x03000 97 #define FFDLY 0x04000 98 #define FF0 0x00000 99 #define FF1 0x04000 100 #define BSDLY 0x08000 101 #define BS0 0x00000 102 #define BS1 0x08000 103 #define VTDLY 0x10000 104 #define VT0 0x00000 105 #define VT1 0x10000 106 /* 107 * Should be equivalent to TAB3, see description of TAB3 in 108 * POSIX.1-2008, Ch. 11.2.3 "Output Modes" 109 */ 110 #define XTABS TAB3 111 112 /* c_cflag bit meaning */ 113 #define CBAUD 0x0000001f 114 #define CBAUDEX 0x00000000 115 #define BOTHER 0x0000001f 116 #define B57600 0x00000010 117 #define B115200 0x00000011 118 #define B230400 0x00000012 119 #define B460800 0x00000013 120 #define B500000 0x00000014 121 #define B576000 0x00000015 122 #define B921600 0x00000016 123 #define B1000000 0x00000017 124 #define B1152000 0x00000018 125 #define B1500000 0x00000019 126 #define B2000000 0x0000001a 127 #define B2500000 0x0000001b 128 #define B3000000 0x0000001c 129 #define B3500000 0x0000001d 130 #define B4000000 0x0000001e 131 #define CSIZE 0x00000300 132 #define CS5 0x00000000 133 #define CS6 0x00000100 134 #define CS7 0x00000200 135 #define CS8 0x00000300 136 #define CSTOPB 0x00000400 137 #define CREAD 0x00000800 138 #define PARENB 0x00001000 139 #define PARODD 0x00002000 140 #define HUPCL 0x00004000 141 #define CLOCAL 0x00008000 142 #define CIBAUD 0x001f0000 143 144 /* c_lflag bits */ 145 #define ISIG 0x00000080 146 #define ICANON 0x00000100 147 #define XCASE 0x00004000 148 #define ECHO 0x00000008 149 #define ECHOE 0x00000002 150 #define ECHOK 0x00000004 151 #define ECHONL 0x00000010 152 #define NOFLSH 0x80000000 153 #define TOSTOP 0x00400000 154 #define ECHOCTL 0x00000040 155 #define ECHOPRT 0x00000020 156 #define ECHOKE 0x00000001 157 #define FLUSHO 0x00800000 158 #define PENDIN 0x20000000 159 #define IEXTEN 0x00000400 160 #define EXTPROC 0x10000000 161 162 /* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'. */ 163 #define TCSANOW 0 164 #define TCSADRAIN 1 165 #define TCSAFLUSH 2 166 167 #endif /* _ALPHA_TERMBITS_H */ 168