A call originating from “stty” will have a second parameter of zero.
Empty all the queues associated with the terminal forthwith. They quite likely contain nonsense;
Reset the speed information (useful in the case of a DH11 interface, but of little interest for the present selection of code);
Reset the “erase” character and the “kill” character. (“kill” here denotes “throw away the current input line”.) Note that if these characters are changed away from their normal values of “#” and “@” respectively, no corresponding changes are made to “maptab”. Nor should they!),
Reset the “flags” defining some relevant terminal characteristics (see Sheet 79):
flag |
bit |
if set ... |
XTABS |
1 |
the terminal will not interpret |
horizontal tab characters |
||
correctly; |
||
LCASE |
2 |
the terminal supports only the |
64 character ASCII subset; |
||
ECHO |
3 |
the terminal is operating in |
full duplex mode, and input |
||
characters must be echoed |
||
back; |
||
CRMOD |
4 |
upon input, a “carriage |
return” is replaced by a |
||
“line feed”; upon output, a |
||
“line feed” is replaced by a |
||
“carriage return” and a “line |
||
feed”; |
||
RAW |
5 |
input characters are to be |
sent to the program exactly |
||
as received, without “erase” |
||
or“kill” processing, or |
||
adjustment for backslash |
||
characters. |
In addition, the following bits are interrogated by “ttyoutput” (8373) in choosing the delay which should ensue after the character indicated is sent, before sending the next character:
8,9 |
line feed; |
10,11 |
horizontal tab; |
12,13 |
carriage return; |
14 |
vertical tab or form feed. |