Re: svn commit: r333351 - head/usr.bin/grep

2018-05-08 Thread Kyle Evans
On Tue, May 8, 2018 at 3:36 PM, Ronald Klop wrote: > On Tue, 08 May 2018 16:49:12 +0200, Alexey Dokuchaev > wrote: > >> On Tue, May 08, 2018 at 09:36:21AM -0500, Kyle Evans wrote: >>> >>> On Tue, May 8, 2018 at 5:58 AM, Alexey Dokuchaev >>> wrote: >>> >> >>> >> - if ((f = fopen(fn, "r")) ==

Re: svn commit: r333351 - head/usr.bin/grep

2018-05-08 Thread Ronald Klop
On Tue, 08 May 2018 16:49:12 +0200, Alexey Dokuchaev wrote: On Tue, May 08, 2018 at 09:36:21AM -0500, Kyle Evans wrote: On Tue, May 8, 2018 at 5:58 AM, Alexey Dokuchaev wrote: >> >> - if ((f = fopen(fn, "r")) == NULL) >> + if (strcmp(fn, "-") == 0) >> + f = stdin; > >

Re: svn commit: r333351 - head/usr.bin/grep

2018-05-08 Thread Alexey Dokuchaev
On Tue, May 08, 2018 at 09:36:21AM -0500, Kyle Evans wrote: > On Tue, May 8, 2018 at 5:58 AM, Alexey Dokuchaev wrote: > >> > >> - if ((f = fopen(fn, "r")) == NULL) > >> + if (strcmp(fn, "-") == 0) > >> + f = stdin; > > > > This makes sense: when `fn' is "-", `f' is stdin. > > >

Re: svn commit: r333351 - head/usr.bin/grep

2018-05-08 Thread Kyle Evans
On Tue, May 8, 2018 at 5:58 AM, Alexey Dokuchaev wrote: > On Tue, May 08, 2018 at 03:53:47AM +, Kyle Evans wrote: >> New Revision: 51 >> URL: https://svnweb.freebsd.org/changeset/base/51 >> >> Log: >> bsdgrep: Allow "-" to be passed to -f to mean "standard input" >> >> A version of

Re: svn commit: r333351 - head/usr.bin/grep

2018-05-08 Thread Alexey Dokuchaev
On Tue, May 08, 2018 at 03:53:47AM +, Kyle Evans wrote: > New Revision: 51 > URL: https://svnweb.freebsd.org/changeset/base/51 > > Log: > bsdgrep: Allow "-" to be passed to -f to mean "standard input" > > A version of this patch was originally sent to me by se@, matching behavio

svn commit: r333351 - head/usr.bin/grep

2018-05-07 Thread Kyle Evans
Author: kevans Date: Tue May 8 03:53:46 2018 New Revision: 51 URL: https://svnweb.freebsd.org/changeset/base/51 Log: bsdgrep: Allow "-" to be passed to -f to mean "standard input" A version of this patch was originally sent to me by se@, matching behavior from newer versions of G