Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Jan 2017 06:26:00 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 195763] bsdgrep, empty matches and -o
Message-ID:  <bug-195763-8-QXe4qj8fsp@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-195763-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-195763-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D195763

Kyle Evans <bsdports@kyle-evans.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #179173|0                           |1
        is obsolete|                            |

--- Comment #5 from Kyle Evans <bsdports@kyle-evans.net> ---
Created attachment 179175
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D179175&action=
=3Dedit
Proposed patch to address line matching issues

Ugh, sorry -- this really should be the final version. Shortly after the la=
st
update, I caught a mailing list entry that mentioned broken beginning of li=
ne
matching behavior and figured it would be wise to catch this as well.

REG_NOTBOL needs to be manually set if we're past the beginning of the stri=
ng
because we also use REG_STARTEND to limit the scope of our matching, which
makes the regex functions think we're beginning of line all the time.

We do not need to do the same with EOL since we limit the scope by adjusting
rm_so, resetting rm_eo to the end of the line. It might not be a bad idea to
later set it anyways, just in case we change our mind, but for now that's o=
ut
of scope.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-195763-8-QXe4qj8fsp>