termios.h, termios - define values for termios
#include <termios.h>
The <termios.h> header contains the definitions used by the terminal I/O interfaces. See termios(3C) and termio(7I) for an overview of the terminal interface.
The following data types are defined through typedef:
cc_t
speed_t
tcflag_t
The above types are all unsigned integer types.
The implementation supports one or more programming environments in which the widths of cc_t, speed_t, and tcflag_t are no greater than the width of type long. The names of these programming environments can be obtained using the confstr(3C) function or the getconf(1) utility.
The termios structure is defined and includes the following members:
tcflag_t c_iflag /* input modes */ tcflag_t c_oflag /* output modes */ tcflag_t c_cflag /* control modes */ tcflag_t c_lflag /* local modes */ cc_t c_cc[NCCS] /* control characters */
A definition is provided for:
NCCS
The following subscript names for the array c_cc are defined:
Subscript UsageCanonical Mode | Subscript UsageNon-Canonical Mode | Description |
VEOF | EOF character | |
VEOL | ||
VERASE | ||
VINTR | ||
VKILL | ||
VQUIT | ||
VSTART | ||
VSTOP | ||
VSUSP | ||
The subscript values are unique, except that the VMIN and VTIME subscripts can have the same values as the VEOF and VEOL subscripts, respectively.
The header file provides the flags described below.
The c_iflag field describes the basic terminal input control:
BRKINT
ICRNL
IGNBRK
IGNCR
IGNPAR
INLCR
INPCK
ISTRIP
IXANY
IXOFF
IXON
PARMRK
The c_oflag field specifies the system treatment of output:
OPOST
ONLCR
OCRNL
ONOCR
ONLRET
OFILL
NLDLY
NL0
NL1
CRDLY
CR0
CR1
CR2
CR3
TABDLY
TAB0
TAB1
TAB2
TAB3
BSDLY
BS0
BS1
VTDLY
VT0
VT1
FFDLY
FF0
FF1
The input and output baud rates are stored in the termios structure. These are the valid values for objects of type speed_ t. The following values are defined, but not all baud rates need be supported by the underlying hardware.
B0
B50
B75
B110
B134
B150
B200
B300
B600
B1200
B1800
B2400
B4800
B9600
B19200
B38400
The c_cflag field describes the hardware control of the terminal; not all values specified are required to be supported by the underlying hardware:
CSIZE
CS5
CS6
CS7
CS8
CSTOPB
CREAD
PARENB
PARODD
HUPCL
CLOCAL
The implementation supports the functionality associated with the symbols CS7, CS8, CSTOPB, PARODD, and PARENB.
The c_lflag field of the argument structure is used to control various terminal functions:
ECHO
ECHOE
ECHOK
ECHONL
ICANON
IEXTEN
ISIG
NOFLSH
TOSTOP
The following symbolic constants for use with tcsetattr() are defined:
TCSANOW
TCSADRAIN
TCSAFLUSH
The following symbolic constants for use with tcflush() are defined:
TCIFLUSH
TCIOFLUSH
TCOFLUSH
The following symbolic constants for use with tcflow() are defined:
TCIOFF
TCION
TCOOFF
TCOON
See attributes(5) for descriptions of the following attributes:
|
getconf(1), cfgetispeed(3C), cfsetispeed(3C), confstr(3C), tcdrain(3C), tcflow(3C), tcflush(3C), tcgetattr(3C), tcgetsid(3C), tcsendbreak(3C), tcsetattr(3C), attributes(5), standards(5)
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |