From owner-freebsd-current Sun Apr 7 05:51:28 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id FAA10326 for current-outgoing; Sun, 7 Apr 1996 05:51:28 -0700 (PDT) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id FAA10321 for ; Sun, 7 Apr 1996 05:51:22 -0700 (PDT) Received: from sax.sax.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id OAA02062 for ; Sun, 7 Apr 1996 14:51:05 +0200 Received: by sax.sax.de (8.6.11/8.6.12-s1) with UUCP id OAA01868 for freebsd-current@FreeBSD.org; Sun, 7 Apr 1996 14:51:04 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.7.5/8.6.9) id OAA18082 for freebsd-current@FreeBSD.org; Sun, 7 Apr 1996 14:02:06 +0200 (MET DST) From: J Wunsch Message-Id: <199604071202.OAA18082@uriah.heep.sax.de> Subject: Re: Can we upgrade ncurses? To: freebsd-current@FreeBSD.org (FreeBSD-current users) Date: Sun, 7 Apr 1996 14:02:05 +0200 (MET DST) Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: from "Peter Wemm" at Apr 7, 96 09:34:34 am X-Phone: +49-351-2012 669 X-Mailer: ELM [version 2.4 PL24 ME8a] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk As Peter Wemm wrote: > The thing that I *sorely* miss in termcap (after being raised on terminfo) is > the more descriptive capability names. > I can dream, can't I? ;-) I think BSDi has been fixing this, at least for use with their login classes. passwd(5) login classes are used as an index into a termcap- style database, but they've definitely cleaned up the code and allow for long capability names. I don't know whether they've done it as a `generic' XXXcap library, or only for the login classes. Our current way of doing things is a crock. Consider /usr/src/usr.sbin/lpr/common_source/printcap.c: ... /* * termcap - routines for dealing with the terminal capability data base ^^^^^^^ ^^^^^^^^^^^^^^^^^^^ * ... #define PRINTCAP ... if (bp >= tbuf+BUFSIZ) { write(2, "Termcap entry too long\n", 23); *bp = '\0'; ... cp = getenv("TERMCAP"); /* * TERMCAP can have one of two things in it. It can be the ... if (cp && *cp) { if (*cp!='/') { cp2 = getenv("TERM"); if (cp2==(char *) 0 || strcmp(name,cp2)==0) { strcpy(bp,cp); return(tnchktc()); } else { tf = open(_PATH_PRINTCAP, 0); } } else tf = open(cp, 0); } if (tf==0) tf = open(_PATH_PRINTCAP, 0); #else tf = open(_PATH_PRINTCAP, 0); #endif ...or /usr/src/usr.bin/vgrind/vgrindefs.c: /* * Get an entry for terminal name in buffer bp, * from the termcap file. Parse is very rudimentary; * we just notice escaped newlines. */ tgetent(bp, name, file) char *bp, *name, *file; { ... Just to name two of them. (In addition, the code there is a clear candidate for the IOCCC. I wonder whether Bill Joy did ever participate in it...) -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)