diff options
| author | Søren Schmidt <sos@FreeBSD.org> | 1995-01-12 11:47:05 +0000 |
|---|---|---|
| committer | Søren Schmidt <sos@FreeBSD.org> | 1995-01-12 11:47:05 +0000 |
| commit | 6378775666543dbab8aedabfcb67bc289d1aefde (patch) | |
| tree | 4740a2fc78a60464f13d1978d7d296c90dc2b652 /usr.sbin/vidcontrol | |
| parent | 9d68e93aafbdac4bf3b12086810426d2749be60f (diff) | |
Notes
Diffstat (limited to 'usr.sbin/vidcontrol')
| -rw-r--r-- | usr.sbin/vidcontrol/vidcontrol.1 | 18 | ||||
| -rw-r--r-- | usr.sbin/vidcontrol/vidcontrol.c | 61 |
2 files changed, 36 insertions, 43 deletions
diff --git a/usr.sbin/vidcontrol/vidcontrol.1 b/usr.sbin/vidcontrol/vidcontrol.1 index f3ac429bc911..c25753913758 100644 --- a/usr.sbin/vidcontrol/vidcontrol.1 +++ b/usr.sbin/vidcontrol/vidcontrol.1 @@ -30,10 +30,12 @@ screensaver type and timeout. A new video mode is selected by specifying its name as an argument to .B vidcontrol eg. " -.B vidcontrol 80x25 +.B vidcontrol VGA_80x25 ". -The modes currently supported: 80x25 and 80x50 text. +The modes currently supported: VGA_40x25, VGA_80x25, VGA_80x50, EGA_80x25, EGA_80x43. +On some laptops the modes VGA_80x30 and VGA_80x60 can be used. +The graphic mode VGA_320x200 can also be chosen. The colors used when displaying text can be changed by specifying the foreground color (eg. " @@ -63,13 +65,8 @@ Set border color to .B color (only supported on VGA hardware): .TP -.BI "\-c\ " start.end -Change the cursor apperance. The cursor is changed to a shape that starts -on scanline -.B start -and ends on scanline -.B end -. +.BI "\-c\ " blink | noblink +Change the cursor apperance. The cursor is either blinking or nonblinking. .TP .BI "\-d\ " Print out current screen output map. @@ -112,7 +109,6 @@ Report when found. .BR kbdcontrol(1) , .BR keyboard (4) , .BR screen (4) , -.BR /sys/i386/conf/GENERICAH .SH AUTHORS -Søren Schmidt (sos@login.dkuug.dk) +Søren Schmidt (sos@FreeBSD.org) diff --git a/usr.sbin/vidcontrol/vidcontrol.c b/usr.sbin/vidcontrol/vidcontrol.c index 6aece126f7b2..cb9ff357bccb 100644 --- a/usr.sbin/vidcontrol/vidcontrol.c +++ b/usr.sbin/vidcontrol/vidcontrol.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1994 Søren Schmidt + * Copyright (c) 1994-1995 Søren Schmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: vidcontrol.c,v 1.2 1994/09/15 07:28:06 sos Exp $ + * $Id: vidcontrol.c,v 1.3 1994/09/26 20:20:44 ache Exp $ */ #include <ctype.h> @@ -264,26 +264,19 @@ set_screensaver_type(char *type) } void -set_cursor_values(char *size) +set_cursor_type(char *appearence) { - int start, end; - int n; - char *v1; + int type; - start = strtol(size, &v1, 0); - if ((start < 0) || (*v1 != '.')) - goto badopt; - size = ++v1; - end = strtol(size, &v1, 0); - if ((end < 0) || (*size == '\0') || (*v1 != '\0')) { -badopt: - fprintf(stderr, - "argument to -c must be start.end\n"); + if (!strcmp(appearence, "blink")) + type = 1; + else if (!strcmp(appearence, "noblink")) + type = 0; + else { + fprintf(stderr, "argument to -c must be blink or noblink\n"); return; } - if (verbose) - fprintf(stderr, "setting cursor to %d.%d\n", start, end); - fprintf(stdout, "[=%d;%dC", start, end); + ioctl(0, CONS_CURSORTYPE, &type); } @@ -297,8 +290,12 @@ video_mode(int argc, char **argv, int *index) mode = SW_VGA_C40x25; else if (!strcmp(argv[*index], "VGA_80x25")) mode = SW_VGA_C80x25; + else if (!strcmp(argv[*index], "VGA_80x30")) + mode = SW_VGA_C80x30; else if (!strcmp(argv[*index], "VGA_80x50")) mode = SW_VGA_C80x50; + else if (!strcmp(argv[*index], "VGA_80x60")) + mode = SW_VGA_C80x60; else if (!strcmp(argv[*index], "VGA_320x200")) mode = SW_VGA_CG320; else if (!strcmp(argv[*index], "EGA_80x25")) @@ -397,18 +394,18 @@ usage() "Usage: vidcontrol mode (available modes: VGA_40x25, VGA_80x25,\n" " VGA_80x50, VGA_320x200,\n" " EGA_80x25, EGA_80x43)\n" -" show (show available colors)\n" -" fgcol bgcol (set fore- & background colors)\n" -" -r fgcol bgcol (set reverse fore- & background colors)\n" -" -b color (set border color)\n" -" -c n.m (set cursor start line n & end line m)\n" -" -d (dump screenmap to stdout)\n" -" -l filename (load srceenmap file filename)\n" -" -L (load default screenmap)\n" -" -f DxL filename (load font, D dots wide & L lines high)\n" -" -s saver | help (set screensaver type or help for a list)\n" -" -t N (set screensaver timeout in seconds)\n" -" -x (use hex numbers for output)\n" +" show (show available colors)\n" +" fgcol bgcol (set fore- & background colors)\n" +" -r fgcol bgcol (set reverse fore- & background colors)\n" +" -b color (set border color)\n" +" -c blink | noblink (set cursor type)\n" +" -d (dump screenmap to stdout)\n" +" -l filename (load srceenmap file filename)\n" +" -L (load default screenmap)\n" +" -f DxL filename (load font, D dots wide & L lines high)\n" +" -s saver | help (set screensaver type or help for a list)\n" +" -t N (set screensaver timeout in seconds)\n" +" -x (use hex numbers for output)\n" ); } @@ -423,13 +420,13 @@ main(int argc, char **argv) info.size = sizeof(info); if (ioctl(0, CONS_GETINFO, &info) < 0) { - perror("Must be on a vty"); + perror("Must be on a vrtual console"); exit(1); } while((opt = getopt(argc, argv, "b:c:df:l:Lr:s:t:vx")) != -1) switch(opt) { case 'c': - set_cursor_values(optarg); + set_cursor_type(optarg); break; case 'b': set_border_color(optarg); |
