[Top] | [Contents] | [Index] | [ ? ] |
This document covers the installation and operation of TVision under the FreeBSD and Linux operating systems.
1. Overview An overview of the TVision package. 2. Reporting Bugs Submitting effective bug reports. 3. File Structure Notes on the file hierarchy. 4. Copyright This copyright license says how you can copy and use TVision.
5. Portability issues The portability of the package. 6. Keyboard The keyboard handling. 7. Screen The screen handling. 8. Mouse The mouse handling. 9. Environment Variables The user modifiable environment variables.
10. Compiling TVision How to compile the library. 11. Resources A list of useful sites.
12. Credits Contributors and useful links. 13. Author's address To send him a nice postcard.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
TV is available in C++ and Pascal and is a product of Borland International. It was developed to run on MS-DOS systems, but today it is available for many other platforms (ported by independent programmers).
This port is based on the Borland 2.0 version with fixes. Original Turbo Vision 2.0 sources should be available at:
ftp://ftp.borland.com/pub/borlandcpp/devsupport/archive/turbovision
ftp://ftp.inprise.com/pub/borlandcpp/devsupport/archive/turbovision
See the 12. Credits section for a list of other useful sites.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
For bug reports, please include enough information for the maintainers to reproduce the problem. Generally speaking, that means:
When in doubt whether something is needed or not, include it. It's better to include too much than to leave out something important.
Patches are most welcome; if possible, please make them with `diff -ru' (see See section `Overview' in The diff program, for details).
When sending email, please do not encode or split the messages in any way if possible; it's much easier to deal with one plain text message, however large, than many small ones.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
`tvision.info' was automatically extracted from `tvision.texi' with the program `makeinfo'. The command `texi2dvi tvision.texi' will output `tvision.dvi', which can then be processed with `dvips' and optionally `gs' (Ghostscript) to produce a nicely formatted printed manual. See section `Overview' in The Texinfo format, and See section `Getting Started' in The info program, for more about the Texinfo documentation system.
To produce this documentation, I annotated each class directly in the header file (.h) where it appears. Then I ran `doxygen', a powerful documentation extractor available from http://www.doxygen.org/index.html or from http://www.stack.nl/~dimitri/doxygen/download.html. It automatically fetches these information and generates a nice html manual.
Before compiling the library, a trick in `Makefile.am' creates a symbolic link named `tvision' to this same directory. This recursive link allows the smooth compilation of the various source files, because all of them try to include `tvision/tv.h'.
`tv.h' is the only header every application needs to include. It automatically includes the required TVision header files by looking at the various `Uses_XXXX' macros. If one macro is defined the relevant header is included.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
All changes copyright (c) 1997-2001 Sergio Sigala, Brescia, Italy. All rights reserved.Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
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 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 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Warning: this BSD-style copyright is applicable only to the modifications brought by Sergio Sigala to the original code. Borland has released the code to the public, but still owns the original copyright (see file `lib/tv.h' for instance).
Other contributors have their respective copyright.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
I made various changes in the code to make it run correctly under big-endian machines. I tested it with a PowerPC running Linux and it works fine (maybe some other minor changes are required).
Another problem is the massive usage of the PC-specific character set. This usually gives a nice look when the applications run in the system console, but can show very annoying characters when they run in a remote terminal or under a X shell.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
More specifically, the ncurses package supports:
In addition to drawing characters on the screen, video attributes and colors may be supported, causing the characters to show up in such modes as underlined, in reverse video, or in color on terminals that support such display enhancements. Line drawing characters may be specified to be output. On input, ncurses is also able to translate arrow and function keys that transmit escape sequences into single value integers. Type `man ncurses' for more.
Under Linux a special output mechanism called VCS, which gives direct access to the console screen memory, may be used. This is noticeably faster than the standard ncurses output. See 7. Screen for details.
For example, to generate the Alt-X combination press ESC X. To generate ESC alone press it once and wait 0.4 seconds or press it twice. If the second key is pressed outside the time interval, the entire sequence is treated like two ordinary key presses are.
Support for CTRL and SHIFT key combinations is also missing.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
There is no way to speedup this process without doing some low-level, operating-system-specific trickery, necessarily non portable across the various operating systems.
This mechanism is a lot faster than the standard ncurses output; we'll call it virtual console mode. For clearness, we'll refer to the conventional, ncurses-based output approach, as remote mode. Not surprising, this facility is capable of displaying all of the 256 characters with all colors the graphic adapter allows, so it fixes the first problem too.
The Linux kernel provides a handful of special devices which refer to the memories of the various virtual consoles; they are described below:
These devices replace the screendump ioctls of `console(4)', so the system administrator can control access using file system permissions. Your application may require root privileges, in order to gain access to these devices. Type `man vcs' for more.
If not already present, the devices for the first eight virtual consoles may be created by:
for x in 0 1 2 3 4 5 6 7 8; do mknod -m 644 /dev/vcs$x c 7 $x; mknod -m 644 /dev/vcsa$x c 7 $[$x+128]; done chown root:tty /dev/vcs* |
Alternatively, you may try the following script, taken from the Midnight Commander, which builds all the 64 devices:
#!/bin/sh # # Script by Jakub Jelinek # if test -e /dev/vcs0 then exit fi I=0 while [ $I -lt 64 ] do mknod /dev/vcs$I c 7 $I chmod 622 /dev/vcs$I chown root.tty /dev/vcs$I mknod /dev/vcsa$I c 7 `expr $I + 128` chmod 622 /dev/vcsa$I chown root.tty /dev/vcsa$I I=`expr $I + 1` done |
In any case, colors are used if the terminal supports them. Otherwise, a monochrome palette with bold and inverse attributes is used to mark the text.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
moused -p /dev/cuaa0 -t microsoft |
By using the `TVOPT' environment variable, you can modify the shape of the cursor. Setting it to `noarrow' disables the arrow pointer; the block pointer will instead be used. See the 9. Environment Variables section for more.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
TVLOG=mylog |
The log file creation can be suppressed by assigning an empty string to this variable.
Note: this option and the one above are useful only when the VCS is enabled; in any other mode the application should automatically select the correct mapping, thanks to the translation kindly done by ncurses and the operating system.
export TVOPT=nogpm ==> does not use Gpm export TVOPT="nogpm novcs" ==> disables both Gpm and VCS export TVOPT= ==> cleans the environment variable |
setenv TVOPT nogpm ==> does not use Gpm setenv TVOPT "nogpm novcs" ==> disables both Gpm and VCS unsetenv TVOPT ==> cleans the environment variable |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Note: this command and the previous (`make install') both need root privileges and should possibly be followed by `ldconfig' to update the linker cache.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Sergio Sigala sergio@sigala.it Viale De Gasperi, 8 25041 Boario Terme (BS) Italy
[Top] | [Contents] | [Index] | [ ? ] |
1. Overview
2. Reporting Bugs
3. File Structure
4. Copyright
5. Portability issues
6. Keyboard
7. Screen
8. Mouse
9. Environment Variables
10. Compiling TVision
11. Resources
12. Credits
13. Author's address
[Top] | [Contents] | [Index] | [ ? ] |
1. Overview
2. Reporting Bugs
3. File Structure
4. Copyright
5. Portability issues
6. Keyboard
7. Screen
8. Mouse
9. Environment Variables
10. Compiling TVision
11. Resources
12. Credits
13. Author's address
[Top] | [Contents] | [Index] | [ ? ] |
Button | Name | Go to | From 1.2.3 go to |
---|---|---|---|
[ < ] | Back | previous section in reading order | 1.2.2 |
[ > ] | Forward | next section in reading order | 1.2.4 |
[ << ] | FastBack | previous or up-and-previous section | 1.1 |
[ Up ] | Up | up section | 1.2 |
[ >> ] | FastForward | next or up-and-next section | 1.3 |
[Top] | Top | cover (top) of document | |
[Contents] | Contents | table of contents | |
[Index] | Index | concept index | |
[ ? ] | About | this page |