vt: add -r flag to start in raw mode

This commit is contained in:
BurnZeZ 2016-03-01 19:17:54 -05:00
parent db509b8466
commit dacebbb2e7
2 changed files with 11 additions and 2 deletions

View file

@ -4,7 +4,7 @@ vt \- emulate a VT-100 or VT-220 terminal
.SH SYNOPSIS
.B vt
[
.B -2abcx
.B -2abcrx
]
[
.B -f
@ -52,6 +52,9 @@ sets the
names a
.I log
file for the session.
.TP
.B r
start in raw mode.
.SS Menus
The right button has a menu with the following entries to provide
the sort of character processing expected by non-Plan 9 systems:

View file

@ -135,13 +135,14 @@ main(int argc, char **argv)
void
usage(void)
{
fprint(2, "usage: %s [-2abcx] [-f font] [-l logfile]\n", argv0);
fprint(2, "usage: %s [-2abcrx] [-f font] [-l logfile]\n", argv0);
exits("usage");
}
void
initialize(int argc, char **argv)
{
int rflag;
int i, blkbg;
char *fontname, *p;
@ -151,6 +152,7 @@ initialize(int argc, char **argv)
term = "vt100";
fk = vt100fk;
blkbg = nocolor = 0;
rflag = 0;
ARGBEGIN{
case '2':
term = "vt220";
@ -179,6 +181,9 @@ initialize(int argc, char **argv)
fk = xtermfk;
term = "xterm";
break;
case 'r':
rflag = 1;
break;
default:
usage();
break;
@ -195,6 +200,7 @@ initialize(int argc, char **argv)
werrstr(""); /* clear spurious error messages */
ebegin(Ehost);
cs->raw = rflag;
histp = hist;
menu2.item = menutext2;
menu3.item = menutext3;