Date: Wed, 8 Aug 2001 09:58:43 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: "Mark E." cc: djgpp-workers AT delorie DOT com Subject: Re: TIOCGWINSZ In-Reply-To: <3B701C66.28168.7C3116@localhost> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk 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?