From ccbe029539d19d812d495f1e351b488e2682c24f Mon Sep 17 00:00:00 2001
From: Sascha Wildner <saw@online.de>
Date: Wed, 26 Feb 2020 20:20:17 +0100
Subject: [PATCH 01/20] Remove the old libvgl.

---
 Makefile_upgrade.inc           |   7 +
 UPDATING                       |   9 +
 etc/mtree/BSD.usr.dist         |   2 -
 lib/Makefile                   |   1 -
 lib/libvgl/Makefile            |  43 ---
 lib/libvgl/bitmap.c            | 367 -------------------------
 lib/libvgl/keyboard.c          |  93 -------
 lib/libvgl/main.c              | 475 ---------------------------------
 lib/libvgl/mouse.c             | 284 --------------------
 lib/libvgl/simple.c            | 403 ----------------------------
 lib/libvgl/text.c              | 244 -----------------
 lib/libvgl/vgl.3               | 466 --------------------------------
 lib/libvgl/vgl.h               | 148 ----------
 share/examples/libvgl/Makefile |   8 -
 share/examples/libvgl/demo.c   | 122 ---------
 share/man/man4/vga.4           |   1 -
 share/mk/bsd.libnames.mk       |   1 -
 17 files changed, 16 insertions(+), 2658 deletions(-)
 delete mode 100644 lib/libvgl/Makefile
 delete mode 100644 lib/libvgl/bitmap.c
 delete mode 100644 lib/libvgl/keyboard.c
 delete mode 100644 lib/libvgl/main.c
 delete mode 100644 lib/libvgl/mouse.c
 delete mode 100644 lib/libvgl/simple.c
 delete mode 100644 lib/libvgl/text.c
 delete mode 100644 lib/libvgl/vgl.3
 delete mode 100644 lib/libvgl/vgl.h
 delete mode 100644 share/examples/libvgl/Makefile
 delete mode 100644 share/examples/libvgl/demo.c

diff --git a/Makefile_upgrade.inc b/Makefile_upgrade.inc
index 82590ff6fc..dfcec7fc37 100644
--- a/Makefile_upgrade.inc
+++ b/Makefile_upgrade.inc
@@ -3912,6 +3912,13 @@ TO_REMOVE+=/usr/share/man/man1/readelf225.1.gz
 TO_REMOVE+=/usr/share/man/man1/size225.1.gz
 TO_REMOVE+=/usr/share/man/man1/strings225.1.gz
 TO_REMOVE+=/usr/share/man/man1/strip225.1.gz
+TO_REMOVE+=/usr/include/vgl.h
+TO_REMOVE+=/usr/lib/libvgl.a
+TO_REMOVE+=/usr/lib/libvgl.so
+TO_REMOVE+=/usr/lib/libvgl.so.4
+TO_REMOVE+=/usr/lib/profile/libvgl.a
+TO_REMOVE+=/usr/share/examples/libvgl
+TO_REMOVE+=/usr/share/man/man3/vgl.3.gz
 
 .if !defined(WANT_INSTALLER)
 TO_REMOVE+=/usr/sbin/dfuibe_installer
diff --git a/UPDATING b/UPDATING
index a08e96c812..28e173f46e 100644
--- a/UPDATING
+++ b/UPDATING
@@ -8,6 +8,15 @@
 # If you discover any problem, please contact the bugs@lists.dragonflybsd.org
 # mailing list with the details.
 
++-----------------------------------------------------------------------+
++         UPGRADING DRAGONFLY FROM 5.8 TO LATER VERSIONS                +
++-----------------------------------------------------------------------+
+
+LIBVGL REMOVED
+--------------
+
+The old libvgl was removed as part of VGA and syscons code cleanup.
+
 +-----------------------------------------------------------------------+
 +         UPGRADING DRAGONFLY FROM 5.6 TO LATER VERSIONS                +
 +-----------------------------------------------------------------------+
diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist
index 0e6b02d921..72f4c85229 100644
--- a/etc/mtree/BSD.usr.dist
+++ b/etc/mtree/BSD.usr.dist
@@ -209,8 +209,6 @@
             ..
             libusb20
             ..
-            libvgl
-            ..
             mdoc
             ..
             netgraph
diff --git a/lib/Makefile b/lib/Makefile
index 92fb25633b..63f07e84f2 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -83,7 +83,6 @@ SUBDIR=	${SUBDIR_ORDERED} \
 	libstand \
 	libtelnet \
 	libu4bhid \
-	libvgl \
 	libwrap \
 	liby
 
