[Lazarus] Xterm, konsole etc.

Mark Morgan Lloyd markMLl.lazarus at telemetry.co.uk
Tue Jun 18 10:44:04 CEST 2013


Hans-Peter Diettrich wrote:
> Mattias Gaertner schrieb:
>> On Sat, 15 Jun 2013 13:46:57 +0000
>> Mark Morgan Lloyd <markMLl.lazarus at telemetry.co.uk> wrote:
>>
>>> What's the easiest way to implement something like xterm or konsole, 
>>> that has minimal escape decoding for e.g. cursor control but under 
>>> normal circumstances buffers output lines in scrollable form?
>>>
>>> What I'm trying to do is implement some special 8-bit codepage 
>>> mapping for programs run inside a window, but it would be desirable 
>>> to be able to run a (unix) shell and a standard editor such as vi.
>>
>> I'm interested in a terminal LCL control as well.
> 
> Please specify: do you want a terminal (e.g. VT-52) or a shell window?

I think it's necessary to separate "shell" (e.g. Bash on Linux) and 
"window" for the purpose of discussion.

The interesting case there is where a shell running in e.g. Xterm or 
Konsole, which normally appends output to the last line and scrolls, 
switches to running a text editor such as Vi where scrolling is 
inhibited. There's also the issue of keeping the environment variables 
that tell a child process the window size (in character units) up to 
date, and sending a WINCH signal when appropriate.

Once there's a control that can handle character-addressable output (and 
ideally can scroll as well), implementing VT-100 (or -52, or 3270, or 
whatever legacy command set one's lumbered with) is comparatively 
simple. It also depends somewhat on the underlying communications 
mechanism, i.e. serial, telnet, tn3270 or whatever turns you on.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]




More information about the Lazarus mailing list