diff options
author | gabor <gabor@FreeBSD.org> | 2010-08-15 22:15:04 +0000 |
---|---|---|
committer | gabor <gabor@FreeBSD.org> | 2010-08-15 22:15:04 +0000 |
commit | 5ee11c8783defc30e3f53ba6ba6004cae0574e8b (patch) | |
tree | 44ced6cc8e38528f9ae4294c0509d9f40b61a7c7 /usr.bin/grep/grep.h | |
parent | 257a18ba177d6257c87a07ccb72fc9908650db8c (diff) | |
download | FreeBSD-src-5ee11c8783defc30e3f53ba6ba6004cae0574e8b.zip FreeBSD-src-5ee11c8783defc30e3f53ba6ba6004cae0574e8b.tar.gz |
- 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 <spam@rm-rf.kiev.ua> [2] [3],
swell.k@gmail.com [2],
poyopoyo@puripuri.plala.or.jp [4]
Submitted by: scf [5],
Shuichi KITAGUCHI <ki@hh.iij4u.or.jp> [6]
Approved by: delphij (mentor)
Diffstat (limited to 'usr.bin/grep/grep.h')
-rw-r--r-- | usr.bin/grep/grep.h | 5 |
1 files changed, 1 insertions, 4 deletions
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 */ |