shithub: riscv

Download patch

ref: dacebbb2e7c1098d7d6567317abc169f2ec327b8
parent: db509b8466ff8a268e965f98ccf719a25f586d1a
author: BurnZeZ <brz-9dev@feline.systems>
date: Tue Mar 1 14:17:54 EST 2016

vt: add -r flag to start in raw mode

--- a/sys/man/1/vt
+++ b/sys/man/1/vt
@@ -4,7 +4,7 @@
 .SH SYNOPSIS
 .B vt
 [
-.B -2abcx
+.B -2abcrx
 ]
 [
 .B -f
@@ -52,6 +52,9 @@
 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:
--- a/sys/src/cmd/vt/main.c
+++ b/sys/src/cmd/vt/main.c
@@ -135,7 +135,7 @@
 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");
 }
 
@@ -142,6 +142,7 @@
 void
 initialize(int argc, char **argv)
 {
+	int rflag;
 	int i, blkbg;
 	char *fontname, *p;
 
@@ -151,6 +152,7 @@
 	term = "vt100";
 	fk = vt100fk;
 	blkbg = nocolor = 0;
+	rflag = 0;
 	ARGBEGIN{
 	case '2':
 		term = "vt220";
@@ -179,6 +181,9 @@
 		fk = xtermfk;
 		term = "xterm";
 		break;
+	case 'r':
+		rflag = 1;
+		break;
 	default:
 		usage();
 		break;
@@ -195,6 +200,7 @@
 	werrstr("");		/* clear spurious error messages */
 	ebegin(Ehost);
 
+	cs->raw = rflag;
 	histp = hist;
 	menu2.item = menutext2;
 	menu3.item = menutext3;