#ifndef COMPAT_TERMIOS_H #define COMPAT_TERMIOS_H 1 #define B0 0x00000000 #define B50 0x00000001 #define B75 0x00000002 #define B110 0x00000003 #define B134 0x00000004 #define B150 0x00000005 #define B200 0x00000006 #define B300 0x00000007 #define B600 0x00000008 #define B1200 0x00000009 #define B1800 0x0000000a #define B2400 0x0000000b #define B4800 0x0000000c #define B9600 0x0000000d #define B19200 0x0000000e #define B38400 0x0000000f #define BRKINT 0x00000100 #define ICRNL 0x00000200 #define IGNBRK 0x00000400 #define IGNCR 0x00000800 #define IGNPAR 0x00001000 #define INLCR 0x00002000 #define INPCK 0x00004000 #define ISTRIP 0x00008000 #define IXOFF 0x00010000 #define IXON 0x00020000 #define PARMRK 0x00040000 #ifndef _POSIX_SOURCE #define IXANY 0x00000800 /* any char will restart after stop */ #define IMAXBEL 0x00002000 /* ring bell on input queue full */ #endif /*_POSIX_SOURCE */ #define OPOST 0x00000100 #define CLOCAL 0x00000100 #define CREAD 0x00000200 #define CS5 0x00000000 #define CS6 0x00000400 #define CS7 0x00000800 #define CS8 0x00000c00 #define CSIZE 0x00000c00 #define CSTOPB 0x00001000 #define HUPCL 0x00002000 #define PARENB 0x00004000 #define PARODD 0x00008000 #define ECHO 0x00000100 #define ECHOE 0x00000200 #define ECHOK 0x00000400 #define ECHONL 0x00000800 #define ICANON 0x00001000 #define IEXTEN 0x00002000 #define ISIG 0x00004000 #define NOFLSH 0x00008000 #define TOSTOP 0x00010000 #define TCIFLUSH 1 #define TCOFLUSH 2 #define TCIOFLUSH 3 #define TCOOFF 1 #define TCOON 2 #define TCIOFF 3 #define TCION 4 #define TCSADRAIN 1 #define TCSAFLUSH 2 #define TCSANOW 3 /* Compatibility header to allow some termios functionality to compile without #ifdefs */ #define VDISCARD 1 #define VEOL 2 #define VEOL2 3 #define VEOF 4 #define VERASE 5 #define VINTR 6 #define VKILL 7 #define VLNEXT 8 #define VMIN 9 #define VQUIT 10 #define VREPRINT 11 #define VSTART 12 #define VSTOP 13 #define VSUSP 14 #define VSWTC 15 #define VTIME 16 #define VWERASE 17 #define NCCS 18 typedef unsigned char cc_t; typedef unsigned int tcflag_t; typedef unsigned int speed_t; struct termios { tcflag_t c_iflag; tcflag_t c_oflag; tcflag_t c_cflag; tcflag_t c_lflag; char c_line; cc_t c_cc[NCCS]; speed_t c_ispeed; speed_t c_ospeed; }; #endif