diff --git a/lib/libvgl/Makefile b/lib/libvgl/Makefile
deleted file mode 100644
index e1ea021c43..0000000000
--- a/lib/libvgl/Makefile
+++ /dev/null
@@ -1,43 +0,0 @@
-# $FreeBSD: src/lib/libvgl/Makefile,v 1.6.2.1 2001/04/25 10:04:43 ru Exp $
-# $DragonFly: src/lib/libvgl/Makefile,v 1.6 2008/10/28 16:54:09 swildner Exp $
-LIB=	vgl
-SHLIB_MAJOR=	4
-CFLAGS+=-I${.CURDIR}
-SRCS=	main.c simple.c bitmap.c text.c mouse.c keyboard.c
-INCS=	vgl.h
-WARNS?=	2
-MAN=	vgl.3
-MLINKS+=	vgl.3 VGLBitmapAllocateBits.3 \
-		vgl.3 VGLBitmapCopy.3 \
-		vgl.3 VGLBitmapCreate.3 \
-		vgl.3 VGLBitmapDestroy.3 \
-		vgl.3 VGLBitmapPutChar.3 \
-		vgl.3 VGLBitmapString.3 \
-		vgl.3 VGLBlankDisplay.3 \
-		vgl.3 VGLBox.3 \
-		vgl.3 VGLCheckSwitch.3 \
-		vgl.3 VGLClear.3 \
-		vgl.3 VGLEllipse.3 \
-		vgl.3 VGLEnd.3 \
-		vgl.3 VGLFilledBox.3 \
-		vgl.3 VGLFilledEllipse.3 \
-		vgl.3 VGLGetXY.3 \
-		vgl.3 VGLInit.3 \
-		vgl.3 VGLKeyboardEnd.3 \
-		vgl.3 VGLKeyboardGetCh.3 \
-		vgl.3 VGLKeyboardInit.3 \
-		vgl.3 VGLLine.3 \
-		vgl.3 VGLMouseInit.3 \
-		vgl.3 VGLMouseMode.3 \
-		vgl.3 VGLMouseSetImage.3 \
-		vgl.3 VGLMouseSetStdImage.3 \
-		vgl.3 VGLMouseStatus.3 \
-		vgl.3 VGLPanScreen.3 \
-		vgl.3 VGLSetBorder.3 \
-		vgl.3 VGLSetPalette.3 \
-		vgl.3 VGLSetPaletteIndex.3 \
-		vgl.3 VGLSetVScreenSize.3 \
-		vgl.3 VGLSetXY.3 \
-		vgl.3 VGLTextSetFontFile.3
-
-.include <bsd.lib.mk>
diff --git a/lib/libvgl/bitmap.c b/lib/libvgl/bitmap.c
deleted file mode 100644
index d04d763b69..0000000000
--- a/lib/libvgl/bitmap.c
+++ /dev/null
@@ -1,367 +0,0 @@
-/*-
- * Copyright (c) 1991-1997 Søren Schmidt
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer,
- *    in this position and unchanged.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $FreeBSD: src/lib/libvgl/bitmap.c,v 1.4 1999/11/08 11:37:39 yokota Exp $
- * $DragonFly: src/lib/libvgl/bitmap.c,v 1.3 2004/06/19 18:55:47 joerg Exp $
- */
-
-#include <sys/types.h>
-#include <signal.h>
-#include <machine/console.h>
-#include "vgl.h"
-
-#define min(x, y)	(((x) < (y)) ? (x) : (y))
-
-static byte mask[8] = {0xff, 0x7f, 0x3f, 0x1f, 0x0f, 0x07, 0x03, 0x01};
-static int color2bit[16] = {0x00000000, 0x00000001, 0x00000100, 0x00000101,
-			    0x00010000, 0x00010001, 0x00010100, 0x00010101,
-			    0x01000000, 0x01000001, 0x01000100, 0x01000101,
-			    0x01010000, 0x01010001, 0x01010100, 0x01010101};
-
-static void
-WriteVerticalLine(VGLBitmap *dst, int x, int y, int width, byte *line)
-{
-  int i, pos, last, planepos, start_offset, end_offset, offset;
-  int len;
-  unsigned int word = 0;
-  byte *address;
-  byte *VGLPlane[4];
-
-  switch (dst->Type) {
-  case VIDBUF4:
-  case VIDBUF4S:
-    start_offset = (x & 0x07);
-    end_offset = (x + width) & 0x07;
-    i = (width + start_offset) / 8;
-    if (end_offset)
-	i++;
-    VGLPlane[0] = VGLBuf;
-    VGLPlane[1] = VGLPlane[0] + i;
-    VGLPlane[2] = VGLPlane[1] + i;
-    VGLPlane[3] = VGLPlane[2] + i;
-    pos = 0;
-    planepos = 0;
-    last = 8 - start_offset;
-    while (pos < width) {
-      word = 0;
-      while (pos < last && pos < width)
-	word = (word<<1) | color2bit[line[pos++]&0x0f];
-      VGLPlane[0][planepos] = word;
-      VGLPlane[1][planepos] = word>>8;
-      VGLPlane[2][planepos] = word>>16;
-      VGLPlane[3][planepos] = word>>24;
-      planepos++;
-      last += 8;
-    }
-    planepos--;
-    if (end_offset) {
-      word <<= (8 - end_offset);
-      VGLPlane[0][planepos] = word;
-      VGLPlane[1][planepos] = word>>8;
-      VGLPlane[2][planepos] = word>>16;
-      VGLPlane[3][planepos] = word>>24;
-    }
-    if (start_offset || end_offset)
-      width+=8;
-    width /= 8;
-    outb(0x3ce, 0x01); outb(0x3cf, 0x00);		/* set/reset enable */
-    outb(0x3ce, 0x08); outb(0x3cf, 0xff);		/* bit mask */
-    for (i=0; i<4; i++) {
-      outb(0x3c4, 0x02);
-      outb(0x3c5, 0x01<<i);
-      outb(0x3ce, 0x04);
-      outb(0x3cf, i);
-      pos = VGLAdpInfo.va_line_width*y + x/8;
-      if (dst->Type == VIDBUF4) {
-	if (end_offset)
-	  VGLPlane[i][planepos] |= dst->Bitmap[pos+planepos] & mask[end_offset];
-	if (start_offset)
-	  VGLPlane[i][0] |= dst->Bitmap[pos] & ~mask[start_offset];
-	bcopy(&VGLPlane[i][0], dst->Bitmap + pos, width);
-      } else {	/* VIDBUF4S */
-	if (end_offset) {
-	  offset = VGLSetSegment(pos + planepos);
-	  VGLPlane[i][planepos] |= dst->Bitmap[offset] & mask[end_offset];
-	}
-	offset = VGLSetSegment(pos);
-	if (start_offset)
-	  VGLPlane[i][0] |= dst->Bitmap[offset] & ~mask[start_offset];
-	for (last = width; ; ) { 
-	  len = min(VGLAdpInfo.va_window_size - offset, last);
-	  bcopy(&VGLPlane[i][width - last], dst->Bitmap + offset, len);
-	  pos += len;
-	  last -= len;
-	  if (last <= 0)
-	    break;
-	  offset = VGLSetSegment(pos);
-	}
-      }
-    }
-    break;
-  case VIDBUF8X:
-    address = dst->Bitmap + VGLAdpInfo.va_line_width * y + x/4;
-    for (i=0; i<4; i++) {
-      outb(0x3c4, 0x02);
-      outb(0x3c5, 0x01 << ((x + i)%4));
-      for (planepos=0, pos=i; pos<width; planepos++, pos+=4)
-        address[planepos] = line[pos];
-      if ((x + i)%4 == 3)
-	++address;
-    }
-    break;
-  case VIDBUF8S:
-    pos = dst->VXsize * y + x;
-    while (width > 0) {
-      offset = VGLSetSegment(pos);
-      i = min(VGLAdpInfo.va_window_size - offset, width);
-      bcopy(line, dst->Bitmap + offset, i);
-      line += i;
-      pos += i;
-      width -= i;
-    }
-    break;
-  case VIDBUF8:
-  case MEMBUF:
-    address = dst->Bitmap + dst->VXsize * y + x;
-    bcopy(line, address, width);
-    break;
-
-  default:
-    break;
-  }
-}
-
-static void
-ReadVerticalLine(VGLBitmap *src, int x, int y, int width, byte *line)
-{
-  int i, bit, pos, count, planepos, start_offset, end_offset, offset;
-  int width2, len;
-  byte *address;
-  byte *VGLPlane[4];
-
-  switch (src->Type) {
-  case VIDBUF4S:
-    start_offset = (x & 0x07);
-    end_offset = (x + width) & 0x07;
-    count = (width + start_offset) / 8;
-    if (end_offset)
-      count++;
-    VGLPlane[0] = VGLBuf;
-    VGLPlane[1] = VGLPlane[0] + count;
-    VGLPlane[2] = VGLPlane[1] + count;
-    VGLPlane[3] = VGLPlane[2] + count;
-    for (i=0; i<4; i++) {
-      outb(0x3ce, 0x04);
-      outb(0x3cf, i);
-      pos = VGLAdpInfo.va_line_width*y + x/8;
-      for (width2 = count; width2 > 0; ) {
-	offset = VGLSetSegment(pos);
-	len = min(VGLAdpInfo.va_window_size - offset, width2);
-	bcopy(src->Bitmap + offset, &VGLPlane[i][count - width2], len);
-	pos += len;
-	width2 -= len;
-      }
-    }
-    goto read_planar;
-  case VIDBUF4:
-    address = src->Bitmap + VGLAdpInfo.va_line_width * y + x/8;
-    start_offset = (x & 0x07);
-    end_offset = (x + width) & 0x07;
-    count = (width + start_offset) / 8;
-    if (end_offset)
-      count++;
-    VGLPlane[0] = VGLBuf;
-    VGLPlane[1] = VGLPlane[0] + count;
-    VGLPlane[2] = VGLPlane[1] + count;
-    VGLPlane[3] = VGLPlane[2] + count;
-    for (i=0; i<4; i++) {
-      outb(0x3ce, 0x04);
-      outb(0x3cf, i);
-      bcopy(address, &VGLPlane[i][0], count);
-    }
-read_planar:
-    pos = 0;
-    planepos = 0;
-    bit = 7 - start_offset;
-    while (pos < width) {
-      for (; bit >= 0 && pos < width; bit--, pos++) {
-        line[pos] = (VGLPlane[0][planepos] & (1<<bit) ? 1 : 0) |
-                    ((VGLPlane[1][planepos] & (1<<bit) ? 1 : 0) << 1) |
-                    ((VGLPlane[2][planepos] & (1<<bit) ? 1 : 0) << 2) |
-                    ((VGLPlane[3][planepos] & (1<<bit) ? 1 : 0) << 3);
-      }
-      planepos++;
-      bit = 7;
-    }
-    break;
-  case VIDBUF8X:
-    address = src->Bitmap + VGLAdpInfo.va_line_width * y + x/4;
-    for (i=0; i<4; i++) {
-      outb(0x3ce, 0x04);
-      outb(0x3cf, (x + i)%4);
-      for (planepos=0, pos=i; pos<width; planepos++, pos+=4)
-        line[pos] = address[planepos];
-      if ((x + i)%4 == 3)
-	++address;
-    }
-    break;
-  case VIDBUF8S:
-    pos = src->VXsize * y + x;
-    while (width > 0) {
-      offset = VGLSetSegment(pos);
-      i = min(VGLAdpInfo.va_window_size - offset, width);
-      bcopy(src->Bitmap + offset, line, i);
-      line += i;
-      pos += i;
-      width -= i;
-    }
-    break;
-  case VIDBUF8:
-  case MEMBUF:
-    address = src->Bitmap + src->VXsize * y + x;
-    bcopy(address, line, width);
-    break;
-  default:
-    break;
-  }
-}
-
-int
-__VGLBitmapCopy(VGLBitmap *src, int srcx, int srcy,
-	      VGLBitmap *dst, int dstx, int dsty, int width, int hight)
-{
-  int srcline, dstline;
-
-  if (srcx>src->VXsize || srcy>src->VYsize
-	|| dstx>dst->VXsize || dsty>dst->VYsize)
-    return -1;  
-  if (srcx < 0) {
-    width=width+srcx; dstx-=srcx; srcx=0;    
-  }
-  if (srcy < 0) {
-    hight=hight+srcy; dsty-=srcy; srcy=0; 
-  }
-  if (dstx < 0) {    
-    width=width+dstx; srcx-=dstx; dstx=0;
-  }
-  if (dsty < 0) {
-    hight=hight+dsty; srcy-=dsty; dsty=0;
-  }
-  if (srcx+width > src->VXsize)
-     width=src->VXsize-srcx;
-  if (srcy+hight > src->VYsize)
-     hight=src->VYsize-srcy;
-  if (dstx+width > dst->VXsize)
-     width=dst->VXsize-dstx;
-  if (dsty+hight > dst->VYsize)
-     hight=dst->VYsize-dsty;
-  if (width < 0 || hight < 0)
-     return -1;
-  if (src->Type == MEMBUF) {
-    for (srcline=srcy, dstline=dsty; srcline<srcy+hight; srcline++, dstline++) {
-      WriteVerticalLine(dst, dstx, dstline, width, 
-	(src->Bitmap+(srcline*src->VXsize)+srcx));
-    }
-  }
-  else if (dst->Type == MEMBUF) {
-    for (srcline=srcy, dstline=dsty; srcline<srcy+hight; srcline++, dstline++) {
-      ReadVerticalLine(src, srcx, srcline, width,
-	 (dst->Bitmap+(dstline*dst->VXsize)+dstx));
-    }
-  }
-  else {
-    byte buffer[2048];	/* XXX */
-    byte *p;
-
-    if (width > sizeof(buffer)) {
-      p = malloc(width);
-      if (p == NULL)
-	return 1;
-    } else {
-      p = buffer;
-    }
-    for (srcline=srcy, dstline=dsty; srcline<srcy+hight; srcline++, dstline++) {
-      ReadVerticalLine(src, srcx, srcline, width, p);
-      WriteVerticalLine(dst, dstx, dstline, width, p);
-    }
-    if (width > sizeof(buffer))
-      free(p);
-  }
-  return 0;
-}
-
-int
-VGLBitmapCopy(VGLBitmap *src, int srcx, int srcy,
-	      VGLBitmap *dst, int dstx, int dsty, int width, int hight)
-{
-  int error;
-
-  VGLMouseFreeze(dstx, dsty, width, hight, 0);
-  error = __VGLBitmapCopy(src, srcx, srcy, dst, dstx, dsty, width, hight);
-  VGLMouseUnFreeze();
-  return error;
-}
-
-VGLBitmap
-*VGLBitmapCreate(int type, int xsize, int ysize, byte *bits)
-{
-  VGLBitmap *object;
-
-  if (type != MEMBUF)
-    return NULL;
-  if (xsize < 0 || ysize < 0)
-    return NULL;
-  object = (VGLBitmap *)malloc(sizeof(*object));
-  if (object == NULL)
-    return NULL;
-  object->Type = type;
-  object->Xsize = xsize;
-  object->Ysize = ysize;
-  object->VXsize = xsize;
-  object->VYsize = ysize;
-  object->Xorigin = 0;
-  object->Yorigin = 0;
-  object->Bitmap = bits;
-  return object;
-}
-
-void
-VGLBitmapDestroy(VGLBitmap *object)
-{
-  if (object->Bitmap)
-    free(object->Bitmap);
-  free(object);
-}
-
-int
-VGLBitmapAllocateBits(VGLBitmap *object)
-{
-  object->Bitmap = (byte *)malloc(object->VXsize*object->VYsize);
-  if (object->Bitmap == NULL)
-    return -1;
-  return 0;
-}
diff --git a/lib/libvgl/keyboard.c b/lib/libvgl/keyboard.c
deleted file mode 100644
index 36e65fb4dd..0000000000
--- a/lib/libvgl/keyboard.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/*-
- * Copyright (c) 1997 Søren Schmidt
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer
- *    in this position and unchanged.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $FreeBSD: src/lib/libvgl/keyboard.c,v 1.3 1999/08/28 00:05:55 peter Exp $
- * $DragonFly: src/lib/libvgl/keyboard.c,v 1.3 2008/09/30 16:57:06 swildner Exp $
- */
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <termios.h>
-#include <sys/time.h>
-#include <machine/console.h>
-#include "vgl.h"
-
-static struct termios VGLKeyboardTty;
-static int VGLKeyboardMode = -1;
-
-int
-VGLKeyboardInit(int mode)
-{
-  static struct termios term;
-
-  ioctl(0, KDGKBMODE, &VGLKeyboardMode);
-  tcgetattr(0, &VGLKeyboardTty);
-
-  term = VGLKeyboardTty;
-  cfmakeraw(&term);
-  term.c_iflag = IGNPAR | IGNBRK;
-  term.c_oflag = 0;
-  term.c_cflag = CREAD | CS8;
-  term.c_lflag &= ~(ICANON | ECHO | ISIG);
-  term.c_cc[VTIME] = 0;
-  term.c_cc[VMIN] = 0;
-  cfsetispeed(&term, 9600);
-  cfsetospeed(&term, 9600);
-  tcsetattr(0, TCSANOW, &term);
-
-  switch (mode) {
-  case VGL_RAWKEYS:
-    ioctl(0, KDSKBMODE, K_RAW);
-    break;
-  case VGL_CODEKEYS:
-    ioctl(0, KDSKBMODE, K_CODE);
-    break;
-  case VGL_XLATEKEYS:
-    ioctl(0, KDSKBMODE, K_XLATE);
-    break;
-  }
-  return 0;
-}
-
-void
-VGLKeyboardEnd(void)
-{
-  if (VGLKeyboardMode != -1) {
-    ioctl(0, KDSKBMODE, VGLKeyboardMode);
-    tcsetattr(0, TCSANOW, &VGLKeyboardTty);
-  }
-}
-
-int
-VGLKeyboardGetCh(void)
-{
-  unsigned char ch = 0;
-
-  read (0, &ch, 1);
-  return (int)ch;
-}
diff --git a/lib/libvgl/main.c b/lib/libvgl/main.c
deleted file mode 100644
index 99f347bc8e..0000000000
--- a/lib/libvgl/main.c
+++ /dev/null
@@ -1,475 +0,0 @@
-/*-
- * Copyright (c) 1991-1997 Søren Schmidt
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer
- *    in this position and unchanged.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $FreeBSD: src/lib/libvgl/main.c,v 1.6.2.2 2001/07/30 14:31:30 yokota Exp $
- */
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/signal.h>
-#include <sys/file.h>
-#include <sys/ioctl.h>
-#include <sys/mman.h>
-#include <machine/console.h>
-#include "vgl.h"
-
-#define min(x, y)	(((x) < (y)) ? (x) : (y))
-#define max(x, y)	(((x) > (y)) ? (x) : (y))
-
-VGLBitmap *VGLDisplay;
-video_info_t VGLModeInfo;
-video_adapter_info_t VGLAdpInfo;
-byte *VGLBuf;
-
-static int VGLMode;
-static int VGLOldMode;
-static size_t VGLBufSize;
-static byte *VGLMem = MAP_FAILED;
-static int VGLSwitchPending;
-static int VGLAbortPending;
-static int VGLOnDisplay;
-static unsigned int VGLCurWindow;
-static int VGLInitDone = 0;
-
-void
-VGLEnd(void)
-{
-struct vt_mode smode;
-
-  if (!VGLInitDone)
-    return;
-  VGLInitDone = 0;
-  VGLSwitchPending = 0;
-  VGLAbortPending = 0;
-
-  signal(SIGUSR1, SIG_IGN);
-
-  if (VGLMem != MAP_FAILED) {
-    VGLClear(VGLDisplay, 0);
-    munmap(VGLMem, VGLAdpInfo.va_window_size);
-  }
-
-  ioctl(0, _IO('S', VGLOldMode), 0);
-  ioctl(0, KDDISABIO, 0);
-  ioctl(0, KDSETMODE, KD_TEXT);
-  smode.mode = VT_AUTO;
-  ioctl(0, VT_SETMODE, &smode);
-  if (VGLBuf)
-    free(VGLBuf);
-  VGLBuf = NULL;
-  free(VGLDisplay);
-  VGLDisplay = NULL;
-  VGLKeyboardEnd();
-}
-
-static void 
-VGLAbort(int signo __unused)
-{
-  VGLAbortPending = 1;
-  signal(SIGINT, SIG_IGN);
-  signal(SIGTERM, SIG_IGN);
-  signal(SIGSEGV, SIG_IGN);
-  signal(SIGBUS, SIG_IGN);
-  signal(SIGUSR2, SIG_IGN);
-}
-
-static void
-VGLSwitch(int signo __unused)
-{
-  if (!VGLOnDisplay)
-    VGLOnDisplay = 1;
-  else
-    VGLOnDisplay = 0;
-  VGLSwitchPending = 1;
-  signal(SIGUSR1, VGLSwitch);
-}
-
-int
-VGLInit(int mode)
-{
-  struct vt_mode smode;
-  int adptype;
-
-  if (VGLInitDone)
-    return -1;
-
-  signal(SIGUSR1, VGLSwitch);
-  signal(SIGINT, VGLAbort);
-  signal(SIGTERM, VGLAbort);
-  signal(SIGSEGV, VGLAbort);
-  signal(SIGBUS, VGLAbort);
-  signal(SIGUSR2, SIG_IGN);
-
-  VGLOnDisplay = 1;
-  VGLSwitchPending = 0;
-  VGLAbortPending = 0;
-
-  if (ioctl(0, CONS_GET, &VGLOldMode) || ioctl(0, CONS_CURRENT, &adptype))
-    return -1;
-  VGLModeInfo.vi_mode = mode;
-  if (ioctl(0, CONS_MODEINFO, &VGLModeInfo))	/* FBIO_MODEINFO */
-    return -1;
-
-  VGLDisplay = (VGLBitmap *)malloc(sizeof(VGLBitmap));
-  if (VGLDisplay == NULL)
-    return -2;
-
-  if (ioctl(0, KDENABIO, 0)) {
-    free(VGLDisplay);
-    return -3;
-  }
-
-  VGLInitDone = 1;
-
-  /*
-   * vi_mem_model specifies the memory model of the current video mode
-   * in -CURRENT.
-   */
-  switch (VGLModeInfo.vi_mem_model) {
-  case V_INFO_MM_PLANAR:
-    /* we can handle EGA/VGA planner modes only */
-    if (VGLModeInfo.vi_depth != 4 || VGLModeInfo.vi_planes != 4
-	|| (adptype != KD_EGA && adptype != KD_VGA)) {
-      VGLEnd();
-      return -4;
-    }
-    VGLDisplay->Type = VIDBUF4;
-    break;
-  case V_INFO_MM_PACKED:
-    /* we can do only 256 color packed modes */
-    if (VGLModeInfo.vi_depth != 8) {
-      VGLEnd();
-      return -4;
-    }
-    VGLDisplay->Type = VIDBUF8;
-    break;
-  case V_INFO_MM_VGAX:
-    VGLDisplay->Type = VIDBUF8X;
-    break;
-  default:
-    VGLEnd();
-    return -4;
-  }
-
-  ioctl(0, VT_WAITACTIVE, 0);
-  ioctl(0, KDSETMODE, KD_GRAPHICS);
-  if (ioctl(0, CONS_SET, &mode)) {
-    VGLEnd();
-    return -5;
-  }
-  if (ioctl(0, CONS_ADPINFO, &VGLAdpInfo)) {	/* FBIO_ADPINFO */
-    VGLEnd();
-    return -6;
-  }
-
-  /*
-   * Calculate the shadow screen buffer size.  In -CURRENT, va_buffer_size
-   * always holds the entire frame buffer size, wheather it's in the linear
-   * mode or windowed mode.  
-   *     VGLBufSize = VGLAdpInfo.va_buffer_size;
-   * In -STABLE, va_buffer_size holds the frame buffer size, only if
-   * the linear frame buffer mode is supported. Otherwise the field is zero.
-   * We shall calculate the minimal size in this case:
-   *     VGLAdpInfo.va_line_width*VGLModeInfo.vi_height*VGLModeInfo.vi_planes
-   * or
-   *     VGLAdpInfo.va_window_size*VGLModeInfo.vi_planes;
-   * Use whichever is larger.
-   */
-  if (VGLAdpInfo.va_buffer_size != 0)
-    VGLBufSize = VGLAdpInfo.va_buffer_size;
-  else
-    VGLBufSize = max(VGLAdpInfo.va_line_width*VGLModeInfo.vi_height,
-		     VGLAdpInfo.va_window_size)*VGLModeInfo.vi_planes;
-  VGLBuf = malloc(VGLBufSize);
-  if (VGLBuf == NULL) {
-    VGLEnd();
-    return -7;
-  }
-
-#ifdef LIBVGL_DEBUG
-  fprintf(stderr, "VGLBufSize:0x%x\n", VGLBufSize);
-#endif
-
-  /* see if we are in the windowed buffer mode or in the linear buffer mode */
-  if (VGLBufSize/VGLModeInfo.vi_planes > VGLAdpInfo.va_window_size) {
-    if (VGLDisplay->Type == VIDBUF4)
-      VGLDisplay->Type = VIDBUF4S;
-    else if (VGLDisplay->Type == VIDBUF8)
-      VGLDisplay->Type = VIDBUF8S;
-  }
-
-  VGLMode = mode;
-  VGLCurWindow = 0;
-
-  VGLDisplay->Xsize = VGLModeInfo.vi_width;
-  VGLDisplay->Ysize = VGLModeInfo.vi_height;
-  VGLDisplay->VXsize = VGLAdpInfo.va_line_width
-			   *8/(VGLModeInfo.vi_depth/VGLModeInfo.vi_planes);
-  VGLDisplay->VYsize = VGLBufSize/VGLModeInfo.vi_planes/VGLAdpInfo.va_line_width;
-  VGLDisplay->Xorigin = 0;
-  VGLDisplay->Yorigin = 0;
-
-  VGLMem = (byte*)mmap(0, VGLAdpInfo.va_window_size, PROT_READ|PROT_WRITE,
-		       MAP_FILE, 0, 0);
-  if (VGLMem == MAP_FAILED) {
-    VGLEnd();
-    return -7;
-  }
-  VGLDisplay->Bitmap = VGLMem;
-
-  VGLSavePalette();
-
-#ifdef LIBVGL_DEBUG
-  fprintf(stderr, "va_line_width:%d\n", VGLAdpInfo.va_line_width);
-  fprintf(stderr, "VGLXsize:%d, Ysize:%d, VXsize:%d, VYsize:%d\n",
-	  VGLDisplay->Xsize, VGLDisplay->Ysize, 
-	  VGLDisplay->VXsize, VGLDisplay->VYsize);
-#endif
-
-  smode.mode = VT_PROCESS;
-  smode.waitv = 0;
-  smode.relsig = SIGUSR1;
-  smode.acqsig = SIGUSR1;
-  smode.frsig  = SIGINT;	
-  if (ioctl(0, VT_SETMODE, &smode)) {
-    VGLEnd();
-    return -9;
-  }
-  VGLTextSetFontFile(NULL);
-  VGLClear(VGLDisplay, 0);
-  return 0;
-}
-
-void
-VGLCheckSwitch(void)
-{
-  if (VGLAbortPending) {
-    VGLEnd();
-    exit(0);
-  }
-  while (VGLSwitchPending) {
-    unsigned int offset;
-    unsigned int len;
-    int i;
-
-    VGLSwitchPending = 0;
-    if (VGLOnDisplay) {
-      ioctl(0, KDENABIO, 0);
-      ioctl(0, KDSETMODE, KD_GRAPHICS);
-      ioctl(0, VGLMode, 0);
-      VGLCurWindow = 0;
-      VGLMem = (byte*)mmap(0, VGLAdpInfo.va_window_size, PROT_READ|PROT_WRITE,
-			   MAP_FILE, 0, 0);
-
-      /* XXX: what if mmap() has failed! */
-      VGLDisplay->Type = VIDBUF8;	/* XXX */
-      switch (VGLModeInfo.vi_mem_model) {
-      case V_INFO_MM_PLANAR:
-	if (VGLModeInfo.vi_depth == 4 && VGLModeInfo.vi_planes == 4) {
-	  if (VGLBufSize/VGLModeInfo.vi_planes > VGLAdpInfo.va_window_size)
-	    VGLDisplay->Type = VIDBUF4S;
-	  else
-	    VGLDisplay->Type = VIDBUF4;
-	} else {
-	  /* shouldn't be happening */
-	}
-        break;
-      case V_INFO_MM_PACKED:
-	if (VGLModeInfo.vi_depth == 8) {
-	  if (VGLBufSize/VGLModeInfo.vi_planes > VGLAdpInfo.va_window_size)
-	    VGLDisplay->Type = VIDBUF8S;
-	  else
-	    VGLDisplay->Type = VIDBUF8;
-	} else {
-	  /* shouldn't be happening */
-	}
-        break;
-      case V_INFO_MM_VGAX:
-	VGLDisplay->Type = VIDBUF8X;
-	break;
-      default:
-	/* shouldn't be happening */
-        break;
-      }
-
-      VGLDisplay->Bitmap = VGLMem;
-      VGLDisplay->Xsize = VGLModeInfo.vi_width;
-      VGLDisplay->Ysize = VGLModeInfo.vi_height;
-      VGLSetVScreenSize(VGLDisplay, VGLDisplay->VXsize, VGLDisplay->VYsize);
-      VGLPanScreen(VGLDisplay, VGLDisplay->Xorigin, VGLDisplay->Yorigin);
-      switch (VGLDisplay->Type) {
-      case VIDBUF4S:
-	outb(0x3c6, 0xff);
-	outb(0x3ce, 0x01); outb(0x3cf, 0x00);		/* set/reset enable */
-	outb(0x3ce, 0x08); outb(0x3cf, 0xff);		/* bit mask */
-	for (offset = 0; offset < VGLBufSize/VGLModeInfo.vi_planes;
-	     offset += len) {
-	  VGLSetSegment(offset);
-	  len = min(VGLBufSize/VGLModeInfo.vi_planes - offset,
-		    VGLAdpInfo.va_window_size);
-	  for (i = 0; i < VGLModeInfo.vi_planes; i++) {
-	    outb(0x3c4, 0x02);
-	    outb(0x3c5, 0x01<<i);
-	    bcopy(&VGLBuf[i*VGLBufSize/VGLModeInfo.vi_planes + offset],
-		  VGLMem, len);
-	  }
-	}
-	break;
-      case VIDBUF4:
-      case VIDBUF8X:
-	outb(0x3c6, 0xff);
-	outb(0x3ce, 0x01); outb(0x3cf, 0x00);		/* set/reset enable */
-	outb(0x3ce, 0x08); outb(0x3cf, 0xff);		/* bit mask */
-	for (i = 0; i < VGLModeInfo.vi_planes; i++) {
-	  outb(0x3c4, 0x02);
-	  outb(0x3c5, 0x01<<i);
-	  bcopy(&VGLBuf[i*VGLAdpInfo.va_window_size], VGLMem,
-		VGLAdpInfo.va_window_size);
-	}
-	break;
-      case VIDBUF8:
-      case VIDBUF8S:
-	for (offset = 0; offset < VGLBufSize; offset += len) {
-	  VGLSetSegment(offset);
-	  len = min(VGLBufSize - offset, VGLAdpInfo.va_window_size);
-          bcopy(&VGLBuf[offset], VGLMem, len);
-	}
-	break;
-      }
-      VGLRestorePalette();
-      ioctl(0, VT_RELDISP, VT_ACKACQ);
-    }
-    else {
-      switch (VGLDisplay->Type) {
-      case VIDBUF4S:
-	for (offset = 0; offset < VGLBufSize/VGLModeInfo.vi_planes;
-	     offset += len) {
-	  VGLSetSegment(offset);
-	  len = min(VGLBufSize/VGLModeInfo.vi_planes - offset,
-		    VGLAdpInfo.va_window_size);
-	  for (i = 0; i < VGLModeInfo.vi_planes; i++) {
-	    outb(0x3ce, 0x04);
-	    outb(0x3cf, i);
-	    bcopy(VGLMem, &VGLBuf[i*VGLBufSize/VGLModeInfo.vi_planes + offset],
-		  len);
-	  }
-	}
-	break;
-      case VIDBUF4:
-      case VIDBUF8X:
-	/*
-	 * NOTE: the saved buffer is NOT in the MEMBUF format which 
-	 * the ordinary memory bitmap object is stored in. XXX
-	 */
-	for (i = 0; i < VGLModeInfo.vi_planes; i++) {
-	  outb(0x3ce, 0x04);
-	  outb(0x3cf, i);
-	  bcopy(VGLMem, &VGLBuf[i*VGLAdpInfo.va_window_size],
-		VGLAdpInfo.va_window_size);
-	}
-	break;
-      case VIDBUF8:
-      case VIDBUF8S:
-	for (offset = 0; offset < VGLBufSize; offset += len) {
-	  VGLSetSegment(offset);
-	  len = min(VGLBufSize - offset, VGLAdpInfo.va_window_size);
-          bcopy(VGLMem, &VGLBuf[offset], len);
-	}
-	break;
-      }
-      VGLMem = MAP_FAILED;
-      munmap(VGLDisplay->Bitmap, VGLAdpInfo.va_window_size);
-      ioctl(0, VGLOldMode, 0);
-      ioctl(0, KDSETMODE, KD_TEXT);
-      ioctl(0, KDDISABIO, 0);
-      ioctl(0, VT_RELDISP, VT_TRUE);
-      VGLDisplay->Bitmap = VGLBuf;
-      VGLDisplay->Type = MEMBUF;
-      VGLDisplay->Xsize = VGLDisplay->VXsize;
-      VGLDisplay->Ysize = VGLDisplay->VYsize;
-      while (!VGLOnDisplay) pause();
-    }
-  }
-}
-
-int
-VGLSetSegment(unsigned int offset)
-{
-  if (offset/VGLAdpInfo.va_window_size != VGLCurWindow) {
-    ioctl(0, CONS_SETWINORG, offset);		/* FBIO_SETWINORG */
-    VGLCurWindow = offset/VGLAdpInfo.va_window_size;
-  }
-  return (offset%VGLAdpInfo.va_window_size);
-}
-
-int
-VGLSetVScreenSize(VGLBitmap *object, int VXsize, int VYsize)
-{
-  if (VXsize < object->Xsize || VYsize < object->Ysize)
-    return -1;
-  if (object->Type == MEMBUF)
-    return -1;
-  if (ioctl(0, FBIO_SETLINEWIDTH, &VXsize))
-    return -1;
-  ioctl(0, CONS_ADPINFO, &VGLAdpInfo);	/* FBIO_ADPINFO */
-  object->VXsize = VGLAdpInfo.va_line_width
-			   *8/(VGLModeInfo.vi_depth/VGLModeInfo.vi_planes);
-  object->VYsize = VGLBufSize/VGLModeInfo.vi_planes/VGLAdpInfo.va_line_width;
-  if (VYsize < object->VYsize)
-    object->VYsize = VYsize;
-
-#ifdef LIBVGL_DEBUG
-  fprintf(stderr, "new size: VGLXsize:%d, Ysize:%d, VXsize:%d, VYsize:%d\n",
-	  object->Xsize, object->Ysize, object->VXsize, object->VYsize);
-#endif
-
-  return 0;
-}
-
-int
-VGLPanScreen(VGLBitmap *object, int x, int y)
-{
-  video_display_start_t origin;
-
-  if (x < 0 || x + object->Xsize > object->VXsize
-      || y < 0 || y + object->Ysize > object->VYsize)
-    return -1;
-  if (object->Type == MEMBUF)
-    return 0;
-  origin.x = x;
-  origin.y = y;
-  if (ioctl(0, FBIO_SETDISPSTART, &origin))
-    return -1;
-  object->Xorigin = x;
-  object->Yorigin = y;
-
-#ifdef LIBVGL_DEBUG
-  fprintf(stderr, "new origin: (%d, %d)\n", x, y);
-#endif
-
-  return 0;
-}
diff --git a/lib/libvgl/mouse.c b/lib/libvgl/mouse.c
deleted file mode 100644
index 223fd27aaa..0000000000
--- a/lib/libvgl/mouse.c
+++ /dev/null
@@ -1,284 +0,0 @@
-/*-
- * Copyright (c) 1991-1997 Søren Schmidt
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer
- *    in this position and unchanged.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $FreeBSD: src/lib/libvgl/mouse.c,v 1.3 1999/11/08 11:37:39 yokota Exp $
- * $DragonFly: src/lib/libvgl/mouse.c,v 1.3 2008/09/30 16:57:06 swildner Exp $
- */
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/signal.h>
-#include <machine/console.h>
-#include "vgl.h"
-
-#define X 0xff
-static byte StdAndMask[MOUSE_IMG_SIZE*MOUSE_IMG_SIZE] = {
-	X,X,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-	X,X,X,0,0,0,0,0,0,0,0,0,0,0,0,0,
-	X,X,X,X,0,0,0,0,0,0,0,0,0,0,0,0,
-	X,X,X,X,X,0,0,0,0,0,0,0,0,0,0,0,
-	X,X,X,X,X,X,0,0,0,0,0,0,0,0,0,0,
-	X,X,X,X,X,X,X,0,0,0,0,0,0,0,0,0,
-	X,X,X,X,X,X,X,X,0,0,0,0,0,0,0,0,
-	X,X,X,X,X,X,X,X,X,0,0,0,0,0,0,0,
-	X,X,X,X,X,X,X,0,0,0,0,0,0,0,0,0,
-	0,0,0,X,X,X,X,0,0,0,0,0,0,0,0,0,
-	0,0,0,X,X,X,X,X,0,0,0,0,0,0,0,0,
-	0,0,0,0,X,X,X,X,0,0,0,0,0,0,0,0,
-	0,0,0,0,X,X,X,X,0,0,0,0,0,0,0,0,
-	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-};
-static byte StdOrMask[MOUSE_IMG_SIZE*MOUSE_IMG_SIZE] = {
-	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-	0,X,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-	0,X,X,0,0,0,0,0,0,0,0,0,0,0,0,0,
-	0,X,X,X,0,0,0,0,0,0,0,0,0,0,0,0,
-	0,X,X,X,X,0,0,0,0,0,0,0,0,0,0,0,
-	0,X,X,X,X,X,0,0,0,0,0,0,0,0,0,0,
-	0,X,X,X,X,X,X,0,0,0,0,0,0,0,0,0,
-	0,X,X,0,X,0,0,0,0,0,0,0,0,0,0,0,
-	0,0,0,0,X,X,0,0,0,0,0,0,0,0,0,0,
-	0,0,0,0,X,X,0,0,0,0,0,0,0,0,0,0,
-	0,0,0,0,0,X,X,0,0,0,0,0,0,0,0,0,
-	0,0,0,0,0,X,X,0,0,0,0,0,0,0,0,0,
-	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-};
-#undef X
-static VGLBitmap VGLMouseStdAndMask = 
-    VGLBITMAP_INITIALIZER(MEMBUF, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE, StdAndMask);
-static VGLBitmap VGLMouseStdOrMask = 
-    VGLBITMAP_INITIALIZER(MEMBUF, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE, StdOrMask);
-static VGLBitmap *VGLMouseAndMask, *VGLMouseOrMask;
-static byte map[MOUSE_IMG_SIZE*MOUSE_IMG_SIZE];
-static VGLBitmap VGLMouseSave = 
-    VGLBITMAP_INITIALIZER(MEMBUF, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE, map);
-static int VGLMouseVisible = 0;
-static int VGLMouseFrozen = 0;
-static int VGLMouseShown = 0;
-static int VGLMouseXpos = 0;
-static int VGLMouseYpos = 0;
-static int VGLMouseButtons = 0;
-
-void
-VGLMousePointerShow(void)
-{
-  byte buf[MOUSE_IMG_SIZE*MOUSE_IMG_SIZE];
-  VGLBitmap buffer =
-    VGLBITMAP_INITIALIZER(MEMBUF, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE, buf);
-  byte crtcidx, crtcval, gdcidx, gdcval;
-  int pos;
-
-  if (!VGLMouseVisible) {
-    VGLMouseVisible = 1;
-    crtcidx = inb(0x3c4);
-    crtcval = inb(0x3c5);
-    gdcidx = inb(0x3ce);
-    gdcval = inb(0x3cf);
-    __VGLBitmapCopy(VGLDisplay, VGLMouseXpos, VGLMouseYpos, 
-		  &VGLMouseSave, 0, 0, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE);
-    bcopy(VGLMouseSave.Bitmap, buffer.Bitmap, MOUSE_IMG_SIZE*MOUSE_IMG_SIZE);
-    for (pos = 0; pos <  MOUSE_IMG_SIZE*MOUSE_IMG_SIZE; pos++)
-      buffer.Bitmap[pos]=(buffer.Bitmap[pos]&~(VGLMouseAndMask->Bitmap[pos])) |
-			   VGLMouseOrMask->Bitmap[pos];
-    __VGLBitmapCopy(&buffer, 0, 0, VGLDisplay, 
-		  VGLMouseXpos, VGLMouseYpos, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE);
-    outb(0x3c4, crtcidx);
-    outb(0x3c5, crtcval);
-    outb(0x3ce, gdcidx);
-    outb(0x3cf, gdcval);
-  }
-}
-
-void
-VGLMousePointerHide(void)
-{
-  byte crtcidx, crtcval, gdcidx, gdcval;
-
-  if (VGLMouseVisible) {
-    VGLMouseVisible = 0;
-    crtcidx = inb(0x3c4);
-    crtcval = inb(0x3c5);
-    gdcidx = inb(0x3ce);
-    gdcval = inb(0x3cf);
-    __VGLBitmapCopy(&VGLMouseSave, 0, 0, VGLDisplay, 
-		  VGLMouseXpos, VGLMouseYpos, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE);
-    outb(0x3c4, crtcidx);
-    outb(0x3c5, crtcval);
-    outb(0x3ce, gdcidx);
-    outb(0x3cf, gdcval);
-  }
-}
-
-void
-VGLMouseMode(int mode)
-{
-  if (mode == VGL_MOUSESHOW) {
-    if (VGLMouseShown == VGL_MOUSEHIDE) {
-      VGLMousePointerShow();
-      VGLMouseShown = VGL_MOUSESHOW;
-    }
-  }
-  else {
-    if (VGLMouseShown == VGL_MOUSESHOW) {
-      VGLMousePointerHide();
-      VGLMouseShown = VGL_MOUSEHIDE;
-    }
-  }
-}
-
-void
-VGLMouseAction(int dummy)	
-{
-  struct mouse_info mouseinfo;
-
-  if (VGLMouseFrozen) {
-    VGLMouseFrozen++;
-    return;
-  }
-  mouseinfo.operation = MOUSE_GETINFO;
-  ioctl(0, CONS_MOUSECTL, &mouseinfo);
-  if (VGLMouseShown == VGL_MOUSESHOW)
-    VGLMousePointerHide();
-  VGLMouseXpos = mouseinfo.u.data.x;
-  VGLMouseYpos = mouseinfo.u.data.y;
-  VGLMouseButtons = mouseinfo.u.data.buttons;
-  if (VGLMouseShown == VGL_MOUSESHOW)
-    VGLMousePointerShow();
-}
-
-void
-VGLMouseSetImage(VGLBitmap *AndMask, VGLBitmap *OrMask)
-{
-  if (VGLMouseShown == VGL_MOUSESHOW)
-    VGLMousePointerHide();
-  VGLMouseAndMask = AndMask;
-  VGLMouseOrMask = OrMask;
-  if (VGLMouseShown == VGL_MOUSESHOW)
-    VGLMousePointerShow();
-}
-
-void
-VGLMouseSetStdImage(void)
-{
-  if (VGLMouseShown == VGL_MOUSESHOW)
-    VGLMousePointerHide();
-  VGLMouseAndMask = &VGLMouseStdAndMask;
-  VGLMouseOrMask = &VGLMouseStdOrMask;
-  if (VGLMouseShown == VGL_MOUSESHOW)
-    VGLMousePointerShow();
-}
-
-int
-VGLMouseInit(int mode)
-{
-  struct mouse_info mouseinfo;
-  int error;
-
-  VGLMouseSetStdImage();
-  mouseinfo.operation = MOUSE_MODE;
-  mouseinfo.u.mode.signal = SIGUSR2;
-  if ((error = ioctl(0, CONS_MOUSECTL, &mouseinfo)))
-    return error;
-  signal(SIGUSR2, VGLMouseAction);
-  mouseinfo.operation = MOUSE_GETINFO;
-  ioctl(0, CONS_MOUSECTL, &mouseinfo);
-  VGLMouseXpos = mouseinfo.u.data.x;
-  VGLMouseYpos = mouseinfo.u.data.y;
-  VGLMouseButtons = mouseinfo.u.data.buttons;
-  VGLMouseMode(mode);
-  return 0;
-}
-
-int
-VGLMouseStatus(int *x, int *y, char *buttons)
-{
-  signal(SIGUSR2, SIG_IGN);
-  *x =  VGLMouseXpos;
-  *y =  VGLMouseYpos;
-  *buttons =  VGLMouseButtons;
-  signal(SIGUSR2, VGLMouseAction);
-  return VGLMouseShown;
-}
-
-int
-VGLMouseFreeze(int x, int y, int width, int hight, byte color)
-{
-  if (!VGLMouseFrozen) {
-    VGLMouseFrozen = 1;
-    if (width > 1 || hight > 1) {		/* bitmap */
-      if (VGLMouseShown == 1) {
-        int overlap;
-
-        if (x > VGLMouseXpos)
-          overlap = (VGLMouseXpos + MOUSE_IMG_SIZE) - x;
-        else
-          overlap = (x + width) - VGLMouseXpos;
-        if (overlap > 0) {
-          if (y > VGLMouseYpos)
-            overlap = (VGLMouseYpos + MOUSE_IMG_SIZE) - y;
-          else
-            overlap = (y + hight) - VGLMouseYpos;
-          if (overlap > 0)
-            VGLMousePointerHide();
-        } 
-      }
-    }
-    else {				/* bit */
-      if (VGLMouseShown &&
-          x >= VGLMouseXpos && x < VGLMouseXpos + MOUSE_IMG_SIZE &&
-          y >= VGLMouseYpos && y < VGLMouseYpos + MOUSE_IMG_SIZE) {
-        VGLMouseSave.Bitmap[(y-VGLMouseYpos)*MOUSE_IMG_SIZE+(x-VGLMouseXpos)] =
-          (color);
-        if (VGLMouseAndMask->Bitmap 
-          [(y-VGLMouseYpos)*MOUSE_IMG_SIZE+(x-VGLMouseXpos)]) {
-          return 1;
-        }   
-      }       
-    }
-  }
-  return 0;
-}
-
-void
-VGLMouseUnFreeze(void)
-{
-  if (VGLMouseFrozen > 1) {
-    VGLMouseFrozen = 0;
-    VGLMouseAction(0);
-  }
-  else {
-    VGLMouseFrozen = 0;
-    if (VGLMouseShown == VGL_MOUSESHOW && !VGLMouseVisible)
-      VGLMousePointerShow();
-  }
-}
diff --git a/lib/libvgl/simple.c b/lib/libvgl/simple.c
deleted file mode 100644
index 80ba495d29..0000000000
--- a/lib/libvgl/simple.c
+++ /dev/null
@@ -1,403 +0,0 @@
-/*-
- * Copyright (c) 1991-1997 Søren Schmidt
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer
- *    in this position and unchanged.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $FreeBSD: src/lib/libvgl/simple.c,v 1.4 1999/11/08 11:37:39 yokota Exp $
- */
-
-#include <signal.h>
-#include <machine/console.h>
-#include "vgl.h"
-
-static byte VGLSavePaletteRed[256];
-static byte VGLSavePaletteGreen[256];
-static byte VGLSavePaletteBlue[256];
-
-#define ABS(a)		(((a)<0) ? -(a) : (a))
-#define SGN(a)		(((a)<0) ? -1 : 1)
-#define min(x, y)	(((x) < (y)) ? (x) : (y))
-#define max(x, y)	(((x) > (y)) ? (x) : (y))
-
-void
-VGLSetXY(VGLBitmap *object, int x, int y, byte color)
-{
-  int offset;
-
-  VGLCheckSwitch();
-  if (x>=0 && x<object->VXsize && y>=0 && y<object->VYsize) {
-    if (!VGLMouseFreeze(x, y, 1, 1, color)) {
-      switch (object->Type) {
-      case MEMBUF:
-      case VIDBUF8:
-        object->Bitmap[y*object->VXsize+x]=(color);
-        break;
-      case VIDBUF8S:
-	object->Bitmap[VGLSetSegment(y*object->VXsize+x)]=(color);
-	break;
-      case VIDBUF8X:
-        outb(0x3c4, 0x02);
-        outb(0x3c5, 0x01 << (x&0x3));
-	object->Bitmap[(unsigned)(VGLAdpInfo.va_line_width*y)+(x/4)] = (color);
-	break;
-      case VIDBUF4S:
-	offset = VGLSetSegment(y*VGLAdpInfo.va_line_width + x/8);
-	goto set_planar;
-      case VIDBUF4:
-	offset = y*VGLAdpInfo.va_line_width + x/8;
-set_planar:
-        outb(0x3c4, 0x02); outb(0x3c5, 0x0f);
-        outb(0x3ce, 0x00); outb(0x3cf, color & 0x0f);	/* set/reset */
-        outb(0x3ce, 0x01); outb(0x3cf, 0x0f);		/* set/reset enable */
-        outb(0x3ce, 0x08); outb(0x3cf, 0x80 >> (x%8));	/* bit mask */
-	object->Bitmap[offset] |= color;
-      }
-    }
-    VGLMouseUnFreeze();
-  }
-}
-
-byte
-VGLGetXY(VGLBitmap *object, int x, int y)
-{
-  int offset;
-#if 0
-  int i;
-  byte color;
-  byte mask;
-#endif
-
-  VGLCheckSwitch();
-  if (x<0 || x>=object->VXsize || y<0 || y>=object->VYsize)
-    return 0;
-  switch (object->Type) {
-    case MEMBUF:
-    case VIDBUF8:
-      return object->Bitmap[((y*object->VXsize)+x)];
-    case VIDBUF8S:
-      return object->Bitmap[VGLSetSegment(y*object->VXsize+x)];
-    case VIDBUF8X:
-      outb(0x3ce, 0x04); outb(0x3cf, x & 0x3);
-      return object->Bitmap[(unsigned)(VGLAdpInfo.va_line_width*y)+(x/4)];
-    case VIDBUF4S:
-      offset = VGLSetSegment(y*VGLAdpInfo.va_line_width + x/8);
-      goto get_planar;
-    case VIDBUF4:
-      offset = y*VGLAdpInfo.va_line_width + x/8;
-get_planar:
-#if 1
-      return (object->Bitmap[offset]&(0x80>>(x%8))) ? 1 : 0;	/* XXX */
-#else
-      color = 0;
-      mask = 0x80 >> (x%8);
-      for (i = 0; i < VGLModeInfo.vi_planes; i++) {
-	outb(0x3ce, 0x04); outb(0x3cf, i);
-	color |= (object->Bitmap[offset] & mask) ? (1 << i) : 0;
-      }
-      return color;
-#endif
-  }
-  return 0;
-}
-
-void
-VGLLine(VGLBitmap *object, int x1, int y1, int x2, int y2, byte color)
-{
-  int d, x, y, ax, ay, sx, sy, dx, dy;
-
-  dx = x2-x1; ax = ABS(dx)<<1; sx = SGN(dx); x = x1;
-  dy = y2-y1; ay = ABS(dy)<<1; sy = SGN(dy); y = y1;
-
-  if (ax>ay) {					/* x dominant */
-    d = ay-(ax>>1);
-    for (;;) {
-      VGLSetXY(object, x, y, color);
-      if (x==x2)
-	break;
-      if (d>=0) {
-	y += sy; d -= ax;
-      }
-      x += sx; d += ay;
-    }
-  }
-  else {					/* y dominant */
-    d = ax-(ay>>1);
-    for (;;) {
-      VGLSetXY(object, x, y, color);
-      if (y==y2) 
-	break;
-      if (d>=0) {
-	x += sx; d -= ay;
-      }
-      y += sy; d += ax;
-    }
-  }
-}
-
-void
-VGLBox(VGLBitmap *object, int x1, int y1, int x2, int y2, byte color)
-{
-  VGLLine(object, x1, y1, x2, y1, color);
-  VGLLine(object, x2, y1, x2, y2, color);
-  VGLLine(object, x2, y2, x1, y2, color);
-  VGLLine(object, x1, y2, x1, y1, color);
-}
-
-void
-VGLFilledBox(VGLBitmap *object, int x1, int y1, int x2, int y2, byte color)
-{
-  int y;
-
-  for (y=y1; y<=y2; y++) VGLLine(object, x1, y, x2, y, color);
-}
-
-inline void
-set4pixels(VGLBitmap *object, int x, int y, int xc, int yc, byte color)
-{
-  if (x!=0) { 
-    VGLSetXY(object, xc+x, yc+y, color); 
-    VGLSetXY(object, xc-x, yc+y, color); 
-    if (y!=0) { 
-      VGLSetXY(object, xc+x, yc-y, color); 
-      VGLSetXY(object, xc-x, yc-y, color); 
-    } 
-  } 
-  else { 
-    VGLSetXY(object, xc, yc+y, color); 
-    if (y!=0) 
-      VGLSetXY(object, xc, yc-y, color); 
-  } 
-}
-
-void
-VGLEllipse(VGLBitmap *object, int xc, int yc, int a, int b, byte color)
-{
-  int x = 0, y = b, asq = a*a, asq2 = a*a*2, bsq = b*b;
-  int bsq2 = b*b*2, d = bsq-asq*b+asq/4, dx = 0, dy = asq2*b;
-
-  while (dx<dy) {
-    set4pixels(object, x, y, xc, yc, color);
-    if (d>0) {
-      y--; dy-=asq2; d-=dy;
-    }
-    x++; dx+=bsq2; d+=bsq+dx;
-  }
-  d+=(3*(asq-bsq)/2-(dx+dy))/2;
-  while (y>=0) {
-    set4pixels(object, x, y, xc, yc, color);
-    if (d<0) {
-      x++; dx+=bsq2; d+=dx;
-    }
-    y--; dy-=asq2; d+=asq-dy;
-  }
-}
-
-inline void
-set2lines(VGLBitmap *object, int x, int y, int xc, int yc, byte color)
-{
-  if (x!=0) { 
-    VGLLine(object, xc+x, yc+y, xc-x, yc+y, color); 
-    if (y!=0) 
-      VGLLine(object, xc+x, yc-y, xc-x, yc-y, color); 
-  } 
-  else { 
-    VGLLine(object, xc, yc+y, xc, yc-y, color); 
-  } 
-}
-
-void
-VGLFilledEllipse(VGLBitmap *object, int xc, int yc, int a, int b, byte color)
-{
-  int x = 0, y = b, asq = a*a, asq2 = a*a*2, bsq = b*b;
-  int bsq2 = b*b*2, d = bsq-asq*b+asq/4, dx = 0, dy = asq2*b;
-
-  while (dx<dy) {
-    set2lines(object, x, y, xc, yc, color);
-    if (d>0) {
-      y--; dy-=asq2; d-=dy;
-    }
-    x++; dx+=bsq2; d+=bsq+dx;
-  }
-  d+=(3*(asq-bsq)/2-(dx+dy))/2;
-  while (y>=0) {
-    set2lines(object, x, y, xc, yc, color);
-    if (d<0) {
-      x++; dx+=bsq2; d+=dx;
-    }
-    y--; dy-=asq2; d+=asq-dy;
-  }
-}
-
-void
-VGLClear(VGLBitmap *object, byte color)
-{
-  int offset;
-  int len;
-
-  VGLCheckSwitch();
-  VGLMouseFreeze(0, 0, object->Xsize, object->Ysize, color);
-  switch (object->Type) {
-  case MEMBUF:
-  case VIDBUF8:
-    memset(object->Bitmap, color, object->VXsize*object->VYsize);
-    break;
-
-  case VIDBUF8S:
-    for (offset = 0; offset < object->VXsize*object->VYsize; ) {
-      VGLSetSegment(offset);
-      len = min(object->VXsize*object->VYsize - offset,
-		VGLAdpInfo.va_window_size);
-      memset(object->Bitmap, color, len);
-      offset += len;
-    }
-    break;
-
-  case VIDBUF8X:
-    /* XXX works only for Xsize % 4 = 0 */
-    outb(0x3c6, 0xff);
-    outb(0x3c4, 0x02); outb(0x3c5, 0x0f);
-    memset(object->Bitmap, color, VGLAdpInfo.va_line_width*object->VYsize);
-    break;
-
-  case VIDBUF4:
-  case VIDBUF4S:
-    /* XXX works only for Xsize % 8 = 0 */
-    outb(0x3c4, 0x02); outb(0x3c5, 0x0f);
-    outb(0x3ce, 0x05); outb(0x3cf, 0x02);		/* mode 2 */
-    outb(0x3ce, 0x01); outb(0x3cf, 0x00);		/* set/reset enable */
-    outb(0x3ce, 0x08); outb(0x3cf, 0xff);		/* bit mask */
-    for (offset = 0; offset < VGLAdpInfo.va_line_width*object->VYsize; ) {
-      VGLSetSegment(offset);
-      len = min(object->VXsize*object->VYsize - offset,
-		VGLAdpInfo.va_window_size);
-      memset(object->Bitmap, color, len);
-      offset += len;
-    }
-    outb(0x3ce, 0x05); outb(0x3cf, 0x00);
-    break;
-  }
-  VGLMouseUnFreeze();
-}
-
-void
-VGLRestorePalette(void)
-{
-  int i;
-
-  outb(0x3C6, 0xFF);
-  inb(0x3DA); 
-  outb(0x3C8, 0x00);
-  for (i=0; i<256; i++) {
-    outb(0x3C9, VGLSavePaletteRed[i]);
-    inb(0x84);
-    outb(0x3C9, VGLSavePaletteGreen[i]);
-    inb(0x84);
-    outb(0x3C9, VGLSavePaletteBlue[i]);
-    inb(0x84);
-  }
-  inb(0x3DA);
-  outb(0x3C0, 0x20);
-}
-
-void
-VGLSavePalette(void)
-{
-  int i;
-
-  outb(0x3C6, 0xFF);
-  inb(0x3DA);
-  outb(0x3C7, 0x00);
-  for (i=0; i<256; i++) {
-    VGLSavePaletteRed[i] = inb(0x3C9);
-    inb(0x84);
-    VGLSavePaletteGreen[i] = inb(0x3C9);
-    inb(0x84);
-    VGLSavePaletteBlue[i] = inb(0x3C9);
-    inb(0x84);
-  }
-  inb(0x3DA);
-  outb(0x3C0, 0x20);
-}
-
-void
-VGLSetPalette(byte *red, byte *green, byte *blue)
-{
-  int i;
-  
-  for (i=0; i<256; i++) {
-    VGLSavePaletteRed[i] = red[i];
-    VGLSavePaletteGreen[i] = green[i];
-    VGLSavePaletteBlue[i] = blue[i];
-  }
-  VGLCheckSwitch();
-  outb(0x3C6, 0xFF);
-  inb(0x3DA); 
-  outb(0x3C8, 0x00);
-  for (i=0; i<256; i++) {
-    outb(0x3C9, VGLSavePaletteRed[i]);
-    inb(0x84);
-    outb(0x3C9, VGLSavePaletteGreen[i]);
-    inb(0x84);
-    outb(0x3C9, VGLSavePaletteBlue[i]);
-    inb(0x84);
-  }
-  inb(0x3DA);
-  outb(0x3C0, 0x20);
-}
-
-void
-VGLSetPaletteIndex(byte color, byte red, byte green, byte blue)
-{
-  VGLSavePaletteRed[color] = red;
-  VGLSavePaletteGreen[color] = green;
-  VGLSavePaletteBlue[color] = blue;
-  VGLCheckSwitch();
-  outb(0x3C6, 0xFF);
-  inb(0x3DA);
-  outb(0x3C8, color); 
-  outb(0x3C9, red); outb(0x3C9, green); outb(0x3C9, blue);
-  inb(0x3DA);
-  outb(0x3C0, 0x20);
-}
-
-void
-VGLSetBorder(byte color)
-{
-  VGLCheckSwitch();
-  inb(0x3DA);
-  outb(0x3C0,0x11); outb(0x3C0, color); 
-  inb(0x3DA);
-  outb(0x3C0, 0x20);
-}
-
-void
-VGLBlankDisplay(int blank)
-{
-  byte val;
-
-  VGLCheckSwitch();
-  outb(0x3C4, 0x01); val = inb(0x3C5); outb(0x3C4, 0x01);
-  outb(0x3C5, ((blank) ? (val |= 0x20) : (val &= 0xDF)));
-}
diff --git a/lib/libvgl/text.c b/lib/libvgl/text.c
deleted file mode 100644
index 382f7ba080..0000000000
--- a/lib/libvgl/text.c
+++ /dev/null
@@ -1,244 +0,0 @@
-/*-
- * Copyright (c) 1991-1997 Søren Schmidt
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer
- *    in this position and unchanged.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $FreeBSD: src/lib/libvgl/text.c,v 1.4 1999/11/08 11:37:39 yokota Exp $
- */
-
-#include <stdio.h>
-#include <machine/console.h>
-#include "vgl.h"
-
-static VGLText		*VGLTextFont = NULL;
-
-extern byte VGLFont[];
-
-int
-VGLTextSetFontFile(char *filename)
-{
-FILE *fd;
-
-  if (VGLTextFont) {
-    if (VGLTextFont->BitmapArray) 
-      free (VGLTextFont->BitmapArray);
-    free(VGLTextFont);
-  }
-
-  if ((VGLTextFont=(VGLText*)malloc(sizeof(VGLText))) == NULL)
-	return 1;
-
-  if (filename==NULL) {
-    VGLTextFont->Width = 8;
-    VGLTextFont->Height = 8;
-    VGLTextFont->BitmapArray = VGLFont;
-  }
-  else {
-    if ((fd=fopen(filename, "r"))==NULL)
-      return 1;
-    fread(&VGLTextFont->Width, 1 , 1, fd);
-    fread(&VGLTextFont->Height, 1 , 1, fd);
-    VGLTextFont->BitmapArray = 
-      (byte*)malloc(256*((VGLTextFont->Width + 7)/8)*VGLTextFont->Height);
-    fread(VGLTextFont->BitmapArray, 1, 
-      (256*VGLTextFont->Width* VGLTextFont->Height), fd);
-    fclose(fd);
-  }
-  return 0;
-}
-
-void
-VGLBitmapPutChar(VGLBitmap *Object, int x, int y, byte ch, 
-		 byte fgcol, byte bgcol, int fill, int dir)
-{
-  int lin, bit;
-
-  for(lin = 0; lin < VGLTextFont->Height; lin++) {
-    for(bit = 0; bit < VGLTextFont->Width; bit++) {
-      if (VGLTextFont->BitmapArray[((ch*VGLTextFont->Height)+lin)]&(1<<bit))
-        switch (dir) {
-          case 0:
-            VGLSetXY(Object, (x+7-bit), (y+lin), fgcol);
-	    break;
-          case 1:
-            VGLSetXY(Object, (x+lin), (y-7+bit), fgcol);
-	    break;
-          case 2:
-            VGLSetXY(Object, (x-7+bit), (y-lin), fgcol);
-	    break;
-          case 3:
-            VGLSetXY(Object, (x-lin), (y+7-bit), fgcol);
-	    break;
-          case 4:
-            VGLSetXY(Object, (x+lin+7-bit), (y+lin+bit), fgcol);
-	    break;
-        }
-      else if (fill)
-        switch (dir) {
-          case 0:
-            VGLSetXY(Object, (x+7-bit), (y+lin), bgcol);
-	    break;
-          case 1:
-            VGLSetXY(Object, (x+lin), (y-7+bit), bgcol);
-	    break;
-          case 2:
-            VGLSetXY(Object, (x-7+bit), (y-lin), bgcol);
-	    break;
-          case 3:
-            VGLSetXY(Object, (x-lin), (y+7-bit), bgcol);
-	    break;
-          case 4:
-            VGLSetXY(Object, (x+lin+7-bit), (y+lin+bit), bgcol);
-	    break;
-        }
-    }
-  }
-}
-
-void
-VGLBitmapString(VGLBitmap *Object, int x, int y, char *str, 
-		byte fgcol, byte bgcol, int fill, int dir)
-{
-  int pos;
-
-  for (pos=0; pos<strlen(str); pos++) {
-    switch (dir) {
-      case 0:
-        VGLBitmapPutChar(Object, x+(pos*VGLTextFont->Width), y, 
-                         str[pos], fgcol, bgcol, fill, dir);
-	break;
-      case 1:
-        VGLBitmapPutChar(Object, x, y-(pos*VGLTextFont->Width), 
-		         str[pos], fgcol, bgcol, fill, dir);
-	break;
-      case 2:
-        VGLBitmapPutChar(Object, x-(pos*VGLTextFont->Width), y, 
-		         str[pos], fgcol, bgcol, fill, dir);
-	break;
-      case 3:
-        VGLBitmapPutChar(Object, x, y+(pos*VGLTextFont->Width),  
-		         str[pos], fgcol, bgcol, fill, dir);
-	break;
-      case 4:
-        VGLBitmapPutChar(Object, x+(pos*VGLTextFont->Width),
-                         y-(pos*VGLTextFont->Width), 
-		         str[pos], fgcol, bgcol, fill, dir);
-	break;
-    }
-  }
-}
-
-byte VGLFont[] = {
-0,0,0,0,0,0,0,0,126,129,165,129,189,153,129,126,126,255,219,255,195,231,
-255,126,108,254,254,254,124,56,16,0,16,56,124,254,124,56,16,0,56,124,56,
-254,254,124,56,124,16,16,56,124,254,124,56,124,0,0,24,60,60,24,0,0,255,
-255,231,195,195,231,255,255,0,60,102,66,66,102,60,0,255,195,153,189,189,
-153,195,255,15,7,15,125,204,204,204,120,60,102,102,102,60,24,126,24,63,
-51,63,48,48,112,240,224,127,99,127,99,99,103,230,192,153,90,60,231,231,
-60,90,153,128,224,248,254,248,224,128,0,2,14,62,254,62,14,2,0,24,60,126,
-24,24,126,60,24,102,102,102,102,102,0,102,0,127,219,219,123,27,27,27,0,
-62,99,56,108,108,56,204,120,0,0,0,0,126,126,126,0,24,60,126,24,126,60,24,
-255,24,60,126,24,24,24,24,0,24,24,24,24,126,60,24,0,0,24,12,254,12,24,0,
-0,0,48,96,254,96,48,0,0,0,0,192,192,192,254,0,0,0,36,102,255,102,36,0,0,
-0,24,60,126,255,255,0,0,0,255,255,126,60,24,0,0,0,0,0,0,0,0,0,0,48,120,
-120,48,48,0,48,0,108,108,108,0,0,0,0,0,108,108,254,108,254,108,108,0,48,
-124,192,120,12,248,48,0,0,198,204,24,48,102,198,0,56,108,56,118,220,204,
-118,0,96,96,192,0,0,0,0,0,24,48,96,96,96,48,24,0,96,48,24,24,24,48,96,0,
-0,102,60,255,60,102,0,0,0,48,48,252,48,48,0,0,0,0,0,0,0,48,48,96,0,0,0,
-252,0,0,0,0,0,0,0,0,0,48,48,0,6,12,24,48,96,192,128,0,124,198,206,222,246,
-230,124,0,48,112,48,48,48,48,252,0,120,204,12,56,96,204,252,0,120,204,12,
-56,12,204,120,0,28,60,108,204,254,12,30,0,252,192,248,12,12,204,120,0,56,
-96,192,248,204,204,120,0,252,204,12,24,48,48,48,0,120,204,204,120,204,204,
-120,0,120,204,204,124,12,24,112,0,0,48,48,0,0,48,48,0,0,48,48,0,0,48,48,
-96,24,48,96,192,96,48,24,0,0,0,252,0,0,252,0,0,96,48,24,12,24,48,96,0,120,
-204,12,24,48,0,48,0,124,198,222,222,222,192,120,0,48,120,204,204,252,204,
-204,0,252,102,102,124,102,102,252,0,60,102,192,192,192,102,60,0,248,108,
-102,102,102,108,248,0,254,98,104,120,104,98,254,0,254,98,104,120,104,96,
-240,0,60,102,192,192,206,102,62,0,204,204,204,252,204,204,204,0,120,48,
-48,48,48,48,120,0,30,12,12,12,204,204,120,0,230,102,108,120,108,102,230,
-0,240,96,96,96,98,102,254,0,198,238,254,254,214,198,198,0,198,230,246,222,
-206,198,198,0,56,108,198,198,198,108,56,0,252,102,102,124,96,96,240,0,120,
-204,204,204,220,120,28,0,252,102,102,124,108,102,230,0,120,204,224,112,
-28,204,120,0,252,180,48,48,48,48,120,0,204,204,204,204,204,204,252,0,204,
-204,204,204,204,120,48,0,198,198,198,214,254,238,198,0,198,198,108,56,56,
-108,198,0,204,204,204,120,48,48,120,0,254,198,140,24,50,102,254,0,120,96,
-96,96,96,96,120,0,192,96,48,24,12,6,2,0,120,24,24,24,24,24,120,0,16,56,
-108,198,0,0,0,0,0,0,0,0,0,0,0,255,48,48,24,0,0,0,0,0,0,0,120,12,124,204,
-118,0,224,96,96,124,102,102,220,0,0,0,120,204,192,204,120,0,28,12,12,124,
-204,204,118,0,0,0,120,204,252,192,120,0,56,108,96,240,96,96,240,0,0,0,118,
-204,204,124,12,248,224,96,108,118,102,102,230,0,48,0,112,48,48,48,120,0,
-12,0,12,12,12,204,204,120,224,96,102,108,120,108,230,0,112,48,48,48,48,
-48,120,0,0,0,204,254,254,214,198,0,0,0,248,204,204,204,204,0,0,0,120,204,
-204,204,120,0,0,0,220,102,102,124,96,240,0,0,118,204,204,124,12,30,0,0,
-220,118,102,96,240,0,0,0,124,192,120,12,248,0,16,48,124,48,48,52,24,0,0,
-0,204,204,204,204,118,0,0,0,204,204,204,120,48,0,0,0,198,214,254,254,108,
-0,0,0,198,108,56,108,198,0,0,0,204,204,204,124,12,248,0,0,252,152,48,100,
-252,0,28,48,48,224,48,48,28,0,24,24,24,0,24,24,24,0,224,48,48,28,48,48,
-224,0,118,220,0,0,0,0,0,0,0,16,56,108,198,198,254,0,0,0,0,0,0,0,0,0,0,0,
-60,126,255,126,24,0,170,85,85,170,170,85,85,170,68,68,68,68,31,4,4,4,124,
-64,64,64,31,16,16,16,56,68,68,56,30,17,20,19,64,64,64,124,31,16,16,16,56,
-108,56,0,0,0,0,0,0,0,24,24,24,24,126,0,68,100,76,68,16,16,16,31,68,68,40,
-16,31,4,4,4,24,24,24,24,248,0,0,0,0,0,0,0,248,24,24,24,0,0,0,0,31,24,24,
-24,24,24,24,24,31,0,0,0,24,24,24,24,255,24,24,24,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,24,24,24,
-24,31,24,24,24,24,24,24,24,248,24,24,24,24,24,24,24,255,0,0,0,0,0,0,0,255,
-24,24,24,24,24,24,24,24,24,24,24,0,12,48,96,24,12,126,0,0,48,12,6,24,48,
-126,0,0,0,3,62,54,54,108,0,0,0,4,126,16,126,64,0,0,28,48,48,48,48,126,0,
-0,0,0,24,0,0,0,0,0,0,0,0,0,0,0,0,48,0,48,48,120,120,48,0,0,0,16,124,192,
-192,124,16,0,56,96,96,240,96,252,0,0,195,60,102,102,60,195,0,0,204,204,
-120,48,252,48,0,24,24,24,0,24,24,24,0,126,192,124,198,124,6,252,0,198,0,
-0,0,0,0,0,0,124,130,186,162,186,130,124,0,28,6,30,34,31,63,0,0,0,51,102,
-204,102,51,0,0,0,254,6,0,0,0,0,0,0,0,0,0,0,0,0,0,124,130,186,178,170,130,
-124,0,254,0,0,0,0,0,0,0,56,108,56,0,0,0,0,0,0,16,124,16,0,124,0,0,28,54,
-6,24,62,0,0,0,30,2,14,2,30,0,0,0,24,48,0,0,0,0,0,0,0,0,204,204,204,204,
-118,192,126,202,202,126,10,10,10,0,0,0,0,24,0,0,0,0,0,0,0,0,0,0,24,48,6,
-14,6,6,6,0,0,0,14,17,17,17,14,31,0,0,0,204,102,51,102,204,0,0,96,224,102,
-108,51,103,15,3,96,224,102,108,54,106,4,14,240,32,150,108,51,103,15,3,48,
-0,48,96,192,204,120,0,24,12,48,120,204,252,204,0,96,192,48,120,204,252,
-204,0,120,132,48,120,204,252,204,0,102,152,48,120,204,252,204,0,204,0,48,
-120,204,252,204,0,48,72,48,120,204,252,204,0,62,120,152,156,248,152,158,
-0,60,102,192,192,192,102,28,48,48,24,254,98,120,98,254,0,24,48,254,98,120,
-98,254,0,56,68,254,98,120,98,254,0,102,0,254,98,120,98,254,0,96,48,120,
-48,48,48,120,0,24,48,120,48,48,48,120,0,120,132,120,48,48,48,120,0,204,
-0,120,48,48,48,120,0,120,108,102,246,102,108,120,0,102,152,230,246,222,
-206,198,0,48,24,124,198,198,198,124,0,24,48,124,198,198,198,124,0,56,68,
-124,198,198,198,124,0,102,152,124,198,198,198,124,0,198,0,124,198,198,198,
-124,0,0,198,108,56,56,108,198,0,6,124,206,154,178,230,120,192,96,48,204,
-204,204,204,252,0,24,48,204,204,204,204,252,0,120,132,204,204,204,204,252,
-0,204,0,204,204,204,204,252,0,24,48,204,204,120,48,120,0,96,120,108,120,
-96,96,96,0,120,204,196,220,198,198,220,192,48,24,120,12,124,204,118,0,24,
-48,120,12,124,204,118,0,120,132,120,12,124,204,118,0,102,152,120,12,124,
-204,118,0,204,0,120,12,124,204,118,0,48,72,56,12,124,204,118,0,0,0,236,
-50,126,176,110,0,0,0,60,102,192,102,28,48,48,24,120,204,252,192,120,0,24,
-48,120,204,252,192,120,0,120,132,120,204,252,192,120,0,204,0,120,204,252,
-192,120,0,96,48,0,112,48,48,120,0,24,48,0,112,48,48,120,0,112,136,0,112,
-48,48,120,0,204,0,0,112,48,48,120,0,108,56,108,12,108,204,120,0,102,152,
-248,204,204,204,204,0,96,48,0,124,198,198,124,0,24,48,0,124,198,198,124,
-0,56,68,0,124,198,198,124,0,102,152,0,124,198,198,124,0,198,0,0,124,198,
-198,124,0,0,0,24,0,126,0,24,0,0,0,6,124,222,246,124,192,96,48,0,204,204,
-204,118,0,24,48,0,204,204,204,118,0,48,72,0,204,204,204,118,0,204,0,0,204,
-204,204,118,0,24,48,204,204,204,124,12,248,224,120,108,102,108,120,224,
-0,204,0,204,204,204,124,12,248
-};
diff --git a/lib/libvgl/vgl.3 b/lib/libvgl/vgl.3
deleted file mode 100644
index fe1102c18f..0000000000
--- a/lib/libvgl/vgl.3
+++ /dev/null
@@ -1,466 +0,0 @@
-.\" Copyright (c) 1997 Søren Schmidt
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\"    notice, this list of conditions and the following disclaimer,
-.\"    in this position and unchanged.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\"    notice, this list of conditions and the following disclaimer in the
-.\"    documentation and/or other materials provided with the distribution.
-.\" 3. The name of the author may not be used to endorse or promote products
-.\"    derived from this software without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $FreeBSD: src/lib/libvgl/vgl.3,v 1.12.2.8 2001/12/17 10:08:35 ru Exp $
-.Dd November 7, 1999
-.Dt VGL 3
-.Os
-.Sh NAME
-.Nm VGLBitmapAllocateBits ,
-.Nm VGLBitmapCopy ,
-.Nm VGLBitmapCreate ,
-.Nm VGLBitmapDestroy ,
-.Nm VGLBitmapPutChar ,
-.Nm VGLBitmapString ,
-.Nm VGLBlankDisplay ,
-.Nm VGLBox ,
-.Nm VGLCheckSwitch ,
-.Nm VGLClear ,
-.Nm VGLEllipse ,
-.Nm VGLEnd ,
-.Nm VGLFilledBox ,
-.Nm VGLFilledEllipse ,
-.Nm VGLGetXY ,
-.Nm VGLInit ,
-.Nm VGLLine ,
-.Nm VGLKeyboardInit ,
-.Nm VGLKeyboardEnd ,
-.Nm VGLKeyboardGetCh ,
-.Nm VGLMouseInit ,
-.Nm VGLMouseMode ,
-.Nm VGLMouseSetImage ,
-.Nm VGLMouseSetStdImage ,
-.Nm VGLMouseStatus ,
-.Nm VGLPanScreen ,
-.Nm VGLSetBorder ,
-.Nm VGLSetPalette ,
-.Nm VGLSetPaletteIndex ,
-.Nm VGLSetVScreenSize ,
-.Nm VGLSetXY ,
-.Nm VGLTextSetFontFile
-.Nd Video Graphics Library functions
-.Sh LIBRARY
-.Lb libvgl
-.Sh SYNOPSIS
-.In machine/console.h
-.In vgl.h
-.Ft int
-.Fn VGLInit "int mode"
-.Ft void
-.Fn VGLEnd "void"
-.Ft void
-.Fn VGLCheckSwitch "void"
-.Ft int
-.Fn VGLTextSetFontFile "char *filename"
-.Ft int
-.Fn VGLKeyboardInit "int code"
-.Ft void
-.Fn VGLKeyboardEnd "void"
-.Ft int
-.Fn VGLKeyboardGetCh "void"
-.Ft int
-.Fn VGLMouseInit "int mode"
-.Ft void
-.Fn VGLMouseMode "int mode"
-.Ft int
-.Fn VGLMouseStatus "int *x" "int *y" "char *buttons"
-.Ft void
-.Fn VGLMouseSetImage "VGLBitmap *AndMask" "VGLBitmap *OrMask"
-.Ft void
-.Fn VGLMouseSetStdImage "void"
-.Ft byte
-.Fn VGLGetXY "VGLBitmap *object" "int x" "int y"
-.Ft void
-.Fn VGLSetXY "VGLBitmap *object" "int x" "int y" "byte color"
-.Ft void
-.Fn VGLLine "VGLBitmap *object" "int x1" "int y1" "int x2" "int y2" "byte color"
-.Ft void
-.Fn VGLBox "VGLBitmap *object" "int x1" "int y1" "int x2" "int y2" "byte color"
-.Ft void
-.Fn VGLFilledBox "VGLBitmap *object" "int x1" "int y1" "int x2" "int y2" "byte color"
-.Ft void
-.Fn VGLEllipse "VGLBitmap *object" "int xc" "int yc" "int a" "int b" "byte color"
-.Ft void
-.Fn VGLFilledEllipse "VGLBitmap *object" "int xc" "int yc" "int a" "int b" "byte color"
-.Ft VGLBitmap *
-.Fn VGLBitmapCreate "int type" "int xsize" "int ysize" "byte *bits"
-.Ft void
-.Fn VGLBitmapDestroy "VGLBitmap *object"
-.Ft int
-.Fn VGLBitmapAllocateBits "VGLBitmap *object"
-.Ft int
-.Fn VGLBitmapCopy "VGLBitmap *src" "int srcx" "int srcy" "VGLBitmap *dst" "int dstx" "int dsty" "int width" "int hight"
-.Ft void
-.Fn VGLBitmapPutChar "VGLBitmap *Object" "int x" "int y" "byte ch" "byte fgcol" "byte bgcol" "int fill" "int dir"
-.Ft void
-.Fn VGLBitmapString "VGLBitmap *Object" "int x" "int y" "char *str" "byte fgcol" "byte bgcol" "int fill" "int dir"
-.Ft void
-.Fn VGLClear "VGLBitmap *object" "byte color"
-.Ft void
-.Fn VGLSetPalette "byte *red" "byte *green" "byte *blue"
-.Ft void
-.Fn VGLSetPaletteIndex "byte color" "byte red" "byte green" "byte blue"
-.Ft void
-.Fn VGLSetBorder "byte color"
-.Ft int
-.Fn VGLSetVScreenSize "VGLBitmap *object" "int vxsize" "int vysize"
-.Ft int
-.Fn VGLPanScreen "VGLBitmap *object" "int x" "int y"
-.Ft void
-.Fn VGLBlankDisplay "int blank"
-.Sh DESCRIPTION
-.Nm Libvgl
-is a library that enables the programmer access to the graphics
-modes supported by the console driver
-.Xr ( syscons 4 ) .
-The library takes care of
-programming the actual video hardware, and provides a number of simple
-functions to do various graphic operations.
-There is also support for a
-mouse via the standard mouse system in
-.Dx ,
-see
-.Xr mouse 4 ,
-including the ability to transparently have a mouse pointer superimposed on
-the graphic image currently being worked on.
-The library takes care of screen switching by storing the current image in
-memory before switching to another virtual console, and restoring when the
-user switches back.
-This allows several graphic applications at once, but
-on different virtual consoles.
-.Pp
-Below is a short description of the various functions:
-.Pp
-.Fn VGLInit
-initialize the library and set up the graphic mode
-.Va mode .
-.Pp
-.Fn VGLEnd
-terminate graphic mode, and restore the screenmode that was active before
-.Fn VGLInit
-was called.
-.Pp
-.Fn VGLCheckSwitch
-if the program goes into longer periods of processing without doing
-any graphics output, calling this function occasionally will allow
-the system to switch screens.
-.Pp
-.Fn VGLTextSetFontFile
-instruct the char/string functions to use the font in file
-.Fa filename
-instead of the builtin font.
-.Pp
-.Fn VGLKeyboardInit
-set up the keyboard in the
-.Dq raw
-I/O mode and
-specify the key code to be used.
-.Va code
-must be
-.Dv VGL_XLATEKEYS ,
-.Dv VGL_CODEKEYS ,
-or
-.Dv VGL_RAWKEYS .
-When
-.Dv VGL_XLATEKEYS
-is specified, the keyboard translate the raw keyboard scan code into
-a character code.
-If
-.Dv VGL_RAWKEYS
-is used, the raw keyboard scan code is read as is.
-.Dv VGL_CODEKEYS
-is the intermediate key code; each key is assigned a unique code whereas
-more than one raw scan code may be generated when a key is pressed.
-.Pp
-.Fn VGLKeyboardEnd
-when you have finished using the keyboard, call this function.
-.Pp
-.Fn VGLKeyboardGetCh
-read one byte from the keyboard.  As the keyboard I/O is in the
-.Dq raw
-input mode, the function will not block even if there is no input data,
-and returns 0.
-.Pp
-.Fn VGLMouseInit
-initialize the mouse.
-The optional on-screen mouse pointer is shown if the
-argument is
-.Dv VGL_MOUSESHOW .
-.Pp
-.Fn VGLMouseMode
-either shows the mouse pointer if the argument is
-.Dv VGL_MOUSESHOW ,
-or hides the mouse pointer if the argument is
-.Dv VGL_MOUSEHIDE .
-.Pp
-.Fn VGLMouseStatus
-returns the current mouse pointer coordinates and button state in
-.Va x , y ,
-buttons.
-The return value reflects if the mouse pointer
-is currently shown on screen or not.
-.Pp
-.Fn VGLMouseSetImage
-with this function it is possible to change the image of the mouse pointer
-on screen.
-.Pp
-.Fn VGLMouseSetStdImage
-this function restores the mouse pointer to the standard arrow.
-.Pp
-.Fn VGLGetXY
-retrieves the color of the pixel located at
-.Va x , y ,
-coordinates of the
-.Va object
-argument, and returns it as a byte value.
-.Pp
-.Fn VGLSetXY
-sets the color of the pixel located at
-.Va x , y ,
-coordinates of the
-.Va object
-argument to
-.Va color
-byte value.
-.Pp
-.Fn VGLLine
-draw a line from
-.Va x1 , y1
-to
-.Va x2 , y2
-in color
-.Va color .
-.Pp
-.Fn VGLBox
-draw a box with upper left hand corner at
-.Va x1 , y1
-and lower right hand corner at
-.Va x2 , y2
-in color
-.Va color .
-.Pp
-.Fn VGLFilledBox
-draw a filled (solid) box with upper left hand corner at
-.Va x1 , y1
-and lower right hand corner at
-.Va x2 , y2
-in color
-.Va color .
-.Pp
-.Fn VGLEllipse
-draw an ellipse centered at
-.Va xc , yc
-make it
-.Va a
-pixels wide, and
-.Va b
-pixels high in color
-.Va color .
-.Pp
-.Fn VGLFilledEllipse
-draw a filled (solid) ellipse centered at
-.Va xc , yc
-make it
-.Va a
-pixels wide, and
-.Va b
-pixels high in color
-.Va color .
-.Pp
-.Fn VGLBitmapCreate
-create a bitmap object and initialize it with the specified
-values and bit data.
-.Va type
-must be
-.Dv MEMBUF
-for the in-memory bitmap.
-.Va bits
-may be NULL so that bitmap data may be associated later.
-.Pp
-There also is a macro,
-.Fn VGLBITMAP_INITIALIZER "type" "xsize" "ysize" "bits"
-to initialize a statically declared bitmap object.
-.Pp
-.Fn VGLBitmapDestroy
-free the bitmap data and the bitmap object.
-.Pp
-.Fn VGLBitmapAllocateBits
-allocate a bit data buffer for the specified object.
-.Pp
-.Fn VGLBitmapCopy
-copy a rectangle of pixels from bitmap
-.Va src
-upper left hand corner at
-.Va srcx , srcy
-to bitmap
-.Va dst
-at
-.Va dstx , dsty
-of the size
-.Va width , height .
-.Pp
-.Fn VGLBitmapPutChar
-write the character
-.Va ch
-at position
-.Va x , y
-in foreground color
-.Va fgcol .
-If
-.Va fill
-is != 0, use the color
-.Va bgcol
-as background otherwise the background is transparent.
-The character is drawn in the direction specified by the argument
-.Va dir .
-.Pp
-.Fn VGLBitmapString
-write the string
-.Va str
-at position
-.Va x , y
-in foreground color
-.Va fgcol .
-If
-.Va fill
-is != 0, use the color
-.Va bgcol
-as background otherwise the background is transparent.
-The string is drawn in the direction specified by the argument
-.Va dir .
-.Pp
-.Fn VGLClear
-clears the entire bitmap to color
-.Va color .
-.Pp
-.Fn VGLSetPalette
-this function sets the palette used, the arguments
-.Va red , green , blue
-should point to byte arrays of 256 positions each.
-.Pp
-.Fn VGLSetPaletteIndex
-set the palette index
-.Va color
-to the specified RGB value.
-.Pp
-.Fn VGLSetBorder
-set the border color to color
-.Va color .
-.Pp
-.Fn VGLSetVScreenSize
-change the virtual screen size of the display.  Note that this
-function must be called when our vty is in the foreground.
-And
-.Va object
-must be
-.Va VGLDisplay .
-Passing an in-memory bitmap to this function results in error.
-.Pp
-The desired virtual screen width may not be achievable because
-of the video card hardware.  In such case the video driver (and
-underlaying video BIOS) may choose the next largest values.
-Always examine
-.Va object->VXsize
-and
-.Va VYsize
-after calling this function, in order to see how the virtual screen
-is actually set up.
-.Pp
-In order to set up the largest possible virtual screen, you may
-call this function with arbitrary large values.
-.Pp
-.Dl VGLSetVScreenSize(10000, 10000);
-.Pp
-.Fn VGLPanScreen
-change the origin of the displayed screen in the virtual screen.
-Note that this function must be called when our vty is in the
-foreground.
-.Va object
-must be
-.Va VGLDisplay .
-Passing an in-memory bitmap to this function results in error.
-.Pp
-.Fn VGLBlankDisplay
-blank the display if the argument
-.Va blank
-\*(Ne 0.
-This can be done to shut off the screen during display updates that
-the user should first see when it's done.
-.Ss Program termination and signal processing
-It is important to call
-.Fn VGLEnd
-before terminating the program.
-Care must be taken if you install signal handlers and try to call
-.Fn VGLEnd
-and
-.Xr exit 3
-to end the program.
-If a signal is caught while the program is inside
-.Nm libvgl
-functions,
-.Fn VGLEnd
-may not be able to properly restore the graphics hardware.
-.Pp
-The recommended way to handle signals and program termination is to
-have a flag to indicate signal's delivery.
-Your signal handlers set this flag but do not terminate
-the program immediately.
-The main part of the program checks the flag to see if it is
-supposed to terminate, and calls
-.Fn VGLEnd
-and
-.Xr exit 3
-if the flag is set.
-.Pp
-Note that
-.Fn VGLInit
-installs its internal signal handlers for
-.Dv SIGINT , SIGTERM , SIGSEGV ,
-and
-.Dv SIGBUS ,
-and terminates the program at appropriate time,
-after one of these signals is caught.
-If you want to have your own signal handlers for these signals,
-install handlers
-.Em after
-.Fn VGLInit .
-.Pp
-.Dv SIGUSR1
-and
-.Dv SIGUSR2
-are internally used by
-.Nm libvgl
-to control screen switching and the mouse pointer,
-and are not available to
-.Nm libvgl
-client programs.
-.Sh HISTORY
-The
-.Nm vgl
-library appeared in
-.Fx 3.0 .
-.Sh AUTHORS
-.An S\(/oren Schmidt Aq Mt sos@FreeBSD.org
diff --git a/lib/libvgl/vgl.h b/lib/libvgl/vgl.h
deleted file mode 100644
index c26279a21a..0000000000
--- a/lib/libvgl/vgl.h
+++ /dev/null
@@ -1,148 +0,0 @@
-/*-
- * Copyright (c) 1991-1997 Søren Schmidt
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer
- *    in this position and unchanged.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $FreeBSD: src/lib/libvgl/vgl.h,v 1.5.2.1 2001/06/19 06:49:15 sobomax Exp $
- * $DragonFly: src/lib/libvgl/vgl.h,v 1.2 2003/06/17 04:26:52 dillon Exp $
- */
-
-#ifndef _VGL_H_
-#define _VGL_H_
-
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <machine/cpufunc.h>
-
-typedef unsigned char byte;
-typedef struct {
-  byte 	Type;
-  int  	Xsize, Ysize;
-  int  	VXsize, VYsize;
-  int   Xorigin, Yorigin;
-  byte 	*Bitmap;
-} VGLBitmap;
-
-#define VGLBITMAP_INITIALIZER(t, x, y, bits)	\
-	{ (t), (x), (y), (x), (y), 0, 0, (bits) }
-
-/*
- * Defined Type's
- */
-#define MEMBUF		0
-#define VIDBUF4		1
-#define VIDBUF8		2
-#define VIDBUF8X	3
-#define VIDBUF8S	4
-#define VIDBUF4S	5
-#define NOBUF		255
-
-typedef struct VGLText {
-  byte	Width, Height;
-  byte	*BitmapArray;
-} VGLText;
-
-typedef struct VGLObject {
-  int	  	Id;
-  int	  	Type;
-  int	  	Status;
-  int	  	Xpos, Ypos;
-  int	  	Xhot, Yhot;
-  VGLBitmap 	*Image;
-  VGLBitmap 	*Mask;
-  int		(*CallBackFunction)();
-} VGLObject;
-
-#define MOUSE_IMG_SIZE		16
-#define VGL_MOUSEHIDE		0
-#define VGL_MOUSESHOW		1
-#define VGL_MOUSEFREEZE		0
-#define VGL_MOUSEUNFREEZE	1
-#define VGL_DIR_RIGHT		0
-#define VGL_DIR_UP		1
-#define VGL_DIR_LEFT		2
-#define VGL_DIR_DOWN		3
-#define VGL_RAWKEYS		1
-#define VGL_CODEKEYS		2
-#define VGL_XLATEKEYS		3
-
-extern video_adapter_info_t	VGLAdpInfo;
-extern video_info_t		VGLModeInfo;
-extern VGLBitmap 		*VGLDisplay;
-extern byte 			*VGLBuf;
-
-/*
- * Prototypes
- */
-/* bitmap.c */
-int __VGLBitmapCopy(VGLBitmap *src, int srcx, int srcy, VGLBitmap *dst, int dstx, int dsty, int width, int hight);
-int VGLBitmapCopy(VGLBitmap *src, int srcx, int srcy, VGLBitmap *dst, int dstx, int dsty, int width, int hight);
-VGLBitmap *VGLBitmapCreate(int type, int xsize, int ysize, byte *bits);
-void VGLBitmapDestroy(VGLBitmap *object);
-int VGLBitmapAllocateBits(VGLBitmap *object);
-/* keyboard.c */
-int VGLKeyboardInit(int mode);
-void VGLKeyboardEnd(void);
-int VGLKeyboardGetCh(void);
-/* main.c */
-void VGLEnd(void);
-int VGLInit(int mode);
-void VGLCheckSwitch(void);
-int VGLSetVScreenSize(VGLBitmap *object, int VXsize, int VYsize);
-int VGLPanScreen(VGLBitmap *object, int x, int y);
-int VGLSetSegment(unsigned int offset);
-/* mouse.c */
-void VGLMousePointerShow(void);
-void VGLMousePointerHide(void);
-void VGLMouseMode(int mode);
-void VGLMouseAction(int dummy);
-void VGLMouseSetImage(VGLBitmap *AndMask, VGLBitmap *OrMask);
-void VGLMouseSetStdImage(void);
-int VGLMouseInit(int mode);
-int VGLMouseStatus(int *x, int *y, char *buttons);
-int VGLMouseFreeze(int x, int y, int width, int hight, byte color);
-void VGLMouseUnFreeze(void);
-/* simple.c */
-void VGLSetXY(VGLBitmap *object, int x, int y, byte color);
-byte VGLGetXY(VGLBitmap *object, int x, int y);
-void VGLLine(VGLBitmap *object, int x1, int y1, int x2, int y2, byte color);
-void VGLBox(VGLBitmap *object, int x1, int y1, int x2, int y2, byte color);
-void VGLFilledBox(VGLBitmap *object, int x1, int y1, int x2, int y2, byte color);
-void VGLEllipse(VGLBitmap *object, int xc, int yc, int a, int b, byte color);
-void VGLFilledEllipse(VGLBitmap *object, int xc, int yc, int a, int b, byte color);
-void VGLClear(VGLBitmap *object, byte color);
-void VGLRestorePalette(void);
-void VGLSavePalette(void);
-void VGLSetPalette(byte *red, byte *green, byte *blue);
-void VGLSetPaletteIndex(byte color, byte red, byte green, byte blue);
-void VGLSetBorder(byte color);
-void VGLBlankDisplay(int blank);
-/* text.c */
-int VGLTextSetFontFile(char *filename);
-void VGLBitmapPutChar(VGLBitmap *Object, int x, int y, byte ch, byte fgcol, byte bgcol, int fill, int dir);
-void VGLBitmapString(VGLBitmap *Object, int x, int y, char *str, byte fgcol, byte bgcol, int fill, int dir);
-
-#endif /* !_VGL_H_ */
diff --git a/share/examples/libvgl/Makefile b/share/examples/libvgl/Makefile
deleted file mode 100644
index cf549246f1..0000000000
--- a/share/examples/libvgl/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# $FreeBSD: src/share/examples/libvgl/Makefile,v 1.2 1999/12/14 08:47:59 billf Exp $
-
-PROG=	demo
-NOMAN=	yes
-LDADD=	-lvgl
-DPADD=	${LIBVGL}
-
-.include <bsd.prog.mk>
diff --git a/share/examples/libvgl/demo.c b/share/examples/libvgl/demo.c
deleted file mode 100644
index af4d65e472..0000000000
--- a/share/examples/libvgl/demo.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/*-
- * Copyright (c) 1991-1997 Søren Schmidt
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer
- *    in this position and unchanged.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $FreeBSD: src/share/examples/libvgl/demo.c,v 1.4 1999/12/14 08:47:42 billf Exp $
- * $DragonFly: src/share/examples/libvgl/demo.c,v 1.4 2008/05/18 03:02:53 pavalos Exp $
- */
-
-#include <sys/types.h>
-#include <machine/console.h>
-#include <vgl.h>
-
-int
-main(int argc, char **argv)
-{
-  int y, xsize, ysize, i,j;
-  VGLBitmap *tmp;
-
-  // set graphics mode, here 320x240 256 colors
-  // supported modes are (from <sys/fbio.h>):
-  // M_VGA_CG320:	std VGA 320x200 256 colors
-  // M_VGA_MODEX:	Modex VGA 320x240 256 colors
-  // M_VGA_CG640:	std VGA 640x480 16 colors
-  VGLInit(M_VGA_MODEX);
-
-  // initialize mouse and show pointer
-  VGLMouseInit(VGL_MOUSESHOW);
-
-  // VGLDisplay is a ptr to a struct Bitmap defined and initialized by 
-  // libvgl. The Bitmap points directly to screen memory etc.
-  xsize=VGLDisplay->Xsize;
-  ysize=VGLDisplay->Ysize;
-
-  // alloc a new bitmap
-  tmp = VGLBitmapCreate(MEMBUF, 256, 256, NULL);
-  VGLBitmapAllocateBits(tmp);
-  VGLClear(tmp, 0);
-
-  // fill the screen with colored lines
-  for (y=0; y<ysize; y++) 
-    VGLLine(VGLDisplay, 0, y, xsize-1, y, y/2 % 256);
-
-  // draw some lines and circles just to show off
-  VGLLine(VGLDisplay, 0, 0, xsize-1, ysize-1, 63);
-  VGLLine(VGLDisplay, 0, ysize-1, xsize-1, 0, 63);
-  VGLLine(VGLDisplay, 0, 0, 0, ysize-1, 63);
-  VGLLine(VGLDisplay, xsize-1, 0, xsize-1, ysize-1, 63);
-  VGLEllipse(VGLDisplay, 256, 0, 256, 256, 63);
-  VGLEllipse(VGLDisplay, 0, 256, 256, 256, 0);
-
-  // some text is also useful
-  VGLBitmapString(VGLDisplay, 100,100,
-    "This is text", 63, 0, 0, VGL_DIR_RIGHT);
-  sleep(2);
-  VGLBitmapString(VGLDisplay, 100,100,
-    "This is text", 63, 0, 0, VGL_DIR_UP);
-  sleep(2);
-  VGLBitmapString(VGLDisplay, 100,100,
-    "This is text", 63, 0, 0, VGL_DIR_LEFT);
-  sleep(2);
-  VGLBitmapString(VGLDisplay, 100,100,
-    "This is text", 63, 0, 0, VGL_DIR_DOWN);
-  sleep(2);
-
-  // now show some simple bitblit 
-  for (i=0; i<256; i++)
-    for (j=0; j<256; j++)
-      tmp->Bitmap[i+256*j] = i%16;
-  VGLBitmapCopy(tmp, 0, 0, VGLDisplay, 0, 0, 128, 128);
-  for (i=0; i<256; i++)
-    for (j=0; j<256; j++)
-      tmp->Bitmap[i+256*j] = j%16;
-  VGLBitmapCopy(tmp, 0, 0, VGLDisplay, 3, 128, 128, 128);
-  sleep(2);
-  VGLBitmapCopy(VGLDisplay, 237, 311, tmp, 64, 64, 128, 128);
-  VGLBitmapCopy(tmp, 32, 32, VGLDisplay, 400, 128, 128, 128);
-  sleep(2);
-  VGLBitmapCopy(VGLDisplay, 300, 300, VGLDisplay, 500, 128, 128, 128);
-  sleep(5);
-  i=0;
-
-  // loop around drawing and copying
-  while (++i) {
-    VGLBitmapCopy(VGLDisplay, rand()%xsize, rand()%ysize,
-  		  VGLDisplay, rand()%xsize, rand()%ysize,
-  		  rand()%xsize, rand()%ysize);
-    VGLLine(VGLDisplay,  rand()%xsize, rand()%ysize, 
-            rand()%xsize, rand()%ysize, rand()%256);
-    VGLEllipse(VGLDisplay, rand()%xsize, rand()%ysize,
-   	       rand()%xsize/2, rand()%ysize/2, rand()%256);
-    rand();
-    if (i > 1000) break;
-  }
-
-  // restore screen to its original mode
-  VGLEnd();
-  return 0;
-}
-
diff --git a/share/man/man4/vga.4 b/share/man/man4/vga.4
index 4e96ea3a44..20ba27f9fe 100644
--- a/share/man/man4/vga.4
+++ b/share/man/man4/vga.4
@@ -97,7 +97,6 @@ Your kernel configuration should normally have:
 .Pp
 .D1 Cd "device vga0 at isa? port ?"
 .Sh SEE ALSO
-.Xr vgl 3 ,
 .Xr syscons 4 ,
 .Xr config 8 ,
 .Xr kldload 8 ,
diff --git a/share/mk/bsd.libnames.mk b/share/mk/bsd.libnames.mk
index a7b73fb5aa..90a534c3c9 100644
--- a/share/mk/bsd.libnames.mk
+++ b/share/mk/bsd.libnames.mk
@@ -80,7 +80,6 @@ LIBTCPLAY?=	${DESTDIR}${LIBDIR}/libtcplay.a
 LIBUSBHID?=	${DESTDIR}${LIBDIR}/libusbhid.a
 LIBUSB?=	${DESTDIR}${LIBDIR}/libusb.a
 LIBUTIL?=	${DESTDIR}${LIBDIR}/libutil.a
-LIBVGL?=	${DESTDIR}${LIBDIR}/libvgl.a
 LIBWRAP?=	${DESTDIR}${LIBDIR}/libwrap.a
 LIBY?=		${DESTDIR}${LIBDIR}/liby.a
 LIBYPCLNT?=	${DESTDIR}${LIBDIR}/libypclnt.a
-- 
2.25.0

