.th stty IV 4/21/86
.sh NAME
stty - set mode of typewriter
.sh SYNOPSIS
.nf
stty(fildes, arg)
struct {
	char	ispeed, ospeed;
	char	erase, kill;
	int 	mode;
} *arg;
.fi
.ft R
.s3
.sh DESCRIPTION
Stty sets mode bits for the terminal whose file
descriptor is passed in the first argument to the call.
First, the system delays until the terminal is quiescent.
.s3
The next two characters of the argument structure
specify the erase and kill characters respectively.
(Defaults are # and @.)
.s3
The mode contains several bits which determine the system's treatment
of the terminal:
.s3
.lp +12 7
100000	Select one of two algorithms for backspace delays
.lp +12 7
040000	Select one of two algorithms for form-feed and vertical-tab delays
.lp +12 7
030000	Select one of four algorithms for carriage-return delays
.lp +12 7
006000	Select one of four algorithms for tab delays
.lp +12 7
001400	Select one of four algorithms for new-line delays
.lp +12 7
000200	even parity allowed on input (e. g. for M37s)
.lp +12 7
000100	odd parity allowed on input
.lp +12 7
000040	raw mode: wake up on all characters
.lp +12 7
000020	map CR into LF; echo LF or CR as CR-LF
.lp +12 7
000010	echo (full duplex)
.lp +12 7
000004	map upper case to lower on input (e. g. M33)
.lp +12 7
000002	echo and print tabs as spaces
.lp +12 7
000001	hang up (remove `data terminal ready,' lead CD) after last close
.i0
.sh "SEE ALSO"
gtty (IV)
.sh DIAGNOSTICS
The error bit (c-bit) is set if the file descriptor does not refer to a
terminal.  From C, a negative value indicates an error.
.sh KSOS
It is not possible to set speeds or parity from the KIP.
