From 5ee11c8783defc30e3f53ba6ba6004cae0574e8b Mon Sep 17 00:00:00 2001 From: gabor Date: Sun, 15 Aug 2010 22:15:04 +0000 Subject: - Revert strlcpy() changes to memcpy() because it's more efficient and former may be safer but in this case it doesn't add extra safety [1] - Fix -w option [2] - Fix handling of GREP_OPTIONS [3] - Fix --line-buffered - Make stdin input imply --line-buffered so that tail -f can be piped to grep [4] - Imply -h if single file is grepped, this is the GNU behaviour - Reduce locking overhead to gain some more performance [5] - Inline some functions to help the compiler better optimize the code - Use shortcut for empty files [6] PR: bin/149425 [6] Prodded by: jilles [1] Reported by: Alex Kozlov [2] [3], swell.k@gmail.com [2], poyopoyo@puripuri.plala.or.jp [4] Submitted by: scf [5], Shuichi KITAGUCHI [6] Approved by: delphij (mentor) --- usr.bin/grep/grep.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'usr.bin/grep/grep.h') diff --git a/usr.bin/grep/grep.h b/usr.bin/grep/grep.h index bb5e5f9..2f743e4 100644 --- a/usr.bin/grep/grep.h +++ b/usr.bin/grep/grep.h @@ -115,7 +115,7 @@ extern int cflags, eflags; extern bool Eflag, Fflag, Gflag, Hflag, Lflag, bflag, cflag, hflag, iflag, lflag, mflag, nflag, oflag, qflag, sflag, vflag, wflag, xflag; -extern bool dexclude, dinclude, fexclude, finclude, nullflag; +extern bool dexclude, dinclude, fexclude, finclude, lbflag, nullflag; extern unsigned long long Aflag, Bflag, mcount; extern char *label; extern const char *color; @@ -134,7 +134,6 @@ extern fastgrep_t *fg_pattern; extern char re_error[RE_ERROR_BUF + 1]; /* Seems big enough */ /* util.c */ -bool dir_matching(const char *dname); bool file_matching(const char *fname); int procfile(const char *fn); int grep_tree(char **argv); @@ -153,8 +152,6 @@ void clearqueue(void); void grep_close(struct file *f); struct file *grep_stdin_open(void); struct file *grep_open(const char *path); -int grep_feof(struct file *f); -int grep_fgetc(struct file *f); char *grep_fgetln(struct file *f, size_t *len); /* fastgrep.c */ -- cgit v1.1