From owner-freebsd-current Sun Feb 24 21:36: 1 2002 Delivered-To: freebsd-current@freebsd.org Received: from mail-relay1.yahoo.com (mail-relay1.yahoo.com [216.145.48.34]) by hub.freebsd.org (Postfix) with ESMTP id CD48837B422; Sun, 24 Feb 2002 21:35:55 -0800 (PST) Received: from DougBarton.net (12-234-22-238.client.attbi.com [12.234.22.238]) by mail-relay1.yahoo.com (Postfix) with ESMTP id 914FE8B5AB; Sun, 24 Feb 2002 21:35:55 -0800 (PST) Message-ID: <3C79CD3B.E315DF4B@DougBarton.net> Date: Sun, 24 Feb 2002 21:35:55 -0800 From: Doug Barton Organization: Triborough Bridge & Tunnel Authority X-Mailer: Mozilla 4.79 [en] (X11; U; Linux 2.4.2 i386) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-current@freebsd.org, joe@freebsd.org Subject: LSCOLORS warning is silly Content-Type: multipart/mixed; boundary="------------DFCA465D07C4E73ED02FCE90" Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This is a multi-part message in MIME format. --------------DFCA465D07C4E73ED02FCE90 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit A couple months ago an improvement was added to the color support of ls to use a wider variety of colors, indicated by alphabet characters instead of numbers. While I think this is a good change, it included a warning when users have the old style numeric flags in their LSCOLORS variable. I think this is a mistake, and needlessly places another barrier for users coming into -current. Since the support for the old style color flags is practically free, I'd like to suggest that rather than warning the user, we simply continue to support the old flags, and indicate that they are deprecated in the man page. I'd like to commit the attached patch. Let me know what you think. -- "We have known freedom's price. We have shown freedom's power. And in this great conflict, ... we will see freedom's victory." - George W. Bush, President of the United States State of the Union, January 28, 2002 Do YOU Yahoo!? --------------DFCA465D07C4E73ED02FCE90 Content-Type: text/plain; charset=us-ascii; name="ls.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ls.diff" ? ls.1.gz Index: ls.1 =================================================================== RCS file: /home/ncvs/src/bin/ls/ls.1,v retrieving revision 1.62 diff -u -r1.62 ls.1 --- ls.1 9 Jan 2002 13:29:39 -0000 1.62 +++ ls.1 25 Feb 2002 05:24:12 -0000 @@ -496,6 +496,8 @@ is the foreground color and .Ar b is the background color. +The old style of numbers as color designators are still supported, +although deprecated. .Pp The color designators are as follows: .Pp Index: print.c =================================================================== RCS file: /home/ncvs/src/bin/ls/print.c,v retrieving revision 1.53 diff -u -r1.53 print.c --- print.c 25 Feb 2002 01:36:59 -0000 1.53 +++ print.c 25 Feb 2002 05:24:13 -0000 @@ -481,7 +481,6 @@ int j; int len; char c[2]; - short legacy_warn = 0; if (cs == NULL) cs = ""; /* LSCOLORS not set */ @@ -500,13 +499,6 @@ /* Legacy colours used 0-7 */ if (c[j] >= '0' && c[j] <= '7') { colors[i].num[j] = c[j] - '0'; - if (!legacy_warn) { - fprintf(stderr, - "warn: LSCOLORS should use " - "characters a-h instead of 0-9 (" - "see the manual page)\n"); - } - legacy_warn = 1; } else if (c[j] >= 'a' && c[j] <= 'h') colors[i].num[j] = c[j] - 'a'; else if (c[j] >= 'A' && c[j] <= 'H') { --------------DFCA465D07C4E73ED02FCE90-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message