delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/10/14/08:07:24

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <ABDA876D71F9D211B39D0090274EA8E213E898@Floyd.logica.co.uk>
From: "Fieldhouse, Dirk" <Fieldhouse AT logica DOT com>
To: "'cygwin AT sourceware DOT cygnus DOT com'" <cygwin AT sourceware DOT cygnus DOT com>
Subject: RE: Scrollable DOS Box under Win95/98
Date: Thu, 14 Oct 1999 13:05:40 +0100
X-Mailer: Internet Mail Service (5.5.2448.0)

On 13 October 1999 19:35, I wrote:
> Paul, 
> 
> That's great. I have to say I never actually tried programming this
myself.
> However it definitely works with the USB supplement W95 console. Just a
> little argument processing and hey presto, a bash resizer.

Here's a typical Win32 weirdness: 

1	SetConsoleScreenBufferSize under W9x expands the window to the
intersection of (scroll buffer size, screen size).

2	You can't SetConsoleScreenBufferSize to a size less than the current
window 

3	GetConsoleScreenBufferInfo - one call - returns the current window
and scroll buffer sizes but there's no SetConsoleScreenBufferInfo -  you
have to call SetConsoleScreenBufferSize and SetConsoleWindowInfo (as well as
SetConsoleTextAttribute and SetConsoleCursorPosition to provide the full
'set' equivalent of GetConsoleScreenBufferInfo).

So you can expand your bash window's scroll buffer, at which point the
window expands, and then you can't set it back to the original size. Or you
can expand the scroll buffer and immediately restore the window size, with
unpleasant user interface results.

See also "A Critique of the Windows Application Programming Interface" at
http://kerkis.math.aegean.gr/~dspin/pubs/jrnl/1997-CSI-WinApi/html/win.html

/df

> On Wed, 13 Oct 1999 21:11:00 +0300, Paul Sokolovsky[SMTP:paul-ml AT is DOT lg DOT ua]
wrote:
> > 
> > Dirk Fieldhouse <fieldhouse AT logica DOT com> wrote:
> > 
> > DF> On Wed, 13 Oct 1999 10:12:06 -0400, "Garrett Sylvester" <gsylvester
at
> > gdats dot com> wrote:
> > 
> > >> Is it possible to get a scrollable screen (DOS box) whose buffer has
more
> > >> than 50 lines when I run the Cygnus BASH shell and utilities under
WIn 95
> > >> or 98? I've looked all over for some way to do this, but no joy. (I
know
> > >> you can do it with NT.)
> > 
> > DF> This is a limitation of the 'console subsystem', such as it is, in
W9x
> > (conagent, winoa386, etc), so even using the W95 version of cmd.exe
> > doesn't help. You could possibly rewrite it - rather you
> > DF> than me. However, search the archives for references to rxvt which
> > might give you what you want for Cygwin purposes.
> > 
> > #include <windows.h>
> > 
> > main()
> > {
> >   COORD c={100,100};
> >   SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE),c);
> > }
> > 
> > works for both fullscreen shell I use (FAR) and cygwin's bash.
> > 
> >       It doesn't work for command.com but probably just because it's
> > dos app, not win32.
> > 
> > 
> > Best regards,
> >  Paul                            mailto:paul-ml AT is DOT lg DOT ua
> > 
> 
> 



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019