Upgrade pcvt to 3.20 b24.

This commit is contained in:
Joerg Wunsch 1995-04-08 16:04:22 +00:00
parent fa74aea62d
commit 785b47579d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=7668
14 changed files with 287 additions and 164 deletions

View file

@ -1,6 +1,6 @@
.\" .\"
.\" Copyright (c) 1992,1993,1994 Hellmuth Michaelis, Brian Dunford-Shore, .\" Copyright (c) 1992, 1995 Hellmuth Michaelis, Brian Dunford-Shore,
.\" Joerg Wunsch and Holger Veit. .\" Joerg Wunsch and Holger Veit.
.\" .\"
.\" All rights reserved. .\" All rights reserved.
.\" .\"
@ -30,15 +30,16 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\" .\"
.\" @(#)pcvt.4, 3.00, Last Edit-Date: [Sun Jan 1 19:06:01 1995] .\" @(#)pcvt.4, 3.20, Last Edit-Date: [Sun Apr 2 18:23:39 1995]
.\" .\"
.\" Man page pcvt(4) created after pcvt_ioctl.h on 13-Jan-93 .\" Man page pcvt(4) created after pcvt_ioctl.h on 13-Jan-93
.\" by Joerg Wunsch .\" by Joerg Wunsch
.\" .\"
.\" updated for rel 2.10 (-hm) .\" updated for rel 2.10 (-hm)
.\" updated for rel 2.20 (-hm) .\" updated for rel 2.20 (-hm)
.\" updated for rel 3.00 (jw) .\" updated for rel 3.00 (-jw)
.\" updated for final rel 3.00 (-hm) .\" updated for final rel 3.00 (-hm)
.\" removed references to 386BSD (-hm)
.\" .\"
.Dd February 27, 1994 .Dd February 27, 1994
.Dt PCVT 4 .Dt PCVT 4
@ -48,8 +49,6 @@
.Sh SYNOPSIS .Sh SYNOPSIS
options options
.Do .Do
.Em PCVT_386BSD
|
.Em PCVT_FREEBSD = version .Em PCVT_FREEBSD = version
| |
.Em PCVT_NETBSD = version .Em PCVT_NETBSD = version
@ -105,7 +104,7 @@ moving towards VT320
.if n (TM) .if n (TM)
.Pc .Pc
.It .It
4 completely independent virtual terminals for CGA's/EGA's/VGA's Completely independent virtual terminals for MDA/HGC/CGA/EGA and VGA
.It .It
25, 28, 35, 40, 43 or 50x80 screen resolution for each virtual screen 25, 28, 35, 40, 43 or 50x80 screen resolution for each virtual screen
.It .It
@ -148,7 +147,7 @@ No inverse background
.It .It
No VT220 printer output support No VT220 printer output support
.It .It
No VT52/VT100 support at all No VT52 support at all
.It .It
No 8-bit controls No 8-bit controls
.It .It
@ -165,12 +164,10 @@ The
.Nm pcvt .Nm pcvt
console driver is currently available for the Intel-based BSD operating console driver is currently available for the Intel-based BSD operating
systems systems
.Em 386BSD Pq release 0.1 with patchkits , .Em NetBSD/i386 Pq release 0.9 or higher,
.Em NetBSD Pq release 0.9 or higher, only i386 ,
and and
.Em FreeBSD Pq release 1.0-GAMMA or higher . .Em FreeBSD Pq release 1.0-GAMMA or higher .
In order to get the appropriate system support, one of the options In order to get the appropriate system support, one of the options
.Em PCVT_386BSD ,
.Em PCVT_NETBSD , .Em PCVT_NETBSD ,
or or
.Em PCVT_FREEBSD .Em PCVT_FREEBSD
@ -761,7 +758,7 @@ structure as argument:
struct pcvtinfo { struct pcvtinfo {
u_int opsys; /* PCVT_xxx(x)BSD */ u_int opsys; /* PCVT_xxx(x)BSD */
#define CONF_UNKNOWNOPSYS 0 #define CONF_UNKNOWNOPSYS 0
#define CONF_386BSD 1 #define CONF_386BSD 1 /* unsupported !!! */
#define CONF_NETBSD 2 #define CONF_NETBSD 2
#define CONF_FREEBSD 3 #define CONF_FREEBSD 3
u_int opsysrel; /* Release for NetBSD/FreeBSD */ u_int opsysrel; /* Release for NetBSD/FreeBSD */
@ -833,7 +830,8 @@ The
.Nm pcvt .Nm pcvt
driver has been developed for and contributed to 386BSD release 0.1. Since driver has been developed for and contributed to 386BSD release 0.1. Since
release 3.00 explicit support is provided for NetBSD 0.9. It is expected release 3.00 explicit support is provided for NetBSD 0.9. It is expected
that no further development on pcvt is done for 386BSD 0.1 after release 3.00. that no further development on pcvt is done for 386BSD 0.1 after release 3.00,
in fact, 386BSD support was dropped with release 3.20.
.Sh AUTHORS .Sh AUTHORS
.Bl -tag -width 30n -offset indent .Bl -tag -width 30n -offset indent
.It Written by : .It Written by :

View file

@ -1,6 +1,6 @@
.\" .\"
.\" Copyright (c) 1992,1993,1994 Hellmuth Michaelis, Brian Dunford-Shore, .\" Copyright (c) 1992, 1995 Hellmuth Michaelis, Brian Dunford-Shore,
.\" Joerg Wunsch and Holger Veit. .\" Joerg Wunsch and Holger Veit.
.\" .\"
.\" All rights reserved. .\" All rights reserved.
.\" .\"
@ -30,15 +30,16 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\" .\"
.\" @(#)pcvt.4, 3.00, Last Edit-Date: [Sun Jan 1 19:06:01 1995] .\" @(#)pcvt.4, 3.20, Last Edit-Date: [Sun Apr 2 18:23:39 1995]
.\" .\"
.\" Man page pcvt(4) created after pcvt_ioctl.h on 13-Jan-93 .\" Man page pcvt(4) created after pcvt_ioctl.h on 13-Jan-93
.\" by Joerg Wunsch .\" by Joerg Wunsch
.\" .\"
.\" updated for rel 2.10 (-hm) .\" updated for rel 2.10 (-hm)
.\" updated for rel 2.20 (-hm) .\" updated for rel 2.20 (-hm)
.\" updated for rel 3.00 (jw) .\" updated for rel 3.00 (-jw)
.\" updated for final rel 3.00 (-hm) .\" updated for final rel 3.00 (-hm)
.\" removed references to 386BSD (-hm)
.\" .\"
.Dd February 27, 1994 .Dd February 27, 1994
.Dt PCVT 4 .Dt PCVT 4
@ -48,8 +49,6 @@
.Sh SYNOPSIS .Sh SYNOPSIS
options options
.Do .Do
.Em PCVT_386BSD
|
.Em PCVT_FREEBSD = version .Em PCVT_FREEBSD = version
| |
.Em PCVT_NETBSD = version .Em PCVT_NETBSD = version
@ -105,7 +104,7 @@ moving towards VT320
.if n (TM) .if n (TM)
.Pc .Pc
.It .It
4 completely independent virtual terminals for CGA's/EGA's/VGA's Completely independent virtual terminals for MDA/HGC/CGA/EGA and VGA
.It .It
25, 28, 35, 40, 43 or 50x80 screen resolution for each virtual screen 25, 28, 35, 40, 43 or 50x80 screen resolution for each virtual screen
.It .It
@ -148,7 +147,7 @@ No inverse background
.It .It
No VT220 printer output support No VT220 printer output support
.It .It
No VT52/VT100 support at all No VT52 support at all
.It .It
No 8-bit controls No 8-bit controls
.It .It
@ -165,12 +164,10 @@ The
.Nm pcvt .Nm pcvt
console driver is currently available for the Intel-based BSD operating console driver is currently available for the Intel-based BSD operating
systems systems
.Em 386BSD Pq release 0.1 with patchkits , .Em NetBSD/i386 Pq release 0.9 or higher,
.Em NetBSD Pq release 0.9 or higher, only i386 ,
and and
.Em FreeBSD Pq release 1.0-GAMMA or higher . .Em FreeBSD Pq release 1.0-GAMMA or higher .
In order to get the appropriate system support, one of the options In order to get the appropriate system support, one of the options
.Em PCVT_386BSD ,
.Em PCVT_NETBSD , .Em PCVT_NETBSD ,
or or
.Em PCVT_FREEBSD .Em PCVT_FREEBSD
@ -761,7 +758,7 @@ structure as argument:
struct pcvtinfo { struct pcvtinfo {
u_int opsys; /* PCVT_xxx(x)BSD */ u_int opsys; /* PCVT_xxx(x)BSD */
#define CONF_UNKNOWNOPSYS 0 #define CONF_UNKNOWNOPSYS 0
#define CONF_386BSD 1 #define CONF_386BSD 1 /* unsupported !!! */
#define CONF_NETBSD 2 #define CONF_NETBSD 2
#define CONF_FREEBSD 3 #define CONF_FREEBSD 3
u_int opsysrel; /* Release for NetBSD/FreeBSD */ u_int opsysrel; /* Release for NetBSD/FreeBSD */
@ -833,7 +830,8 @@ The
.Nm pcvt .Nm pcvt
driver has been developed for and contributed to 386BSD release 0.1. Since driver has been developed for and contributed to 386BSD release 0.1. Since
release 3.00 explicit support is provided for NetBSD 0.9. It is expected release 3.00 explicit support is provided for NetBSD 0.9. It is expected
that no further development on pcvt is done for 386BSD 0.1 after release 3.00. that no further development on pcvt is done for 386BSD 0.1 after release 3.00,
in fact, 386BSD support was dropped with release 3.20.
.Sh AUTHORS .Sh AUTHORS
.Bl -tag -width 30n -offset indent .Bl -tag -width 30n -offset indent
.It Written by : .It Written by :

View file

@ -1,9 +1,44 @@
ChangeLog last edit-date: [Thu Mar 30 19:57:09 1995] ChangeLog last edit-date: [Thu Apr 6 10:52:50 1995]
================================================================================ ================================================================================
Changes 3.10 -> 3.20 March 1995 Changes 3.10 -> 3.20 April 1995
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
- bugfix from Thomas Eberhardt: the force 24 lines enable function key
label was not updated when changing force 24 lines mode with
'scon -f on|off', this is now fixed.
- bugfix from John Kohl fixing divide by zero problem in pcvt_ext.c when
ringing the bell and pitch is 0: this avoids an integer divide
trap in supervisor mode.
- changed the default behaviour of keyboard controller delay from using
delay()/DELAY() to using dummy reads to port 0x84 because i got
keyboard hangs in X.
- bugfix: in pcvt_ext.c, MDA state restore when leaving X was lost, should
function now again.
- renamed PCVT_XSERVER to XSERVER in ispcvt.c
- bugfix in pcvt_vtf.c: renamed PCVT_USL_COMPAT to PCVT_USL_VT_COMPAT
- added '-d <device>' option to ispcvt and loadfont
- removed PCVT_NEEDPG
- almost completely removed support for 386BSD 0.1 with patchkit 0.2.4
- applied a patch from Joerg providing missing FreeBSD 2.1 functionality and
a some minor bugfixes and checks.
- provide a single place PCVT_KBD_DELAY in pcvt_hdr.h. made it configurable
via PCVT_PORTIO_DELAY to use either 6 dummy reads from port 0x84
or the delay/DELAY function of the operating system. Changed ispcvt
to report status of compile time switch.
- release beta 23 --------------------------------------------------------------
- removed some files for 386BSD as there is virtually noone outside - removed some files for 386BSD as there is virtually noone outside
using it anymore using it anymore

View file

@ -1,4 +1,4 @@
# 386BSD and NetBSD # NetBSD
#MAN4= pcvt.0 #MAN4= pcvt.0
#MLINKS= pcvt.0 ../pcvt.0 #MLINKS= pcvt.0 ../pcvt.0

View file

@ -1,4 +1,4 @@
Random Notes and Hints Last Edit-Date: [Wed Mar 29 21:38:17 1995] Random Notes and Hints Last Edit-Date: [Sun Apr 2 18:28:09 1995]
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
@ -69,6 +69,8 @@ recalculated in case of a switch to another line size.
I don't have access to a 386BSD 0.1 machine anymore so the 386BSD pcvt is I don't have access to a 386BSD 0.1 machine anymore so the 386BSD pcvt is
considered unsupported and will disappear in the future. considered unsupported and will disappear in the future.
386BSD support was dropped with release 3.20.
Keyboard hangs after first update of keyboard LED's Keyboard hangs after first update of keyboard LED's
=============================================================================== ===============================================================================

View file

@ -0,0 +1,13 @@
Things to do Last Edit-Date: [Sun Apr 2 18:29:16 1995]
================================================================================
- implement secondary DA request: ESC [ > c and/or ESC [ > 0 c
- implement user settable primary DA response and secondary DA response
- retrying for a non-connected keyboard in doreset() must be made cpu and
speed independent. in case of a not connected keyboard, a fast machine
runs doreset() fast and a slow machine runs doreset() slow - bad !!
- remove single screen X server support and make PCVT_USL_VT the default

View file

@ -2,7 +2,7 @@
# #
# pcvt termcap database entry (release 3.20) # pcvt termcap database entry (release 3.20)
# #
# last edit-date: [Sun Feb 19 12:47:20 1995] # last edit-date: [Sun Apr 2 18:31:04 1995]
# #
# -hm new entries for SR and SF # -hm new entries for SR and SF
# -hm removing duplicate entries # -hm removing duplicate entries
@ -10,7 +10,7 @@
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# 386bsd vt220 terminal emulator console (pc keyboard & monitor) # NetBSD/FreeBSD vt220 terminal emulator console (pc keyboard & monitor)
# termcap entries for pure VT220-Emulation and 25, 28, 35, 40, 43 and # termcap entries for pure VT220-Emulation and 25, 28, 35, 40, 43 and
# 50 lines entries # 50 lines entries
# 80 columns # 80 columns
@ -52,7 +52,7 @@ pcvt50|dec vt220 with 50 lines:\
:tc=pcvtXX: :tc=pcvtXX:
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# 386bsd vt220 terminal emulator console (pc keyboard & monitor) # NetBSD/FreeBSD vt220 terminal emulator console (pc keyboard & monitor)
# termcap entries for pure VT220-Emulation and 25, 28, 35, 40, 43 and # termcap entries for pure VT220-Emulation and 25, 28, 35, 40, 43 and
# 50 lines entries # 50 lines entries
# 132 columns # 132 columns
@ -94,7 +94,7 @@ pcvt50w|dec vt220 with 50 lines and 132 cols:\
:tc=pcvtXX: :tc=pcvtXX:
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# 386bsd vt220 terminal emulator console (pc keyboard & monitor) # NetBSD/FreeBSD vt220 terminal emulator console (pc keyboard & monitor)
# termcap entries for HP-Emulation and 25, 28, 35, 40, 43 and 50 # termcap entries for HP-Emulation and 25, 28, 35, 40, 43 and 50
# lines entries. note that the HP-Emulation uses the bottom 3 lines # lines entries. note that the HP-Emulation uses the bottom 3 lines
# for status and function key labels, so we get always 3 lines less. # for status and function key labels, so we get always 3 lines less.
@ -144,7 +144,7 @@ pcvt47h|dec vt220 with HP-fkey labels and 47 lines:\
:tc=pcvtXX: :tc=pcvtXX:
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# 386bsd vt220 terminal emulator console (pc keyboard & monitor) # NetBSD/FreeBSD vt220 terminal emulator console (pc keyboard & monitor)
# termcap entries for HP-Emulation and 25, 28, 35, 40, 43 and 50 # termcap entries for HP-Emulation and 25, 28, 35, 40, 43 and 50
# lines entries. note that the HP-Emulation uses the bottom 3 lines # lines entries. note that the HP-Emulation uses the bottom 3 lines
# for status and function key labels, so we get always 3 lines less. # for status and function key labels, so we get always 3 lines less.

View file

@ -6,10 +6,10 @@
| NetBSD 0.9, 1.0 | | NetBSD 0.9, 1.0 |
| FreeBSD 1.0, 1.1, 1.1.5.1, 2.0 | | FreeBSD 1.0, 1.1, 1.1.5.1, 2.0 |
| | | |
| Release 3.20 March 1995 | | Release 3.20 April 1995 |
| | | |
| ---------------------------- | | ---------------------------- |
| ========>> BETA 23 <<======= | | ========>> BETA 24 <<======= |
| ---------------------------- | | ---------------------------- |
| | | |
| (c) Copyright 1992,1993,1994,1995 by | | (c) Copyright 1992,1993,1994,1995 by |
@ -176,16 +176,16 @@ Tested Operating Systems
NetBSD 0.9 pcvt release 3.20-b2 tested NetBSD 0.9 pcvt release 3.20-b2 tested
NetBSD 1.0 pcvt release 3.20-b23 tested NetBSD 1.0 pcvt release 3.20-b24 tested
NetBSD-current (post 1.0) reported to run (end of March '95) NetBSD-current (post 1.0) reported to run (end of March '95)
FreeBSD 1.1R pcvt release 3.20-b7 tested FreeBSD 1.1R pcvt release 3.20-b7 tested
FreeBSD 1.1.5.1R pcvt release 3.20-b23 tested FreeBSD 1.1.5.1R pcvt release 3.20-b24 tested
FreeBSD 2.0 pcvt release 3.20-b23 tested FreeBSD 2.0 pcvt release 3.20-b24 tested
FreeBSD-current (post 2.0) reported to run (end of March '95) FreeBSD-current (post 2.0) reported to run (end of March '95)

View file

@ -1,5 +1,7 @@
/* /*
* Copyright (c) 1992,1993,1994 Hellmuth Michaelis and Brian Dunford-Shore * Copyright (c) 1992, 1995 Hellmuth Michaelis
*
* Copyright (c) 1992, 1994 Brian Dunford-Shore
* *
* All rights reserved. * All rights reserved.
* *
@ -32,7 +34,7 @@
*/ */
static char *id = static char *id =
"@(#)cursor.c, 3.20, Last Edit-Date: [Thu Feb 23 16:02:33 1995]"; "@(#)cursor.c, 3.20, Last Edit-Date: [Tue Apr 4 12:27:54 1995]";
/*---------------------------------------------------------------------------* /*---------------------------------------------------------------------------*
* *

View file

@ -30,10 +30,10 @@ void clear_screen();
#ifdef BSD #ifdef BSD
#include <sys/ioctl.h> #include <sys/ioctl.h>
#endif BSD #endif BSD
#if defined (__386BSD__) || defined (__NetBSD__) || defined (__FreeBSD__) #if defined (__NetBSD__) || defined (__FreeBSD__)
#include <sys/termios.h> #include <sys/termios.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#endif /* __386BSD__ || __NetBSD__ || __FreeBSD__ */ #endif /* __NetBSD__ || __FreeBSD__ */
#include <signal.h> #include <signal.h>
#ifdef CURFIX #ifdef CURFIX
@ -107,9 +107,9 @@ struct termio old_stty, new_stty;
#ifdef BSD #ifdef BSD
struct sgttyb old_stty, new_stty; struct sgttyb old_stty, new_stty;
#endif BSD #endif BSD
#if defined (__386BSD__) || defined (__NetBSD__) || defined (__FreeBSD__) #if defined (__NetBSD__) || defined (__FreeBSD__)
struct termios old_stty, new_stty; struct termios old_stty, new_stty;
#endif /* __386BSD__ || __NetBSD__ || __FreeBSD__ */ #endif /* __NetBSD__ || __FreeBSD__ */
FILE * font_file = (FILE *)0; FILE * font_file = (FILE *)0;
@ -130,9 +130,9 @@ interrupt()
#ifdef BSD #ifdef BSD
ioctl( 0, TIOCSETP, &old_stty ); ioctl( 0, TIOCSETP, &old_stty );
#endif BSD #endif BSD
#if defined (__386BSD__) || defined (__NetBSD__) || defined (__FreeBSD__) #if defined (__NetBSD__) || defined (__FreeBSD__)
ioctl( 0, TIOCSETA, &old_stty ); ioctl( 0, TIOCSETA, &old_stty );
#endif /* __386BSD__ || __NetBSD__ || __FreeBSD__ */ #endif /* __NetBSD__ || __FreeBSD__ */
clear_screen(); clear_screen();
exit( 0 ); exit( 0 );
} }
@ -187,9 +187,9 @@ char *argv[];
#ifdef BSD #ifdef BSD
ioctl( 0, TIOCGETP, &old_stty ); ioctl( 0, TIOCGETP, &old_stty );
#endif BSD #endif BSD
#if defined (__386BSD__) || defined (__NetBSD__) || defined (__FreeBSD__) #if defined (__NetBSD__) || defined (__FreeBSD__)
ioctl( 0, TIOCGETA, &old_stty ); ioctl( 0, TIOCGETA, &old_stty );
#endif /* __386BSD__ || __NetBSD__ || __FreeBSD__ */ #endif /* __NetBSD__ || __FreeBSD__ */
signal( SIGINT, (void *) interrupt ); signal( SIGINT, (void *) interrupt );
new_stty = old_stty; new_stty = old_stty;
#ifdef SYSV #ifdef SYSV
@ -197,12 +197,12 @@ char *argv[];
new_stty.c_cc[VMIN] = 1; new_stty.c_cc[VMIN] = 1;
ioctl( 0, TCSETA, &new_stty ); ioctl( 0, TCSETA, &new_stty );
#endif SYSV #endif SYSV
#if defined (__386BSD__) || defined (__NetBSD__) || defined (__FreeBSD__) #if defined (__NetBSD__) || defined (__FreeBSD__)
new_stty.c_lflag &= ~ICANON; new_stty.c_lflag &= ~ICANON;
new_stty.c_lflag &= ~ECHO; new_stty.c_lflag &= ~ECHO;
new_stty.c_cc[VMIN] = 1; new_stty.c_cc[VMIN] = 1;
ioctl( 0, TIOCSETA, &new_stty ); ioctl( 0, TIOCSETA, &new_stty );
#endif /* __386BSD__ || __NetBSD__ || __FreeBSD__ */ #endif /* __NetBSD__ || __FreeBSD__ */
#ifdef BSD #ifdef BSD
new_stty.sg_flags |= CBREAK; new_stty.sg_flags |= CBREAK;
new_stty.sg_flags &= ~ECHO; new_stty.sg_flags &= ~ECHO;
@ -218,9 +218,9 @@ char *argv[];
#ifdef BSD #ifdef BSD
ioctl( 0, TIOCSETP, &old_stty ); ioctl( 0, TIOCSETP, &old_stty );
#endif BSD #endif BSD
#if defined (__386BSD__) || defined (__NetBSD__) || defined (__FreeBSD__) #if defined (__NetBSD__) || defined (__FreeBSD__)
ioctl( 0, TIOCSETA, &old_stty ); ioctl( 0, TIOCSETA, &old_stty );
#endif /* __386BSD__ || __NetBSD__ || __FreeBSD__ */ #endif /* __NetBSD__ || __FreeBSD__ */
clear_screen(); clear_screen();
/* Overwrite the old file. */ /* Overwrite the old file. */

View file

@ -1,4 +1,4 @@
.\" Copyright (c) 1992,1993,1994 Hellmuth Michaelis .\" Copyright (c) 1992, 1995 Hellmuth Michaelis
.\" .\"
.\" All rights reserved. .\" All rights reserved.
.\" .\"
@ -27,17 +27,18 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\" .\"
.\" @(#)ispcvt.1, 3.00, Last Edit-Date: [Mon Jan 10 21:19:00 1994] .\" @(#)ispcvt.1, 3.20, Last Edit-Date: [Tue Apr 4 12:35:54 1995]
.\" .\"
.Dd December 30, 1993 .Dd April 4, 1995
.Dt ISPCVT 1 .Dt ISPCVT 1
.Sh NAME .Sh NAME
.Nm ispcvt .Nm ispcvt
.Nd verify if current video driver is pcvt driver .Nd verify if current video driver is pcvt driver
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm ispcvt .Nm ispcvt
.Op Fl v
.Op Fl c .Op Fl c
.Op Fl d Ar device
.Op Fl v
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Nm ispcvt .Nm ispcvt
@ -53,6 +54,8 @@ compiled with.
.Pp .Pp
The options are as follows: The options are as follows:
.Bl -tag -width Ds .Bl -tag -width Ds
.It Fl d
Specifies a device for which the check is done.
.It Fl v .It Fl v
Specifies being verbose. On success the name and revision is reported, on Specifies being verbose. On success the name and revision is reported, on
failure which comparison failed. failure which comparison failed.
@ -71,7 +74,7 @@ option gives a verbose listing of the compile-time options.
.It Sy 0 .It Sy 0
driver is pcvt and major and minor numbers match driver is pcvt and major and minor numbers match
.It Sy 1 .It Sy 1
ioctl system call failed open or ioctl system call failed
.It Sy 2 .It Sy 2
driver name mismatch driver name mismatch
.It Sy 3 .It Sy 3

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1992,1993,1994 Hellmuth Michaelis * Copyright (c) 1992, 1995 Hellmuth Michaelis
* *
* All rights reserved. * All rights reserved.
* *
@ -17,10 +17,10 @@
* 4. The name authors may not be used to endorse or promote products * 4. The name authors may not be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
@ -31,7 +31,7 @@
*/ */
static char *id = static char *id =
"@(#)ispcvt.c, 3.20, Last Edit-Date: [Sun Feb 19 13:17:57 1995]"; "@(#)ispcvt.c, 3.20, Last Edit-Date: [Wed Apr 5 17:53:28 1995]";
/*---------------------------------------------------------------------------* /*---------------------------------------------------------------------------*
* *
@ -45,12 +45,19 @@ static char *id =
* -hm new CONF_ values for 3.10 * -hm new CONF_ values for 3.10
* -hm new CONF_ values for 3.20 * -hm new CONF_ values for 3.20
* -hm removed PCVT_FAKE_SYSCONS10 * -hm removed PCVT_FAKE_SYSCONS10
* -hm added PCVT_PORTIO_DELAY
* -hm removed PCVT_386BSD
* -hm add -d option to specify a device
* -hm PCVT_XSERVER -> XSERVER
* *
*---------------------------------------------------------------------------*/ *---------------------------------------------------------------------------*/
#include <stdio.h> #include <stdio.h>
#include <fcntl.h>
#include <machine/pcvt_ioctl.h> #include <machine/pcvt_ioctl.h>
#define DEFAULTFD 0
main(argc,argv) main(argc,argv)
int argc; int argc;
char *argv[]; char *argv[];
@ -65,8 +72,11 @@ char *argv[];
char *p; char *p;
int verbose = 0; int verbose = 0;
int config = 0; int config = 0;
int dflag = 0;
int fd;
char *device;
while( (c = getopt(argc, argv, "vc")) != EOF) while( (c = getopt(argc, argv, "vcd:")) != EOF)
{ {
switch(c) switch(c)
{ {
@ -78,6 +88,11 @@ char *argv[];
config = 1; config = 1;
break; break;
case 'd':
device = optarg;
dflag = 1;
break;
case '?': case '?':
default: default:
usage(); usage();
@ -85,7 +100,26 @@ char *argv[];
} }
} }
if(ioctl(0, VGAPCVTID, &pcvtid) == -1) if(dflag)
{
if((fd = open(device, O_RDWR)) == -1)
{
if(verbose)
{
char buffer[80];
strcpy(buffer,"ERROR opening ");
strcat(buffer,device);
perror(buffer);
}
exit(1);
}
}
else
{
fd = DEFAULTFD;
}
if(ioctl(fd, VGAPCVTID, &pcvtid) == -1)
{ {
if(verbose) if(verbose)
perror("ispcvt - ioctl VGAPCVTID failed, error"); perror("ispcvt - ioctl VGAPCVTID failed, error");
@ -125,22 +159,17 @@ char *argv[];
if(config == 0) if(config == 0)
exit(0); exit(0);
if(ioctl(0, VGAPCVTINFO, &pcvtinfo) == -1) if(ioctl(fd, VGAPCVTINFO, &pcvtinfo) == -1)
{ {
if(verbose) if(verbose)
perror("ispcvt - ioctl VGAPCVTINFO failed, error"); perror("ispcvt - ioctl VGAPCVTINFO failed, error");
exit(1); exit(1);
} }
if(verbose) if(verbose)
{ {
switch(pcvtinfo.opsys) switch(pcvtinfo.opsys)
{ {
case CONF_386BSD:
p = "PCVT_386BSD";
break;
case CONF_NETBSD: case CONF_NETBSD:
p = "PCVT_NETBSD"; p = "PCVT_NETBSD";
break; break;
@ -166,83 +195,85 @@ char *argv[];
/* config booleans */ /* config booleans */
fprintf(stderr,"PCVT_VT220KEYB = %s\t\t", fprintf(stderr,"PCVT_132GENERIC = %s",
((u_int)pcvtinfo.compile_opts & (u_int)CONF_VT220KEYB) ? "ON" : "OFF");
fprintf(stderr,"PCVT_SCREENSAVER = %s\n",
(pcvtinfo.compile_opts & CONF_SCREENSAVER) ? "ON" : "OFF");
fprintf(stderr,"PCVT_PRETTYSCRNS = %s\t\t",
(pcvtinfo.compile_opts & CONF_PRETTYSCRNS) ? "ON" : "OFF");
fprintf(stderr,"PCVT_CTRL_ALT_DEL = %s\n",
(pcvtinfo.compile_opts & CONF_CTRL_ALT_DEL) ? "ON" : "OFF");
fprintf(stderr,"PCVT_USEKBDSEC = %s\t\t",
(pcvtinfo.compile_opts & CONF_USEKBDSEC) ? "ON" : "OFF");
fprintf(stderr,"PCVT_24LINESDEF = %s\n",
(pcvtinfo.compile_opts & CONF_24LINESDEF) ? "ON" : "OFF");
fprintf(stderr,"PCVT_EMU_MOUSE = %s\t\t",
(pcvtinfo.compile_opts & CONF_EMU_MOUSE) ? "ON" : "OFF");
fprintf(stderr,"PCVT_SHOWKEYS = %s\n",
(pcvtinfo.compile_opts & CONF_SHOWKEYS) ? "ON" : "OFF");
fprintf(stderr,"PCVT_KEYBDID = %s\t\t",
(pcvtinfo.compile_opts & CONF_KEYBDID) ? "ON" : "OFF");
fprintf(stderr,"PCVT_SIGWINCH = %s\n",
(pcvtinfo.compile_opts & CONF_SIGWINCH) ? "ON" : "OFF");
fprintf(stderr,"PCVT_NULLCHARS = %s\t\t",
(pcvtinfo.compile_opts & CONF_NULLCHARS) ? "ON" : "OFF");
fprintf(stderr,"PCVT_BACKUP_FONTS = %s\n",
(pcvtinfo.compile_opts & CONF_BACKUP_FONTS) ? "ON" : "OFF");
fprintf(stderr,"PCVT_SW0CNOUTP = %s\t\t",
(pcvtinfo.compile_opts & CONF_SW0CNOUTP) ? "ON" : "OFF");
fprintf(stderr,"PCVT_NEEDPG = %s\n",
(pcvtinfo.compile_opts & CONF_NEEDPG) ? "ON" : "OFF");
fprintf(stderr,"PCVT_SETCOLOR = %s\t\t",
(pcvtinfo.compile_opts & CONF_SETCOLOR) ? "ON" : "OFF");
fprintf(stderr,"PCVT_132GENERIC = %s\n",
(pcvtinfo.compile_opts & CONF_132GENERIC) ? "ON" : "OFF"); (pcvtinfo.compile_opts & CONF_132GENERIC) ? "ON" : "OFF");
next();
fprintf(stderr,"PCVT_PALFLICKER = %s\t\t", fprintf(stderr,"PCVT_24LINESDEF = %s",
(pcvtinfo.compile_opts & CONF_PALFLICKER) ? "ON" : "OFF"); (pcvtinfo.compile_opts & CONF_24LINESDEF) ? "ON" : "OFF");
next();
fprintf(stderr,"PCVT_WAITRETRACE = %s\n", fprintf(stderr,"PCVT_BACKUP_FONTS = %s",
(pcvtinfo.compile_opts & CONF_WAITRETRACE) ? "ON" : "OFF"); (pcvtinfo.compile_opts & CONF_BACKUP_FONTS) ? "ON" : "OFF");
next();
fprintf(stderr,"PCVT_XSERVER = %s\t\t", fprintf(stderr,"PCVT_CTRL_ALT_DEL = %s",
(pcvtinfo.compile_opts & CONF_XSERVER) ? "ON" : "OFF"); (pcvtinfo.compile_opts & CONF_CTRL_ALT_DEL) ? "ON" : "OFF");
next();
fprintf(stderr,"PCVT_USL_VT_COMPAT = %s\n", fprintf(stderr,"PCVT_EMU_MOUSE = %s",
(pcvtinfo.compile_opts & CONF_USL_VT_COMPAT) ? "ON" : "OFF"); (pcvtinfo.compile_opts & CONF_EMU_MOUSE) ? "ON" : "OFF");
next();
fprintf(stderr,"PCVT_INHIBIT_NUMLOCK = %s\t\t", fprintf(stderr,"PCVT_INHIBIT_NUMLOCK = %s",
(pcvtinfo.compile_opts & CONF_INHIBIT_NUMLOCK) ? "ON" : "OFF"); (pcvtinfo.compile_opts & CONF_INHIBIT_NUMLOCK) ? "ON" : "OFF");
next();
fprintf(stderr,"PCVT_META_ESC = %s\n", fprintf(stderr,"PCVT_KEYBDID = %s",
(pcvtinfo.compile_opts & CONF_META_ESC) ? "ON" : "OFF"); (pcvtinfo.compile_opts & CONF_KEYBDID) ? "ON" : "OFF");
next();
fprintf(stderr,"PCVT_NOFASTSCROLL = %s\t\t", fprintf(stderr,"PCVT_KBD_FIFO = %s",
(pcvtinfo.compile_opts & CONF_NOFASTSCROLL) ? "ON" : "OFF");
fprintf(stderr,"PCVT_SLOW_INTERRUPT = %s\n",
(pcvtinfo.compile_opts & CONF_SLOW_INTERRUPT) ? "ON" : "OFF");
fprintf(stderr,"PCVT_KBD_FIFO = %s\t\t",
(pcvtinfo.compile_opts & CONF_KBD_FIFO) ? "ON" : "OFF"); (pcvtinfo.compile_opts & CONF_KBD_FIFO) ? "ON" : "OFF");
next();
fprintf(stderr,"PCVT_NO_LED_UPDATE = %s\n\n", fprintf(stderr,"PCVT_META_ESC = %s",
(pcvtinfo.compile_opts & CONF_META_ESC) ? "ON" : "OFF");
next();
fprintf(stderr,"PCVT_NOFASTSCROLL = %s",
(pcvtinfo.compile_opts & CONF_NOFASTSCROLL) ? "ON" : "OFF");
next();
fprintf(stderr,"PCVT_NO_LED_UPDATE = %s",
(pcvtinfo.compile_opts & CONF_NO_LED_UPDATE) ? "ON" : "OFF"); (pcvtinfo.compile_opts & CONF_NO_LED_UPDATE) ? "ON" : "OFF");
next();
fprintf(stderr,"PCVT_NULLCHARS = %s",
(pcvtinfo.compile_opts & CONF_NULLCHARS) ? "ON" : "OFF");
next();
fprintf(stderr,"PCVT_PALFLICKER = %s",
(pcvtinfo.compile_opts & CONF_PALFLICKER) ? "ON" : "OFF");
next();
fprintf(stderr,"PCVT_PORTIO_DELAY = %s",
(pcvtinfo.compile_opts & CONF_PORTIO_DELAY) ? "ON" : "OFF");
next();
fprintf(stderr,"PCVT_PRETTYSCRNS = %s",
(pcvtinfo.compile_opts & CONF_PRETTYSCRNS) ? "ON" : "OFF");
next();
fprintf(stderr,"PCVT_SCREENSAVER = %s",
(pcvtinfo.compile_opts & CONF_SCREENSAVER) ? "ON" : "OFF");
next();
fprintf(stderr,"PCVT_SETCOLOR = %s",
(pcvtinfo.compile_opts & CONF_SETCOLOR) ? "ON" : "OFF");
next();
fprintf(stderr,"PCVT_SHOWKEYS = %s",
(pcvtinfo.compile_opts & CONF_SHOWKEYS) ? "ON" : "OFF");
next();
fprintf(stderr,"PCVT_SIGWINCH = %s",
(pcvtinfo.compile_opts & CONF_SIGWINCH) ? "ON" : "OFF");
next();
fprintf(stderr,"PCVT_SLOW_INTERRUPT = %s",
(pcvtinfo.compile_opts & CONF_SLOW_INTERRUPT) ? "ON" : "OFF");
next();
fprintf(stderr,"PCVT_SW0CNOUTP = %s",
(pcvtinfo.compile_opts & CONF_SW0CNOUTP) ? "ON" : "OFF");
next();
fprintf(stderr,"PCVT_USEKBDSEC = %s",
(pcvtinfo.compile_opts & CONF_USEKBDSEC) ? "ON" : "OFF");
next();
fprintf(stderr,"PCVT_USL_VT_COMPAT = %s",
(pcvtinfo.compile_opts & CONF_USL_VT_COMPAT) ? "ON" : "OFF");
next();
fprintf(stderr,"PCVT_VT220KEYB = %s",
((u_int)pcvtinfo.compile_opts & (u_int)CONF_VT220KEYB) ? "ON" : "OFF");
next();
fprintf(stderr,"PCVT_WAITRETRACE = %s",
(pcvtinfo.compile_opts & CONF_WAITRETRACE) ? "ON" : "OFF");
next();
fprintf(stderr,"XSERVER = %s",
(pcvtinfo.compile_opts & CONF_XSERVER) ? "ON" : "OFF");
fprintf(stderr,"\n\n");
} }
else /* !verbose */ else /* !verbose */
{ {
@ -258,9 +289,20 @@ char *argv[];
usage() usage()
{ {
fprintf(stderr,"\nispcvt - verify current video driver is the pcvt-driver\n"); fprintf(stderr,"\nispcvt - verify current video driver is the pcvt-driver\n");
fprintf(stderr,"usage: ispcvt [-v] [-c]\n"); fprintf(stderr," usage: ispcvt [-v] [-c] [-d device]\n");
fprintf(stderr," -v be verbose\n"); fprintf(stderr,"options: -v be verbose\n");
fprintf(stderr," -c print compile time configuration\n\n"); fprintf(stderr," -c print compile time configuration\n");
fprintf(stderr," -d <name> use devicefile <name> for verification\n\n");
exit(5); exit(5);
} }
next()
{
static int i = 0;
fprintf(stderr, "%s", (i == 0) ? "\t\t" : "\n");
i = ~i;
}
/* EOF */

View file

@ -1,4 +1,4 @@
.\" Copyright (c) 1992,1993,1994 Hellmuth Michaelis .\" Copyright (c) 1992, 1995 Hellmuth Michaelis
.\" .\"
.\" All rights reserved. .\" All rights reserved.
.\" .\"
@ -27,9 +27,9 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\" .\"
.\" @(#)loadfont.1, 3.00, Last Edit-Date: [Mon Jan 10 21:25:01 1994] .\" @(#)loadfont.1, 3.20, Last Edit-Date: [Tue Apr 4 13:06:00 1995]
.\" .\"
.Dd January 3, 1993 .Dd April 4, 1995
.Dt LOADFONT 1 .Dt LOADFONT 1
.Sh NAME .Sh NAME
.Nm loadfont .Nm loadfont
@ -38,6 +38,7 @@ driver.
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm loadfont .Nm loadfont
.Op Fl c Ar charsetno .Op Fl c Ar charsetno
.Op Fl d Ar devicefile
.Op Fl f Ar fontfilename .Op Fl f Ar fontfilename
.Op Fl i .Op Fl i
.Sh DESCRIPTION .Sh DESCRIPTION
@ -51,6 +52,8 @@ The options are as follows:
.It Fl c .It Fl c
Specifies the slot, the font is to load into. EGA boards have four Specifies the slot, the font is to load into. EGA boards have four
slots and VGA boards have eight slots available for downloading fonts. slots and VGA boards have eight slots available for downloading fonts.
.It Fl d
Specifies the devicefile to use.
.It Fl f .It Fl f
Specifies the file which contains the font to be downloaded. Specifies the file which contains the font to be downloaded.
.It Fl i .It Fl i
@ -61,8 +64,7 @@ This is also the default behaviour if no options are specified on the commandlin
This utility is used only on EGA and VGA boards, as MDA, HCG and CGA boards This utility is used only on EGA and VGA boards, as MDA, HCG and CGA boards
do not have downloadable charactersets available. do not have downloadable charactersets available.
.Sh FILES .Sh FILES
Unless otherwise specified in the Makefile, the following fontfiles are The following fontfiles are available in the pcvt distribution:
available for the pcvt 2.0 distribution:
.nf .nf
/usr/share/misc/vgafonts/vt220l.808: 8x8 IBM II font /usr/share/misc/vgafonts/vt220l.808: 8x8 IBM II font

View file

@ -1,5 +1,7 @@
/* /*
* Copyright (c) 1992,1993,1994 Hellmuth Michaelis and Brian Dunford-Shore * Copyright (c) 1992, 1995 Hellmuth Michaelis
*
* Copyright (c) 1992, 1994 Brian Dunford-Shore
* *
* All rights reserved. * All rights reserved.
* *
@ -32,7 +34,7 @@
*/ */
static char *id = static char *id =
"@(#)loadfont.c, 3.20, Last Edit-Date: [Tue Dec 20 14:52:58 1994]"; "@(#)loadfont.c, 3.20, Last Edit-Date: [Fri Apr 7 10:13:16 1995]";
/*---------------------------------------------------------------------------* /*---------------------------------------------------------------------------*
* *
@ -40,10 +42,12 @@ static char *id =
* *
* -hm removing explicit HGC support (same as MDA ..) * -hm removing explicit HGC support (same as MDA ..)
* -hm new pcvt_ioctl.h SIZ_xxROWS * -hm new pcvt_ioctl.h SIZ_xxROWS
* -hm add -d option
* *
*---------------------------------------------------------------------------*/ *---------------------------------------------------------------------------*/
#include <stdio.h> #include <stdio.h>
#include <fcntl.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <machine/pcvt_ioctl.h> #include <machine/pcvt_ioctl.h>
@ -51,25 +55,25 @@ static char *id =
#define FONT8X8 2048 /* filesize for 8x8 font */ #define FONT8X8 2048 /* filesize for 8x8 font */
#define HEIGHT8X8 8 /* 8 scan lines char cell height */ #define HEIGHT8X8 8 /* 8 scan lines char cell height */
#define SSCAN8X8 143 /* 400 scan lines on screen - 256 - 1 */ #define SSCAN8X8 143 /* 400 scan lines on screen - 256 - 1 */
#define SROWS8X8 50 /* 50 character lines on screen */
#define FONT8X10 2560 /* filesize for 8x10 font */ #define FONT8X10 2560 /* filesize for 8x10 font */
#define HEIGHT8X10 10 /* 10 scan lines char cell height */ #define HEIGHT8X10 10 /* 10 scan lines char cell height */
#define SSCAN8X10 143 /* 400 scan lines on screen - 256 - 1 */ #define SSCAN8X10 143 /* 400 scan lines on screen - 256 - 1 */
#define SROWS8X10 40 /* 50 character lines on screen */
#define FONT8X14 3584 /* filesize for 8x14 font */ #define FONT8X14 3584 /* filesize for 8x14 font */
#define HEIGHT8X14 14 /* 14 scan lines char cell height */ #define HEIGHT8X14 14 /* 14 scan lines char cell height */
#define SSCAN8X14 135 /* 392 scan lines on screen - 256 - 1 */ #define SSCAN8X14 135 /* 392 scan lines on screen - 256 - 1 */
#define SROWS8X14 28 /* 28 character lines on screen */
#define FONT8X16 4096 /* filesize for 8x16 font */ #define FONT8X16 4096 /* filesize for 8x16 font */
#define HEIGHT8X16 16 /* 16 scan lines char cell height */ #define HEIGHT8X16 16 /* 16 scan lines char cell height */
#define SSCAN8X16 143 /* 400 scan lines on screen - 256 - 1 */ #define SSCAN8X16 143 /* 400 scan lines on screen - 256 - 1 */
#define SROWS8X16 25 /* 25 character lines on screen */
struct screeninfo screeninfo; struct screeninfo screeninfo;
#define DEFAULTFD 0
int fd;
main(argc,argv) main(argc,argv)
int argc; int argc;
char *argv[]; char *argv[];
@ -90,8 +94,10 @@ char *argv[];
char *filename; char *filename;
int fflag = -1; int fflag = -1;
int info = -1; int info = -1;
int dflag = 0;
char *device;
while( (c = getopt(argc, argv, "c:f:i")) != EOF) while( (c = getopt(argc, argv, "c:d:f:i")) != EOF)
{ {
switch(c) switch(c)
{ {
@ -99,6 +105,11 @@ char *argv[];
chr_set = atoi(optarg); chr_set = atoi(optarg);
break; break;
case 'd':
device = optarg;
dflag = 1;
break;
case 'f': case 'f':
filename = optarg; filename = optarg;
fflag = 1; fflag = 1;
@ -118,11 +129,27 @@ char *argv[];
if(chr_set == -1 || fflag == -1) if(chr_set == -1 || fflag == -1)
info = 1; info = 1;
if(dflag)
{
if((fd = open(device, O_RDWR)) == -1)
{
char buffer[80];
strcpy(buffer,"ERROR opening ");
strcat(buffer,device);
perror(buffer);
exit(1);
}
}
else
{
fd = DEFAULTFD;
}
if(info == 1) if(info == 1)
{ {
int i; int i;
if(ioctl(0, VGAGETSCREEN, &screeninfo) == -1) if(ioctl(fd, VGAGETSCREEN, &screeninfo) == -1)
{ {
perror("ioctl VGAGETSCREEN failed"); perror("ioctl VGAGETSCREEN failed");
exit(1); exit(1);
@ -234,7 +261,7 @@ int charset, fontloaded, charscan, scrscan, scrrow;
vfattr.screen_scanlines = scrscan; vfattr.screen_scanlines = scrscan;
vfattr.screen_size = scrrow; vfattr.screen_size = scrrow;
if(ioctl(1, VGASETFONTATTR, &vfattr) == -1) if(ioctl(fd, VGASETFONTATTR, &vfattr) == -1)
{ {
perror("loadfont - ioctl VGASETFONTATTR failed, error"); perror("loadfont - ioctl VGASETFONTATTR failed, error");
exit(1); exit(1);
@ -260,7 +287,7 @@ unsigned char *font_table;
vlc.char_table[j] = font_table[j]; vlc.char_table[j] = font_table[j];
} }
font_table += charscanlines; font_table += charscanlines;
if(ioctl(1, VGALOADCHAR, &vlc) == -1) if(ioctl(fd, VGALOADCHAR, &vlc) == -1)
{ {
perror("loadfont - ioctl VGALOADCHAR failed, error"); perror("loadfont - ioctl VGALOADCHAR failed, error");
exit(1); exit(1);
@ -276,7 +303,7 @@ int charset;
vfattr.character_set = charset; vfattr.character_set = charset;
if(ioctl(1, VGAGETFONTATTR, &vfattr) == -1) if(ioctl(fd, VGAGETFONTATTR, &vfattr) == -1)
{ {
perror("loadfont - ioctl VGAGETFONTATTR failed, error"); perror("loadfont - ioctl VGAGETFONTATTR failed, error");
exit(1); exit(1);
@ -309,8 +336,9 @@ printheader()
usage() usage()
{ {
fprintf(stderr,"\nloadfont - load font into ega/vga font ram for pcvt video driver\n"); fprintf(stderr,"\nloadfont - load font into ega/vga font ram for pcvt video driver\n");
fprintf(stderr,"usage: loadfont -c<cset> -f<filename> -i\n"); fprintf(stderr,"usage: loadfont -c <cset> -d <dev> -f <name> -i\n");
fprintf(stderr," -c <cset> characterset to load (ega 0..3, vga 0..7)\n"); fprintf(stderr," -c <cset> characterset to load (ega 0..3, vga 0..7)\n");
fprintf(stderr," -d <dev> specify device\n");
fprintf(stderr," -f <name> filename containing binary font data\n"); fprintf(stderr," -f <name> filename containing binary font data\n");
fprintf(stderr," -i print status and types of loaded fonts (default)\n"); fprintf(stderr," -i print status and types of loaded fonts (default)\n");
exit(1); exit(1);