delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/08/08/02:58:55

Date: Wed, 8 Aug 2001 09:58:43 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: "Mark E." <snowball3 AT bigfoot DOT com>
cc: djgpp-workers AT delorie DOT com
Subject: Re: TIOCGWINSZ
In-Reply-To: <3B701C66.28168.7C3116@localhost>
Message-ID: <Pine.SUN.3.91.1010808095816.23412F@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Tue, 7 Aug 2001, Mark E. wrote:

> I think it would be nice if DJGPP supported TIOCGWINSZ ioctl call to
> retrieve the number of rows and columns. It will help ncurses and
> readline "just work" without the need for more conditional code.

Agreed.

> I've deleted the "#if 0" block in sys/ioctl.h. But I don't most of
> things in there are worth bothering about. If there were, it would
> have caused enough trouble to implement before now. And I don't
> think it's possible to implement the ioctl commands in the Posix
> draft in DJGPP, so that leaves us with TIOCGWINSZ. Therefore, I
> think most of the unix stuff in sys/ioctl.h can be cleared out.

I'm not sure what you are saying here, but the diffs you sent expose
all of the Unix ioctl stuff, which we don't support.  I think that
would be a mistake: we should only define those features we do
support, so that packages that use #ifdef TIOCGWINSZ could DTRT.

The original ioctl.h didn't ifdef away the Unixy part, and that broke
some ported packages which tried to use the non-implemented features.

So I think we should only define TIOCGWINSZ and struct winsize, for
now.  Unless you are going to implement the rest of the stuff, that
is ;-)

> !       win->ws_xpixel = win->ws_col * 8;  /* Assumes 8 pixel width. */
> !       win->ws_ypixel = win->ws_row * _farnspeekw(0x0485);

Shouldn't we put 1 here, since pixels are irrelevant in text mode?
What do other text-mode environments (Unix, GNU/Linux) return in these
members?

- Raw text -


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