$Id: README,v 1.16 1998/09/13 09:36:15 vons Exp $ DESCRIPTION This is version 1.1.2 of 'vtt', short for VTermType. Vtt will find out what type of terminal you use, and report it on stdout. The rules must be specified in a .vtt_termtab file, either in the user's home-dir, or in a system-wide file. This file specifies the relation between escape-sequence, response, and terminal-type. If your terminal does not respond to any escape-sequence, you may be able to identify it with the help of the hostname, the osname, and/or the ttyname. This is necessary for a Sun console for example, the same holds for FreeBSD's pccons and syscons console drivers. See the supplied vtt_termtab.sample for details. Typical use for (k)sh is TERM=`vtt` ;export TERM or eval `vtt -e 'TERM=$n; TERMCAP=$c; export TERM TERMCAP'` and for (t)csh setenv TERM `vtt` or eval `vtt -e 'setenv TERM $n; setenv TERMCAP $c'` For more information, see the vtt(1) manpage. SEE ALSO 1) qterm. Works fine, I've used it for years. Only supports escape- sequences though, and I wanted to do better on things like portability, ease of use, and code volume. 2) getterm. Limited, and not very stable last time I tried it. KNOWN PROBLEMS Sun's JetTerm terminal emulator (/usr/openwin/demo/jet) eats up the first character that arrives after the escape-code, which may be part of a message from vtt. (Just try an "echo A[cbla | tr A '\033' ", the 'b' will not be displayed!). There is no problem if you assign the result of vtt to a shell variable, but be prepared that any output to the screen may be incomplete. BUILDING INSTRUCTIONS Vtt has been written using ANSI-C, but will compile with older non-ANSI compilers as well. Vtt is known to run on the following systems: * Dec Ultrix 4.2 cc * Dec Alpha OSF/1 cc * FreeBSD 1.x gcc 2.4.5 * FreeBSD 2.1.7 gcc 2.6.3 FreeBSD 2.2.7 gcc 2.7.2.1 * HP-UX B.08.00 cc * IBM AIX R2 cc OpenBSD 2.3 gcc 2.8.1 * RedHat Linux 3.0.3 gcc 2.7.2 (kernel 1.2.13) * RedHat Linux 4.0 gcc 2.7.2 (kernel 2.0.18) * SCO OpenServer 5.0.2 cc * SCO UnixWare 2.1.2 cc Sun Solaris 1.x /bin/cc, Sun-C 2.0.1 Sun Solaris 2.5.1 Sun-C 3.0 * == latest version not yet tested on these platforms Compilation is simple on Unix systems: run the configure script and type 'make'. For other systems, copy the config.h.in file to config.h and change it where needed. INSTALLATION Copy the executable and the manpage to /usr/local/{bin,man}, and install the sample vtt_termtab either in /usr/local/etc/vtt_termtab and/or in ~/.vtt_termtab. Gert-Jan E-MAIL vons at netcourrier dot com DEBUGGING The '-d' (verbose) option will display the queries, and the responses received. '-x' will display a trace of the process. -------------------------------------------------------------------------- CURRENT VERSION: 1.1.2 1.1.2 1998/09/13 - hmmm, forgot to actually delta the 1.1.1 modif. - updated README with FreeBSD 2.2.7 and OpenBSD 2.3 - prefer libtermcap over libtermlib 1.1.1 1998/01/11 - As always, a new bug is found just after releasing a version. Things went wrong when the pipe (|) was used somewhere in the tty capability strings. Vtt happily considered all text upto the latest pipe to be part of the entry's name/description... 1.1 1998/01/11 - now also tested under FreeBSD 2.1.7, FreeBSD 2.2.5, SCO Openserver 5.0.2, SCO UnixWare 2.1.2, RedHat Linux 4.0, and OpenBSD 2.2. - added SCO Openserver console and SCO UnixWare Terminal identification to vtt_termtab.sample, together with OpenBSD console, Emu, ... - bugfix: termcap string was output directly instead of using tputs() - fixed dependency typo in Makefile.in - improved Makefile.in, added compile/lint options for the various compilers and platforms (options are default off). - updated config script for autoconf 2.12, removed dependencies on autoconf internal variable names. - ignore EINVAL on tcdrain(). UnixWare returns this when the device doesn't support the ioctl(). 1.0 1996/07/14 - fixed lint warning in tty.c - modified makefile to look for sources in $srcdir - it was time for version 1.0... 0.94 1996/05/19 - fixed some lint warnings (missing termcap prototypes, ...) 0.93 1996/05/12 - configure stuff: bugfix & cleanup - minor fix for manpage 0.92 1996/05/11 - minor fixes. - modified makefile so that "mkdir foo; cd foo; ../configure; make" works, so separate builds can be run/tested in parallel. 0.9 1995/11/17 - vtt will now send the initialisation string to the terminal, unless the -I option is given (like tset(1)). - it will also set the erase key to the terminal's erase key, unless the -K option is given. 0.8 1995/11/05 - Fixed problem with :sh in nvi, stdin is not writable. Query is now written to stderr, and answer is read from stdin. - Vtt will now avoid the use of '*' and '?' in the $TERMCAP definition, using an octal encoding instead. This way, "echo $TERMCAP" will work correctly, and not fail with the obscure "echo: No match." message. 0.7 1995/03/21 - using the '-e' option failed when the terminal was not recognised or not present in the termcap/terminfo database, $c failed. Just define it as the null-string in those cases. - changed the behavior on systems without $TERMCAP, instead of disabling the '-e' option, vtt now defines $c to be an empty string. 0.6 1995/03/17 - fixed problem with configure, some preprocessors don't like whitespace before the '#include <...>' (OSF/1, HP-UX) - configure now tries to find out whether the platform still supports $TERMCAP (some terminfo systems offer termcap compatibility but ignore $TERMCAP, e.g. Solaris 2) - If the system does not support $TERMCAP, vtt will complain when the -e option is used. 0.5 1995/02/28 - finished manpage (finally) - corrected some lint warnings 0.4b 1995/02/27 - fixed an out-of-bound index in tt_strcmp - added -e option, vtt now is now also able to generate code that defines $TERM and $TERMCAP 0.4a 1995/02/19 - Incremented max line length for the vtt_termtab file to 128, and added a test for overflow. - the name of a query is no longer limited to Q1..Q9, it is now user-defined. - The maximum number of queries is incremented to 20. (yes I know, I could malloc()...) - Vtt verifies that the tty type is present in termcap/terminfo. - If the -u option is given, ttytype entries that are unknown in termcap/terminfo are skipped. 0.4 1995/02/13 - Should not abort when $TERM is not defined. - Oops, uname() error is -1, not some value !=0... - Made all esc-sequence handling unsigned, a vt220 in 8bit *does* return 8bit chars... - Always give a warning on stderr when tty is not recognised, can be suppressed with the help of the new -q (quiet) option. - Added detection of many well-known DEC terminal types - Added '-f' option, used to specify a vtt_termtab file to use - A warning is given when non-option arguments are found - fixed bug with sa_flags when neither SA_INTERRUPT nor SA_RESTART were defined. - completed sample vtt_termtab with support for all the modes of a real Digital vt420 0.3 1995/02/07 - fixed /bin/cc problem on sun, no atexit()... - fixed typo in sample vtt_termtab. 0.2 1995/02/06 - code cleaned up. - manpage added. - tested on Sun/Linux/Fbsd platforms, fixed some portability problems. - exit status now 2 on error, 1 means tty not recognised. - cleaned verbose/trace options and messages. - sample vtt_termtab, based on xterm/xvt/shelltool/cit224+/... 0.1 1995/01/29 - Initial revision, vtt more or less works. Still needs cleanup and manpage.