Xref: utzoo comp.sources.d:6418 alt.sources.d:1435 Path: utzoo!utgpu!cs.utexas.edu!sdd.hp.com!usc!apple!agate!usenet.ins.cwru.edu!ncoast!allbery From: allbery@NCoast.ORG (Brandon S. Allbery KB8JRR) Newsgroups: comp.sources.d,alt.sources.d Subject: Re: termcap and negative numbers Message-ID: <1991Feb2.182324.4140@NCoast.ORG> Date: 2 Feb 91 18:23:24 GMT References: <17263@cgl.ucsf.EDU> Reply-To: allbery@ncoast.ORG (Brandon S. Allbery KB8JRR) Followup-To: comp.sources.d Organization: North Coast Public Access Un*x (ncoast) Lines: 24 As quoted from <17263@cgl.ucsf.EDU> by srp@babar.mmwb.ucsf.edu (Scott R. Presnell): +--------------- | Is there a standard extention to the termcap source code that | allows the extraction of negative numbers via the tgetnum() call? Or has | anyone implemented something like this? I'm just looking for a precedent. +--------------- Since -1 from tgetnum() means "capability not present", there's potential for interpretation problems here. Note that "not present" is quite different from "0" in some cases; consider "sg#0" vs. "sg@". The former is usually interpreted as the terminal has "field" attributes which don't use visible screen memory, while the latter means that the terminal has "character" attributes. (I still argue that the former is really the "ms@" attribute, but the current behavior is too well entrenched now to be changed.) Thus, the value "0" can't be used to say "not present". ++Brandon -- Me: Brandon S. Allbery VHF/UHF: KB8JRR on 220, 2m, 440 Internet: allbery@NCoast.ORG Packet: KB8JRR @ WA8BXN America OnLine: KB8JRR AMPR: KB8JRR.AmPR.ORG [44.70.4.88] uunet!usenet.ins.cwru.edu!ncoast!allbery Delphi: ALLBERY