summaryrefslogtreecommitdiff
path: root/misc/colorls
diff options
context:
space:
mode:
authorhubertf <hubertf>1998-05-04 23:30:22 +0000
committerhubertf <hubertf>1998-05-04 23:30:22 +0000
commit1830d010cf3014103d8a34054bf563a4e62b8ca6 (patch)
treeb2b0b47464e61bcacb976a597b5034c88ac652a0 /misc/colorls
parent7b6c601be8b6ef0da26f869ad50ea154cf19bcca (diff)
downloadpkgsrc-1830d010cf3014103d8a34054bf563a4e62b8ca6.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/colorls')
-rw-r--r--misc/colorls/patches/patch-ab16
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;