Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 alpha 5/22/85; site cbosgd.UUCP Path: utzoo!linus!gatech!cbosgd!mark From: mark@cbosgd.UUCP (Mark Horton) Newsgroups: net.micro.att,net.unix-wizards Subject: Re: Re: instability in Berkeley versus AT&T releases (absurdly long) Message-ID: <1392@cbosgd.UUCP> Date: Sun, 11-Aug-85 19:45:53 EDT Article-I.D.: cbosgd.1392 Posted: Sun Aug 11 19:45:53 1985 Date-Received: Tue, 13-Aug-85 03:14:17 EDT References: <2067@ucf-cs.UUCP> <363@cuae2.UUCP> <2423@sun.uucp> Organization: AT&T Bell Laboratories, Columbus, Oh Lines: 36 Xref: linus net.micro.att:467 net.unix-wizards:11519 In article <553@brl-tgr.ARPA> gwyn@brl-tgr.ARPA (Doug Gwyn) writes: >> Actually, the SVR2 ls -C looks at the COLUMNS variable to find out how much >> space is available, and adjusts the number of columns accordingly. > >Columnators should also do an ioctl(TIOCGWINSZ) or the DMD equivalent. >Our "mpx" does not alter the COLUMNS environment variable for each >layer, but rather stores the window size in the tty structure. It doesn't really look directly at COLUMNS. It calls setupterm and looks at columns, which setupterm sets. Setupterm (a standard low level terminfo routine) checks for COLUMNS, does the proper ioctls (JWINSIZE for the 5620, TIOGCSIZE for Sun, and presumably TIOCGWINSZ for the 7300, and then looks at the terminfo database. Given the lack of standardization of this important ioctl, software should not call this, but let setupterm do it for you. Termcap based systems should let tgetnum do the same thing, as happens on the Sun. >It is very easy to make up a shell function, alias, or script like > l(){ > ls -Cf $*; > } >to make your own personalized "l" command if you want one. > >Default command behavior should be simple, with complexities reserved >for the options. In fact, this is what I do. However, your last sentence is important. I agree with what it says, not with what you meant. "simple" may be different depending on whose viewpoint you take. From the implementers viewpoint, it's simpler to have it run down the left margin. From the novice user's viewpoint, it's simpler to have it appear in columns on the side of the screen than to (a) learn to lunge for ^S before it runs off the screen, (b) remember to type -C every time, or (c) learn how to make a .profile that contains the function. Mark