From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2201 invoked from network); 16 Jun 1999 13:16:51 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 16 Jun 1999 13:16:51 -0000 Received: (qmail 18005 invoked by alias); 16 Jun 1999 13:16:12 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6663 Received: (qmail 17998 invoked from network); 16 Jun 1999 13:16:11 -0000 Message-Id: <9906161247.AA25648@ibmth.df.unipi.it> To: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: 3.0.6-pre-4: COLUMNS/LINES environment handling In-Reply-To: ""Bart Schaefer""'s message of "Mon, 14 Jun 1999 09:43:01 DFT." <990614094301.ZM19130@candle.brasslantern.com> Date: Wed, 16 Jun 1999 14:47:31 +0200 From: Peter Stephenson "Bart Schaefer" wrote: > Now, somebody who has a copy of the actual POSIX shell spec should tell > us if the above is reasonable. Zoltan, are you out there? I had a look at the single UNIX spec (see http://www.opengroup.org/) and it doesn't say anything about this, at least in the Shell chapter (2). > How much of all that needs to go in the manual? Lots of it should go in > the FAQ, including remarks about how it is broken in various versions if > we can figure that out. As it now behaves logically, the manual entry can be shortish, but it might be nice to say a bit more about LINES and COLUMNS, e.g. that they're set automatically if possible but may be wrong. As for the FAQ entry, maybe inspiration will strike, but these things are unpredictable, n'est-ce pas? > Finally, I noticed that `winchanged' was declared only if TIOCGWINSZ but > used without such a condition. Apparently zsh doesn't get built on any > systems that don't have TIOCGWINSZ? Presumably it hasn't been (because it can't be), but this must be wrong. This is a non-sequitur, but while I was looking at the UNIX spec I noticed that LINENO, unlike LINES, is specified, and it says that functions as well as scripts should have it set. You'll find out that with autoloaded functions you always get 0 from `print $LINENO' (the question of why is not entirely trivial). I've known about this for ages, but the ways I thought about fixing it at the time were rather gross. But maybe someone's little grey cells... -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy