Add missing file /.profile.

Simplify stty utility, remove unused options.
This commit is contained in:
Serge Vakulenko
2015-09-13 01:59:42 -07:00
parent 967ec35fd2
commit 0087168ba6
6 changed files with 31 additions and 95 deletions

3
.gitignore vendored
View File

@@ -24,8 +24,5 @@
*.dis
*.0
*.img
sdcard.rd
.profile
*~
Makefile.user

7
.profile Normal file
View File

@@ -0,0 +1,7 @@
echo 'erase ^?, kill ^U, intr ^C'
stty dec
PATH=/bin:/sbin:/etc
export PATH
HOME=/
export HOME
export TERM

View File

@@ -201,8 +201,7 @@ This character is an additional character causing wakeup.
.TP 10
.B dec
set all modes suitable for Digital Equipment Corp. operating systems
users; (erase, kill, and interrupt characters to ^?, ^U, and ^C,
decctlq and ``newcrt''.)
users; (erase, kill, and interrupt characters to ^?, ^U, and ^C, and ``crt''.)
.ns
.TP 10
.B 0
@@ -235,11 +234,6 @@ and more functionality than the basic driver is fully described in
.IR tty (4).
The following options apply only to it.
.TP 10
.B new
Use new driver (switching flushes typeahead).
.br
.ns
.TP 10
.B crt
Set options for a CRT (crtbs, ctlecho and, if >= 1200 baud,
crterase and crtkill.)
@@ -276,18 +270,6 @@ Print two backspaces following the EOT character (control D).
Control characters echo as themselves; in cooked mode EOT (control-D)
is not echoed.
.TP 10
.B decctlq
After output is suspended (normally by ^S), only a start character
(normally ^Q) will restart it. This is compatible with DEC's vendor
supplied systems.
.br
.ns
.TP 10
.B \-decctlq
After output is suspended, any character typed will restart it;
the start character will restart output without providing any input.
(This is the default.)
.TP 10
.B tostop
Background jobs stop if they attempt terminal output.
.br
@@ -346,9 +328,7 @@ Don't send hangup signal if carrier drops.
.B \-nohang
Send hangup signal to control process group when carrier drops.
.PP
The following special characters are applicable only to the new
teletype driver
and are not normally changed.
The following special characters are not normally changed.
.TP 10
.BI susp \ c\fR
set suspend process character to \fIc\fR (default control Z).

View File

@@ -106,8 +106,6 @@ struct MODES lmodes[] = {
"-ctlecho", 0, LCTLECH,
"pendin", LPENDIN, 0,
"-pendin", 0, LPENDIN,
"decctlq", LDECCTQ, 0,
"-decctlq", 0, LDECCTQ,
"noflsh", LNOFLSH, 0,
"-noflsh", 0, LNOFLSH,
0
@@ -223,33 +221,9 @@ args:
while (argc-- > 0) {
arg = *argv++;
if (eq("new")){
ldisc = NTTYDISC;
if (ioctl(1, TIOCSETD, &ldisc)<0)
perror("ioctl");
continue;
}
if (eq("newcrt")){
ldisc = NTTYDISC;
lmode &= ~LPRTERA;
lmode |= LCRTBS|LCTLECH;
if (mode.sg_ospeed >= B1200)
lmode |= LCRTERA|LCRTKIL;
if (ioctl(1, TIOCSETD, &ldisc)<0)
perror("ioctl");
continue;
}
if (eq("crt")){
lmode &= ~LPRTERA;
lmode |= LCRTBS|LCTLECH;
if (mode.sg_ospeed >= B1200)
lmode |= LCRTERA|LCRTKIL;
continue;
}
if (eq("old")){
ldisc = 0;
if (ioctl(1, TIOCSETD, &ldisc)<0)
perror("ioctl");
crt: lmode &= ~LPRTERA;
lmode |= LCRTBS | LCTLECH | LCRTERA | LCRTKIL;
continue;
}
if (eq("sane")){
@@ -261,14 +235,7 @@ args:
mode.sg_erase = 0177;
mode.sg_kill = CTRL('u');
tc.t_intrc = CTRL('c');
ldisc = NTTYDISC;
lmode &= ~LPRTERA;
lmode |= LCRTBS|LCTLECH|LDECCTQ;
if (mode.sg_ospeed >= B1200)
lmode |= LCRTERA|LCRTKIL;
if (ioctl(1, TIOCSETD, &ldisc)<0)
perror("ioctl");
continue;
goto crt;
}
for (sp = special; sp->name; sp++)
if (eq(sp->name)) {
@@ -387,11 +354,7 @@ prmodes(all)
fprintf(stderr, "net discipline, ");
else
#endif
if (ldisc==NTTYDISC)
fprintf(stderr, "new tty, ");
else if (ldisc == 0)
fprintf(stderr, "old tty, ");
else
if (ldisc!=NTTYDISC)
fprintf(stderr, "discipline %d, ");
if(mode.sg_ispeed != mode.sg_ospeed) {
@@ -435,8 +398,7 @@ prmodes(all)
}
if (ldisc == NTTYDISC) {
int newcrt = (lmode & (LCTLECH|LCRTBS)) == (LCTLECH|LCRTBS) &&
(lmode & (LCRTERA|LCRTKIL)) ==
((mode.sg_ospeed > B300) ? LCRTERA|LCRTKIL : 0);
(lmode & (LCRTERA|LCRTKIL)) == (LCRTERA|LCRTKIL);
int nothing = 1;
if (newcrt) {
if (all)
@@ -468,7 +430,6 @@ prmodes(all)
nothing = 0;
}
lpit(LPENDIN, "-pendin ");
lpit(LDECCTQ, "-decctlq ");
lpit(LNOFLSH, "-noflsh ");
if (any || nothing)
fputc('\n', stderr);

View File

@@ -161,7 +161,6 @@ struct ttysize {
#define PASS8 0x08000000
#define CTLECH 0x10000000 /* echo control chars as ^X */
#define PENDIN 0x20000000 /* tp->t_rawq needs reread */
#define DECCTQ 0x40000000 /* only ^Q starts after ^S */
#define NOFLSH 0x80000000 /* no output flush on signal */
/* locals, from 127 down */
#define TIOCLBIS _IOW('t', 127, int) /* bis local mode bits */
@@ -181,7 +180,6 @@ struct ttysize {
#define LPASS8 ((int)(PASS8>>16))
#define LCTLECH ((int)(CTLECH>>16))
#define LPENDIN ((int)(PENDIN>>16))
#define LDECCTQ ((int)(DECCTQ>>16))
#define LNOFLSH ((int)(NOFLSH>>16))
#define TIOCSBRK _IO ('t', 123) /* set break bit */
#define TIOCCBRK _IO ('t', 122) /* clear break bit */

View File

@@ -1225,13 +1225,6 @@ erasenb:
}
}
endcase:
/*
* If DEC-style start/stop is enabled don't restart
* output until seeing the start character.
*/
if (t_flags & DECCTQ && tp->t_state & TS_TTSTOP &&
tp->t_startc != tp->t_stopc)
return;
restartoutput:
tp->t_state &= ~TS_TTSTOP;
tp->t_flags &= ~FLUSHO;