Return to BSD News archive
Received: by minnie.vk1xwt.ampr.org with NNTP id AA6779 ; Fri, 15 Jan 93 10:32:03 EST Xref: sserve comp.unix.bsd:9961 alt.sources:4985 Path: sserve!manuel.anu.edu.au!munnari.oz.au!spool.mu.edu!umn.edu!lynx.unm.edu!fmsrl7!destroyer!gumby!yale!yale.edu!ira.uka.de!Germany.EU.net!hcshh!hm From: hm@hcshh.hcs.de (Hellmuth Michaelis) Newsgroups: comp.unix.bsd,alt.sources Subject: [386BSD] pcvt 2.00 - VT220 console driver (part 02/11) Summary: 386BSD 0.1 VT220 console device driver source code Keywords: 386BSD console driver VT220 Message-ID: <1618@hcshh.hcs.de> Date: 15 Jan 93 13:02:02 GMT Followup-To: comp.unix.bsd Organization: HCS GmbH, Hamburg, Europe Lines: 2230 Submitted-by: hm@hcshh.hcs.de (Hellmuth Michaelis) Archive-name: pcvt-2.00/part02 ---- Cut Here and unpack ---- #!/bin/sh # This is part 02 of pcvt-2.00 if touch 2>&1 | fgrep '[-amc]' > /dev/null then TOUCH=touch else TOUCH=true fi # ============= README.FIRST ============== if test X"$1" != X"-c" -a -f 'README.FIRST'; then echo "File already exists: skipping 'README.FIRST'" else echo "x - extracting README.FIRST (Text)" sed 's/^X//' << 'SHAR_EOF' > README.FIRST && X================================================================================ X# # X# P C V T - VT220 Terminal Emulation Driver for 386BSD 0.1 # X# ---------------------------------------------------------- # X# # X# Release 2.00 January 1993 # X# # X================================================================================ X XWritten by: Hellmuth Michaelis (hm@hcshh.hcs.de) X XWith much help from: Brian Dunford-Shore (brian@morpheus.wustl.edu) X XThanks for beta-testing, Xbugfixes and code from: Joerg Wunsch (joerg_wunsch@uriah.sax.de) X Scott Turner (scotty@gagetalker.com) X Peter Galbavy (peter.galbavy@micromuse.co.uk) X Michael Havemester (tik@abqhh.hanse.de) X X XHISTORY X-------------------------------------------------------------------------------- X XRelease Changes/Features X------- ---------------------------------------------------------------- X1.00 Released as "pccons_vga" to alt.sources, VT100 emulation X2.00 VT220 emulation, many bugfixes and enhancements X X XFEATURES X-------------------------------------------------------------------------------- X X - Almost full dec VT220 functionality (moving towards VT320) X - 4 completely independent virtual terminals for CGA's/EGA's/VGA's X - 25, 28, 35, 40, 43 or 50x80 screen resolution for each virtual screen X - Fully remappable keyboard to support national keyboards X - All VT220 character sets plus iso latin-1 and dec technical supported X - VT220 downloadable character set supported when run on EGA/VGA X - VT220 user defined keys for each virtual terminal X - Optional function key label support a 'la Hewlett-Packard X - Display function codes functionality X - Support for MDA, CGA, EGA and VGA display adaptors X - Optional screen-saving feature X XWhat it cannot: X X - It doesn't even know what X11 is X - No 132 columns support (yet) X - No double wide/high characters X - No softscroll X - No inverse background X - No VT220 printer output support X - No VT52/VT100 support at all X - No 8-bit controls X - Only limited AT-keyboard (84 keys) support (yet) X - Help you to make money .... X X XINSTALLATION X-------------------------------------------------------------------------------- X XPlease follow the instructions from file "Doc/INSTALLATION" X X XWYSIWYG - WHAT YOU SHARE IS WHAT YOU GET X-------------------------------------------------------------------------------- X XWhile beta-testing this driver, i learned that there are no two video boards Xwhich are compatible. Same applies to the keyboard interface on motherboards. X XWe got this driver to compile and run on the majority of the tested machines, Xbut not on all. The configurations failing to run this driver were not very Xexotic, but because i don't own all sorts of hardware, in many cases i could Xonly guess .... X XPLEASE, if you fix bugs, add features, hack this driver to work on your Xhardware or simply don't get it up and running, get in contact with me! X X Help us to avoid reinventing the wheel over and over again! X ----------------------------------------------------------- X XThe code is far from being perfect, YOU are very welcome to enhance it ! X XPlease mail bug reports/fixes, suggestions, enhancements & diffs to X X hm@hcshh.hcs.de X XSame applies to national keyboard mappings - send them in !!!! X XI will support this driver as my time permits it, feel free to contact me! X XThank You! X X XFILES AND DIRECTORIES X-------------------------------------------------------------------------------- X XDoc Driver installation and documentation, see below XREADME This file XSupport Additional utilities and support, see below Xpcvt_drv.c Driver, os-interface Xpcvt_hdr.h Driver, global include file Xpcvt_ioctl.h Ioctl's available for the driver Xpcvt_kbd.c Driver, keyboard handling Xpcvt_out.c Driver, video board handling Xpcvt_sup.c Driver, support code for ega's/vga's Xpcvt_tbl.h Driver, character set to vga charset mapping tables X X XFILES AND DIRECTORIES - Doc X-------------------------------------------------------------------------------- X XAcknowledgements Everyone and everything who/what helped XBibliography Books and documentation XCharsets VT220 and mda/cga/hcs/ega/vga charactersets XEscapeSequences List of supported control codes & escape sequences XINSTALLATION How to install all this onto your system XKeyboard.HP Special keys and emulated VT220 keys, one style XKeyboard.VT Special keys and emulated VT220 keys, other style XMAKEDEV.pcvt A shell script to mknod the device files XMakefile Makefile for man page file pcvt.4 XTermcap A complete (?) termcap entry for the emulator Xpcvt.4 Manual page for the driver and ioctl's X X XFILES AND DIRECTORIES - Support X-------------------------------------------------------------------------------- X Xdirectory description X--------- --------------------------------------------------------------- X Xloadfont Program to download charactersets into EGA/VGA character X generator memory. X Xcursor Very simple program to set the cursor shape. X Xscon Program to control various aspects of terminal emulation, X such as: emulation mode, screen switching etc. X Xkcon Program to control various aspects of the keyboard such as X key remapping for national keyboards etc. X Xkeycap A library for accessing the keycap database X Xfontedit A program to edit VT220 downloadable character sets. X Xuserkeys A program to edit the VT220 programmable function keys. X Xfonts Contains uuencoded binary fontfiles following the naming rule: X X vt220<X>.<YYY>.uu X X <X> can be 'l' or 'h', where 'l' stands for a standard X IBM II charset and is to be loaded first for the X base characterset to support a desired resolution, X and 'h' is the extended characterset needed for proper X VT220 emulation and is to be loaded as the second set X in addition to the above mentioned base characterset. X X <YYY> is the identifier for the character cell size, currently X we have: X 808 = 8x8 - 50 lines on VGA, 43 lines on EGA X 810 = 8x10 - 40 lines on VGA X 814 = 8x14 - 28 lines on VGA, 25 lines on EGA X 816 = 8x16 - 25 lines on VGA X X Files distributed: X X vt220l.808.uu, vt220h.808.uu X vt220l.810.uu, vt220h.810.uu X vt220l.814.uu, vt220h.814.uu X vt220l.816.uu, vt220h.816.uu X X The next two are just for reference, or to design new fonts but X of no real other use: X X vt100pc.814.uu - Uudecoded binary fontfile containing an X 8x14 font with special display functions at 0x00..0x1f X X vt100sg.814.uu - Uudecoded binary fontfile containing an X 8x14 font with special display functions at 0x00..0x1f, X a special graphics char set at 0x1f..0x7f and X a supplemental graphics char set at 0x80..0xff X Xvttest A VT100 compatibility tester. This is a test tool for X VT100 emulation writers and terminal buyers. X Xuemacs An example how to use the function key labels. X It was written for MicroEmacs version 3.11a and X consists of: X - dot-emacsrc, to be moved to /usr/local/.emacsrc, X startup file for micro emacs, contains setup of X the function key labels X - emacs.hlp, interactive uemacs help system X - unix.c-3.11a the source for the terminal handling X Xdemo chardemo.vt and colors.vt X These two files are from the MSDOS-Kermit distribution X from the Columbia University. They can be "cat"-ed to X the terminal screen and do display all supported VT220 X charactersets and all possible colors respectively. X X XKNOWN BUGS X------------------------------------------------------------------------------- X XThe way 8 bit handling is implemented is a hack - see: pcread() X XFew VT220 functions have not been implemented, mainly because it makes no Xsense to implement them (such as media copy) in this context. X X XTODO X------------------------------------------------------------------------------- X XThe HP-Escape sequences need to be FULLY implemented X XA new keyboard driver is underway - it will be a complete rewrite ..... X XIt's big - let it compile via #ifdefs as a minimal vt220 one-screen driver X XMake it X - aware X X XTESTED VIDEO BOARDS X-------------------------------------------------------------------------------- X XManufacturer Chipset Monitor X------------------------------ ---------------------- ------------------------ X2theMax (?) ET4000 VGA Color XVideo7 Inc. Video 7 VGA Color XDiamond Stealth VRAM S3 NEC 3FGx XTrident TVGA 8800CS NEC 3D XData General C&T P82C604 VGA Color XNoName Hercules W86855AF Mono XKyocera (Mainboard) WD90C11 Sony Color X X XTESTED KEYBOARDS X-------------------------------------------------------------------------------- X XManufacturer Type Layout X------------------------------ ---------------------- ------------------------ XCherry MF II US XCherry/Tandon MF II German XHewlett-Packard MF II US XHewlett-Packard MF II German XTatung AT German X XThere is absolutely NO support for the ancient PC-keyboards (they had 83 keys). X XThere is only limited support for AT-keyboards (they have 84 keys, and a Xseparate numeric keypad, they don't have F9-F12 keys) because the emulator Xneeds F9-F12 for control functions, and due to the current design of the Xkeyboard driver there is no (full) support for national keyboards because Xof the lack of a ALTGR key. X XMF-keyboards are fully supported, 101- and 102-key versions. X X X X XGood Luck and Have Fun ! X XHellmuth X Xe-mail: hm@hcshh.hcs.de (...mcsun!unido!hcshh!hm) Xs-mail: c/o HCS GmbH, Oldesloer Str 97-99, 2000 Hamburg 61, Germany Xtel: +49/40/55903-0 or +49/40/55903-170 (business) Xfax: +49/40/5591486 (business) Xtel: +49/40/384298 (private) X SHAR_EOF $TOUCH -am 0114193793 README.FIRST && chmod 0660 README.FIRST || echo "restore of README.FIRST failed" set `wc -c README.FIRST`;Wc_c=$1 if test "$Wc_c" != "10000"; then echo original size 10000, current size $Wc_c fi fi # ============= Support/Makefile ============== if test ! -d 'Support'; then echo "x - creating directory Support" mkdir 'Support' fi if test X"$1" != X"-c" -a -f 'Support/Makefile'; then echo "File already exists: skipping 'Support/Makefile'" else echo "x - extracting Support/Makefile (Text)" sed 's/^X//' << 'SHAR_EOF' > Support/Makefile && XSUBDIR= keycap cursor fontedit fonts kcon loadfont scon userkeys vttest demo X X.include <bsd.prog.mk> SHAR_EOF $TOUCH -am 0115115593 Support/Makefile && chmod 0660 Support/Makefile || echo "restore of Support/Makefile failed" set `wc -c Support/Makefile`;Wc_c=$1 if test "$Wc_c" != "101"; then echo original size 101, current size $Wc_c fi fi # ============= Support/fontedit/Makefile ============== if test ! -d 'Support/fontedit'; then echo "x - creating directory Support/fontedit" mkdir 'Support/fontedit' fi if test X"$1" != X"-c" -a -f 'Support/fontedit/Makefile'; then echo "File already exists: skipping 'Support/fontedit/Makefile'" else echo "x - extracting Support/fontedit/Makefile (Text)" sed 's/^X//' << 'SHAR_EOF' > Support/fontedit/Makefile && XPROG= fontedit XCLEANFILES+= core.fontedit X X X.include <bsd.prog.mk> X X X X X SHAR_EOF $TOUCH -am 0113141193 Support/fontedit/Makefile && chmod 0660 Support/fontedit/Makefile || echo "restore of Support/fontedit/Makefile failed" set `wc -c Support/fontedit/Makefile`;Wc_c=$1 if test "$Wc_c" != "72"; then echo original size 72, current size $Wc_c fi fi # ============= Support/fontedit/README ============== if test X"$1" != X"-c" -a -f 'Support/fontedit/README'; then echo "File already exists: skipping 'Support/fontedit/README'" else echo "x - extracting Support/fontedit/README (Text)" sed 's/^X//' << 'SHAR_EOF' > Support/fontedit/README && XWhen I first saw this posted to rn, I tried to compile this on a machine Xrunning BSD UNIX. Much to my dissapointment, It said "unable to find X/usr/include/termio.h" and thus it sat for a couple months. I was able to Xcompile it on a 3b5, but I didn't have a vt220 hooked up to it. I was doing Xsome unrelated work with ioctl calls and finally realized that it would not be Xtoo hard to convert it from System V to BSD. It also looked kind of strange Xwith the cursor on, so I turned this off. To implement this, compile with Xthe "-DCURFIX" flag in the Makefile. XI am working on a new version that uses curses and that would enable you to Xchange the file that your are working on without leaving the program. XI thought I'd post it as it is now, since it has a lot of uses right away. XImagine changing your favorite game to have objects that look like what they Xare instead of the regular characters. Also, I think people should post their Xown character sets, if they come up with some neat stuff. X Please send any comments or suggestions to: X X UUCP : ..!harvard!bu-cs!bucsb!eap X ARPANET: eap@bucsb.bu.edu X CSNET : eap%bucsb@bu-cs X X Have fun, X X - Eric Pearce X Boston University X X X X X X X X X X X X SHAR_EOF $TOUCH -am 0112125693 Support/fontedit/README && chmod 0640 Support/fontedit/README || echo "restore of Support/fontedit/README failed" set `wc -c Support/fontedit/README`;Wc_c=$1 if test "$Wc_c" != "1482"; then echo original size 1482, current size $Wc_c fi fi # ============= Support/fontedit/fontedit.1 ============== if test X"$1" != X"-c" -a -f 'Support/fontedit/fontedit.1'; then echo "File already exists: skipping 'Support/fontedit/fontedit.1'" else echo "x - extracting Support/fontedit/fontedit.1 (Text)" sed 's/^X//' << 'SHAR_EOF' > Support/fontedit/fontedit.1 && X.TH FONTEDIT 1 LOCAL X.SH NAME Xfontedit \- Edit fonts. X.SH SYNOPSIS X.B fontedit file X.SH DESCRIPTION X.I Fontedit Xis used to edit the down line reloadable character set (DRCS) of a VT220 Xterminal. The editor has two display areas, one for displaying the Xentry currently being manipulated, and one for displaying the complete XDRCS. Commands to the editor take the form of function keys. X.PP X.I Fontedit Xtakes one command line parameter, a file name. This file is Xused to save the character set. If the file exists when \fIfontedit\fP Xis invoked, it is read in to initialize the DRCS. The file is written Xto when \fIfontedit\fP exits. X.PP XCommands to fontedit take the form of function keys. The current Xdefinitions are: X.IP \fBHELP\fP XDisplay a help screen. X.IP \fBF6\fP XTurn the pixel under the cursor on. X.IP \fBF7\fP XTurn the pixel under the cursor off. X.IP \fBF13\fP XClear the display area. X.IP \fBFind\fP XSave the current font in the font table. Update the DRCS display. X.IP \fBSelect\fP XExtract the entry selected by the cursor in the DRCS display. X.IP \fBPrev\fP XMove the cursor to the previous entry in the DRCS display. X.IP \fBNext\fP XMove the cursor to the next entry in the DRCS display. X.IP \fBInsert\fP XInsert a blank line at the current cursor position. The bottom row is lost. X.IP \fBRemove\fP XRemove the row at the current cursor position. All rows below the Xcurrent one are shifted up. X.IP \fBCursors\fP XMove the cursor in the main display area. X.PP XIf the screen gets garbled, press <control-L>. X.PP XTo exit \fIfontedit\fP, press <control-D>. The DRCS will be saved in X\fIfile\fP. To exit without saving the DRCS, hit interrupt (usually XDEL). X.SH DIAGNOSTICS X.I Fontedit Xwill issue a warning when the entry being worked on is not saved, and Xsome potentially destructive command, like \fBSelect\fP is used. To Xoverride the warning message, immediately reissue the command. X.SH AUTHOR XGreg Franks. X X SHAR_EOF $TOUCH -am 0112125693 Support/fontedit/fontedit.1 && chmod 0640 Support/fontedit/fontedit.1 || echo "restore of Support/fontedit/fontedit.1 failed" set `wc -c Support/fontedit/fontedit.1`;Wc_c=$1 if test "$Wc_c" != "1927"; then echo original size 1927, current size $Wc_c fi fi # ============= Support/fontedit/fontedit.c ============== if test X"$1" != X"-c" -a -f 'Support/fontedit/fontedit.c'; then echo "File already exists: skipping 'Support/fontedit/fontedit.c'" else echo "x - extracting Support/fontedit/fontedit.c (Text)" sed 's/^X//' << 'SHAR_EOF' > Support/fontedit/fontedit.c && X/* X * fontedit X * Fonteditor for VT220 X * X * BUGS: X * o Cursor motion is less than optimal (but who cares at 9600), X * X * COMPILE: X * cc -O fontedit.c -o fontedit X * (use Makefile) X * X * Copyright (c) 1987 by Greg Franks. X * X * Permission is granted to do anything you want with this program X * except claim that you wrote it. X * X * X * REVISION HISTORY: X * X * Nov 21, 1987 - Fixed man page to say "Fontedit" instead of "Top" X * Nov 22, 1987 - Added BSD Compatible ioctl, turned cursor on/off X * - eap@bucsf.bu.edu X */ X Xvoid clear_screen(); X#include <stdio.h> X#ifdef SYSV X#include <sys/termio.h> X#endif SYSV X#ifdef BSD X#include <sys/ioctl.h> X#endif BSD X#ifdef __386BSD__ X#include <sys/termios.h> X#include <sys/ioctl.h> X#endif __386BSD__ X#include <signal.h> X X#ifdef CURFIX X#define CURSORON "\033[?25h" X#define CURSOROFF "\033[?25l" X#endif CURFIX X X#define MAX_ROWS 10 X#define MAX_COLS 8 X Xtypedef enum { false, true } bool; X X#define KEY_FIND 0x0100 X#define KEY_INSERT 0x0101 X#define KEY_REMOVE 0x0102 X#define KEY_SELECT 0x0103 X#define KEY_PREV 0x0104 X#define KEY_NEXT 0x0105 X#define KEY_F6 0X0106 X#define KEY_F7 0x0107 X#define KEY_F8 0x0108 X#define KEY_F9 0x0109 X#define KEY_F10 0x010a X#define KEY_F11 0x010b X#define KEY_F12 0x010c X#define KEY_F13 0x010d X#define KEY_F14 0x010e X#define KEY_HELP 0x010f X#define KEY_DO 0x0110 X#define KEY_F17 0x0111 X#define KEY_F18 0x0112 X#define KEY_F19 0x0113 X#define KEY_F20 0x0114 X#define KEY_UP 0x0115 X#define KEY_DOWN 0x0116 X#define KEY_RIGHT 0x0117 X#define KEY_LEFT 0x0118 X X/* X * Position of main drawing screen. X */ X X#define ROW_OFFSET 3 X#define COL_OFFSET 10 X X/* X * Position of the DRCS table. X */ X X#define TABLE_ROW 4 X#define TABLE_COL 50 X X/* X * X */ X X#define ERROR_ROW 20 X#define ERROR_COL 40 X Xbool display_table[MAX_ROWS][MAX_COLS]; X X#define TOTAL_ENTRIES (128 - 32) X#define SIXELS_PER_CHAR 16 X Xchar font_table[TOTAL_ENTRIES][SIXELS_PER_CHAR]; Xunsigned int current_entry; X X#ifdef SYSV Xstruct termio old_stty, new_stty; X#endif SYSV X#ifdef BSD Xstruct sgttyb old_stty, new_stty; X#endif BSD X#ifdef __386BSD__ Xstruct termios old_stty, new_stty; X#endif __386BSD__ XFILE * font_file = (FILE *)0; X X X/* X * Interrupt X * Exit gracefully. X */ X Xinterrupt() X{ X void clear_screen(); X#ifdef CURFIX X printf("%s\n",CURSORON); X#endif CURFIX X#ifdef SYSV X ioctl( 0, TCSETA, &old_stty ); X#endif SYSV X#ifdef BSD X ioctl( 0, TIOCSETP, &old_stty ); X#endif BSD X#ifdef __386BSD__ X ioctl( 0, TIOCSETA, &old_stty ); X#endif __386BSD__ X clear_screen(); X exit( 0 ); X} X X X/* X * Main X * Grab input/output file and call main command processor. X */ X Xmain( argc, argv ) Xint argc; Xchar *argv[]; X{ X void command(), init_restore(), clear_screen(); X void save_table(), get_table(), extract_entry(); X X if ( argc != 2 ) { X fprintf( stderr, "usage: fontedit filename\n" ); X exit( 1 ); X } X X printf( "Press HELP for help\n" ); X printf( "\033P1;1;2{ @\033\\" ); /* Clear font buffer */ X fflush( stdout ); X sleep( 1 ); /* Let terminal catch up */ X /* otherwise we get frogs */ X X if ( ( font_file = fopen( argv[1], "r" ) ) == (FILE *)0 ) { X if ( ( font_file = fopen( argv[1], "w" ) ) == (FILE *)0 ) { X fprintf( stderr, "Cannot create file %s \n", argv[1] ); X exit( 1 ); X } X } X fclose( font_file ); X X if ( ( font_file = fopen( argv[1], "r" ) ) != (FILE *)0 ) { X get_table( font_file ); X fclose( font_file ); X } X X if ( ( font_file = fopen( argv[1], "r+" ) ) == (FILE *)0 ) { X fprintf( stderr, "Cannot open %s for writing\n", argv[1] ); X exit( 1 ); X } X#ifdef CURFIX X printf("%s\n",CURSOROFF); X#endif CURFIX X#ifdef SYSV X ioctl( 0, TCGETA, &old_stty ); X#endif SYSV X#ifdef BSD X ioctl( 0, TIOCGETP, &old_stty ); X#endif BSD X#ifdef __386BSD__ X ioctl( 0, TIOCGETA, &old_stty ); X#endif __386BSD__ X signal( SIGINT, (void *) interrupt ); X new_stty = old_stty; X#ifdef SYSV X new_stty.c_lflag &= ~ICANON; X new_stty.c_cc[VMIN] = 1; X ioctl( 0, TCSETA, &new_stty ); X#endif SYSV X#ifdef __386BSD__ X new_stty.c_lflag &= ~ICANON; X new_stty.c_lflag &= ~ECHO; X new_stty.c_cc[VMIN] = 1; X ioctl( 0, TIOCSETA, &new_stty ); X#endif __386BSD__ X#ifdef BSD X new_stty.sg_flags |= CBREAK; X new_stty.sg_flags &= ~ECHO; X ioctl( 0, TIOCSETP, &new_stty ); X#endif BSD X current_entry = 1; X extract_entry( current_entry ); X init_restore(); X command(); X#ifdef SYSV X ioctl( 0, TCSETA, &old_stty ); X#endif SYSV X#ifdef BSD X ioctl( 0, TIOCSETP, &old_stty ); X#endif BSD X#ifdef __386BSD__ X ioctl( 0, TIOCSETA, &old_stty ); X#endif __386BSD__ X clear_screen(); X X /* Overwrite the old file. */ X X fseek( font_file, 0L, 0 ); X save_table( font_file ); X fclose( font_file ); X#ifdef CURFIX X printf("%s\n",CURSORON); X#endif CURFIX X} X X X X/* X * Command X * Process a function key. X * X * The user cannot fill in slots 0 or 95 (space and del respecitively). X */ X Xvoid Xcommand() X{ X register int c; X register int row, col; X register int i, j; X bool change, error, override; X X void build_entry(), extract_entry(), send_entry(), print_entry(); X void highlight(), draw_current(), init_restore(), help(); X void warning(); X X change = false; X error = false; X override = false; X row = 0; col = 0; X highlight( row, col, true ); X X for ( ;; ) { X c = get_key(); X highlight( row, col, false ); /* turn cursor off */ X X if ( error ) { X move ( ERROR_ROW, ERROR_COL ); X printf( "\033[K" ); /* Clear error message */ X move ( ERROR_ROW+1, ERROR_COL ); X printf( "\033[K" ); /* Clear error message */ X error = false; X } else { X override = false; X } X X switch ( c ) { X X case KEY_FIND: /* update DRCS */ X if ( !change && !override ) { X warning( "No changes to save" ); X override = true; X error = true; X } else { X build_entry( current_entry ); X send_entry( current_entry ); X print_entry( current_entry, true ); X change = false; X } X break; X X case KEY_F6: /* Turn on pixel */ X change = true; X display_table[row][col] = true; X highlight( row, col, false ); X col = ( col + 1 ) % MAX_COLS; X if ( col == 0 ) X row = ( row + 1 ) % MAX_ROWS; X break; X X case KEY_F7: /* Turn off pixel */ X change = true; X display_table[row][col] = false; X highlight( row, col, false ); X col = ( col + 1 ) % MAX_COLS; X if ( col == 0 ) X row = ( row + 1 ) % MAX_ROWS; X break; X X case KEY_INSERT: /* Insert a blank row */ X change = true; X for ( j = 0; j < MAX_COLS; ++j ) { X for ( i = MAX_ROWS - 1; i > row; --i ) { X display_table[i][j] = display_table[i-1][j]; X } X display_table[row][j] = false; X } X draw_current(); X break; X X case KEY_REMOVE: /* Remove a row */ X change = true; X for ( j = 0; j < MAX_COLS; ++j ) { X for ( i = row; i < MAX_ROWS - 1; ++i ) { X display_table[i][j] = display_table[i+1][j]; X } X display_table[MAX_ROWS-1][j] = false; X } X draw_current(); X break; X X case KEY_F13: /* Clear buffer */ X if ( change && !override ) { X warning( "Changes not saved" ); X error = true; X override = true; X } else { X for ( j = 0; j < MAX_COLS; ++j ) { X for ( i = 0; i < MAX_ROWS; ++i ) { X display_table[i][j] = false; X } X } X draw_current(); X } X break; X X case KEY_SELECT: /* Select font from DRCS */ X if ( change && !override ) { X warning( "Changes not saved" ); X error = true; X override = true; X } else { X extract_entry( current_entry ); X draw_current(); X } X break; X X case KEY_PREV: /* Move to prev entry in DRCS */ X if ( change && !override ) { X warning( "Changes not saved" ); X override = true; X error = true; X } else { X print_entry( current_entry, false ); X current_entry = current_entry - 1; X if ( current_entry == 0 ) X current_entry = TOTAL_ENTRIES - 2; X print_entry( current_entry, true ); X } X break; X X case KEY_NEXT: /* Move to next entry in DRCS */ X if ( change && !override ) { X warning( "Changes not saved" ); X override = true; X error = true; X } else { X print_entry( current_entry, false ); X current_entry = current_entry + 1; X if ( current_entry == TOTAL_ENTRIES - 1 ) X current_entry = 1; X print_entry( current_entry, true ); X } X break; X X case KEY_UP: /* UP one row. */ X if ( row == 0 ) X row = MAX_ROWS; X row = row - 1; X break; X X case KEY_DOWN: /* Guess. */ X row = ( row + 1 ) % MAX_ROWS; X break; X X case KEY_RIGHT: X col = ( col + 1 ) % MAX_COLS; X break; X X case KEY_LEFT: X if ( col == 0 ) X col = MAX_COLS; X col = col - 1; X break; X X case KEY_HELP: /* Display helpful info */ X clear_screen(); X help(); X c = getchar(); X init_restore(); X break; X X case '\004': /* All done! */ X return; X X case '\f': /* Redraw display */ X init_restore(); X break; X X default: /* user is a klutzy typist */ X move ( ERROR_ROW, ERROR_COL ); X printf( "Unknown key: " ); X if ( c < 0x20 ) { X printf( "^%c", c ); X } else if ( c < 0x0100 ) { X printf( "%c", c ); X } else { X printf( "0x%04x", c ); X } X fflush( stdout ); X error = true; X } X X highlight( row, col, true ); /* turn cursor on */ X } X} X X X Xchar *key_table[] = { X "\033[1~", /* Find */ X "\033[2~", /* Insert */ X "\033[3~", /* Remove */ X "\033[4~", /* Select */ X "\033[5~", /* Prev */ X "\033[6~", /* Next */ X "\033[17~", X "\033[18~", X "\033[19~", X "\033[20~", X "\033[21~", X "\033[23~", X "\033[24~", X "\033[25~", X "\033[26~", X "\033[28~", X "\033[29~", X "\033[31~", X "\033[32~", X "\033[33~", X "\033[34~", X "\033[A", X "\033[B", X "\033[C", X "\033[D", X (char *)0 }; X X/* X * get_key X * Convert VT220 escape sequence into something more reasonable. X */ X Xint Xget_key() X{ X register char *p; X char s[10]; X register int i, j; X X p = s; X for ( i = 0; i < 10; ++i ) { X *p = getchar(); X if ( i == 0 && *p != '\033' ) X return( (int)*p ); /* Not an escape sequence */ X if ( *p != '\033' && *p < 0x0020 ) X return( (int)*p ); /* Control character */ X *++p = '\0'; /* Null terminate */ X for ( j = 0; key_table[j]; ++j ) { X if ( strcmp( s, key_table[j] ) == 0 ) { X return( j | 0x0100 ); X } X } X } X return( -1 ); X} X X X X/* X * pad X * Emit nulls so that the terminal can catch up. X */ X Xpad() X{ X int i; X X for ( i = 0; i < 20; ++i ) X putchar( '\000' ); X fflush( stdout ); X} X X X X/* X * init_restore X * refresh the main display table. X */ X Xvoid Xinit_restore() X{ X register int row, col; X register int i; X X void draw_current(), clear_screen(), print_entry(); X X clear_screen(); X X for ( col = 0; col < MAX_COLS; ++col ) { X move( ROW_OFFSET - 2, col * 3 + COL_OFFSET + 1 ); X printf( "%d", col ); X } X move( ROW_OFFSET - 1, COL_OFFSET ); X printf( "+--+--+--+--+--+--+--+--+" ); X move( ROW_OFFSET + MAX_ROWS * 2, COL_OFFSET ); X printf( "+--+--+--+--+--+--+--+--+" ); X X for ( row = 0; row < MAX_ROWS; ++row ) { X if ( row != 0 && row != 7 ) { X move( row * 2 + ROW_OFFSET, COL_OFFSET - 2 ); X printf( "%d|", row ); X move( row * 2 + ROW_OFFSET + 1, COL_OFFSET - 1 ); X printf( "|" ); X move( row * 2 + ROW_OFFSET, COL_OFFSET + MAX_COLS * 3 ); X printf( "|" ); X move( row * 2 + ROW_OFFSET + 1, COL_OFFSET + MAX_COLS * 3 ); X printf( "|" ); X } else { X move( row * 2 + ROW_OFFSET, COL_OFFSET - 2 ); X printf( "%d*", row ); X move( row * 2 + ROW_OFFSET + 1, COL_OFFSET - 1 ); X printf( "*" ); X move( row * 2 + ROW_OFFSET, COL_OFFSET + MAX_COLS * 3 ); X printf( "*" ); X move( row * 2 + ROW_OFFSET + 1, COL_OFFSET + MAX_COLS * 3 ); X printf( "*" ); X } X } X draw_current(); X X move( TABLE_ROW - 1, TABLE_COL - 1 ); X printf( "+-+-+-+-+-+-+-+-+-+-+-+-+" ); X move( TABLE_ROW + 8 * 2 - 1, TABLE_COL - 1 ); X printf( "+-+-+-+-+-+-+-+-+-+-+-+-+" ); X for ( i = 0; i < 8; ++i ) { X move ( TABLE_ROW + i * 2, TABLE_COL - 1 ); X printf( "|" ); X move ( TABLE_ROW + i * 2 + 1, TABLE_COL - 1 ); X printf( "+" ); X move ( TABLE_ROW + i * 2, TABLE_COL + 12 * 2 - 1); X printf( "|" ); X move ( TABLE_ROW + i * 2 + 1, TABLE_COL +12 * 2 - 1); X printf( "+" ); X } X for ( i = 0; i < TOTAL_ENTRIES; ++i ) X print_entry( i, (i == current_entry) ? true : false ); X} X X X X/* X * draw_current X * Draw the complete current entry. X */ X Xvoid Xdraw_current() X{ X register int row, col; X X printf( "\033)0" ); /* Special graphics in G1 */ X printf( "\016" ); /* Lock in G1 (SO) */ X X for ( row = 0; row < MAX_ROWS; ++row ) { X for ( col = 0; col < MAX_COLS; ++col ) { X if ( display_table[row][col] ) { X move( row * 2 + ROW_OFFSET, col * 3 + COL_OFFSET ); X printf( "\141\141\141" ); X move( row * 2 + ROW_OFFSET + 1, col * 3 + COL_OFFSET ); X printf( "\141\141\141" ); X } else { X move( row * 2 + ROW_OFFSET, col * 3 + COL_OFFSET ); X printf( " " ); /* erase splat */ X move( row * 2 + ROW_OFFSET + 1, col * 3 + COL_OFFSET ); X printf( " " ); /* erase splat */ X } X } X pad(); X } X printf( "\017" ); /* Lock in G0 (SI) */ X fflush( stdout ); X} X X X X/* X * highlight X * Draw the cursor in the main display area. X */ X Xvoid Xhighlight( row, col, on ) Xunsigned int row, col; Xbool on; X{ X X printf( "\033)0" ); /* Special graphics in G1 */ X printf( "\016" ); /* Lock in G1 (SO) */ X if ( on ) { X printf( "\033[7m" ); /* Reverse video cursor */ X } X X if ( display_table[row][col] ) { X move( row * 2 + ROW_OFFSET, col * 3 + COL_OFFSET ); X printf( "\141\141\141" ); X move( row * 2 + ROW_OFFSET + 1, col * 3 + COL_OFFSET ); X printf( "\141\141\141" ); X } else { X move( row * 2 + ROW_OFFSET, col * 3 + COL_OFFSET ); X printf( " " ); /* erase splat */ X move( row * 2 + ROW_OFFSET + 1, col * 3 + COL_OFFSET ); X printf( " " ); /* erase splat */ X } X pad(); X printf( "\017" ); /* Lock in G0 (SI) */ X printf( "\033[0m" ); /* normal video */ X printf( "\b" ); /* Back up one spot */ X fflush( stdout ); X} X X X X/* X * Clear_screen X */ X Xvoid Xclear_screen() X{ X printf( "\033[H\033[J" ); /* Clear screen. */ X fflush( stdout ); X} X X X X/* X * move X */ X Xmove( y, x ) Xint y, x; X{ X printf( "\033[%d;%df", y, x ); X} X X X X/* X * Build_entry X * Convert the bit pattern used in the main display area into something X * that the vt220 can digest - namely sixels... X */ X Xvoid Xbuild_entry( entry_no ) Xunsigned int entry_no; X{ X register int row, col; X register unsigned int mask; X X for ( col = 0; col < 8; ++col ) { X X /* Top set of sixels */ X X mask = 0; X for ( row = 5; row >= 0; --row ) { X mask = mask << 1; X if ( display_table[row][col] ) X mask |= 1; X } X font_table[entry_no][col] = mask + 077; X X /* Bottom set of sixels */ X X mask = 0; X for ( row = 9; row >= 6; --row ) { X mask = mask << 1; X if ( display_table[row][col] ) X mask |= 1; X } X font_table[entry_no][col+8] = mask + 077; X } X X} X X X X/* X * Extract_engry X * convert sixel representation into an array of bits. X */ X Xvoid Xextract_entry( entry_no ) Xunsigned int entry_no; X{ X register int row, col; X register unsigned int mask; X X for ( col = 0; col < 8; ++col ) { X X /* Top set of sixels */ X X mask = font_table[entry_no][col]; X if ( mask >= 077 ) X mask -= 077; X else X mask = 0; /* Bogus entry */ X X for ( row = 0; row <= 5; ++row ) { X display_table[row][col] = (bool)(mask & 0x0001); X mask = mask >> 1; X } X X /* Bottom set of sixels */ X X mask = font_table[entry_no][col+8]; X if ( mask >= 077 ) X mask -= 077; X else X mask = 0; X X for ( row = 6; row <= 9; ++row ) { X display_table[row][col] = (bool)(mask & 0x0001); X mask = mask >> 1; X } X } X X} X X X X/* X * Send_entry X * Emit the stuff used by the VT220 to load a character into the X * DRCS. We could, of course, send more than one entry at a time... X */ X Xvoid Xsend_entry( entry_no ) Xint entry_no; X{ X register char *fp = font_table[entry_no]; X X printf( "\033P1;%d;1;0;0;0{ @%c%c%c%c%c%c%c%c/%c%c%c%c%c%c%c%c\033\\", X entry_no, X fp[ 0], fp[ 1], fp[ 2], fp[ 3], fp[ 4], fp[ 5], fp[ 6], fp[ 7], X fp[ 8], fp[ 9], fp[10], fp[11], fp[12], fp[13], fp[14], fp[15] ); X} X X X X/* X * Print_entry X * The terminal normally has G0 in GL. We don't want to change X * this, nor do we want to use GR. Sooooo send out the necessary X * magic for shifting in G2 temporarily for the character that we X * want to display. X */ X Xvoid Xprint_entry( entry_no, highlight ) Xregister unsigned int entry_no; Xbool highlight; X{ X X register int y, x; X X y = entry_no & 0x07; X x = entry_no >> 3 & 0x1f; X entry_no += 32; /* Map up to G set */ X X move( y * 2 + TABLE_ROW, x * 2 + TABLE_COL ); X X if ( highlight ) X printf( "\033[7m" ); X X printf( "\033* @" ); /* select DRCS into G2 */ X printf( "\033N" ); /* select single shift */ X printf( "%c", entry_no ); /* Draw the character */ X X if ( highlight ) X printf( "\033[0m" ); X} X X X X/* X * Save_table X * Save a font table X */ X Xvoid Xsave_table( font_file ) XFILE *font_file; X{ X register char *fp; X register int i; X X for ( i = 0; i < TOTAL_ENTRIES; ++i ) { X fp = font_table[i]; X fprintf( font_file, "\033P1;%d;1;0;0;0{ @%c%c%c%c%c%c%c%c/%c%c%c%c%c%c%c%c\033\\\n", X i, X fp[ 0], fp[ 1], fp[ 2], fp[ 3], fp[ 4], fp[ 5], fp[ 6], fp[ 7], X fp[ 8], fp[ 9], fp[10], fp[11], fp[12], fp[13], fp[14], fp[15] ); X } X} X X X X/* X * Get_table X * Extract font table entries from a file X */ X Xvoid Xget_table( font_file ) XFILE *font_file; X{ X char s[256]; X register char *p; X char *fp; X int i; X register int j; X X while( fgets( s, 255, font_file ) ) { X if ( strncmp( s, "\033P1;", 4 ) != 0 ) X continue; /* Bogus line */ X p = &s[4]; X if ( sscanf( p, "%d", &i ) != 1 ) X continue; /* Illegal entry number */ X X if ( i <= 0 || TOTAL_ENTRIES <= i ) X continue; /* Bogues entry */ X X fp = font_table[i]; X X while ( *p && *p != '@' ) X ++p; /* Skip to font definition */ X if ( ! *p++ ) X continue; /* Skip @ */ X X for ( j = 0; *p && *p != '\033' && j < 16; ++j, ++p ) { X if ( *p == '/' ) { X j = 8; X ++p; X } X fp[j] = *p; X } X send_entry( i ); X } X} X X X X/* X * Help X * Print out help information. X */ X Xvoid Xhelp() X{ X printf( "Font editor\n\n" ); X printf( "F6 - Pixel on\n" ); X printf( "F7 - Pixel off\n" ); X printf( "F13 - Clear display area\n" ); X printf( "HELP - This screen\n" ); X printf( "FIND - Update font table\n" ); X printf( "INSERT - Insert a blank row\n" ); X printf( "REMOVE - Remove a row\n" ); X printf( "SELECT - Select current font table entry\n" ); X printf( "PREV - Move to previous font table entry\n" ); X printf( "NEXT - Move to next font table entry\n" ); X printf( "^D - Exit\n" ); X printf( "\n\n\n\nPress any key to continue\n" ); X} X X X X/* X * Warning X * Issue a warning to the regarding the current status. X */ X Xvoid Xwarning( s ) Xchar *s; X{ X move( ERROR_ROW, ERROR_COL ); X printf( "Warning: %s!\n", s ); X move( ERROR_ROW+1, ERROR_COL ); X printf( " Reissue command to override\n" ); X} SHAR_EOF $TOUCH -am 0112125693 Support/fontedit/fontedit.c && chmod 0640 Support/fontedit/fontedit.c || echo "restore of Support/fontedit/fontedit.c failed" set `wc -c Support/fontedit/fontedit.c`;Wc_c=$1 if test "$Wc_c" != "18519"; then echo original size 18519, current size $Wc_c fi fi # ============= Support/userkeys/Makefile ============== if test ! -d 'Support/userkeys'; then echo "x - creating directory Support/userkeys" mkdir 'Support/userkeys' fi if test X"$1" != X"-c" -a -f 'Support/userkeys/Makefile'; then echo "File already exists: skipping 'Support/userkeys/Makefile'" else echo "x - extracting Support/userkeys/Makefile (Text)" sed 's/^X//' << 'SHAR_EOF' > Support/userkeys/Makefile && XPROG= vt220keys XCLEANFILES+= core.vt220keys X X.include <bsd.prog.mk> X X X SHAR_EOF $TOUCH -am 0113141493 Support/userkeys/Makefile && chmod 0660 Support/userkeys/Makefile || echo "restore of Support/userkeys/Makefile failed" set `wc -c Support/userkeys/Makefile`;Wc_c=$1 if test "$Wc_c" != "71"; then echo original size 71, current size $Wc_c fi fi # ============= Support/userkeys/vt220keys.1 ============== if test X"$1" != X"-c" -a -f 'Support/userkeys/vt220keys.1'; then echo "File already exists: skipping 'Support/userkeys/vt220keys.1'" else echo "x - extracting Support/userkeys/vt220keys.1 (Text)" sed 's/^X//' << 'SHAR_EOF' > Support/userkeys/vt220keys.1 && X.TH VT220 1 X.UC 4 X.SH NAME Xvt220 \- define SHIFTED function keys on VT220 terminal X.SH SYNTAX X.B vt220 X[ X.B \-cil X] X[ keyname keystring ] ... X.SH DESCRIPTION X.I Vt220 Xsets up a "vt220 terminal" in vt200 mode to allow user Xdefinition of the SHIFTED function keys. Each X\f2keyname\f1 specified on the command line will be loaded with Xthe corresponding \f2keystring\f1. XA \f2keyname\f1 is one of the following "words": XF6 F7 F8 F9 F10 F11 ESC F12 BS F13 LF F14 HELP DO F17 F18 F19 F20. X\f2Keystrings\f1 Xmust be quoted if spaces, tabs, or shell metacharacters are included. X.PP X.B Vt220 Xexpects to receive some combination of option flags and/or Xargument pair(s), otherwised an usage message Xis printed. X.PP XThe options are: X.TP X.B \-c XClears all SHIFTED function key definitions before setting them to user Xdefined strings. X.TP X.B \-i XRead the initialization file X.I $HOME/.vt220rc Xfor SHIFTED function key definitions. This is done before any Xargument pair specified on the command line is processed. XEach line in the file must consist of two fields (separated by spaces Xor tabs) where the first field is the X\f2keyname\f1 and the second field is the \f2keystring\f1. XThe second field extends to the end of the line, thus a X\f2keystring\f1 Xmay include spaces or tabs. A newline (return) may be specified Xwithin the string by using the C Language notation for newline (\\n). X.TP X.B \-l XLocks the function keys from further definition. XLocking occurs after processing the initialization file (if the "i" Xoption is specified) and any argument Xpairs. XThe only way Xto unlock is by turning the power off. X.SH EXAMPLES Xvt220 -ci X.br Xvt220 F6 'nroff -ms ' X.br Xvt220 -i F20 'cc -O -c ' X.br Xvt220 -l HELP man X.SH "OTHER FEATURES" XPressing the function keys without using the shift key, generates Xa string of characters. With X\f2csh\f1(1) this string can be aliased to some command. For example: X.br X alias ^[[17~ "ls -CR | more" X.br Xwhere ^[[17~ is what is generated by pressing the F6 key. Therefore XF6 can perform two commands, depending if pressed with/without the SHIFT Xkey. X.PP X.B Vt220 Xcan be called from your .login or .profile file. Typically an user Xwill create a initialization file and include a line like X.br X vt220 -ci X.br XOR X.br X vt220 -cil X.br Xin the above mentioned files. This way the SHIFTED function keys Xwill be set to your favorite commands when logging in. X.SH CAVEATS XIf the SHIFTED function keys are unlocked, redefinition of a SHIFTED Xfunction key will rewrite the old string. X.PP XThere are 256 bytes available for the SHIFTED function keys. Space is Xsupplied on a first-come/first-serve basis. After the 256 bytes are Xused, you can't define any more keys unless space is cleared. This Xcan be done by redefining a key to contain a string of fewer bytes. X.PP XAll key definitions are stored in volatile RAM, and are lost when Xterminal power is lost. X.PP XThe ESC key (unshifted) no longer generates the proper escape character. This Xis of particular importance since many editors require use of the XESC key. Here are some available alternatives: X.sp X.in +.5i XThe escape character can be generated by typing ^[ (control-[). X.sp XUse X.B vt220 Xas follows (note ^[ is control-[) X.br X.in +.5i Xvt220 ESC '^[' X.in X.br XThis will require you Xto press the SHIFT key and ESC to generate the escape sequence. X.sp XSome editors, allow other character(s) to be substituted for the Xescape character. For example with X.B emacs Xinclude this line in your .emacs_pro: X.br X (bind-to-key "ESC-prefix" "\\033[23~") X.br XThus when the ESC key is pressed, emacs will allow the characters Xgenerated (^[[23~) to perform the same function as the escape Xcharacter. X.in X.SH FILES X$HOME/.vt220rc \- initialization file X.SH "SEE ALSO" XVT220 Programmer Reference Manual X.br XVT220 Programmer Pocket Guide X SHAR_EOF $TOUCH -am 0112125693 Support/userkeys/vt220keys.1 && chmod 0640 Support/userkeys/vt220keys.1 || echo "restore of Support/userkeys/vt220keys.1 failed" set `wc -c Support/userkeys/vt220keys.1`;Wc_c=$1 if test "$Wc_c" != "3818"; then echo original size 3818, current size $Wc_c fi fi # ============= Support/userkeys/vt220keys.c ============== if test X"$1" != X"-c" -a -f 'Support/userkeys/vt220keys.c'; then echo "File already exists: skipping 'Support/userkeys/vt220keys.c'" else echo "x - extracting Support/userkeys/vt220keys.c (Text)" sed 's/^X//' << 'SHAR_EOF' > Support/userkeys/vt220keys.c && X/* X * Trivial program to load VT220 Function keys with strings, X * note that the values only get sent when the key is shifted X * (shoulda been an option to flip the shift set like the Z19!) X * X * Typing no args gives help, basically pairs of keyname/value X * strings. X * X * Author, Author: Barry Shein, Boston University X * X * HISTORY X {1} 30-Oct-85 Kenneth J. Lester (ken) at ektools X X Added the necessary code to read an initialization file. This X should make it easier to used this program. Also added code X that will set-up the terminal in vt200 (this saves the user the X trouble of checking if the set-up is in vt200). X X Restructed the main function to use getopt, for argument X processing. X X Alterated usage function to include new "i" option (init file) X X X -hm minor modifications for pcvt 2.0 release X X*/ X X#include <stdio.h> X#include <ctype.h> X X/* X * The default toupper() macro is stupid, will toupper anything X */ X X#ifdef toupper X#undef toupper X#endif X#define toupper(c) (islower(c) ? ((c)-' ') : c) X X#define VT200_7BIT 1 X#define ESC 033 X#define INITFILE ".vt220rc" X Xstruct keynames { X char *name ; X char *string ; X} keys[] = { X "F6", "17", X "F7", "18", X "F8", "19", X "F9", "20", X "F10", "21", X "F11", "23", X "ESC", "23", X "F12", "24", X "BS", "24", X "F13", "25", X "LF", "25", X "F14", "26", X "HELP", "28", X "DO", "29", X "F17", "31", X "F18", "32", X "F19", "33", X "F20", "34", X NULL, NULL X}; X Xchar prog[BUFSIZ]; X Xmain(argc,argv) X int argc; X char *argv[]; X{ X /* these are defined in the getopt routine */ X extern char *optarg; /* argument give to an option */ X extern int optind; /* argv index after option processing */ X X int option; /* option character returned by getopt */ X int initf = 0; /* read initialization file */ X int lockf = 0; /* lock keys after loading strings */ X int clearf = 0; /* clear all keys before loading strings */ X char *strcpy(); X X (void) strcpy(prog, *argv); /* store program name */ X X if(argc == 1) usage(); /* program requires options */ X X /* get options */ X while ((option = getopt(argc, argv, "cli")) != EOF) X switch(option) X { X case 'c' : X clearf++; X break; X case 'l' : X lockf++; X break; X case 'i' : X initf++; X break; X case '?' : X usage(); X } X X if (VT200_7BIT) X printf("\033[62;1\"p"); /* vt200 7 bits */ X else X printf("\033[62;2\"p"); /* vt200 8 bits */ X X if(clearf) clearkeys(); X X if (initf) getinit(); X X /* process {key, key string} pairs. Note optind is index to argv X for first pair. By adding 1 to optind insures that a pair exists X i.e. the last key has a key string. */ X X while(optind + 1 < argc) X { X dokey(argv[optind], argv[optind+1]); X optind += 2; X } X X if(lockf) lockkeys(); X X exit(0); X} X X/****************************************************************************/ X X/* X * Load the VT220 SHIFT-FNKEY value, the basic pattern is X * "\EP1;1|"+KEYNAME+"/"+VAL_AS_HEX+"\E\\" X * that is, literally what is in quotes (w/o quotes) then the X * name of the key from the keytable above (a numeric string) X * then a slash, then the string value as hex pairs then ESC-BACKSLASH X * X * Note: you can gang together key defns with semicolons but that X * would complicate things, especially error handling, so do it all X * for each pair, who cares, really. X */ X Xdokey(nm,val) char *nm, *val; X{ X register char *scr; X register struct keynames *kp; X X for(scr = nm; *scr = toupper(*scr); scr++) X ; X for(kp = keys; kp->name != NULL; kp++) X if(strcmp(nm,kp->name) == 0) { X printf("%cP1;1|%s/",ESC,kp->string); X while(*val) printf("%02x",*val++); X printf("%c\\",ESC); X fflush(stdout); X return; X } X fprintf(stderr,"Bad key name: %s\n",nm); X usage(); /* bad key name, give up */ X} X X/****************************************************************************/ X Xclearkeys() X{ X printf("%cP0;1|%c\\",ESC,ESC); X fflush(stdout); X} X X/****************************************************************************/ X Xlockkeys() X{ X printf("%cP1;0|%c\\",ESC,ESC); X fflush(stdout); X} X X/****************************************************************************/ X Xusage() X{ X int i; X X fprintf(stderr,"Usage: %s [-cil] [keyname string keyname string...]\n\n",prog); X fprintf(stderr,"The following options are available\n"); X fprintf(stderr,"\t-c\tclears keys first\n"); X fprintf(stderr,"\t-l\t[sets then] locks further setting\n"); X fprintf(stderr,"\t-i\tfirst read initialization file $HOME/%s\n",INITFILE); X fprintf(stderr,"(note that the only way to unlock is via Set-Up)\n\n"); X fprintf(stderr,"Keyname is one of:\n\t"); X for(i=0; keys[i].name != NULL; i++) X fprintf(stderr,"%s ",keys[i].name); X fprintf(stderr,"\nKeyname is SHIFTED function key that sends the string\n\n"); X fprintf(stderr,"Strings may need quoting to protect from shell\n"); X fprintf(stderr,"You must specify an option or key,string pairs\n\n"); X exit(1); X} X X/****************************************************************************/ X X/* This routine process the INITFILE. This file expects lines in the format X X <ws> keyname ws string X X Where ws is white space (spaces or tabs) and <ws> is optional white space. X The string may include spaces or tabs and need not be quoted. If the X string has the sequence of "\n" then a newline character is included in X the string. X X examples: X X F6 ls -lg\n X F7 uulog -s X X*/ X X#include <sys/types.h> X#include <sys/stat.h> X Xgetinit() X{ X char *home; /* user's home directory */ X char path[BUFSIZ]; /* full path name of init file */ X char buf[BUFSIZ]; /* buffer to hold 1 line from init file */ X char key[BUFSIZ]; /* buffer, to hold specified fcn key */ X char keystr[BUFSIZ]; /* string associated with fcn key */ X char *ptr; /* pointer to transverse buf */ X int i, j; /* array indices */ X int statflag; /* whether init file is regular & readable */ X struct stat statbuf; /* stat of the init file */ X FILE *fp; /* file pointer to init file */ X X /* system calls and subroutines */ X FILE *fopen(); X char *strcpy(); X char *strcat(); X char *fgets(); X char *getenv(); X X /* construct full path name for init file */ X home = getenv("HOME"); X (void) strcpy(path, home); X (void) strcat(path,"/"); X (void) strcat(path,INITFILE); X X /* check status if init file */ X if (stat(path, &statbuf) != -1) X { X statflag = statbuf.st_mode & S_IFREG && statbuf.st_mode & S_IREAD; X if (!statflag || (fp = fopen(path, "r")) == NULL) X { X fprintf(stderr, "couldn't open initalization file: %s\n", path); X exit(1); X } X X /* process lines from init file */ X while (fgets(buf, BUFSIZ, fp) != NULL) X { X /* variable initializations */ X i = 0; j = 0; X key[0] = '\0'; keystr[0] = '\0'; X ptr = buf; X X while (*ptr == ' ' || *ptr == '\t') ptr++; /*skip whitespace*/ X X if (*ptr == '\n') break; /* we hit an emtpy line */ X X while (!isspace(*ptr) && *ptr != '\0') /* get keyname */ X key[i++] = *ptr++; X key[i] = '\0'; /* place EOS in buffer */ X X while (*ptr == ' ' || *ptr == '\t') ptr++; /*skip whitespace*/ X X while (*ptr != '\n' && *ptr != '\0') /* get string */ X { X /* check if string is to include newline i.e. \n */ X if (*ptr == '\\' && *(ptr+1) == 'n') X { X keystr[j] = '\012'; X ptr++; X } X else X keystr[j] = *ptr; X j++; ptr++; X } X keystr[j] = '\0'; /* place EOS in buffer */ X dokey(key, keystr); /* load key with string */ X } X } X else X { X fprintf(stderr, "init file %s not found\n\n", path); X usage(); X } X} SHAR_EOF $TOUCH -am 0112125693 Support/userkeys/vt220keys.c && chmod 0640 Support/userkeys/vt220keys.c || echo "restore of Support/userkeys/vt220keys.c failed" set `wc -c Support/userkeys/vt220keys.c`;Wc_c=$1 if test "$Wc_c" != "9348"; then echo original size 9348, current size $Wc_c fi fi # ============= Support/demo/README ============== if test ! -d 'Support/demo'; then echo "x - creating directory Support/demo" mkdir 'Support/demo' fi if test X"$1" != X"-c" -a -f 'Support/demo/README'; then echo "File already exists: skipping 'Support/demo/README'" else echo "x - extracting Support/demo/README (Text)" sed 's/^X//' << 'SHAR_EOF' > Support/demo/README && Xthe files chardemo.vt and colors.vt are taken from the ms-dos kermit Xdistribution and are redistributed with permission from frank da cruz. SHAR_EOF $TOUCH -am 0112125693 Support/demo/README && chmod 0660 Support/demo/README || echo "restore of Support/demo/README failed" set `wc -c Support/demo/README`;Wc_c=$1 if test "$Wc_c" != "141"; then echo original size 141, current size $Wc_c fi fi # ============= Support/demo/colors.vt.uu ============== if test X"$1" != X"-c" -a -f 'Support/demo/colors.vt.uu'; then echo "File already exists: skipping 'Support/demo/colors.vt.uu'" else echo "x - extracting Support/demo/colors.vt.uu (Text)" sed 's/^X//' << 'SHAR_EOF' > Support/demo/colors.vt.uu && Xbegin 660 colors.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,QM;,S8[-#1M("`S-B`T-!M;,S8[-#5M("`S-B`T-1M;,S8[ XM-#9M("`S-B`T-AM;,S8[-#=M("`S-B`T-PT*&ULS,#LT-VT@,S<@(!M;,S<[ XM-#!M("`S-R`T,!M;,S<[-#%M("`S-R`T,1M;,S<[-#)M("`S-R`T,AM;,S<[ XM-#-M("`S-R`T,QM;,S<[-#1M("`S-R`T-!M;,S<[-#5M("`S-R`T-1M;,S<[ XM-#9M("`S-R`T-AM;,S<[-#=M("`S-R`T-PT*&ULS,#LT-VU4:&ES(!M;,S$[ XM-#=M:7,@&ULS,CLT-VUA(!M;,S,[-#=M;75L=&D;6S,T.S0W;6-O;&]R(!M; XA,S4[-#=M;&EN91M;,S`[-#=M+AM;,S0[-#=M&ULP;0T* X` Xend SHAR_EOF $TOUCH -am 0115111893 Support/demo/colors.vt.uu && chmod 0660 Support/demo/colors.vt.uu || echo "restore of Support/demo/colors.vt.uu failed" set `wc -c Support/demo/colors.vt.uu`;Wc_c=$1 if test "$Wc_c" != "3544"; then echo original size 3544, current size $Wc_c fi fi # ============= Support/demo/Makefile ============== if test X"$1" != X"-c" -a -f 'Support/demo/Makefile'; then echo "File already exists: skipping 'Support/demo/Makefile'" else echo "x - extracting Support/demo/Makefile (Text)" sed 's/^X//' << 'SHAR_EOF' > Support/demo/Makefile && XDEMOS= chardemo.vt colors.vt X Xall: $(DEMOS) X XCLEANFILES= ${DEMOS} X Xinstall: ${DEMOS} X @echo "to look at the demos, execute \"cat <filename>.vt\"" X X.SUFFIXES: .uu X X.uu: X uudecode ${.IMPSRC} X Xclean: X rm -f ${CLEANFILES} X SHAR_EOF $TOUCH -am 0115115293 Support/demo/Makefile && chmod 0660 Support/demo/Makefile || echo "restore of Support/demo/Makefile failed" set `wc -c Support/demo/Makefile`;Wc_c=$1 if test "$Wc_c" != "219"; then echo original size 219, current size $Wc_c fi fi # ============= Support/demo/chardemo.vt.uu ============== if test X"$1" != X"-c" -a -f 'Support/demo/chardemo.vt.uu'; then echo "File already exists: skipping 'Support/demo/chardemo.vt.uu'" else echo "x - extracting Support/demo/chardemo.vt.uu (Text)" sed 's/^X//' << 'SHAR_EOF' > Support/demo/chardemo.vt.uu && Xbegin 660 chardemo.vt XM&V,;6S([,4@-"B`@("!.871I;VYA;"`@05-#24D@("`@3&%T:6XM,2`@4W5P XM($=R("`@4W!C($=R("`@(%504U,@("`@(%1E8V@@("`@06QT+5)O;0T*("`@ XM("`@("`@("`@("`@($(@("`@("`@($$@("`@("`@("4U("`@("`@(#`@("`@ XM("`@(#P@("`@("`@(#X@("`@("`@(#$-"B`@("`@,C,T-38W("`@,C,T-38W XM("`@,C,T-38W("`@,C,T-38W("`@,C,T-38W("`@,C,T-38W("`@,C,T-38W XM("`@,C,T-38W("`@&ULV.S)((#`Z(!M;-SLR2"`Q.B`;6S@[,D@@,CH@&ULY XM.S)((#,Z(!M;,3`[,D@@-#H@&ULQ,3LR2"`U.B`;6S$R.S)((#8Z(!M;,3,[ XM,D@@-SH@&ULQ-#LR2"`X.B`;6S$U.S)((#DZ(!M;,38[,D@Q,#H@&ULQ-SLR XM2#$Q.B`;6S$X.S)(,3(Z(!M;,3D[,D@Q,SH@&ULR,#LR2#$T.B`;6S(Q.S)( XM,34Z(!M;/S0R:!LW#AM;-CLV2"`;6S<[-D@A&ULX.S9((AM;.3LV2",;6S$P XM.S9()!M;,3$[-D@E&ULQ,CLV2"8;6S$S.S9()QM;,30[-D@H&ULQ-3LV2"D; XM6S$V.S9(*AM;,3<[-D@K&ULQ.#LV2"P;6S$Y.S9(+1M;,C`[-D@N&ULR,3LV XM2"\;6S8[-T@P&ULW.S=(,1M;.#LW2#(;6SD[-T@S&ULQ,#LW2#0;6S$Q.S=( XM-1M;,3([-T@V&ULQ,SLW2#<;6S$T.S=(.!M;,34[-T@Y&ULQ-CLW2#H;6S$W XM.S=(.QM;,3@[-T@\&ULQ.3LW2#T;6S(P.S=(/AM;,C$[-T@_&ULV.SA(0!M; XM-SLX2$$;6S@[.$A"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U XM.S<P2#D;6S$V.S<P2#H;6S$W.S<P2#L;6S$X.S<P2#P;6S$Y.S<P2#T;6S(P XM.S<P2#X;6S(Q.S<P2#\;6S8[-S%(0!M;-SLW,4A!&ULX.S<Q2$(;6SD[-S%( XM0QM;,3`[-S%(1!M;,3$[-S%(11M;,3([-S%(1AM;,3,[-S%(1QM;,30[-S%( XM2!M;,34[-S%(21M;,38[-S%(2AM;,3<[-S%(2QM;,3@[-S%(3!M;,3D[-S%( XM31M;,C`[-S%(3AM;,C$[-S%(3QM;-CLW,DA0&ULW.S<R2%$;6S@[-S)(4AM; XM.3LW,DA3&ULQ,#LW,DA4&ULQ,3LW,DA5&ULQ,CLW,DA6&ULQ,SLW,DA7&ULQ XM-#LW,DA8&ULQ-3LW,DA9&ULQ-CLW,DA:&ULQ-SLW,DA;&ULQ.#LW,DA<&ULQ XM.3LW,DA=&ULR,#LW,DA>&ULR,3LW,DA?&ULV.S<S2&`;6S<[-S-(81M;.#LW XM,TAB&ULY.S<S2&,;6S$P.S<S2&0;6S$Q.S<S2&4;6S$R.S<S2&8;6S$S.S<S XM2&<;6S$T.S<S2&@;6S$U.S<S2&D;6S$V.S<S2&H;6S$W.S<S2&L;6S$X.S<S XM2&P;6S$Y.S<S2&T;6S(P.S<S2&X;6S(Q.S<S2&\;6S8[-S1(<!M;-SLW-$AQ XM&ULX.S<T2'(;6SD[-S1(<QM;,3`[-S1(=!M;,3$[-S1(=1M;,3([-S1(=AM; XM,3,[-S1(=QM;,30[-S1(>!M;,34[-S1(>1M;,38[-S1(>AM;,3<[-S1(>QM; XL,3@[-S1(?!M;,3D[-S1(?1M;,C`[-S1(?AM;,C$[-S1(?P\;.!M;,C,[,4A; X` Xend SHAR_EOF $TOUCH -am 0115111793 Support/demo/chardemo.vt.uu && chmod 0660 Support/demo/chardemo.vt.uu || echo "restore of Support/demo/chardemo.vt.uu failed" set `wc -c Support/demo/chardemo.vt.uu`;Wc_c=$1 if test "$Wc_c" != "9886"; then echo original size 9886, current size $Wc_c fi fi # ============= Support/vttest/Makefile ============== if test ! -d 'Support/vttest'; then echo "x - creating directory Support/vttest" mkdir 'Support/vttest' fi if test X"$1" != X"-c" -a -f 'Support/vttest/Makefile'; then echo "File already exists: skipping 'Support/vttest/Makefile'" else echo "x - extracting Support/vttest/Makefile (Text)" sed 's/^X//' << 'SHAR_EOF' > Support/vttest/Makefile && XPROG= vttest XCFLAGS+= -traditional -DUSEMYSTTY XSRCS= main.c esc.c X X.include <bsd.prog.mk> SHAR_EOF $TOUCH -am 0113141593 Support/vttest/Makefile && chmod 0660 Support/vttest/Makefile || echo "restore of Support/vttest/Makefile failed" set `wc -c Support/vttest/Makefile`;Wc_c=$1 if test "$Wc_c" != "92"; then echo original size 92, current size $Wc_c fi fi echo "End of part 2, continue with part 3" exit 0 -- hellmuth michaelis HCS Hanseatischer Computerservice GmbH hamburg, europe hm@hcshh.hcs.de tel: +49/40/55903-170 fax: +49/40/5591486