Advanced Programming in the UNIX® Environment

(lily) #1
ptg10805159

Section 18.2 Overview 675


Figures 18.3 through 18.6). The handling of terminal devices is complicated by the large
number of options available for terminal devices and the challenge of trying to
determine which options arerequired for a particular device (be it a terminal, modem,
printer, or whatever).

FreeBSD Linux Mac OS X Solaris
Flag Description POSIX.1 8.0 3.2.0 10.6.8 10

CBAUDEXT extended baud rate •
CCAR_OFLOW DCD flow control of output ••
CCTS_OFLOW CTS flow control of output •••
CDSR_OFLOW DSR flow control of output ••
CDTR_IFLOW DTR flow control of input ••
CIBAUDEXT extended input baud rate •
CIGNORE ignorecontrol flags ••
CLOCAL ignoremodem status lines •••• •
CMSPAR mark or space parity •
CREAD enable receiver • •• ••
CRTSCTS enable hardwareflow control • •• •
CRTS_IFLOW RTSflow control of input •••
CRTSXOFF enable input hardwareflow control •
CSIZE character size mask •••• •
CSTOPB send two stop bits, else one •••• •
HUPCL hang up on last close •••• •
MDMBUF same asCCAR_OFLOW ••
PARENB parity enable •••• •
PAREXT mark or space parity •
PARODD odd parity,else even •••• •

Figure 18.3c_cflagterminal flags

FreeBSD Linux Mac OS X Solaris
Flag Description POSIX.1 8.0 3.2.0 10.6.8 10

BRKINT generateSIGINTon BREAK •••• •
ICRNL map CR to NL on input •••• •
IGNBRK ignoreBREAK condition •••• •
IGNCR ignoreCR••• ••
IGNPAR ignorecharacters with parity errors • •• ••
IMAXBEL ring bell on input queue full •• ••
INLCR map NL to CR on input •••• •
INPCK enable input parity checking •••• •
ISTRIP strip eighth bit offinput characters •••• •
IUCLC map uppercase to lowercase on input ••
IUTF8 input is UTF-8••
IXANY enable any characters to restart output •••• •
IXOFF enable start/stop input flow control • •• ••
IXON enable start/stop output flow control • •• ••
PARMRK mark parity errors • •• ••

Figure 18.4c_iflagterminal flags
Free download pdf