pkg://fileutils-4.1-10.4.src.rpm:1292396/fileutils-ls-dumbterm.patch
info downloads
--- fileutils-4.0.36/src/ls.c.dumbterm Sun Jan 7 11:57:14 2001
+++ fileutils-4.0.36/src/ls.c Mon Jan 15 14:31:17 2001
@@ -116,6 +116,7 @@
#include "system.h"
#include <fnmatch.h>
+#include <termcap.h>
#include "argmatch.h"
#include "error.h"
@@ -1298,7 +1299,9 @@
print_with_color = (i == color_always
|| (i == color_if_tty
- && isatty (STDOUT_FILENO)));
+ && isatty (STDOUT_FILENO))
+ && tgetent(NULL,getenv("TERM")) > 0
+ && tgetstr("md",NULL) > 0);
if (print_with_color)
{
--- fileutils-4.0.36/src/Makefile.in.dumbterm Sun Jan 14 21:08:32 2001
+++ fileutils-4.0.36/src/Makefile.in Mon Jan 15 14:32:26 2001
@@ -136,10 +136,10 @@
DEFS = -DLOCALEDIR=\"$(localedir)\" -DSHAREDIR=\"$(datadir)\" @DEFS@
LDADD = @INTLLIBS@ ../lib/libfetish.a
-dir_LDADD = $(LDADD) @LIB_CLOCK_GETTIME@
-ls_LDADD = $(LDADD) @LIB_CLOCK_GETTIME@
+dir_LDADD = $(LDADD) @LIB_CLOCK_GETTIME@ -ltermcap
+ls_LDADD = $(LDADD) @LIB_CLOCK_GETTIME@ -ltermcap
shred_LDADD = $(LDADD) @LIB_CLOCK_GETTIME@
-vdir_LDADD = $(LDADD) @LIB_CLOCK_GETTIME@
+vdir_LDADD = $(LDADD) @LIB_CLOCK_GETTIME@ -ltermcap
# Use `ginstall' in the definition of PROGRAMS and in dependencies to avoid
# confusion with the `install' target. The install rule transforms `ginstall'