From 4fe3b11a8cb74d310f159c10d23bbd9110f2f7a2 Mon Sep 17 00:00:00 2001 From: tjr Date: Wed, 6 Nov 2002 01:18:12 +0000 Subject: Use warn() instead of perror() or fprintf() where appropriate. --- bin/ls/print.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'bin/ls/print.c') diff --git a/bin/ls/print.c b/bin/ls/print.c index c09e1d6..841270b 100644 --- a/bin/ls/print.c +++ b/bin/ls/print.c @@ -558,10 +558,9 @@ parsecolors(const char *cs) if (c[j] >= '0' && c[j] <= '7') { colors[i].num[j] = c[j] - '0'; if (!legacy_warn) { - fprintf(stderr, - "warn: LSCOLORS should use " + warnx("LSCOLORS should use " "characters a-h instead of 0-9 (" - "see the manual page)\n"); + "see the manual page)"); } legacy_warn = 1; } else if (c[j] >= 'a' && c[j] <= 'h') @@ -572,9 +571,8 @@ parsecolors(const char *cs) } else if (tolower((unsigned char)c[j] == 'x')) colors[i].num[j] = -1; else { - fprintf(stderr, - "error: invalid character '%c' in LSCOLORS" - " env var\n", c[j]); + warnx("invalid character '%c' in LSCOLORS" + " env var", c[j]); colors[i].num[j] = -1; } } -- cgit v1.1