HP-UX Reference (11i v2 07/12) - 7 Device (Special) Files, 9 General Information, Index (vol 10)

s
sttyv6(7) sttyv6(7)
NAME
sttyv6: stty - terminal interface for Version 6/PWB compatibility
REMARKS
These facilities are included to aid in conversion of old programs, and should not be used in new code. Use
the interface described in termio(7). Note that these conversions do not work for programs ported from
UNIX Time-Sharing System, Seventh Edition (Version 7), because some V7 flags are defined differently.
DESCRIPTION
These routines attempt to map the UNIX Time-Sharing System, Sixth Edition (Version 6), and PWB
stty() and gtty() calls into the current ioctls that perform the same functions. The mapping cannot
be perfect. The way the features are translated is described below. The reader should be familiar with
termio before studying this entry. See termio(7).
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 */
int 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
#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 stty command (ioctl TIOCSETP) is executed, the flags in the old sgttyb structure are
mapped into their new equivalents in the termio structure. Then the TCSETA command is executed.
The following table shows the mapping between the old sgttyb flags and the current termio flags.
Note that flags contained in the termio structure that are not mentioned below are cleared.
HUPCL (if set) Sets the termio HUPCL flag.
HP-UX 11i Version 2: December 2007 Update 1 Hewlett-Packard Company 185