From owner-freebsd-arch@FreeBSD.ORG Fri Feb 21 19:14:23 2014 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 998D1424 for ; Fri, 21 Feb 2014 19:14:23 +0000 (UTC) Received: from mail-vc0-x236.google.com (mail-vc0-x236.google.com [IPv6:2607:f8b0:400c:c03::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 50E0A1286 for ; Fri, 21 Feb 2014 19:14:23 +0000 (UTC) Received: by mail-vc0-f182.google.com with SMTP id id10so3648995vcb.41 for ; Fri, 21 Feb 2014 11:14:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Evp/jmYgXIBtNK4+qtn5d8c+HdujdV/nBiyCYihvUrc=; b=Wr2l8iUzmdHqR3HC/FvX20ChBdKIB0DnJynnWC5EK9oq3b2b34JIxOmWOhW9nxbKIo 6llOpq7c5wIkTiBDrBrwGWyW4qXkdfJKOk7XpW4ZK1G0K3WYv+lws3Zyi7W8A5BfkXtA nVMbNiUkZaZx14Gx4KOnWIqmNI+G6uaJRLVO4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Evp/jmYgXIBtNK4+qtn5d8c+HdujdV/nBiyCYihvUrc=; b=I85GF7AFjxAHB7rzXtbV26sv8Y+nAlcuC83qumKSaCoPeCeoMWcgSndNqWLM9+9mYg KxUgnUZdYNxWvovfQxkccuk1Et5Jmrt1rSoA/+nOdMEKlNyN44t8H0YjZ6Dyqriy2nj3 CWfoHNKlKvZtLlKFR7Lqy67ye+ko5HeYzYQfbQpQdHey/3RT11FhPii1Czjw/NxY9c8j sxOeVz7j0UToAJuCMeDPOcHhEaxdNejCcUhbs6P1rXz1/54YRop1ijbTJCVx8AFxrGMs DmPqla2jOwd4A0Z8XKJIqi2BKQjhkHr4WLoZSTwUz8tY6NEGQRRcBy6cMkLezBTGihPe hAXA== X-Gm-Message-State: ALoCoQlngWHwmrL8dsdnV7BLwlhHrAZHcDdjSblt53Y4gSag7WaQzSeLrZkVBmuBidOCdpaPxr+e MIME-Version: 1.0 X-Received: by 10.220.47.10 with SMTP id l10mr5920368vcf.56.1393010062368; Fri, 21 Feb 2014 11:14:22 -0800 (PST) Received: by 10.220.30.69 with HTTP; Fri, 21 Feb 2014 11:14:22 -0800 (PST) In-Reply-To: <5304A0CC.5000505@FreeBSD.org> References: <5304A0CC.5000505@FreeBSD.org> Date: Fri, 21 Feb 2014 11:14:22 -0800 Message-ID: Subject: Re: terminfo From: Peter Wemm To: Bryan Drewery Content-Type: text/plain; charset=ISO-8859-1 Cc: FreeBSD Arch X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Feb 2014 19:14:23 -0000 On Wed, Feb 19, 2014 at 4:17 AM, Bryan Drewery wrote: > Why do we not use terminfo? Our termcap is quite aged and missing a lot > of modern terminals/clients. Using terminfo would allow us to use the > already well maintained database from ncurses. > > Is it just a matter of someone doing the work or are there other reasons? > > -- > Regards, > Bryan Drewery > There are historical reasons. As the person who imported the current setup I have some insight into that. One issue was because cons25 / syscons was evolving. That's no longer the case. Because things were in flux, people accumulated their own rules. Another was that termcap was the source of truth on 4.x BSD systems, but we could translate into terminfo dynamically for things that needed it. At the time, the reverse wasn't adequate - the ncurses provided terminfo wasn't rich enough to express everything we had in termcap so we couldn't do a lossless conversion of our home grown termcap rules into terminfo and get everything back through the emulator. There were personal preferences as well - the ncurses terminfo at the time was sysv-style and was a fixed binary format and non-extensible while termcap was flexible and freely extendable. HOWEVER, if I were to do it today, I would be inclined to use netbsd's libtinfo and cdb modules and switch to terminfo as the source of truth. It is my understanding that netbsd's libtinfo "compiles" into a .cdb format file and gives us the same flexibility that we have with termcap/termcap.db without the non-extensible sysv binary format lock-in. Then have ncurses use it instead, like netbsd does. We get to import the ncurses sourced terminfo database and port over our tweaks/extensions as needed. As has been pointed out in other followups.. the ones that really matter are xterm/xterm-color/vt100/cons25. And less so on including cons25 in that as syscons can speak xterm now and the others are xterm only. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV Yes, I know, gmail sucks now. If you see this then I forgot. Habits are hard to break.