diff options
author | hubertf <hubertf@pkgsrc.org> | 1998-05-04 23:30:22 +0000 |
---|---|---|
committer | hubertf <hubertf@pkgsrc.org> | 1998-05-04 23:30:22 +0000 |
commit | 550f63ed3ebeca3e00216f95e097177cff119ab7 (patch) | |
tree | b2b0b47464e61bcacb976a597b5034c88ac652a0 /misc | |
parent | a9df96d0ddab2a7c5306f304699d154fa1f96716 (diff) | |
download | pkgsrc-550f63ed3ebeca3e00216f95e097177cff119ab7.tar.gz |
Fix output if it's not going to a tty; as posted to current-users
by Soren S. Jorvang <soren@t.dk>.
Diffstat (limited to 'misc')
-rw-r--r-- | misc/colorls/patches/patch-ab | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/misc/colorls/patches/patch-ab b/misc/colorls/patches/patch-ab index e8ddb3fbdfb..058bc7b15f0 100644 --- a/misc/colorls/patches/patch-ab +++ b/misc/colorls/patches/patch-ab @@ -1,7 +1,5 @@ -For NetBSD - hubertf - ---- ls.c.orig Thu Oct 23 14:12:16 1997 -+++ ls.c Thu Oct 23 14:13:44 1997 +--- ls.c.orig Tue May 5 01:15:09 1998 ++++ ls.c Tue May 5 01:16:24 1998 @@ -59,6 +59,8 @@ #include <string.h> #include <unistd.h> @@ -11,3 +9,13 @@ For NetBSD - hubertf #include "ls.h" #include "extern.h" +@@ -170,7 +172,8 @@ + f_type = 1; + break; + case 'G': +- f_color = 1; ++ if (isatty(STDOUT_FILENO)) ++ f_color = 1; + break; + case 'L': + fts_options &= ~FTS_PHYSICAL; |