From dacebbb2e7c1098d7d6567317abc169f2ec327b8 Mon Sep 17 00:00:00 2001 From: BurnZeZ Date: Tue, 1 Mar 2016 19:17:54 -0500 Subject: vt: add -r flag to start in raw mode --- sys/man/1/vt | 5 ++++- sys/src/cmd/vt/main.c | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/sys/man/1/vt b/sys/man/1/vt index fefd7b8c2..48fb57172 100644 --- a/sys/man/1/vt +++ b/sys/man/1/vt @@ -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: diff --git a/sys/src/cmd/vt/main.c b/sys/src/cmd/vt/main.c index aad1828c2..1952681b6 100644 --- a/sys/src/cmd/vt/main.c +++ b/sys/src/cmd/vt/main.c @@ -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; -- cgit v1.2.3