From owner-cvs-all Sun Jun 4 16:24:22 2000 Delivered-To: cvs-all@freebsd.org Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by hub.freebsd.org (Postfix) with ESMTP id 7C41337B545; Sun, 4 Jun 2000 16:24:13 -0700 (PDT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (robert@fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.9.3/8.9.3) with SMTP id TAA08981; Sun, 4 Jun 2000 19:23:41 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Sun, 4 Jun 2000 19:23:41 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Doug Barton Cc: Warner Losh , "Matthew N. Dodd" , cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, Josef Karthauser Subject: Re: cvs commit: src/bin/ls extern.h ls.1 ls.c ls.h print.c In-Reply-To: <393ADBA7.7A2B5BF9@gorean.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 4 Jun 2000, Doug Barton wrote: > 3. First choice for 'ls -G' should be tgetstr(), with the ANSI codes > left in as a fallback if that returns NULL. (Thus handling the case of > no mounted /usr as well as possible.) Forgive me my ignorance here -- the only situation I can imagine where using hard-coded color codes would be appropriate would be where termcap is not available, but a known-good terminal type is available via getenv("TERM"). I don't believe there is any other appropriate situation -- if color information is not available from termcap for the current terminal, then no codes should be used as they are a priori inappropriate as they're for a different terminal type :-). So this leads me to the obvious question: if terminal information is not available, why would we want to print out color codes? Is it not acceptable to just not print in color when in single-user mode, or if the termcap database is unavailable? Robert To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message