|
nsz |
6a2161 |
#include <termios.h>
|
|
nsz |
6a2161 |
#define T(t) (t*)0;
|
|
nsz |
6a2161 |
#define F(t,n) {t *y = &x.;;}
|
|
nsz |
6a2161 |
#define C(n) switch(n){case n:;}
|
|
nsz |
6a2161 |
static void f()
|
|
nsz |
6a2161 |
{
|
|
nsz |
6a2161 |
T(cc_t)
|
|
nsz |
6a2161 |
T(speed_t)
|
|
nsz |
6a2161 |
T(tcflag_t)
|
|
nsz |
6a2161 |
T(pid_t)
|
|
nsz |
6a2161 |
{
|
|
nsz |
6a2161 |
struct termios x;
|
|
nsz |
6a2161 |
F(tcflag_t,c_iflag)
|
|
nsz |
6a2161 |
F(tcflag_t,c_oflag)
|
|
nsz |
6a2161 |
F(tcflag_t,c_cflag)
|
|
nsz |
6a2161 |
F(tcflag_t,c_lflag)
|
|
nsz |
6a2161 |
F(cc_t,c_cc[NCCS])
|
|
nsz |
6a2161 |
}
|
|
nsz |
6a2161 |
C(NCCS)
|
|
nsz |
6a2161 |
C(VEOF)
|
|
nsz |
6a2161 |
C(VEOL)
|
|
nsz |
6a2161 |
C(VERASE)
|
|
nsz |
6a2161 |
C(VINTR)
|
|
nsz |
6a2161 |
C(VKILL)
|
|
nsz |
6a2161 |
C(VMIN)
|
|
nsz |
6a2161 |
C(VQUIT)
|
|
nsz |
6a2161 |
C(VSTART)
|
|
nsz |
6a2161 |
C(VSTOP)
|
|
nsz |
6a2161 |
C(VSUSP)
|
|
nsz |
6a2161 |
C(VTIME)
|
|
nsz |
6a2161 |
C(BRKINT)
|
|
nsz |
6a2161 |
C(ICRNL)
|
|
nsz |
6a2161 |
C(IGNBRK)
|
|
nsz |
6a2161 |
C(IGNCR)
|
|
nsz |
6a2161 |
C(IGNPAR)
|
|
nsz |
6a2161 |
C(INLCR)
|
|
nsz |
6a2161 |
C(INPCK)
|
|
nsz |
6a2161 |
C(ISTRIP)
|
|
nsz |
6a2161 |
C(IXANY)
|
|
nsz |
6a2161 |
C(IXOFF)
|
|
nsz |
6a2161 |
C(IXON)
|
|
nsz |
6a2161 |
C(PARMRK)
|
|
nsz |
6a2161 |
C(OPOST)
|
|
nsz |
6a2161 |
#ifdef _XOPEN_SOURCE
|
|
nsz |
6a2161 |
C(ONLCR)
|
|
nsz |
6a2161 |
C(OCRNL)
|
|
nsz |
6a2161 |
C(ONOCR)
|
|
nsz |
6a2161 |
C(ONLRET)
|
|
nsz |
6a2161 |
C(OFDEL)
|
|
nsz |
6a2161 |
C(OFILL)
|
|
nsz |
6a2161 |
C(NLDLY)
|
|
nsz |
6a2161 |
C(NL0)
|
|
nsz |
6a2161 |
C(NL1)
|
|
nsz |
6a2161 |
C(CRDLY)
|
|
nsz |
6a2161 |
C(CR0)
|
|
nsz |
6a2161 |
C(CR1)
|
|
nsz |
6a2161 |
C(CR2)
|
|
nsz |
6a2161 |
C(CR3)
|
|
nsz |
6a2161 |
C(TABDLY)
|
|
nsz |
6a2161 |
C(TAB0)
|
|
nsz |
6a2161 |
C(TAB1)
|
|
nsz |
6a2161 |
C(TAB2)
|
|
nsz |
6a2161 |
C(TAB3)
|
|
nsz |
6a2161 |
C(BSDLY)
|
|
nsz |
6a2161 |
C(BS0)
|
|
nsz |
6a2161 |
C(BS1)
|
|
nsz |
6a2161 |
C(VTDLY)
|
|
nsz |
6a2161 |
C(VT0)
|
|
nsz |
6a2161 |
C(VT1)
|
|
nsz |
6a2161 |
C(FFDLY)
|
|
nsz |
6a2161 |
C(FF0)
|
|
nsz |
6a2161 |
C(FF1)
|
|
nsz |
6a2161 |
#endif
|
|
nsz |
6a2161 |
C(B0)
|
|
nsz |
6a2161 |
C(B50)
|
|
nsz |
6a2161 |
C(B75)
|
|
nsz |
6a2161 |
C(B110)
|
|
nsz |
6a2161 |
C(B134)
|
|
nsz |
6a2161 |
C(B150)
|
|
nsz |
6a2161 |
C(B200)
|
|
nsz |
6a2161 |
C(B300)
|
|
nsz |
6a2161 |
C(B600)
|
|
nsz |
6a2161 |
C(B1200)
|
|
nsz |
6a2161 |
C(B1800)
|
|
nsz |
6a2161 |
C(B2400)
|
|
nsz |
6a2161 |
C(B4800)
|
|
nsz |
6a2161 |
C(B9600)
|
|
nsz |
6a2161 |
C(B19200)
|
|
nsz |
6a2161 |
C(B38400)
|
|
nsz |
6a2161 |
C(CSIZE)
|
|
nsz |
6a2161 |
C(CS5)
|
|
nsz |
6a2161 |
C(CS6)
|
|
nsz |
6a2161 |
C(CS7)
|
|
nsz |
6a2161 |
C(CS8)
|
|
nsz |
6a2161 |
C(CSTOPB)
|
|
nsz |
6a2161 |
C(CREAD)
|
|
nsz |
6a2161 |
C(PARENB)
|
|
nsz |
6a2161 |
C(PARODD)
|
|
nsz |
6a2161 |
C(HUPCL)
|
|
nsz |
6a2161 |
C(CLOCAL)
|
|
nsz |
6a2161 |
C(ECHO)
|
|
nsz |
6a2161 |
C(ECHOE)
|
|
nsz |
6a2161 |
C(ECHOK)
|
|
nsz |
6a2161 |
C(ECHONL)
|
|
nsz |
6a2161 |
C(ICANON)
|
|
nsz |
6a2161 |
C(IEXTEN)
|
|
nsz |
6a2161 |
C(ISIG)
|
|
nsz |
6a2161 |
C(NOFLSH)
|
|
nsz |
6a2161 |
C(TOSTOP)
|
|
nsz |
6a2161 |
C(TCSANOW)
|
|
nsz |
6a2161 |
C(TCSADRAIN)
|
|
nsz |
6a2161 |
C(TCSAFLUSH)
|
|
nsz |
6a2161 |
C(TCIFLUSH)
|
|
nsz |
6a2161 |
C(TCIOFLUSH)
|
|
nsz |
6a2161 |
C(TCOFLUSH)
|
|
nsz |
6a2161 |
C(TCIOFF)
|
|
nsz |
6a2161 |
C(TCION)
|
|
nsz |
6a2161 |
C(TCOOFF)
|
|
nsz |
6a2161 |
C(TCOON)
|
|
nsz |
0ef264 |
{speed_t(*p)(const struct termios*) = cfgetispeed;}
|
|
nsz |
0ef264 |
{speed_t(*p)(const struct termios*) = cfgetospeed;}
|
|
nsz |
0ef264 |
{int(*p)(struct termios*,speed_t) = cfsetispeed;}
|
|
nsz |
0ef264 |
{int(*p)(struct termios*,speed_t) = cfsetospeed;}
|
|
nsz |
0ef264 |
{int(*p)(int) = tcdrain;}
|
|
nsz |
0ef264 |
{int(*p)(int,int) = tcflow;}
|
|
nsz |
0ef264 |
{int(*p)(int,int) = tcflush;}
|
|
nsz |
0ef264 |
{int(*p)(int,struct termios*) = tcgetattr;}
|
|
nsz |
0ef264 |
{pid_t(*p)(int) = tcgetsid;}
|
|
nsz |
0ef264 |
{int(*p)(int,int) = tcsendbreak;}
|
|
nsz |
0ef264 |
{int(*p)(int,int,const struct termios*) = tcsetattr;}
|
|
nsz |
6a2161 |
}
|