Mail Archives: djgpp-workers/2001/08/08/02:58:55
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 -