diff options
Diffstat (limited to 'sys/arch/i386/isa/pcvt/Util/scon')
-rw-r--r-- | sys/arch/i386/isa/pcvt/Util/scon/scon.1 | 9 | ||||
-rw-r--r-- | sys/arch/i386/isa/pcvt/Util/scon/scon.c | 27 |
2 files changed, 31 insertions, 5 deletions
diff --git a/sys/arch/i386/isa/pcvt/Util/scon/scon.1 b/sys/arch/i386/isa/pcvt/Util/scon/scon.1 index 23f4240dac8..615b2fa98ca 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.8 1999/07/09 13:35:32 aaron Exp $ +.\" $OpenBSD: scon.1,v 1.9 1999/09/29 22:29:10 aaron Exp $ .\" .\" Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch .\" @@ -41,6 +41,7 @@ .Sh SYNOPSIS .Nm scon .Op Fl a +.Op Fl b Ar num .Op Fl c Ar screenno .Op Fl d Ar device .Op Fl f Ar on|off @@ -83,6 +84,10 @@ The options are as follows: .It Fl a Returns a string describing the video adaptor found by pcvt, the string returned could be MDA, HGC, CGA, EGA, VGA or UNKNOWN. +.It Fl b +Set the number of scrollback buffer pages to +.Ar num . +The minimum value is 2, maximum 100. .It Fl c Specify the screen number the current (displayed) screen should be switched to. @@ -206,7 +211,7 @@ Invoking will result in green on gray output for normal text. Note that normal text color is light gray, and not white as one might expect. .Sh BUGS -the +The .Fl c and .Fl d diff --git a/sys/arch/i386/isa/pcvt/Util/scon/scon.c b/sys/arch/i386/isa/pcvt/Util/scon/scon.c index 436cd143764..0795fb956c8 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.12 1999/05/24 15:37:44 aaron Exp $ */ +/* $OpenBSD: scon.c,v 1.13 1999/09/29 22:29:10 aaron Exp $ */ /* * Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch @@ -68,6 +68,8 @@ static char *id = #define DEFAULTFD 0 int aflag = -1; +int bflag = -1; +unsigned int scrollback_pages = 8; int lflag = -1; int mflag = -1; int current = -1; @@ -206,13 +208,18 @@ char *argv[]; int c; int fd; - while( (c = getopt(argc, argv, "ac:d:f:HVlms:t:vp:18")) != -1) + while( (c = getopt(argc, argv, "ab:c:d:f:HVlms:t:vp:18")) != -1) { switch(c) { case 'a': aflag = 1; break; + + case 'b': + bflag = 1; + scrollback_pages = atoi(optarg); + break; case 'l': lflag = 1; @@ -336,7 +343,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) + && colms == 0 && mflag == -1 && bflag == -1) { lflag = 1; } @@ -367,6 +374,20 @@ char *argv[]; exit(0); } + if (bflag == 1) + { + if(vflag) + printf("Setting number of scrollback buffer pages "); + printf("to %d.\n", scrollback_pages); + + if(ioctl(fd, SETSCROLLSIZE, &scrollback_pages) < 0) + { + perror("ioctl(SETSCROLLSIZE)"); + exit(2); + } + exit(0); + } + if(mflag == 1) /* return monitor type */ { printmonitor(fd); |