head	1.3;
access;
symbols
	RELEASE_4_7_0:1.2
	RELEASE_4_6_2:1.2
	RELEASE_4_6_1:1.2
	RELEASE_4_6_0:1.2
	RELEASE_5_0_DP1:1.2
	RELEASE_4_5_0:1.2
	RELEASE_4_4_0:1.2
	RELEASE_4_3_0:1.2
	RELEASE_4_2_0:1.2
	RELEASE_4_1_1:1.2
	RELEASE_4_1_0:1.2
	RELEASE_3_5_0:1.2
	RELEASE_4_0_0:1.1;
locks; strict;
comment	@# @;


1.3
date	2002.11.27.15.38.37;	author vanilla;	state dead;
branches;
next	1.2;

1.2
date	2000.04.02.11.18.20;	author vanilla;	state Exp;
branches;
next	1.1;

1.1
date	2000.02.06.07.04.30;	author vanilla;	state Exp;
branches;
next	;


desc
@@


1.3
log
@Fix build in -current.

PR:		ports/45710
Submitted by:	Statue <statue@@freebsd.sinica.edu.tw>
Obtained from:	japanese/kon2-*
@
text
@--- src/vga.c.orig	Sun Apr 14 16:40:40 1996
+++ src/vga.c	Sun Apr  2 19:03:41 2000
@@@@ -205,7 +205,8 @@@@
 	regText.seq[i] = PortInb(VGASEQ_DATA);
     }
     regText.mis = PortInb(VGAMISC_IN);
-    
+
+    PortOutb(PortInb(VGAMISC_IN)|0x01, VGAMISC_OUT);
     VgaSetRegisters(&regGraph);
     
     /* save font data in plane 2 */
@@@@ -369,7 +370,7 @@@@
 /*    if (!code) return;*/
     VgaSetColor(fc);
     if (bc & 0x8) *(vcls - dInfo.glineByte) = 0;
-    for (x = 0;x < sbFReg->high;x ++, code ++, fm >>= 1) {
+    if (code) for (x = 0;x < sbFReg->high;x ++, code ++, fm >>= 1) {
 	if (*code) {
 	    VgaOutByte(*code);
 	    *gram = *gram;
@@@@ -437,7 +438,7 @@@@
 
 void VgaCursor(struct cursorInfo *ci)
 {
-    char	*gram;
+    volatile char	*gram;
     u_char	x;
     int	bottom = cursorBtm + 1 <= dInfo.glineChar ?
 	cursorBtm + 1 : dInfo.glineChar;
@@@@ -607,7 +608,11 @@@@
       Perror("ioctl CONSOLE_IO_ENABLE");
       return FAILURE;
     }
+#if (__FreeBSD__ <= 3)
     if ((devMem = open("/dev/vga", O_RDWR|O_NDELAY) ) < 0) {
+#else
+    if ((devMem = open("/dev/mem", O_RDWR|O_NDELAY) ) < 0) {
+#endif
 	Perror("/dev/mem");
 	return FAILURE;
     }
@


1.2
log
@Add a patch for vga_cursor.
@
text
@@


1.1
log
@Fix for 4.0-current.

Submitted by:	Keith Jang (keith@@freebsd.sinica.edu.tw)
@
text
@d1 13
a13 3
--- src/vga.c.orig	Sun Jan 26 18:05:00 1997
+++ src/vga.c	Mon Jan 31 14:09:55 2000
@@@@ -382,7 +382,7 @@@@
d22 12
a33 3
@@@@ -620,7 +620,11 @@@@
 	Perror("ioctl CONSOLE_IO_ENABLE");
 	return FAILURE;
@

