Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.sys.hp Subject: Re: standards for windowing software? Message-ID: <4210@auspex.auspex.com> Date: 30 Oct 90 22:01:14 GMT References: <1990Oct20.123109.7287@cs.dal.ca> <25121@uflorida.cis.ufl.EDU> Distribution: na Organization: Auspex Systems, Santa Clara Lines: 41 > Thank you for your glowing review of HP-UX. While you had some >valid points regarding the use of SIGWINCH on Sun (and other Berkeley >based systems), Including System V Release 4.... >BTW, I was interested to hear that Sun's vi did not obey the SIGWINCH >signal ... I always assumed they had fixed vi since they had SIGWINCH... Yes, Sun *did* fix "vi" - they did so by *removing* the violently broken 4.3BSD handling of SIGWINCH. The 4.3BSD version, when it gets a SIGWINCH, does a big "longjmp()" back to the initialization code, which gets the new window size, blah blah blah. Unfortunately, if the SIGWINCH is delivered while "vi" is in the middle of, say, reading in a file, you lose big - the read-in is aborted. SunView delivers SIGWINCH to a window-system program not only when a window's size is changed, but also when the window is opened or closed or part of it is uncovered. The SunView tty subwindow code passes SIGWINCH through in all those cases, so if you move a tty subwindow to the front when "vi" is reading in a file, you'd lose. Delivering a SIGWINCH through to the tty in that case really isn't useful, although it *is* useful to deliver it when a window is opened or closed. Ideally, "vi" should be fixed to handle SIGWINCH sanely - and to do so even when in insert mode, instead of just blocking SIGWINCH when in insert mode, as the 4.3BSD "vi" does - but "vi" is a mess internally and it didn't look easy to fix. > It would be ridiculous if it were true. But, in fact, HP-UX vi >(and other curses-based terminal window applications) *DO* make use of >ROWS and COLUMNS. It should also use TIOCGWINSZ, as S5R4's "curses" and SunOS's "curses" and 4.3BSD's "curses" and various other systems "curses" do. (I.e., do a TIOCGWINSZ; if that succeeds and returns non-zero sizes, use them, otherwise get LINES and COLUMNS; if they exist, use their values, otherwise fall back on the "terminfo" entry.)