summaryrefslogtreecommitdiff
path: root/sys/arch/i386/isa/pcvt/Util/scon
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>1999-10-16 18:56:38 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>1999-10-16 18:56:38 +0000
commitc58f75931455fa39eee6866e375b5791c6478fea (patch)
tree4941afb4376222061c2a617df76e0949198bf70a /sys/arch/i386/isa/pcvt/Util/scon
parentdadb7bf9c6f6f6c27e774fd5edd5c5fd9c0b98b9 (diff)
- Add support for a traditional PC display (16 colors and use the standard IBM
font) and make it the default mode. This is more or less a hack, since pcvt was developed only to be a vt220 terminal emulator. - Document new default mode in pcvt(4). - Add -o option to scon(1) for toggling between the new and legacy modes.
Diffstat (limited to 'sys/arch/i386/isa/pcvt/Util/scon')
-rw-r--r--sys/arch/i386/isa/pcvt/Util/scon/scon.112
-rw-r--r--sys/arch/i386/isa/pcvt/Util/scon/scon.c21
2 files changed, 29 insertions, 4 deletions
diff --git a/sys/arch/i386/isa/pcvt/Util/scon/scon.1 b/sys/arch/i386/isa/pcvt/Util/scon/scon.1
index 615b2fa98ca..37f9387ed11 100644
--- a/sys/arch/i386/isa/pcvt/Util/scon/scon.1
+++ b/sys/arch/i386/isa/pcvt/Util/scon/scon.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: scon.1,v 1.9 1999/09/29 22:29:10 aaron Exp $
+.\" $OpenBSD: scon.1,v 1.10 1999/10/16 18:56:37 aaron Exp $
.\"
.\" Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch
.\"
@@ -49,6 +49,7 @@
.Op Fl H
.Op Fl l
.Op Fl m
+.Op Fl o
.Op Fl v
.Op Fl V
.Op Fl s Ar lines
@@ -122,6 +123,15 @@ any HP escape sequences and without displaying function key labels.
Switch the specified/current screen into a mixed HP/VT220 mode. That is, that
in addition to the full VT220 emulation, the HP function key labels and the
escape sequences for handling the labels are available to the user.
+.It Fl o
+Toggle
+.Dq legacy
+pcvt mode with traditional PC display mode.
+As of
+.Ox 2.6 ,
+character mapping is turned off by default in favour of a traditional PC
+display with 16 colors and the standard IBM font.
+This option has no effect in line modes other than 25.
.It Fl s
Specify the number of character lines on the screen. Possible parameters are
25, 28, 35, 40, 43 or 50. To use all this screen sizes, the fonts required
diff --git a/sys/arch/i386/isa/pcvt/Util/scon/scon.c b/sys/arch/i386/isa/pcvt/Util/scon/scon.c
index 2a0945df9d2..250439b2525 100644
--- a/sys/arch/i386/isa/pcvt/Util/scon/scon.c
+++ b/sys/arch/i386/isa/pcvt/Util/scon/scon.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scon.c,v 1.15 1999/10/07 18:26:21 wvdputte Exp $ */
+/* $OpenBSD: scon.c,v 1.16 1999/10/16 18:56:37 aaron Exp $ */
/*
* Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch
@@ -72,6 +72,7 @@ int bflag = -1;
unsigned int scrollback_pages = 8;
int lflag = -1;
int mflag = -1;
+int oflag = -1;
int current = -1;
int pflag = -1;
int hflag = -1;
@@ -208,7 +209,7 @@ char *argv[];
int c;
int fd;
- while( (c = getopt(argc, argv, "ab:c:d:f:HVlms:t:vp:18")) != -1)
+ while( (c = getopt(argc, argv, "ab:c:d:f:HVlmos:t:vp:18")) != -1)
{
switch(c)
{
@@ -270,6 +271,10 @@ char *argv[];
vflag++;
break;
+ case 'o':
+ oflag = 1;
+ break;
+
case 'p':
if(!strcmp(optarg, "list"))
{
@@ -343,7 +348,7 @@ char *argv[];
if(dflag == -1 && lflag == -1 && current == -1 && pflag == -1 &&
hflag == -1 && res == -1 && Pflag == 0 && tflag == 0 && fflag == -1
- && colms == 0 && mflag == -1 && bflag == -1)
+ && colms == 0 && mflag == -1 && bflag == -1 && oflag == -1)
{
lflag = 1;
}
@@ -389,6 +394,16 @@ char *argv[];
exit(0);
}
+ if (oflag == 1)
+ {
+ if (ioctl(fd, TOGGLEPCDISP, &oflag) < 0)
+ {
+ perror("ioctl(TOGGLEPCDISP)");
+ exit(2);
+ }
+ exit(0);
+ }
+
if(mflag == 1) /* return monitor type */
{
printmonitor(fd);