diff options
-rw-r--r-- | share/man/man4/man4.i386/pcvt.4 | 24 | ||||
-rw-r--r-- | share/man/man4/pcvt.4 | 24 | ||||
-rw-r--r-- | usr.sbin/pcvt/Misc/Doc/ChangeLog | 39 | ||||
-rw-r--r-- | usr.sbin/pcvt/Misc/Doc/Makefile | 2 | ||||
-rw-r--r-- | usr.sbin/pcvt/Misc/Doc/NotesAndHints | 4 | ||||
-rw-r--r-- | usr.sbin/pcvt/Misc/Doc/ToDo | 13 | ||||
-rw-r--r-- | usr.sbin/pcvt/Misc/Etc/Termcap | 10 | ||||
-rw-r--r-- | usr.sbin/pcvt/Misc/README.FIRST | 10 | ||||
-rw-r--r-- | usr.sbin/pcvt/cursor/cursor.c | 6 | ||||
-rw-r--r-- | usr.sbin/pcvt/fontedit/fontedit.c | 24 | ||||
-rw-r--r-- | usr.sbin/pcvt/ispcvt/ispcvt.8 | 13 | ||||
-rw-r--r-- | usr.sbin/pcvt/ispcvt/ispcvt.c | 210 | ||||
-rw-r--r-- | usr.sbin/pcvt/loadfont/loadfont.1 | 12 | ||||
-rw-r--r-- | usr.sbin/pcvt/loadfont/loadfont.c | 52 |
14 files changed, 283 insertions, 160 deletions
diff --git a/share/man/man4/man4.i386/pcvt.4 b/share/man/man4/man4.i386/pcvt.4 index e681782..4a3a683 100644 --- a/share/man/man4/man4.i386/pcvt.4 +++ b/share/man/man4/man4.i386/pcvt.4 @@ -1,6 +1,6 @@ .\" -.\" Copyright (c) 1992,1993,1994 Hellmuth Michaelis, Brian Dunford-Shore, -.\" Joerg Wunsch and Holger Veit. +.\" Copyright (c) 1992, 1995 Hellmuth Michaelis, Brian Dunford-Shore, +.\" Joerg Wunsch and Holger Veit. .\" .\" All rights reserved. .\" @@ -30,15 +30,16 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" 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 .\" by Joerg Wunsch .\" .\" updated for rel 2.10 (-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) +.\" removed references to 386BSD (-hm) .\" .Dd February 27, 1994 .Dt PCVT 4 @@ -48,8 +49,6 @@ .Sh SYNOPSIS options .Do -.Em PCVT_386BSD -| .Em PCVT_FREEBSD = version | .Em PCVT_NETBSD = version @@ -105,7 +104,7 @@ moving towards VT320 .if n (TM) .Pc .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 25, 28, 35, 40, 43 or 50x80 screen resolution for each virtual screen .It @@ -148,7 +147,7 @@ No inverse background .It No VT220 printer output support .It -No VT52/VT100 support at all +No VT52 support at all .It No 8-bit controls .It @@ -165,12 +164,10 @@ The .Nm pcvt console driver is currently available for the Intel-based BSD operating systems -.Em 386BSD Pq release 0.1 with patchkits , -.Em NetBSD Pq release 0.9 or higher, only i386 , +.Em NetBSD/i386 Pq release 0.9 or higher, and .Em FreeBSD Pq release 1.0-GAMMA or higher . In order to get the appropriate system support, one of the options -.Em PCVT_386BSD , .Em PCVT_NETBSD , or .Em PCVT_FREEBSD @@ -761,7 +758,7 @@ structure as argument: struct pcvtinfo { u_int opsys; /* PCVT_xxx(x)BSD */ #define CONF_UNKNOWNOPSYS 0 -#define CONF_386BSD 1 +#define CONF_386BSD 1 /* unsupported !!! */ #define CONF_NETBSD 2 #define CONF_FREEBSD 3 u_int opsysrel; /* Release for NetBSD/FreeBSD */ @@ -833,7 +830,8 @@ The .Nm pcvt 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 -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 .Bl -tag -width 30n -offset indent .It Written by : diff --git a/share/man/man4/pcvt.4 b/share/man/man4/pcvt.4 index e681782..4a3a683 100644 --- a/share/man/man4/pcvt.4 +++ b/share/man/man4/pcvt.4 @@ -1,6 +1,6 @@ .\" -.\" Copyright (c) 1992,1993,1994 Hellmuth Michaelis, Brian Dunford-Shore, -.\" Joerg Wunsch and Holger Veit. +.\" Copyright (c) 1992, 1995 Hellmuth Michaelis, Brian Dunford-Shore, +.\" Joerg Wunsch and Holger Veit. .\" .\" All rights reserved. .\" @@ -30,15 +30,16 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" 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 .\" by Joerg Wunsch .\" .\" updated for rel 2.10 (-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) +.\" removed references to 386BSD (-hm) .\" .Dd February 27, 1994 .Dt PCVT 4 @@ -48,8 +49,6 @@ .Sh SYNOPSIS options .Do -.Em PCVT_386BSD -| .Em PCVT_FREEBSD = version | .Em PCVT_NETBSD = version @@ -105,7 +104,7 @@ moving towards VT320 .if n (TM) .Pc .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 25, 28, 35, 40, 43 or 50x80 screen resolution for each virtual screen .It @@ -148,7 +147,7 @@ No inverse background .It No VT220 printer output support .It -No VT52/VT100 support at all +No VT52 support at all .It No 8-bit controls .It @@ -165,12 +164,10 @@ The .Nm pcvt console driver is currently available for the Intel-based BSD operating systems -.Em 386BSD Pq release 0.1 with patchkits , -.Em NetBSD Pq release 0.9 or higher, only i386 , +.Em NetBSD/i386 Pq release 0.9 or higher, and .Em FreeBSD Pq release 1.0-GAMMA or higher . In order to get the appropriate system support, one of the options -.Em PCVT_386BSD , .Em PCVT_NETBSD , or .Em PCVT_FREEBSD @@ -761,7 +758,7 @@ structure as argument: struct pcvtinfo { u_int opsys; /* PCVT_xxx(x)BSD */ #define CONF_UNKNOWNOPSYS 0 -#define CONF_386BSD 1 +#define CONF_386BSD 1 /* unsupported !!! */ #define CONF_NETBSD 2 #define CONF_FREEBSD 3 u_int opsysrel; /* Release for NetBSD/FreeBSD */ @@ -833,7 +830,8 @@ The .Nm pcvt 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 -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 .Bl -tag -width 30n -offset indent .It Written by : diff --git a/usr.sbin/pcvt/Misc/Doc/ChangeLog b/usr.sbin/pcvt/Misc/Doc/ChangeLog index 629088e..2e8547e 100644 --- a/usr.sbin/pcvt/Misc/Doc/ChangeLog +++ b/usr.sbin/pcvt/Misc/Doc/ChangeLog @@ -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 using it anymore diff --git a/usr.sbin/pcvt/Misc/Doc/Makefile b/usr.sbin/pcvt/Misc/Doc/Makefile index 537515e..649291b 100644 --- a/usr.sbin/pcvt/Misc/Doc/Makefile +++ b/usr.sbin/pcvt/Misc/Doc/Makefile @@ -1,4 +1,4 @@ -# 386BSD and NetBSD +# NetBSD #MAN4= pcvt.0 #MLINKS= pcvt.0 ../pcvt.0 diff --git a/usr.sbin/pcvt/Misc/Doc/NotesAndHints b/usr.sbin/pcvt/Misc/Doc/NotesAndHints index cbe4478..725831a 100644 --- a/usr.sbin/pcvt/Misc/Doc/NotesAndHints +++ b/usr.sbin/pcvt/Misc/Doc/NotesAndHints @@ -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 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 =============================================================================== diff --git a/usr.sbin/pcvt/Misc/Doc/ToDo b/usr.sbin/pcvt/Misc/Doc/ToDo new file mode 100644 index 0000000..463e005 --- /dev/null +++ b/usr.sbin/pcvt/Misc/Doc/ToDo @@ -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 diff --git a/usr.sbin/pcvt/Misc/Etc/Termcap b/usr.sbin/pcvt/Misc/Etc/Termcap index 5826f7e..a4eb030 100644 --- a/usr.sbin/pcvt/Misc/Etc/Termcap +++ b/usr.sbin/pcvt/Misc/Etc/Termcap @@ -2,7 +2,7 @@ # # 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 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 # 50 lines entries # 80 columns @@ -52,7 +52,7 @@ pcvt50|dec vt220 with 50 lines:\ :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 # 50 lines entries # 132 columns @@ -94,7 +94,7 @@ pcvt50w|dec vt220 with 50 lines and 132 cols:\ :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 # 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. @@ -144,7 +144,7 @@ pcvt47h|dec vt220 with HP-fkey labels and 47 lines:\ :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 # 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. diff --git a/usr.sbin/pcvt/Misc/README.FIRST b/usr.sbin/pcvt/Misc/README.FIRST index bf6625f..7194a72 100644 --- a/usr.sbin/pcvt/Misc/README.FIRST +++ b/usr.sbin/pcvt/Misc/README.FIRST @@ -6,10 +6,10 @@ | NetBSD 0.9, 1.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 | @@ -176,16 +176,16 @@ Tested Operating Systems 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) 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) diff --git a/usr.sbin/pcvt/cursor/cursor.c b/usr.sbin/pcvt/cursor/cursor.c index 683e607..58fb5c7 100644 --- a/usr.sbin/pcvt/cursor/cursor.c +++ b/usr.sbin/pcvt/cursor/cursor.c @@ -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. * @@ -32,7 +34,7 @@ */ 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]"; /*---------------------------------------------------------------------------* * diff --git a/usr.sbin/pcvt/fontedit/fontedit.c b/usr.sbin/pcvt/fontedit/fontedit.c index 479ba74..36a3232 100644 --- a/usr.sbin/pcvt/fontedit/fontedit.c +++ b/usr.sbin/pcvt/fontedit/fontedit.c @@ -30,10 +30,10 @@ void clear_screen(); #ifdef BSD #include <sys/ioctl.h> #endif BSD -#if defined (__386BSD__) || defined (__NetBSD__) || defined (__FreeBSD__) +#if defined (__NetBSD__) || defined (__FreeBSD__) #include <sys/termios.h> #include <sys/ioctl.h> -#endif /* __386BSD__ || __NetBSD__ || __FreeBSD__ */ +#endif /* __NetBSD__ || __FreeBSD__ */ #include <signal.h> #ifdef CURFIX @@ -107,9 +107,9 @@ struct termio old_stty, new_stty; #ifdef BSD struct sgttyb old_stty, new_stty; #endif BSD -#if defined (__386BSD__) || defined (__NetBSD__) || defined (__FreeBSD__) +#if defined (__NetBSD__) || defined (__FreeBSD__) struct termios old_stty, new_stty; -#endif /* __386BSD__ || __NetBSD__ || __FreeBSD__ */ +#endif /* __NetBSD__ || __FreeBSD__ */ FILE * font_file = (FILE *)0; @@ -130,9 +130,9 @@ interrupt() #ifdef BSD ioctl( 0, TIOCSETP, &old_stty ); #endif BSD -#if defined (__386BSD__) || defined (__NetBSD__) || defined (__FreeBSD__) +#if defined (__NetBSD__) || defined (__FreeBSD__) ioctl( 0, TIOCSETA, &old_stty ); -#endif /* __386BSD__ || __NetBSD__ || __FreeBSD__ */ +#endif /* __NetBSD__ || __FreeBSD__ */ clear_screen(); exit( 0 ); } @@ -187,9 +187,9 @@ char *argv[]; #ifdef BSD ioctl( 0, TIOCGETP, &old_stty ); #endif BSD -#if defined (__386BSD__) || defined (__NetBSD__) || defined (__FreeBSD__) +#if defined (__NetBSD__) || defined (__FreeBSD__) ioctl( 0, TIOCGETA, &old_stty ); -#endif /* __386BSD__ || __NetBSD__ || __FreeBSD__ */ +#endif /* __NetBSD__ || __FreeBSD__ */ signal( SIGINT, (void *) interrupt ); new_stty = old_stty; #ifdef SYSV @@ -197,12 +197,12 @@ char *argv[]; new_stty.c_cc[VMIN] = 1; ioctl( 0, TCSETA, &new_stty ); #endif SYSV -#if defined (__386BSD__) || defined (__NetBSD__) || defined (__FreeBSD__) +#if defined (__NetBSD__) || defined (__FreeBSD__) new_stty.c_lflag &= ~ICANON; new_stty.c_lflag &= ~ECHO; new_stty.c_cc[VMIN] = 1; ioctl( 0, TIOCSETA, &new_stty ); -#endif /* __386BSD__ || __NetBSD__ || __FreeBSD__ */ +#endif /* __NetBSD__ || __FreeBSD__ */ #ifdef BSD new_stty.sg_flags |= CBREAK; new_stty.sg_flags &= ~ECHO; @@ -218,9 +218,9 @@ char *argv[]; #ifdef BSD ioctl( 0, TIOCSETP, &old_stty ); #endif BSD -#if defined (__386BSD__) || defined (__NetBSD__) || defined (__FreeBSD__) +#if defined (__NetBSD__) || defined (__FreeBSD__) ioctl( 0, TIOCSETA, &old_stty ); -#endif /* __386BSD__ || __NetBSD__ || __FreeBSD__ */ +#endif /* __NetBSD__ || __FreeBSD__ */ clear_screen(); /* Overwrite the old file. */ diff --git a/usr.sbin/pcvt/ispcvt/ispcvt.8 b/usr.sbin/pcvt/ispcvt/ispcvt.8 index 35cdda4..9751aff 100644 --- a/usr.sbin/pcvt/ispcvt/ispcvt.8 +++ b/usr.sbin/pcvt/ispcvt/ispcvt.8 @@ -1,4 +1,4 @@ -.\" Copyright (c) 1992,1993,1994 Hellmuth Michaelis +.\" Copyright (c) 1992, 1995 Hellmuth Michaelis .\" .\" All rights reserved. .\" @@ -27,17 +27,18 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" 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 .Sh NAME .Nm ispcvt .Nd verify if current video driver is pcvt driver .Sh SYNOPSIS .Nm ispcvt -.Op Fl v .Op Fl c +.Op Fl d Ar device +.Op Fl v .Sh DESCRIPTION The .Nm ispcvt @@ -53,6 +54,8 @@ compiled with. .Pp The options are as follows: .Bl -tag -width Ds +.It Fl d +Specifies a device for which the check is done. .It Fl v Specifies being verbose. On success the name and revision is reported, on failure which comparison failed. @@ -71,7 +74,7 @@ option gives a verbose listing of the compile-time options. .It Sy 0 driver is pcvt and major and minor numbers match .It Sy 1 -ioctl system call failed +open or ioctl system call failed .It Sy 2 driver name mismatch .It Sy 3 diff --git a/usr.sbin/pcvt/ispcvt/ispcvt.c b/usr.sbin/pcvt/ispcvt/ispcvt.c index 26c5e7e..fe6a1a9 100644 --- a/usr.sbin/pcvt/ispcvt/ispcvt.c +++ b/usr.sbin/pcvt/ispcvt/ispcvt.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1992,1993,1994 Hellmuth Michaelis + * Copyright (c) 1992, 1995 Hellmuth Michaelis * * All rights reserved. * @@ -17,10 +17,10 @@ * 4. The name authors may not be used to endorse or promote products * 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 * 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 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY @@ -31,7 +31,7 @@ */ 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.20 * -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 <fcntl.h> #include <machine/pcvt_ioctl.h> +#define DEFAULTFD 0 + main(argc,argv) int argc; char *argv[]; @@ -65,8 +72,11 @@ char *argv[]; char *p; int verbose = 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) { @@ -78,6 +88,11 @@ char *argv[]; config = 1; break; + case 'd': + device = optarg; + dflag = 1; + break; + case '?': default: 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) perror("ispcvt - ioctl VGAPCVTID failed, error"); @@ -125,22 +159,17 @@ char *argv[]; if(config == 0) exit(0); - if(ioctl(0, VGAPCVTINFO, &pcvtinfo) == -1) + if(ioctl(fd, VGAPCVTINFO, &pcvtinfo) == -1) { if(verbose) perror("ispcvt - ioctl VGAPCVTINFO failed, error"); exit(1); } - if(verbose) { switch(pcvtinfo.opsys) { - case CONF_386BSD: - p = "PCVT_386BSD"; - break; - case CONF_NETBSD: p = "PCVT_NETBSD"; break; @@ -166,83 +195,85 @@ char *argv[]; /* config booleans */ - fprintf(stderr,"PCVT_VT220KEYB = %s\t\t", - ((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", + fprintf(stderr,"PCVT_132GENERIC = %s", + (pcvtinfo.compile_opts & CONF_132GENERIC) ? "ON" : "OFF"); + next(); + fprintf(stderr,"PCVT_24LINESDEF = %s", (pcvtinfo.compile_opts & CONF_24LINESDEF) ? "ON" : "OFF"); - - fprintf(stderr,"PCVT_EMU_MOUSE = %s\t\t", + next(); + fprintf(stderr,"PCVT_BACKUP_FONTS = %s", + (pcvtinfo.compile_opts & CONF_BACKUP_FONTS) ? "ON" : "OFF"); + next(); + fprintf(stderr,"PCVT_CTRL_ALT_DEL = %s", + (pcvtinfo.compile_opts & CONF_CTRL_ALT_DEL) ? "ON" : "OFF"); + next(); + fprintf(stderr,"PCVT_EMU_MOUSE = %s", (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", + next(); + fprintf(stderr,"PCVT_INHIBIT_NUMLOCK = %s", + (pcvtinfo.compile_opts & CONF_INHIBIT_NUMLOCK) ? "ON" : "OFF"); + next(); + fprintf(stderr,"PCVT_KEYBDID = %s", (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", + next(); + fprintf(stderr,"PCVT_KBD_FIFO = %s", + (pcvtinfo.compile_opts & CONF_KBD_FIFO) ? "ON" : "OFF"); + next(); + 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"); + next(); + fprintf(stderr,"PCVT_NULLCHARS = %s", (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"); - - fprintf(stderr,"PCVT_PALFLICKER = %s\t\t", + next(); + fprintf(stderr,"PCVT_PALFLICKER = %s", (pcvtinfo.compile_opts & CONF_PALFLICKER) ? "ON" : "OFF"); - - fprintf(stderr,"PCVT_WAITRETRACE = %s\n", + 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"); - - fprintf(stderr,"PCVT_XSERVER = %s\t\t", + next(); + fprintf(stderr,"XSERVER = %s", (pcvtinfo.compile_opts & CONF_XSERVER) ? "ON" : "OFF"); - - fprintf(stderr,"PCVT_USL_VT_COMPAT = %s\n", - (pcvtinfo.compile_opts & CONF_USL_VT_COMPAT) ? "ON" : "OFF"); - - fprintf(stderr,"PCVT_INHIBIT_NUMLOCK = %s\t\t", - (pcvtinfo.compile_opts & CONF_INHIBIT_NUMLOCK) ? "ON" : "OFF"); - - fprintf(stderr,"PCVT_META_ESC = %s\n", - (pcvtinfo.compile_opts & CONF_META_ESC) ? "ON" : "OFF"); - - fprintf(stderr,"PCVT_NOFASTSCROLL = %s\t\t", - (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"); - - fprintf(stderr,"PCVT_NO_LED_UPDATE = %s\n\n", - (pcvtinfo.compile_opts & CONF_NO_LED_UPDATE) ? "ON" : "OFF"); + fprintf(stderr,"\n\n"); } else /* !verbose */ { @@ -258,9 +289,20 @@ char *argv[]; usage() { fprintf(stderr,"\nispcvt - verify current video driver is the pcvt-driver\n"); - fprintf(stderr,"usage: ispcvt [-v] [-c]\n"); - fprintf(stderr," -v be verbose\n"); - fprintf(stderr," -c print compile time configuration\n\n"); + fprintf(stderr," usage: ispcvt [-v] [-c] [-d device]\n"); + fprintf(stderr,"options: -v be verbose\n"); + fprintf(stderr," -c print compile time configuration\n"); + fprintf(stderr," -d <name> use devicefile <name> for verification\n\n"); exit(5); } +next() +{ + static int i = 0; + + fprintf(stderr, "%s", (i == 0) ? "\t\t" : "\n"); + + i = ~i; +} + +/* EOF */ diff --git a/usr.sbin/pcvt/loadfont/loadfont.1 b/usr.sbin/pcvt/loadfont/loadfont.1 index f799574..1ae339b 100644 --- a/usr.sbin/pcvt/loadfont/loadfont.1 +++ b/usr.sbin/pcvt/loadfont/loadfont.1 @@ -1,4 +1,4 @@ -.\" Copyright (c) 1992,1993,1994 Hellmuth Michaelis +.\" Copyright (c) 1992, 1995 Hellmuth Michaelis .\" .\" All rights reserved. .\" @@ -27,9 +27,9 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" 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 .Sh NAME .Nm loadfont @@ -38,6 +38,7 @@ driver. .Sh SYNOPSIS .Nm loadfont .Op Fl c Ar charsetno +.Op Fl d Ar devicefile .Op Fl f Ar fontfilename .Op Fl i .Sh DESCRIPTION @@ -51,6 +52,8 @@ The options are as follows: .It Fl c Specifies the slot, the font is to load into. EGA boards have four slots and VGA boards have eight slots available for downloading fonts. +.It Fl d +Specifies the devicefile to use. .It Fl f Specifies the file which contains the font to be downloaded. .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 do not have downloadable charactersets available. .Sh FILES -Unless otherwise specified in the Makefile, the following fontfiles are -available for the pcvt 2.0 distribution: +The following fontfiles are available in the pcvt distribution: .nf /usr/share/misc/vgafonts/vt220l.808: 8x8 IBM II font diff --git a/usr.sbin/pcvt/loadfont/loadfont.c b/usr.sbin/pcvt/loadfont/loadfont.c index 0dfb054..db25185 100644 --- a/usr.sbin/pcvt/loadfont/loadfont.c +++ b/usr.sbin/pcvt/loadfont/loadfont.c @@ -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. * @@ -32,7 +34,7 @@ */ 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 new pcvt_ioctl.h SIZ_xxROWS + * -hm add -d option * *---------------------------------------------------------------------------*/ #include <stdio.h> +#include <fcntl.h> #include <sys/types.h> #include <sys/stat.h> #include <machine/pcvt_ioctl.h> @@ -51,25 +55,25 @@ static char *id = #define FONT8X8 2048 /* filesize for 8x8 font */ #define HEIGHT8X8 8 /* 8 scan lines char cell height */ #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 HEIGHT8X10 10 /* 10 scan lines char cell height */ #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 HEIGHT8X14 14 /* 14 scan lines char cell height */ #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 HEIGHT8X16 16 /* 16 scan lines char cell height */ #define SSCAN8X16 143 /* 400 scan lines on screen - 256 - 1 */ -#define SROWS8X16 25 /* 25 character lines on screen */ struct screeninfo screeninfo; +#define DEFAULTFD 0 +int fd; + + main(argc,argv) int argc; char *argv[]; @@ -90,8 +94,10 @@ char *argv[]; char *filename; int fflag = -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) { @@ -99,6 +105,11 @@ char *argv[]; chr_set = atoi(optarg); break; + case 'd': + device = optarg; + dflag = 1; + break; + case 'f': filename = optarg; fflag = 1; @@ -118,11 +129,27 @@ char *argv[]; if(chr_set == -1 || fflag == -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) { int i; - if(ioctl(0, VGAGETSCREEN, &screeninfo) == -1) + if(ioctl(fd, VGAGETSCREEN, &screeninfo) == -1) { perror("ioctl VGAGETSCREEN failed"); exit(1); @@ -234,7 +261,7 @@ int charset, fontloaded, charscan, scrscan, scrrow; vfattr.screen_scanlines = scrscan; vfattr.screen_size = scrrow; - if(ioctl(1, VGASETFONTATTR, &vfattr) == -1) + if(ioctl(fd, VGASETFONTATTR, &vfattr) == -1) { perror("loadfont - ioctl VGASETFONTATTR failed, error"); exit(1); @@ -260,7 +287,7 @@ unsigned char *font_table; vlc.char_table[j] = font_table[j]; } font_table += charscanlines; - if(ioctl(1, VGALOADCHAR, &vlc) == -1) + if(ioctl(fd, VGALOADCHAR, &vlc) == -1) { perror("loadfont - ioctl VGALOADCHAR failed, error"); exit(1); @@ -276,7 +303,7 @@ int charset; vfattr.character_set = charset; - if(ioctl(1, VGAGETFONTATTR, &vfattr) == -1) + if(ioctl(fd, VGAGETFONTATTR, &vfattr) == -1) { perror("loadfont - ioctl VGAGETFONTATTR failed, error"); exit(1); @@ -309,8 +336,9 @@ printheader() usage() { 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," -d <dev> specify device\n"); fprintf(stderr," -f <name> filename containing binary font data\n"); fprintf(stderr," -i print status and types of loaded fonts (default)\n"); exit(1); |