comp.lang.ada
 help / color / mirror / Atom feed
From: Ivan Levashew <octagram@bluebottle.com>
Subject: Re: Screen package (Mike Feldman)
Date: Wed, 24 Dec 2008 22:26:39 -0800 (PST)
Date: 2008-12-24T22:26:39-08:00	[thread overview]
Message-ID: <d27fc12c-4b24-40b2-bef7-b398d155a642@r24g2000vbp.googlegroups.com> (raw)
In-Reply-To: nospam-6FCA62.02200724122008@nntp.motzarella.org

On 24 дек, 13:20, "John B. Matthews" <nos...@nospam.com> wrote:
>
> IIRC, some terminal emulators clear the screen by writing a series
> of empty lines to the screen. If the terminal window is enlarged,
> the number of lines written may not suffice to clear the entire
> screen. Have you tried a different terminal emulator?
>
> <http://technosrix.blogspot.com/2008/08/best-windows-terminal-emulator...>

This post isn't quite correct. There is no such thing as terminal
emulator on plain Win32 installation. Terminal emulator is supposed
to map stream of bytes to a matrix of characters. There are also
some details such as signal hangling (e. g. SIGWINCH), but these
are minory issues. Generally, UNIX Terminals operate on streams.
Windows console doesn't.

Win32 console can't be mapped to a stream. One can always output
to it like if it was a file, but then one will lose ability to
output unicode symbols, which is not a desired thing. One must
use WriteConsoleW in order to output unicode symbols. The bad
thing about WriteConsole is that it can only output symbols to
a "console" objects. Console objects are maintained by OS, and
one can't easily provide own console object instead of system one.

Windows console objects is, put simply, a matrix of character cells.
One can't replace it with something being more complex. (Apple
Terminal
stores window contents as a vector of strings, so it can rewrap
strings
after resizes). One can't enable more colors than 16 on Windows
consoles.
Windows console is a kind of terminal, and it's not replaceable.

There are just 2 opportunities to replace Windows provided Terminal
window: create invisible console object and render its contents on
another window, or intercept Console APIs.

Console2 actually installs interceptor DLL.

Tools like PuTTY interoperate with UNIX hosts so they are working on a
byte streams. They are unable to host FAR manager because FAR manager
uses
Console APIs. There are advanced SSH servers for Windows that can (in
contrast
to Cygwin sshd) transmit FAR Manager window to a remote host. Such
server is either
intercepting APIs or creating invisible console object and
transmitting updates.



  parent reply	other threads:[~2008-12-25  6:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-23 21:22 Screen package (Mike Feldman) tolkamp
2008-12-24  7:20 ` John B. Matthews
2008-12-24 11:05   ` tolkamp
2008-12-25  6:26   ` Ivan Levashew [this message]
2008-12-24 15:57 ` anon
2008-12-25  5:55 ` Ivan Levashew
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox