HP-UX Reference (11i v1 00/12) - 5 Miscellaneous Topics, 7 Device (Special) Files, 9 General Information, Index (vol 9)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man7/!!!intro.7
________________________________________________________________
___ ___
s
sttyv6(7) sttyv6(7)
NAME
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(7) before study-
ing this entry.
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(2) 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;
HUPCL (if clear) clears the termio HUPCL flag;
HP-UX Release 11i: December 2000 − 1 − Section 7−−153
___
___