TTY(4) UNIX Programmer's Manual TTY(4) NAME tty - general terminal interface HP-UX COMPATIBILITY Level: HP-UX/RUN ONLY Origin: System III DESCRIPTION This section describes both a particular special file and the general nature of the terminal interface. The file /dev/tty is, in each process, a synonym for the control terminal associated with the process group of that process, if any. It is useful for programs or shell sequences that wish to be sure of writing messages on the terminal no matter how output has been redirected. It can also be used for programs that demand the name of a file for output, when typed output is desired and it is tiresome to find out what terminal is currently in use. As for terminals in general: all of the asynchronous commun- ications ports use the same general interface, no matter what hardware is involved. The remainder of this section discusses the common features of this interface. When a terminal file is opened, it normally causes the pro- cess to wait until a connection is established. In prac- tice, users' programs seldom open these files; they are opened by _g_e_t_t_y(8) and become a user's standard input, out- put, and error files. The very first terminal file opened by the process group leader of a terminal file not already associated with a process group becomes the _c_o_n_t_r_o_l _t_e_r_m_i_n_a_l for that process group. The control terminal plays a spe- cial role in handling quit and interrupt signals, as dis- cussed below. The control terminal is inherited by a child process during a _f_o_r_k(2). A process can break this associa- tion by changing its process group using _s_e_t_p_g_r_p(2). A terminal associated with one of these files ordinarily operates in full-duplex mode. Characters may be typed at any time, even while output is occurring, and are only lost when the system's character input buffers become completely full, which is rare, or when the user has accumulated the maximum allowed number of input characters that have not yet been read by some program. This limit is dependent on the particular implementation, but is at least 256. When the input limit is reached, all the saved characters are thrown away without notice. Normally, terminal input is processed in units of lines. A line is delimited by a new-line (ASCII LF) character, an Printed 12/17/84 1 TTY(4) UNIX Programmer's Manual TTY(4) end-of-file (ASCII EOT) character, or an end-of-line charac- ter. This means that a program attempting to read will be suspended until an entire line has been typed. Also, no matter how many characters are requested in the read call, at most one line will be returned. It is not, however, necessary to read a whole line at once; any number of char- acters may be requested in a read, even one, without losing information. During input, erase and kill processing is normally done. By default, the character # erases the last character typed, except that it will not erase beyond the beginning of the line. By default, the character @ kills (deletes) the entire input line, and optionally outputs a new-line charac- ter. Both these characters operate on a key-stroke basis, independently of any backspacing or tabbing that may have been done. Both the erase and kill characters may be entered literally by preceding them with the escape charac- ter (\). In this case the escape character is not read. The erase and kill characters may be changed. Certain characters have special functions on input. These functions and their default character values are summarized as follows: INTR (Rubout or ASCII DEL) generates an _i_n_t_e_r_r_u_p_t signal which is sent to all processes with the associated control terminal. Normally, each such process is forced to terminate, but arrangements may be made either to ignore the signal or to receive a trap to an agreed-upon location; see _s_i_g_n_a_l(2). QUIT (Control-| or ASCII FS) generates a _q_u_i_t signal. Its treatment is identical to the interrupt signal except that, unless a receiving process has made other arrangements, it will not only be terminated but a core image file (called core) will be created in the current working directory if the implementa- tion supports core files. ERASE (#) erases the preceding character. It will not erase beyond the start of a line, as delimited by a NL, EOF, or EOL character. KILL (@) deletes the entire line, as delimited by a NL, EOF, or EOL character. EOF (Control-d or ASCII EOT) may be used to generate an end-of-file from a terminal. When received, all the characters waiting to be read are immediately passed to the program, without waiting for a new-line, and the EOF is discarded. Thus, if there are no Printed 12/17/84 2 TTY(4) UNIX Programmer's Manual TTY(4) characters waiting, which is to say the EOF occurred at the beginning of a line, zero characters will be passed back, which is the standard end-of-file indi- cation. NL (ASCII LF) is the normal line delimiter. It can not be changed or escaped. EOL (ASCII NUL) is an additional line delimiter, like NL. It is not normally used. STOP (Control-s or ASCII DC3) can be used to temporarily suspend output. It is useful with CRT terminals to prevent output from disappearing before it can be read. While output is suspended, STOP characters are ignored and not read. START (Control-q or ASCII DC1) is used to resume output which has been suspended by a STOP character. While output is not suspended, START characters are ignored and not read. The start/stop characters can not be changed or escaped. The character values for INTR, QUIT, ERASE, KILL, EOF, and EOL may be changed to suit individual tastes. The ERASE, KILL, and EOF characters may be escaped by a preceding \ character, in which case no special function is done. When the carrier signal from the data-set drops, a _h_a_n_g_u_p signal is sent to all processes that have this terminal as the control terminal. Unless other arrangements have been made, this signal causes the processes to terminate. If the hangup signal is ignored, any subsequent read returns with an end-of-file indication. Thus programs that read a termi- nal and test for end-of-file can terminate appropriately when hung up on. When one or more characters are written, they are transmit- ted to the terminal as soon as previously-written characters have finished typing. Input characters are echoed by put- ting them in the output queue as they arrive. If a process produces characters more rapidly than they can be typed, it will be suspended when its output queue exceeds some limit. When the queue has drained down to some threshold, the pro- gram is resumed. Several _i_o_c_t_l(2) system calls apply to terminal files. The primary calls use the following structure, defined in : #define NCC 8 struct termio { Printed 12/17/84 3 TTY(4) UNIX Programmer's Manual TTY(4) unsigned short c_iflag; /* input modes */ unsigned short c_oflag; /* output modes */ unsigned short c_cflag; /* control modes */ unsigned short c_lflag; /* local modes */ char c_line; /* line discipline */ unsigned char c_cc[NCC]; /* control chars */ }; The special control characters are defined by the array _c__c_c. The relative positions and initial values for each function are as follows: 0 INTR DEL 1 QUIT FS 2 ERASE # 3 KILL @ 4 EOF EOT 5 EOL NUL 6 reserved 7 reserved The _c__i_f_l_a_g field describes the basic terminal input con- trol: IGNBRK 0000001 Ignore break condition. BRKINT 0000002 Signal interrupt on break. IGNPAR 0000004 Ignore characters with parity errors. PARMRK 0000010 Mark parity errors. INPCK 0000020 Enable input parity check. ISTRIP 0000040 Strip character. INLCR 0000100 Map NL to CR on input. IGNCR 0000200 Ignore CR. ICRNL 0000400 Map CR to NL on input. IUCLC 0001000 Map upper-case to lower-case on input. IXON 0002000 Enable start/stop output control. IXANY 0004000 Enable any character to restart output. IXOFF 0010000 Enable start/stop input control. If IGNBRK is set, the break condition (a character framing error with data all zeros) is ignored, that is, not put on the input queue and therefore not read by any process. Oth- erwise if BRKINT is set, the break condition will generate an interrupt signal and flush both the input and output queues. If IGNPAR is set, characters with other framing and parity errors are ignored. If PARMRK is set, a character with a framing or parity error which is not ignored is read as the three character sequence: 0377, 0, X, where X is the data of the character received in error. To avoid ambiguity in this case, if ISTRIP is not set, a valid character of 0377 is read as 0377, 0377. If PARMRK is not set, a framing or parity error Printed 12/17/84 4 TTY(4) UNIX Programmer's Manual TTY(4) which is not ignored is read as the character NUL (0). If INPCK is set, input parity checking is enabled. If INPCK is not set, input parity checking is disabled. This allows output parity generation without input parity errors. If ISTRIP is set, valid input characters are first stripped to 7-bits, otherwise all 8-bits are processed. If INLCR is set, a received NL character is translated into a CR character. If IGNCR is set, a received CR character is ignored (not read). Otherwise if ICRNL is set, a received CR character is translated into a NL character. If IUCLC is set, a received upper-case alphabetic character is translated into the corresponding lower-case character. If IXON is set, start/stop output control is enabled. A received STOP character will suspend output and a received START character will restart output. All start/stop charac- ters are ignored and not read. If IXANY is set, any input character, will restart output which has been suspended. If IXOFF is set, the system will transmit START/STOP charac- ters when the input queue is nearly empty/full. If IENQAK is set, the system will transmit ASCII ENQ after every 80 characters sent and then wait until the terminal responds with ASCII ACK. The terminal will respond in this way when it has sufficiently emptied its buffer. If the terminal does not respond after 5 seconds, the system will resume transmission anyway. The ASCII ACK that the terminal sends will not get entered into the input queue if it was sent in response to ASCII ENQ. The initial input control value is all bits clear. The _c__o_f_l_a_g field specifies the system treatment of output: OPOST 0000001 Postprocess output. OLCUC 0000002 Map lower case to upper on output. ONLCR 0000004 Map NL to CR-NL on output. OCRNL 0000010 Map CR to NL on output. ONOCR 0000020 No CR output at column 0. ONLRET 0000040 NL performs CR function. OFILL 0000100 Use fill characters for delay. OFDEL 0000200 Fill is DEL, else NUL. NLDLY 0000400 Select new-line delays: NL0 0 NL1 0000400 CRDLY 0003000 Select carriage-return delays: CR0 0 Printed 12/17/84 5 TTY(4) UNIX Programmer's Manual TTY(4) CR1 0001000 CR2 0002000 CR3 0003000 TABDLY 0014000 Select horizontal-tab delays: TAB0 0 TAB1 0004000 TAB2 0010000 TAB3 0014000 Expand tabs to spaces. BSDLY 0020000 Select backspace delays: BS0 0 BS1 0020000 VTDLY 0040000 Select vertical-tab delays: VT0 0 VT1 0040000 FFDLY 0100000 Select form-feed delays: FF0 0 FF1 0100000 If OPOST is set, output characters are post-processed as indicated by the remaining flags, otherwise characters are transmitted without change. If OLCUC is set, a lower-case alphabetic character is transmitted as the corresponding upper-case character. This function is often used in conjunction with IUCLC. If ONLCR is set, the NL character is transmitted as the CR- NL character pair. If OCRNL is set, the CR character is transmitted as the NL character. If ONOCR is set, no CR character is transmitted when at column 0 (first position). If ONLRET is set, the NL character is assumed to do the carriage-return function; the column pointer will be set to 0 and the delays specified for CR will be used. Otherwise the NL character is assumed to do just the line-feed func- tion; the column pointer will remain unchanged. The column pointer is also set to 0 if the CR character is actually transmitted. The delay bits specify how long transmission stops to allow for mechanical or other movement when certain characters are sent to the terminal. In all cases a value of 0 indicates no delay. If OFILL is set, fill characters will be transmitted for delay instead of a timed delay. This is useful for high baud rate terminals which need only a minimal delay. If OFDEL is set, the fill character is DEL, otherwise NUL. If a form-feed or vertical-tab delay is specified, it lasts for about 2 seconds. New-line delay lasts about 0.10 seconds. If ONLRET is set, the carriage-return delays are used instead of the new-line Printed 12/17/84 6 TTY(4) UNIX Programmer's Manual TTY(4) delays. If OFILL is set, two fill characters will be transmitted. Carriage-return delay type 1 is dependent on the current column position, type 2 is about 0.10 seconds, and type 3 is about 0.15 seconds. If OFILL is set, delay type 1 transmits two fill characters, and type 2 four fill characters. Horizontal-tab delay type 1 is dependent on the current column position. Type 2 is about 0.10 seconds. Type 3 specifies that tabs are to be expanded into spaces. If OFILL is set, two fill characters will be transmitted for any delay. Backspace delay lasts about 0.05 seconds. If OFILL is set, one fill character will be transmitted. The actual delays depend on line speed and system load. The initial output control value is all bits clear. The _c__c_f_l_a_g field describes the hardware control of the ter- minal: CBAUD 0000037 Baud rate: B0 0 Hang up B50 0000001 50 baud B75 0000002 75 baud B110 0000003 110 baud B134 0000004 134.5 baud B150 0000005 150 baud B200 0000006 200 baud B300 0000007 300 baud B600 0000010 600 baud B900 0000011 900 baud B1200 0000012 1200 baud B1800 0000013 1800 baud B2400 0000014 2400 baud B3600 0000015 3600 baud B4800 0000016 4800 baud B7200 0000017 7200 baud B9600 0000020 9600 baud B19200 0000021 19200 baud B38400 0000022 38400 baud EXTA 0000036 External A EXTB 0000037 External B CSIZE 0000140 Character size: CS5 0 5 bits CS6 0000040 6 bits CS7 0000100 7 bits CS8 0000140 8 bits CSTOPB 0000200 Send two stop bits, else one. Printed 12/17/84 7 TTY(4) UNIX Programmer's Manual TTY(4) CREAD 0000400 Enable receiver. PARENB 0001000 Parity enable. PARODD 0002000 Odd parity, else even. HUPCL 0004000 Hang up on last close. CLOCAL 0010000 Local line, else dial-up. CRTS 0020000 Assert request-to-send. The CBAUD bits specify the baud rate. The zero baud rate, B0, is used to hang up the connection. If B0 is specified, the data-terminal-ready signal will not be asserted. Nor- mally, this will disconnect the line. For any particular hardware, impossible speed changes are ignored. The CSIZE bits specify the character size in bits for both transmission and reception. This size does not include the parity bit, if any. If CSTOPB is set, two stop bits are used, otherwise one stop bit. For example, at 110 baud, two stops bits are required. If PARENB is set, parity generation and detection is enabled and a parity bit is added to each character. If parity is enabled, the PARODD flag specifies odd parity if set, other- wise even parity is used. If CREAD is set, the receiver is enabled. Otherwise no characters will be received. If HUPCL is set, the line will be disconnected when the last process with the line open closes it or terminates. That is, the data-terminal-ready signal will not be asserted. If CLOCAL is set, the line is assumed to be a local, direct connection with no modem control. Otherwise modem control is assumed. Modem control is defined as asserting data-terminal-ready whenever the device is open, and dropping it on closing the device the last time. Any open to a modem-controlled device will hang until carrier detect is asserted unless the open is asynchronous (O_NDELAY). Without modem control, data- terminal-ready is not asserted, and the state of carrier- detect is ignored. Asynchronous changes to CLOCAL on an open line directly con- trol the data-terminal-ready modem control line. If CLOCAL is asynchronously turned off on an already open line, subse- quent opens (with wait) will hang until carrier-detect is asserted, already open lines will not be affected. Reads to lines which are not in CLOCAL and for which carrier-detect is not asserted will return end-of-file, writes will be dis- carded as if they had been successful. Printed 12/17/84 8 TTY(4) UNIX Programmer's Manual TTY(4) If CRTS is set, the request-to-send line is asserted, other- wise it is not. This line may be raised or lowered at any time as needed for controlling the attached device. The initial hardware control value after open is B300, CS8, CREAD, HUPCL. The _c__l_f_l_a_g field of the argument structure is used by the line discipline to control terminal functions. The basic line discipline (0) provides the following: ISIG 0000001 Enable signals. ICANON 0000002 Canonical input (erase, kill processing). XCASE 0000004 Canonical upper/lower presentation. ECHO 0000010 Enable echo. ECHOE 0000020 Echo erase character as BS-SP-BS. ECHOK 0000040 Echo NL after kill character. ECHONL 0000100 Echo NL. NOFLSH 0000200 Disable flush after interrupt or quit. If ISIG is set, each input character is checked against the special control characters INTR and QUIT. If an input char- acter matches one of these control characters, the function associated with that character is performed. If ISIG is not set, no checking is done. Thus these special input func- tions are possible only if ISIG is set. These functions may be disabled individually by changing the value of the con- trol character to an unlikely or impossible value (e.g. 0377). If ICANON is set, canonical processing is enabled. This enables the erase and kill edit functions, and the assembly of input characters into lines delimited by NL, EOF, and EOL. If ICANON is not set, read requests are satisfied directly from the input queue. A read will not be satisfied until at least MIN characters have been received or the timeout value TIME has expired. (Note that the timeout TIME begins after the first character is read, _n_o_t at the begin- ning of the read operation.) This allows fast bursts of input to be read efficiently while still allowing single character input. The MIN and TIME values are stored in the position for the EOF and EOL characters respectively. The time value represents tenths of seconds. If XCASE is set, and if ICANON is set, an upper-case letter is accepted on input by preceding it with a \ character, and is output preceded by a \ character. In this mode, the fol- lowing escape sequences are generated on output and accepted on input: Printed 12/17/84 9 TTY(4) UNIX Programmer's Manual TTY(4) _f_o_r: _u_s_e: ` \' | \! ~ \^ { \( } \) \ \\ For example, A is input as \a, \n as \\n, and \N as \\\n. If ECHO is set, characters are echoed as received. When ICANON is set, the following echo functions are possi- ble. If ECHO and ECHOE are set, the erase character is echoed as ASCII BS SP BS, which will clear the last charac- ter from a CRT screen. If ECHOE is set and ECHO is not set, the erase character is echoed as ASCII SP BS. If ECHOK is set, the NL character will be echoed after the kill charac- ter to emphasize that the line will be deleted. Note that an escape character preceding the erase or kill character removes any special function. If ECHONL is set, the NL character will be echoed even if ECHO is not set. This is useful for terminals set to local echo (so-called half duplex). Unless escaped, the EOF character is not echoed. Because EOT is the default EOF character, this prevents ter- minals that respond to EOT from hanging up. If NOFLSH is set, the normal flush of the input and output queues associated with the quit and interrupt characters will not be done. The initial line-discipline control value is all bits clear. The primary _i_o_c_t_l(2) system calls have the form: ioctl (fildes, command, arg) struct termio *arg; The commands using this form are: TCGETA Get the parameters associated with the termi- nal and store in the _t_e_r_m_i_o structure refer- enced by arg. TCSETA Set the parameters associated with the termi- nal from the structure referenced by arg. The change is immediate. TCSETAW Wait for the output to drain before setting the new parameters. This form should be used when changing parameters that will affect output. Printed 12/17/84 10 TTY(4) UNIX Programmer's Manual TTY(4) TCSETAF Wait for the output to drain, then flush the input queue and set the new parameters. Additional _i_o_c_t_l(2) calls have the form: ioctl (fildes, command, arg) int arg; The commands using this form are: TCSBRK Wait for the output to drain. If _a_r_g is 0, then send a break (zero bits for at least 0.25 seconds). TCXONC Start/stop control. If _a_r_g is 0, suspend output; if 1, restart suspended output. TCFLSH If _a_r_g is 0, flush the input queue; if 1, flush the output queue; if 2, flush both the input and output queues. Conversion Aids for stty(2)/gtty(2) The following conversion information is supplied to help you port programs from pwb/V6 UNIX to your current HP-UX system. Note that these conversions do not work for programs ported from Version 7 UNIX, since some Version 7 flags are defined differently. The following data structure is defined in the include file sgtty.h: struct sgttyb { char sg_ispeed; /* input speed */ char sg_ospeed; /* output speed */ char sg_erase; /* erase character */ char sg_kill; /* kill character */ short sg_flags; /* mode flags */ } The flags, as defined in sgtty.h, are: #define HUPCL 01 #define XTABS 02 #define LCASE 04 #define ECHO 010 #define CRMOD 020 #define RAW 040 #define ODDP 0100 #define EVENP 0200 #define ANYP 0300 #define NLDELAY 001400 #define TBDELAY 002000 Printed 12/17/84 11 TTY(4) UNIX Programmer's Manual TTY(4) #define CRDELAY 030000 #define VTDELAY 040000 #define BSDELAY 0100000 #define CR0 0 #define CR1 010000 #define CR2 020000 #define CR3 030000 #define NL0 0 #define NL1 000400 #define NL2 001000 #define NL3 001400 #define TAB0 0 #define TAB1 002000 #define NOAL 004000 #define FF0 0 #define FF1 040000 #define BS0 0 #define BS1 0100000 When the _i_o_c_t_l TIOCSETP (_s_t_t_y(2)) command is executed, the flags in the old sgttyb structure are mapped into their new equivalents in the termio structure. Then the TCSETA com- mand is executed as defined above. The following table shows the mapping between the old sgttyb flags and the current termio flags. Note that flags con- tained in the termio structure that are not mentioned below are cleared. HUPCL (if set) sets the termio HUPCL flag; HUPCL (if clear) clears the termio HUPCL flag; XTABS (if set) sets the termio TAB3 flag; XTABS (if clear) clears the termio TAB3 flag; TBDELAY (if set) sets the termio TAB1 flag; TBDELAY (if clear) clears the termio TAB1 flag; LCASE (if set) sets the termio IUCLC, OLCUC, and XCASE flags; LCASE (if clear) clears the termio IUCLC, OLCUC, and XCASE flags; ECHO (if set) sets the termio ECHO flag; ECHO (if clear) clears the termio ECHO flag; NOAL (if set) clears the termio ECHOK flag; Printed 12/17/84 12 TTY(4) UNIX Programmer's Manual TTY(4) NOAL (if clear) sets the termio ECHOK flag; CRMOD (if set) sets the termio ICRNL and ONLCR flags; also, if CR1 is set, the termio CR1 flag is set, and if CR2 is set, the termio ONOCR and CR2 flags are set; CRMOD (if clear) sets the termio ONLRET flag; also, if NL1 is set, the termio CR1 flag is set, and if NL2 is set, the termio CR2 flag is set; RAW (if set) sets the termio CS8 flag, and clears the termio ICRNL and IUCLC flags; also, default values of 6 characters and 0.1 seconds are assigned to MIN and TIME, respec- tively. Setting _R_A_W has precedence over setting the _C_R_M_O_D or _L_C_A_S_E flags. RAW (if clear) sets the termio BRKINT, IGNPAR, ISTRIP, IXON, IXANY, OPOST, CS7, PARENB, ICANON, and ISIG flags; also, the default values control-D and null are assigned to the control characters EOF and EOL, respectively; ODDP (if set) if EVENP is also set, clears the termio INPCK flag; otherwise, sets the termio PARODD flag; VTDELAY (if set) sets the termio FFDLY flag; VTDELAY (if clear) clears the termio FFDLY flag; BSDELAY (if set) sets the termio BSDLY flag; BSDELAY (if clear) clears the termio BSDLY flag. In addition, the termio CREAD bit is set, and, if the baud rate is 110, the CSTOPB bit is set. When using TIOCSETP, the _i_s_p_e_e_d entry in the sgttyb struc- ture is mapped into the appropriate speed in the termio CBAUD field. The _e_r_a_s_e and _k_i_l_l sgttyb entries are mapped into the termio erase and kill characters. When the _i_o_c_t_l TIOCGETP (_g_t_t_y(2)) command is executed, the current TCGETA command is first executed. The resulting termio structure is then mapped into the sgttyb structure, which is then returned to the user. The following table shows how the termio flags are mapped into the old sgttyb structure. Note that all flags con- tained in the sgttyb structure that are not mentioned below are cleared. HUPCL (if set) Printed 12/17/84 13 TTY(4) UNIX Programmer's Manual TTY(4) sets the sgttyb HUPCL flag; HUPCL (if clear) clears the sgttyb HUPCL flag; ICANON (if set) clears the sgttyb RAW flag; ICANON (if clear) sets the sgttyb RAW flag; XCASE (if set) sets the sgttyb LCASE flag; XCASE (if clear) clears the sgttyb LCASE flag; ECHO (if set) sets the sgttyb ECHO flag; ECHO (if clear) clears the sgttyb ECHO flag; ECHOK (if set) clears the sgttyb NOAL flag; ECHOK (if clear) sets the sgttyb NOAL flag; PARODD (if set) sets the sgttyb ODDP flag; PARODD (if clear) clears the sgttyb ODDP flag; INPCK (if set) sets the sgttyb EVENP flag; PARODD, INPCK (if both clear) sets the sgttyb ODDP and EVENP flags; ONLCR (if set) sets the sgttyb CRMOD flag; also, if CR1 is set, the sgttyb CR1 flag is set, and if CR2 is set, the sgttyb CR2 flag is set; ONLCR (if clear) if CR1 is set, the sgttyb NL1 flag is set, and if CR2 is set, the sgttyb NL2 flag is set; TAB3 (if set) sets the sgttyb XTABS flag; TAB3 (if clear) clears the sgttyb XTABS flag; TAB1 (if set) sets the sgttyb TBDELAY flag; TAB1 (if clear) clears the sgttyb TBDELAY flag; FFDLY (if set) sets the sgttyb VTDELAY flag; FFDLY (if clear) clears the sgttyb VTDELAY flag; BSDLY (if set) sets the sgttyb BSDELAY flag; BSDLY (if clear) clears the sgttyb BSDELAY flag. Printed 12/17/84 14 TTY(4) UNIX Programmer's Manual TTY(4) When using TIOCGETP, the termio CBAUD field is mapped into the _i_s_p_e_e_d and _o_s_p_e_e_d entries of the sgttyb structure. Also, the termio erase and kill characters are mapped into the _e_r_a_s_e and _k_i_l_l sgttyb entries. Note that, since there is not a one-to-one mapping between the sgttyb and termio structures, unexpected results may occur when using the older TIOCSETP and TIOCGETP calls. Thus, the TIOCSETP and TIOCGETP calls should be replaced in all future code by the current equivalents, TCSETA and TCGETA, respectively. HARDWARE DEPENDENCIES Series 200: The _c__i_f_l_a_g field parameter IXANY (enable any character to restart output) is not supported by the HP 98628B interface card. The _c__i_f_l_a_g field parameter IENQAK (enable output pac- ing control) is not supported by the HP 98628B inter- face card. Timed delays for the HP 98628B interface card are unpredictable due to the card's output buffer. The HP 98628B interface does not support the following baud rates: 900, 7200, and 38400. You must use 300 baud if you want to guarantee that no characters will be dropped in any configuration. 38400 baud is not supported by the RS-232 interface. European modems are not currently supported. Series 500: An additional terminal input control parameter is sup- ported. It is IENQAK (0020000), which enables pacing control. 38400 baud is not supported by the RS-232 interface. European modems are not currently supported. The following abbreviations are used for the following dependencies: ASI stands for the HP 27128A Asynchronous Serial Interface; MUX stands for the HP 27130A 8- Channel Asynchronous Multiplexor; 520 stands for the internal terminal of the HP 9000 Model 520 computer. [ASI/MUX/520] There is no support for output delays for certain characters, tab expansion, or upper- to lower-case mapping. Printed 12/17/84 15 TTY(4) UNIX Programmer's Manual TTY(4) [ASI/MUX] The kill character is echoed as , and the ECHOK flag is set equal to the ECHO flag. [ASI/MUX/520] When the type-ahead limit is reached, input is not flushed. Rather, further characters are either ignored (ASI/MUX) or cause a beep (520). [ASI/MUX] There is no parity error marking on terminal input. [ASI/MUX] The echoing of carriage-return and new-line characters may not be quite as expected in more obscure driver configurations. [ASI/MUX] EOF character echoing is not suppressed on terminal input. [ASI/MUX/520] There is no support for the ONLRET, ONOCR, and OCRNL flags on terminal output. [ASI/MUX/520] The MIN and TIME parameters for raw ter- minal input are not supported. [ASI/MUX/520] The ECHONL flag is not supported. [ASI/MUX/520] If ECHOE is set and ECHO is not, nothing is echoed for the erase character. [ASI] The baud rate, number of bits/character, parity, and the CLOCAL flag are governed by switches on the card. [MUX] The CLOCAL flag is permanently set. [ASI] On terminals that are hard-wired via direct- connect cables, the carrier-detect line is always false (cleared). Thus, clearing the CLOCAL flag causes a hang-up signal to be sent. [520] The following _i_o_c_t_l flags are not supported, because there is no asynchronous data communication to deal with: IGNPAR, PARMRK, INPCK, IXOFF, IENQAK, CBAUD, CSIZE, CSTOPB, PARENB, PARODD, HUPCL, CLOCAL, CRTS. FILES /dev/tty /dev/tty* /dev/console Printed 12/17/84 16 TTY(4) UNIX Programmer's Manual TTY(4) SEE ALSO stty(1), ioctl(2), stty(2), mknod(8). Printed 12/17/84 17