/* : : generated from contrib/ast/src/lib/libast/features/tty by iffe version 2012-07-17 : : */ #ifndef _def_tty_ast #define _def_tty_ast 1 #define _sys_types 1 /* #include ok */ #define _hdr_termios 1 /* #include ok */ #define _hdr_termio 1 /* #include ok */ #define _hdr_sgtty 1 /* #include ok */ #define _sys_termios 1 /* #include ok */ #define _sys_termio 1 /* #include ok */ #define _sys_ioctl 1 /* #include ok */ #define _lib_tcgetattr 1 /* tcgetattr() in default lib(s) */ #define _lib_tcgetpgrp 1 /* tcgetpgrp() in default lib(s) */ #define _mac__POSIX_VDISABLE 1 /* _POSIX_VDISABLE is a macro */ #ifdef _hdr_termios # if _mac__POSIX_VDISABLE # undef _POSIX_VDISABLE # endif # include #else # if defined(_sys_termios) && defined(_lib_tcgetattr) # include # define _hdr_termios 1 # else # undef _sys_termios # endif /* _sys_termios */ #endif /* _hdr_termios */ #ifdef _hdr_termios # undef _hdr_sgtty # undef tcgetattr # undef tcsetattr # undef tcgetpgrp # undef tcsetpgrp # undef cfgetospeed # ifndef TCSANOW # define TCSANOW TCSETS # define TCSADRAIN TCSETSW # define TCSAFLUSH TCSETSF # endif /* TCSANOW */ /* The following corrects bugs in some implementations */ # if defined(TCSADFLUSH) && !defined(TCSAFLUSH) # define TCSAFLUSH TCSADFLUSH # endif /* TCSADFLUSH */ # ifndef _lib_tcgetattr # undef tcgetattr # define tcgetattr(fd,tty) ioctl(fd, TCGETS, tty) # undef tcsetattr # define tcsetattr(fd,action,tty) ioctl(fd, action, tty) # undef cfgetospeed # define cfgetospeed(tp) ((tp)->c_cflag & CBAUD) # endif /* _lib_tcgetattr */ # undef TIOCGETC #else # define cfgetospeed(tp) ((tp)->c_cflag & CBAUD) # define cfgetispeed(tp) ((tp)->c_cflag & CBAUD) # define cfsetispeed(tp,val) ((tp)->c_cflag &=~ CBAUD,(tp)->c_cflag|=(val)) # define cfsetospeed(tp,val) ((tp)->c_cflag &=~ CBAUD,(tp)->c_cflag|=(val)) # ifdef _hdr_termio # include # else # ifdef _sys_termio # include # define _hdr_termio 1 # endif /* _sys_termio */ # endif /* _hdr_termio */ # ifdef _hdr_termio # define termios termio # undef TIOCGETC # define tcgetattr(fd,tty) ioctl(fd, TCGETA, tty) # define tcsetattr(fd,action,tty) ioctl(fd, action, tty) # ifdef _sys_bsdtty # include # endif /* _sys_bsdtty */ # else # ifdef _hdr_sgtty # include # ifndef LPENDIN # ifdef _sys_nttyio # include # endif /* _sys_nttyio */ # endif /* LPENDIN */ # define termios sgttyb # ifdef TIOCSETN # undef TCSETAW # endif /* TIOCSETN */ # ifdef TIOCGETP # define tcgetattr(fd,tty) ioctl(fd, TIOCGETP, tty) # define tcsetattr(fd,action,tty) ioctl(fd, action, tty) # else # define tcgetattr(fd,tty) gtty(fd, tty) # define tcsetattr(fd,action,tty) stty(fd, tty) # endif /* TIOCGETP */ # else # ifdef _sys_ttyio # include # endif # endif /* _hdr_sgtty */ # endif /* hdr_termio */ # ifndef TCSANOW # ifdef TCSETAW # define TCSANOW TCSETA # define TCSAFLUSH TCSETAF # else # ifdef TIOCSETN # define TCSANOW TIOCSETN # define TCSADRAIN TIOCSETN # define TCSAFLUSH TIOCSETP # endif /* TIOCSETN */ # endif /* TCSETAW */ # endif /* TCSANOW */ #endif /* _hdr_termios */ /* set ECHOCTL if driver can echo control charaters as ^c */ #ifdef LCTLECH # ifndef ECHOCTL # define ECHOCTL LCTLECH # endif /* !ECHOCTL */ #endif /* LCTLECH */ #ifdef LNEW_CTLECH # ifndef ECHOCTL # define ECHOCTL LNEW_CTLECH # endif /* !ECHOCTL */ #endif /* LNEW_CTLECH */ #ifdef LNEW_PENDIN # ifndef PENDIN # define PENDIN LNEW_PENDIN # endif /* !PENDIN */ #endif /* LNEW_PENDIN */ #endif