From bd82d8ab8f92c816eb4d2efab70e3472e518e72a Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Mon, 5 Jun 2000 19:36:06 +0000 Subject: [PATCH] Don't use curses includes, include termcap.h instead Add ^C reaction set --- bin/ls/ls.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/bin/ls/ls.c b/bin/ls/ls.c index ee9da2cb0f9..88b1d6d31ff 100644 --- a/bin/ls/ls.c +++ b/bin/ls/ls.c @@ -53,9 +53,6 @@ static const char rcsid[] = #include #include -#ifdef COLORLS -#include -#endif #include #include #include @@ -65,10 +62,11 @@ static const char rcsid[] = #include #include #include -#ifdef COLORLS -#include -#endif #include +#ifdef COLORLS +#include +#include +#endif #include "ls.h" #include "extern.h" @@ -123,6 +121,7 @@ int f_color; /* add type in color for non-regular files */ char *ansi_bgcol; /* ANSI sequence to set background colour */ char *ansi_fgcol; /* ANSI sequence to set foreground colour */ char *ansi_coloff; /* ANSI sequence to reset colours */ +extern void colorquit __P((int)); #endif int rval; @@ -299,8 +298,10 @@ main(argc, argv) argv += optind; #ifdef COLORLS - if (f_color) + if (f_color) { + (void) signal(SIGINT, colorquit); parsecolors(getenv("LSCOLORS")); + } #endif /*