From: Jim Meyering Date: Mon, 10 Mar 1997 04:47:32 +0000 (+0000) Subject: (decode_switches): Ignore value of COLUMNS envionment X-Git-Tag: SH-UTILS-1_16a~190 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=613357b0abecb668c65318acfa7fe24a2dea9e98;p=thirdparty%2Fcoreutils.git (decode_switches): Ignore value of COLUMNS envionment variable when it is the empty string. Suggestion from Ulrich Drepper. --- diff --git a/src/ls.c b/src/ls.c index 67e372370a..ec051c29d9 100644 --- a/src/ls.c +++ b/src/ls.c @@ -825,7 +825,7 @@ decode_switches (int argc, char **argv) quote_as_string = 0; line_length = 80; - if ((p = getenv ("COLUMNS"))) + if ((p = getenv ("COLUMNS")) && *p) { if (xstrtol (p, NULL, 0, &tmp_long, NULL) == LONGINT_OK && 0 < tmp_long && tmp_long <= INT_MAX)