From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20096 invoked from network); 7 Mar 1997 09:47:40 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by coral.primenet.com.au with SMTP; 7 Mar 1997 09:47:40 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id EAA07224; Fri, 7 Mar 1997 04:36:36 -0500 (EST) Resent-Date: Fri, 7 Mar 1997 04:36:36 -0500 (EST) From: "Bart Schaefer" Message-Id: <970307014359.ZM12055@candle.brasslantern.com> Date: Fri, 7 Mar 1997 01:43:59 -0800 In-Reply-To: gwing@primenet.com.au "Zle patch - termok change" (Mar 7, 6:23pm) References: <19970307072357.19867.qmail@primenet.com.au> Reply-To: schaefer@nbn.com X-Mailer: Z-Mail (4.0b.820 20aug96) To: gwing@primenet.com.au, zsh-workers@math.gatech.edu (zsh-workers) Subject: Re: Zle patch - termok change MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"_6gVi2.0.pm1.a6-7p"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2971 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Mar 7, 6:23pm, gwing@primenet.com.au wrote: } Subject: Zle patch - termok change } } termok now is flag based, not value based. } termok == 0 indicates a `normal' working terminal - this is *opposite* to } the previous situation. In that case, you should never use the form (!termok) because it reads as if you mean the terminal is not OK. Use (termok == 0) or make a new macro #define nosetflag(X) ((X) == 0) and then write (nosetflag(termok)). } Flags for termok are defined and explained in zsh.h - currently TERM_NARROW } is unused. It looks like it is used in zlevarsetfn() ... you mean nobody explicitly tests for it, but it is used in the sense that it makes termok != 0 ... } If a terminal is evaluated as TERM_BAD then that status shouldn't go until } $TERM is changed. So that means that init_term() looks for TERM_BAD and doesn't change it? Or what? } Bart wrote: } :Hmm. Well, I dislike ..... because it presumes that init_term() } :is independent of the values of "lines" and "columns". } } I can't see why lines/columns should be any way connected to init_term() . They don't need to be as long as init_term() doesn't reset TERM_SHORT or TERM_NARROW. If I do TERM=vt100 LINES=3 COLUMNS=3 TERM=xterm Then what happens to termok? Am I going to get a crash because init_term() has reset termok to zero? BTW: #define issetflag(X, Y) ((X & (Y)) == Y) #define isanysetflag(X, Y) (X & (Y)) Is it really necessary for these to be different? Why risk evaluating Y twice in issetflag? -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.nbn.com/people/lantern