You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
PDCursesMod/vt
Bill-Gray ab9f4163c5 VT flavor did not recognize the Escape key 6 years ago
..
CMakeLists.txt CMake tested on Windows, and Linux 7 years ago
Makefile VT makefile modified so one can 'make speed' (demo to test speed of ncurses or PDCurses drawing). Should have been added in to previous commit. 6 years ago
Makefile.bcc Initial versions of makefiles for various compilers. They all work, at least 'sort of', though further effort is apt to be needed 7 years ago
Makefile.dmc Followed wcbrine's lead: removed terminfo.c and term.h, moved mvcur() to move.c See docs/HISTORY.md for details on why this was done. 6 years ago
Makefile.vc Two Makefile.vc files didn't have 'common' defined, resulting in errors when compiling DLLs for those flavors with Visual C. 6 years ago
Makefile.wcc Initial versions of makefiles for various compilers. They all work, at least 'sort of', though further effort is apt to be needed 7 years ago
README.md Update to README.md to reflect changes, clarify some poorly written bits. 6 years ago
pdcclip.c MSVC gave numerous warnings for casts and similar issues. Mostly nuisances, but they are fixed herein. 6 years ago
pdcdisp.c VT flavor : fwrite()s to stdout could fail if a signal handler was called mid-write. (Something I only noticed with 'picsview' expanded to a huge screen and with lots of resizing.) You have to notice that not all bytes were written, check to make sure that a signal handler really was the problem, then try again until all bytes do get written. 6 years ago
pdcgetsc.c Modified to resemble similar code in other flavors, including debugging statements 7 years ago
pdckbd.c VT flavor did not recognize the Escape key 6 years ago
pdcscrn.c VT flavor will now use SGR mouse commands if available. 6 years ago
pdcsetsc.c PDC_init_color() now takes integers, not shorts. This had some small ripple effects. 6 years ago
pdcutil.c VT now uses WIN32_LEAN_AND_MEAN. This speeds up compiles (very slightly). 6 years ago
pdcvt.h Followed wmcbrine lead in putting suppression of MSVC bogus warnings into platform-specific include files, and not in 'curspriv.h' or makefiles. 'curspriv.h' altered to follow wmcbrine's style. 6 years ago

README.md

PDCurses for VT

This directory contains source code to support PDCurses using a mix of xterm, VT-100, VT-200, and ANSI escape sequences to set colors, position the cursor, etc. Note that the name is misleading; it uses an olio of control sequences from

https://www.gnu.org/software/screen/manual/html_node/Control-Sequences.html

which may, or may not, work on your terminal. I've tested it in urxvt, xterm, and QTerminal on Linux and FreeBSD, and in cmd on Win10 and (with NANSI.COM or NANSI.SYS) on Windows ME. MS-DOS (again with NANSI) and Linux console modes 'sort of' work (no mouse and the colors need work).

It assumes that 256 colors are available (16 in NANSI mode), but it can use full RGB on terminals that support it.

Building

In GNU/Linux, run make or make WIDE=Y. You can add -w64 or -w32 to cross-compile 64-bit or 32-bit Windows executables, using MinGW64.

In *BSD, use gmake or gmake WIDE=Y. Cross-compiling to Windows should be possible there as well.

For DOS/Windows, makefiles for Borland, Digital Mars, MSVC, and OpenWATCOM are provided, but are at the 'it works on my machine' stage, and haven't really been thoroughly vetted by others yet.

Caveats

As currently set up, this is a bare-bones implementation. It relies on a terminal that supports at least 256 colors. RGB colors get remapped to the 6x6x6 color cube. If the COLORTERM environment variable is set to truecolor, you'll get true color. If not, you can tell PDCurses you really do have true color by setting

PDC_VT=RGB

export PDC_VT

Note that you can explain to PDCurses more capabilities of the terminal, e.g.,

PDC_VT=RGB UNDERLINE BLINK DIM STANDOUT

to say that the underlying terminal supports true-color, underlined, blinking, dimmed, and 'standout' text. (The Right Thing to Do here would be to dig around in the terminfo database, as ncurses does, both to know the control sequences to use and the actual capabilities of the terminal.)

Arrow keys and some function keys are recognized (see the tbl array in pdckey.c). Some mouse input is recognized. Shift, Ctrl, and Alt function keys and arrows are (mostly) not correctly identified; I've not figured out how those keys are supposed to be detected yet. Or if they can be. None of the 'extended' keys found on some keyboards, such as Browser Back/Forward, Search, Refresh, Stop, etc., are detected, on any platform.

Clipboard functions are currently completely absent on this platform. I expect to be able to add clipboard functions for Windows by recycling code from the Windows GUI and console flavors, and have clipboard access code for X11 that is not yet included here.

Distribution Status

The files in this directory are released to the Public Domain.