From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c12346c96c20fe7b X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!r24g2000vbp.googlegroups.com!not-for-mail From: Ivan Levashew Newsgroups: comp.lang.ada Subject: Re: Screen package (Mike Feldman) Date: Wed, 24 Dec 2008 22:26:39 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <763c9600-b888-4d85-9fe9-2f1e5286eadf@i24g2000prf.googlegroups.com> NNTP-Posting-Host: 83.246.130.218 Mime-Version: 1.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1230186399 578 127.0.0.1 (25 Dec 2008 06:26:39 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 25 Dec 2008 06:26:39 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: r24g2000vbp.googlegroups.com; posting-host=83.246.130.218; posting-account=SWSr0goAAABcqpu6T_j1x1_Ub5y2Ekfy User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.60 (Windows NT 5.1; U; ru) Presto/2.1.1,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:4063 Date: 2008-12-24T22:26:39-08:00 List-Id: On 24 =C4=C5=CB, 13:20, "John B. Matthews" 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? > > 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.