From nobody Thu Feb 23 20:26:22 2023 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PN4L93XDCz3sjM4 for ; Thu, 23 Feb 2023 20:26:25 +0000 (UTC) (envelope-from btv1==4186ac3e7a1==tom@invisible-island.net) Received: from smtp-1a.his.com (smtp-1a.his.com [216.194.196.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PN4L92zNnz4Mmd for ; Thu, 23 Feb 2023 20:26:25 +0000 (UTC) (envelope-from btv1==4186ac3e7a1==tom@invisible-island.net) Authentication-Results: mx1.freebsd.org; none Received: from cuda501.his.com (cuda501.his.com [18.191.10.220]) by smtp-1a.his.com (Postfix) with ESMTPS id 678A2321 for ; Thu, 23 Feb 2023 15:26:24 -0500 (EST) X-ASG-Debug-ID: 1677183983-1f26af441e418a40001-YuSLm7 Received: from smtp-nf-202.his.com (smtp-nf-202.his.com [216.194.196.20]) by cuda501.his.com with ESMTP id RLOF2R6bltNBKjHk; Thu, 23 Feb 2023 15:26:23 -0500 (EST) X-Barracuda-Envelope-From: tom@invisible-island.net X-Barracuda-RBL-Trusted-Forwarder: 216.194.196.20 Received: from zproxy101.his.com (zproxy101.his.com [18.218.2.49]) by smtp-nf-202.his.com (Postfix) with ESMTPS id 36CF7609C8; Thu, 23 Feb 2023 15:26:23 -0500 (EST) Received: from localhost (localhost.localdomain [127.0.0.1]) by zproxy101.his.com (Postfix) with ESMTP id E39611780B8; Thu, 23 Feb 2023 15:26:22 -0500 (EST) X-Barracuda-RBL-IP: 18.218.2.49 X-Barracuda-Effective-Source-IP: zproxy101.his.com[18.218.2.49] X-Barracuda-Apparent-Source-IP: 18.218.2.49 Received: from zproxy101.his.com ([127.0.0.1]) by localhost (zproxy101.his.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id ALf8KAah04X6; Thu, 23 Feb 2023 15:26:22 -0500 (EST) Received: from localhost (localhost.localdomain [127.0.0.1]) by zproxy101.his.com (Postfix) with ESMTP id C995E1798E0; Thu, 23 Feb 2023 15:26:22 -0500 (EST) X-Virus-Scanned: amavisd-new at zproxy101.his.com Received: from zproxy101.his.com ([127.0.0.1]) by localhost (zproxy101.his.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ZV0k80gW7-Yf; Thu, 23 Feb 2023 15:26:22 -0500 (EST) Received: from prl-debianold-64.jexium-island.net (static-96-255-221-90.washdc.fios.verizon.net [96.255.221.90]) by zproxy101.his.com (Postfix) with ESMTPSA id AF0FF1780B8; Thu, 23 Feb 2023 15:26:22 -0500 (EST) Received: from tom by prl-debianold-64.jexium-island.net with local (Exim 4.92) (envelope-from ) id 1pVIAY-0001Cu-E5; Thu, 23 Feb 2023 15:26:22 -0500 Date: Thu, 23 Feb 2023 15:26:22 -0500 From: Thomas Dickey To: Kurt Hackenberg Cc: questions@freebsd.org Subject: Re: Cursing the tput utility - the penguin strikes again Message-ID: <20230223202622.GA4604@prl-debianold-64.jexium-island.net> X-ASG-Orig-Subj: Re: Cursing the tput utility - the penguin strikes again Reply-To: dickey@his.com References: <974a81c2-a92d-7f94-5f96-869bddfe21f3@fjl.co.uk> List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="VS++wcV0S1rZb1Fb" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Barracuda-Connect: smtp-nf-202.his.com[216.194.196.20] X-Barracuda-Start-Time: 1677183983 X-Barracuda-URL: https://spam.his.com:443/cgi-mod/mark.cgi X-Barracuda-BRTS-Status: 1 X-Virus-Scanned: by bsmtpd at his.com X-Barracuda-Scan-Msg-Size: 2216 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0174 1.0000 -1.9076 X-Barracuda-Spam-Score: -1.91 X-Barracuda-Spam-Status: No, SCORE=-1.91 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=5.0 KILL_LEVEL=7.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.105179 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Rspamd-Queue-Id: 4PN4L92zNnz4Mmd X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:11604, ipnet:216.194.196.0/24, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --VS++wcV0S1rZb1Fb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 23, 2023 at 03:14:16PM -0500, Kurt Hackenberg wrote: > On Thu, Feb 23, 2023 at 04:45:21PM +0000, Frank Leonhardt wrote: >=20 > > So there's a tput utility for controlling the terminal in BSD. > ... > > Well use the tcap utility on non-BSD platforms and it suddenly doesn't > > work. It turns out that the penguinistas thought using the "Cap Name" > > instead of the "TCap Code" was a good idea. Some of the codes are the > > same, some are not. In fact most are not. >=20 > The trouble is those are two different mechanisms, based on two different > file formats, that do the same thing. >=20 > The two file formats are "termcap" and "terminfo", both from the default > names of the system files that use them. Manual section 5 has pages about > both. They're similar, but different enough to be incompatible. >=20 > The "TCap codes" are the names used in termcap format; the "Capnames" are > the names used in terminfo format. (A "cap" is a terminal "capability".) >=20 > I think termcap came first, and then somebody invented terminfo as an > improvement or a reimplementation of the same idea. I think termcap came > from Berkeley Unix -- maybe invented for vi -- so FreeBSD more or less > stayed with it. Maybe terminfo came from Bell Labs; I think Linux prefers > it. most do (FreeBSD's userland is an exception) It's actually ncurses (and terminfo) underneath the facade. related - https://invisible-island.net/ncurses/tctest.html =20 > This is pointlessly incompatible, the result of haphazard evolution, and > kind of a mess. It's all about 40 years old. >=20 > The library functions that use those terminal descriptions were in the > library "curses" (from "cursor"), long ago superseded by "ncurses" (new > curses). Probably the program tput uses the library ncurses. You might wa= nt > to look at that library; maybe there's a compatibility layer. Or, as Dani= el > Tameling suggested, maybe there are two different version of ncurses. just one - https://invisible-island.net/ncurses/ncurses.faq.html#platform-portable (but reading the FreeBSD sources would tell more) --=20 Thomas E. Dickey https://invisible-island.net --VS++wcV0S1rZb1Fb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGYgtkt2kxADCLA1WzCr0RyFnvgMFAmP3y+oACgkQzCr0RyFn vgMavAv/Z0U5vYHWn/X8jKLBcGMmy5E27qUWqE/6ZkxK5FiXyvlAOnH+Odhhrmue tNP9bDTtxmr2NQ8CdSQ6WShw+J8/agkfUs3sHOavTMw/D66bJ3CXvdyM+Z7ic7Jy bZkG/Be4+o7amPwUnAQwbtMVx4vfapQ/PdPLc/q38JTe4pQGaxhe0H6yf1cg1eiu ECpcS/EA5q6yqzxHdy7Nc8MqclYH160/VkDPhMjWLGZo78xvm1uLJXajgGeDnTVr AcepjzIAcubHxBdgS8qRo3v3h8Sx8wPdZ0t5ZTHKleO/DOpPRnql5LBIHdTG7lrX Xp9f99ihCVE9QQq27eBgVpHlK14V/jtV0GbTryxDA9G5tCyywX293z3o94lOAn7L hnOWN7aSZ8TaKriPSBwE7TxAQj4+Oh/goerlMXPfADCW8GKuEB37PNv2vAftKDNw X57GKN20Wcm98fwZFKWMmPdSTK9SCbGib9NfYaDxTAykmBtbJaNQz0aT5cYZP3iB iKMafcxa =6g1t -----END PGP SIGNATURE----- --VS++wcV0S1rZb1Fb--