From 6a65a7e10a4189931f5ab166f4c918fd56f8ff6a Mon Sep 17 00:00:00 2001 From: gabor Date: Sun, 25 Jul 2010 08:42:18 +0000 Subject: - Fix --color behaviour to only output color sequences if stdout is a tty or if forced mode is specified [1] - While here, add some alternative names for the options and make then case-insensitive - Fix -q and -l behaviour [2] - Some small changes to make the code easier to review Submitted by: swell.k@gmail.com [1], dougb [2] Approved by: delphij (mentor) --- usr.bin/grep/grep.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'usr.bin/grep/grep.h') diff --git a/usr.bin/grep/grep.h b/usr.bin/grep/grep.h index 573de56..4a2d43f 100644 --- a/usr.bin/grep/grep.h +++ b/usr.bin/grep/grep.h @@ -60,14 +60,14 @@ extern const char *errstr[]; #define FILE_GZIP 1 #define FILE_BZIP 2 -#define DIR_GREP 0 +#define DIR_READ 0 #define DIR_SKIP 1 #define DIR_RECURSE 2 -#define DEV_GREP 0 +#define DEV_READ 0 #define DEV_SKIP 1 -#define LINK_GREP 0 +#define LINK_READ 0 #define LINK_EXPLICIT 1 #define LINK_SKIP 2 @@ -120,7 +120,8 @@ extern bool Eflag, Fflag, Gflag, Hflag, Lflag, qflag, sflag, vflag, wflag, xflag; extern bool exclflag, nullflag; extern unsigned long long Aflag, Bflag, mcount; -extern char *color, *label; +extern char *label; +extern const char *color; extern int binbehave, devbehave, dirbehave, filebehave, grepbehave, linkbehave; extern bool first, matchall, notfound, prev; -- cgit v1.1