Date: Sun, 7 Apr 1996 14:02:05 +0200 (MET DST) From: J Wunsch <j@uriah.heep.sax.de> To: freebsd-current@FreeBSD.org (FreeBSD-current users) Subject: Re: Can we upgrade ncurses? Message-ID: <199604071202.OAA18082@uriah.heep.sax.de> In-Reply-To: <peter.828869674@jhome.DIALix.COM> from "Peter Wemm" at Apr 7, 96 09:34:34 am
next in thread | previous in thread | raw e-mail | index | archive | help
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. ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199604071202.OAA18082>