History log of /freebsd-11-stable/usr.bin/grep/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
354628 11-Nov-2019 kevans

MFC bsdgrep(1) fixes: r320414, r328559, r332805-r332806, r332809, r332832,
r332850-r332852, r332856, r332858, r332876, r333351, r334803,
r334806-r334809, r334821, r334837, r334889, r335188, r351769, r352691

r320414:
Expect :mmap_eof_not_eol to fail

It relies on a jemalloc feature (opt.redzone) no longer available after
r319971.

r328559:
Remove t_grep:mmap_eof_not_eol test

The test was marked as an expected failure in r320414 after r319971's import
of a newer jemalloc removed an essential feature (opt.redzone) for
reproducing the behavior it was testing. Since then, no way has been found
or demonstrated to reliably test the behavior, so remove the test.

r332805:
bsdgrep: Split match processing out of procfile

procfile is getting kind of hairy, and it's not going to get better as we
correct some more bits that assume we process one line at a time.

r332806:
bsdgrep: Clean up procmatches a little bit

r332809:
bsdgrep: Add some TODOs for future work on operating on chunks

r332832:
bsdgrep: Break procmatches down a little bit more

Split the matching and non-matching cases out into their own functions to
reduce future complexity. As the name implies, procmatches will eventually
process more than one match itself in the future.

r332850:
bsdgrep: Some light cleanup

There's no point checking for a bunch of file modes if we're not a
practicing believer of DIR_SKIP or DEV_SKIP.

This also reduces some style violations that were particularly ugly looking
when browsing through.

r332851:
bsdgrep: More trivial cleanup/style cleanup

We can avoid branching for these easily reduced patterns

r332852:
bsdgrep: if chain => switch

This makes some of this a little easier to follow (in my opinion).

r332856:
bsdgrep: Fix --include/--exclude ordering issues

Prior to r332851:
* --exclude always win out over --include
* --exclude-dir always wins out over --include-dir

r332851 broke that behavior, resulting in:
* First of --exclude, --include wins
* First of --exclude-dir, --include-dir wins

As it turns out, both behaviors are wrong by modern grep standards- the
latest rule wins. e.g.:

`grep --exclude foo --include foo 'thing' foo`
foo is included

`grep --include foo --exclude foo 'thing' foo`
foo is excluded

As tested with GNU grep 3.1.

This commit makes bsdgrep follow this behavior.

r332858:
bsdgrep: Use grep_strdup instead of grep_malloc+strcpy

r332876:
bsdgrep: Fix build failure WITHOUT_LZMA (incorrect bracket placement)

r333351:
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 GNU grep.

While there have been some differences of opinion on whether stdin should be
closed or not after depleting it in process of -f, I've opted to leave stdin
open and just let the later matching stuff fail and result in a no-match.
I'm not married to the current behavior- it was generally chosen since we
are adopting this in particular from GNU grep, and I would like to stay
consistent without a strong argument to the contrary. The current behavior
isn't technically wrong, it's just fairly unfriendly to the developer-user
of grep that may not realize their usage is trivially invalid.

r334803:
netbsd-tests: grep(1): Add test for -c flag

Someone might be inclined to accidentally break this. someone might have
written said test because they broke it locally.

r334806:
bsdgrep(1): Do some less dirty things with return types

Neither procfile nor grep_tree return anything meaningful to their callers.
None of the callers actually care about how many lines were matched in all
of the files they processed; it's all about "did anything match?"

This is generally just a light refactoring to remind me of what actually
matters as I'm rewriting these bits to care less about 'stuff'.

r334807:
bsdgrep(1): whoops, garbage collect the now write-only variable

r334808:
bsdgrep(1): Don't initialize fts_flags twice

Admittedly, this is a clang-scan complaint... but it wasn't wrong. fts_flags
is initialized by all cases in the switch(), which should be fairly obvious.
Annotate this anyways.

r334809:
netbsd-tests: bsdgrep(1): Add a test for -m, too

r334821:
bsdgrep(1): Slooowly peel away the chunky onion

(or peel off the band-aid, whatever floats your boat)

This addresses two separate issues:

1.) Nothing within bsdgrep actually knew whether it cared about line numbers
or not.

2.) The file layer knew nothing about the context in which it was being
called.

#1 is only important when we're *not* processing line-by-line. #2 is
debatably a good idea; the parsing context is only handy because that's
where we store current offset information and, as of this commit, whether or
not it needs to be line-aware.

r334837:
bsdgrep(1): Evict character sequence that moved in

r334889:
bsdgrep(1): Some more int -> bool conversions and name changes

Again motivated by upcoming work to rewrite a bunch of this- single-letter
variable names and slightly misleading variable names ("lastmatches" to
indicate that the last matched) are not helpful.

r335188:
bsdgrep(1): Remove redundant initialization; unconditionally assigned later

r351769:
bsdgrep(1): add some basic tests for some GNU Extension support

These will be expanded later as I come up with good test cases; for now,
these seem to be enough to trigger bugs in base gnugrep and expose missing
features in bsdgrep.

r352691:
bsdgrep(1): various fixes of empty pattern/exit code/-c behavior

When an empty pattern is encountered in the pattern list, I had previously
broken bsdgrep to count that as a "match all" and ignore any other patterns
in the list. This commit rectifies that mistake, among others:

- The -v flag semantics were not quite right; lines matched should have been
counted differently based on whether the -v flag was set or not. procline
now definitively returns whether it's matched or not, and interpreting
that result has been kicked up a level.
- Empty patterns with the -x flag was broken similarly to empty patterns
with the -w flag. The former is a whole-line match and should be more
strict, only matching blank lines. No -x and no -w will will match the
empty string at the beginning of each line.
- The exit code with -L was broken, w.r.t. modern grep. Modern grap will
exit(0) if any file that didn't match was output, so our interpretation
was simply backwards. The new interpretation makes sense to me.

Tests updated and added to try and catch some of this.

This misbehavior was found by autoconf while fixing ports found in PR 229925
expecting either a more sane or a more GNU-like sed.

330449 05-Mar-2018 eadler

MFC r326276:

various: general adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.


/freebsd-11-stable/bin/pkill/pkill.c
/freebsd-11-stable/etc/pam.d/convert.pl
/freebsd-11-stable/kerberos5/lib/libgssapi_krb5/gss_krb5.c
/freebsd-11-stable/kerberos5/lib/libgssapi_krb5/pname_to_uid.c
/freebsd-11-stable/kerberos5/lib/libgssapi_krb5/prefix.c
/freebsd-11-stable/kerberos5/lib/libgssapi_ntlm/prefix.c
/freebsd-11-stable/kerberos5/lib/libgssapi_spnego/freebsd_compat.c
/freebsd-11-stable/sbin/adjkerntz/adjkerntz.c
/freebsd-11-stable/sbin/adjkerntz/pathnames.h
/freebsd-11-stable/sbin/camcontrol/camcontrol.h
/freebsd-11-stable/sbin/camcontrol/fwdownload.c
/freebsd-11-stable/sbin/camcontrol/modeedit.c
/freebsd-11-stable/sbin/camcontrol/progress.c
/freebsd-11-stable/sbin/camcontrol/progress.h
/freebsd-11-stable/sbin/camcontrol/util.c
/freebsd-11-stable/sbin/ccdconfig/ccdconfig.c
/freebsd-11-stable/sbin/ccdconfig/pathnames.h
/freebsd-11-stable/sbin/comcontrol/comcontrol.c
/freebsd-11-stable/sbin/conscontrol/conscontrol.c
/freebsd-11-stable/sbin/ddb/ddb.c
/freebsd-11-stable/sbin/ddb/ddb.h
/freebsd-11-stable/sbin/ddb/ddb_capture.c
/freebsd-11-stable/sbin/ddb/ddb_script.c
/freebsd-11-stable/sbin/devd/devd.h
/freebsd-11-stable/sbin/devd/devd.hh
/freebsd-11-stable/sbin/devd/parse.y
/freebsd-11-stable/sbin/devd/token.l
/freebsd-11-stable/sbin/devfs/devfs.c
/freebsd-11-stable/sbin/devfs/extern.h
/freebsd-11-stable/sbin/devfs/rule.c
/freebsd-11-stable/sbin/etherswitchcfg/etherswitchcfg.c
/freebsd-11-stable/sbin/fsck/fsutil.h
/freebsd-11-stable/sbin/fsck_ffs/ea.c
/freebsd-11-stable/sbin/fsck_ffs/suj.c
/freebsd-11-stable/sbin/fsck_msdosfs/boot.c
/freebsd-11-stable/sbin/fsck_msdosfs/check.c
/freebsd-11-stable/sbin/fsck_msdosfs/dir.c
/freebsd-11-stable/sbin/fsck_msdosfs/dosfs.h
/freebsd-11-stable/sbin/fsck_msdosfs/ext.h
/freebsd-11-stable/sbin/fsck_msdosfs/fat.c
/freebsd-11-stable/sbin/fsck_msdosfs/main.c
/freebsd-11-stable/sbin/fsdb/fsdb.c
/freebsd-11-stable/sbin/fsdb/fsdb.h
/freebsd-11-stable/sbin/fsdb/fsdbutil.c
/freebsd-11-stable/sbin/fsirand/fsirand.c
/freebsd-11-stable/sbin/gbde/gbde.c
/freebsd-11-stable/sbin/geom/class/cache/geom_cache.c
/freebsd-11-stable/sbin/geom/class/concat/geom_concat.c
/freebsd-11-stable/sbin/geom/class/eli/geom_eli.c
/freebsd-11-stable/sbin/geom/class/journal/geom_journal.c
/freebsd-11-stable/sbin/geom/class/journal/geom_journal.h
/freebsd-11-stable/sbin/geom/class/journal/geom_journal_ufs.c
/freebsd-11-stable/sbin/geom/class/label/geom_label.c
/freebsd-11-stable/sbin/geom/class/mirror/geom_mirror.c
/freebsd-11-stable/sbin/geom/class/mountver/geom_mountver.c
/freebsd-11-stable/sbin/geom/class/multipath/geom_multipath.c
/freebsd-11-stable/sbin/geom/class/nop/geom_nop.c
/freebsd-11-stable/sbin/geom/class/part/geom_part.c
/freebsd-11-stable/sbin/geom/class/raid/geom_raid.c
/freebsd-11-stable/sbin/geom/class/raid3/geom_raid3.c
/freebsd-11-stable/sbin/geom/class/sched/geom_sched.c
/freebsd-11-stable/sbin/geom/class/shsec/geom_shsec.c
/freebsd-11-stable/sbin/geom/class/stripe/geom_stripe.c
/freebsd-11-stable/sbin/geom/class/virstor/geom_virstor.c
/freebsd-11-stable/sbin/geom/core/geom.c
/freebsd-11-stable/sbin/geom/core/geom.h
/freebsd-11-stable/sbin/geom/misc/subr.c
/freebsd-11-stable/sbin/geom/misc/subr.h
/freebsd-11-stable/sbin/ggate/ggatec/ggatec.c
/freebsd-11-stable/sbin/ggate/ggated/ggated.c
/freebsd-11-stable/sbin/ggate/ggatel/ggatel.c
/freebsd-11-stable/sbin/ggate/shared/ggate.c
/freebsd-11-stable/sbin/ggate/shared/ggate.h
/freebsd-11-stable/sbin/gvinum/gvinum.c
/freebsd-11-stable/sbin/hastctl/hastctl.c
/freebsd-11-stable/sbin/hastd/activemap.c
/freebsd-11-stable/sbin/hastd/activemap.h
/freebsd-11-stable/sbin/hastd/control.c
/freebsd-11-stable/sbin/hastd/control.h
/freebsd-11-stable/sbin/hastd/ebuf.c
/freebsd-11-stable/sbin/hastd/ebuf.h
/freebsd-11-stable/sbin/hastd/event.c
/freebsd-11-stable/sbin/hastd/event.h
/freebsd-11-stable/sbin/hastd/hast.h
/freebsd-11-stable/sbin/hastd/hast_checksum.c
/freebsd-11-stable/sbin/hastd/hast_checksum.h
/freebsd-11-stable/sbin/hastd/hast_compression.c
/freebsd-11-stable/sbin/hastd/hast_compression.h
/freebsd-11-stable/sbin/hastd/hast_proto.c
/freebsd-11-stable/sbin/hastd/hast_proto.h
/freebsd-11-stable/sbin/hastd/hastd.c
/freebsd-11-stable/sbin/hastd/hastd.h
/freebsd-11-stable/sbin/hastd/hooks.c
/freebsd-11-stable/sbin/hastd/hooks.h
/freebsd-11-stable/sbin/hastd/lzf.c
/freebsd-11-stable/sbin/hastd/lzf.h
/freebsd-11-stable/sbin/hastd/metadata.c
/freebsd-11-stable/sbin/hastd/metadata.h
/freebsd-11-stable/sbin/hastd/nv.c
/freebsd-11-stable/sbin/hastd/nv.h
/freebsd-11-stable/sbin/hastd/parse.y
/freebsd-11-stable/sbin/hastd/pjdlog.c
/freebsd-11-stable/sbin/hastd/pjdlog.h
/freebsd-11-stable/sbin/hastd/primary.c
/freebsd-11-stable/sbin/hastd/proto.c
/freebsd-11-stable/sbin/hastd/proto.h
/freebsd-11-stable/sbin/hastd/proto_common.c
/freebsd-11-stable/sbin/hastd/proto_impl.h
/freebsd-11-stable/sbin/hastd/proto_socketpair.c
/freebsd-11-stable/sbin/hastd/proto_tcp.c
/freebsd-11-stable/sbin/hastd/proto_uds.c
/freebsd-11-stable/sbin/hastd/rangelock.c
/freebsd-11-stable/sbin/hastd/rangelock.h
/freebsd-11-stable/sbin/hastd/refcnt.h
/freebsd-11-stable/sbin/hastd/secondary.c
/freebsd-11-stable/sbin/hastd/subr.c
/freebsd-11-stable/sbin/hastd/subr.h
/freebsd-11-stable/sbin/hastd/synch.h
/freebsd-11-stable/sbin/hastd/token.l
/freebsd-11-stable/sbin/ifconfig/af_nd6.c
/freebsd-11-stable/sbin/ifconfig/carp.c
/freebsd-11-stable/sbin/ifconfig/ifbridge.c
/freebsd-11-stable/sbin/ifconfig/ifconfig.h
/freebsd-11-stable/sbin/ifconfig/iffib.c
/freebsd-11-stable/sbin/ifconfig/ifgif.c
/freebsd-11-stable/sbin/ifconfig/ifgre.c
/freebsd-11-stable/sbin/ifconfig/ifgroup.c
/freebsd-11-stable/sbin/ifconfig/ifieee80211.c
/freebsd-11-stable/sbin/ifconfig/ifmac.c
/freebsd-11-stable/sbin/ifconfig/ifpfsync.c
/freebsd-11-stable/sbin/iscontrol/auth_subr.c
/freebsd-11-stable/sbin/iscontrol/config.c
/freebsd-11-stable/sbin/iscontrol/fsm.c
/freebsd-11-stable/sbin/iscontrol/iscontrol.c
/freebsd-11-stable/sbin/iscontrol/iscontrol.h
/freebsd-11-stable/sbin/iscontrol/login.c
/freebsd-11-stable/sbin/iscontrol/misc.c
/freebsd-11-stable/sbin/iscontrol/pdu.c
/freebsd-11-stable/sbin/kldconfig/kldconfig.c
/freebsd-11-stable/sbin/kldload/kldload.c
/freebsd-11-stable/sbin/kldstat/kldstat.c
/freebsd-11-stable/sbin/kldunload/kldunload.c
/freebsd-11-stable/sbin/ldconfig/elfhints.c
/freebsd-11-stable/sbin/ldconfig/ldconfig.c
/freebsd-11-stable/sbin/ldconfig/ldconfig.h
/freebsd-11-stable/sbin/mdconfig/mdconfig.c
/freebsd-11-stable/sbin/mdmfs/mdmfs.c
/freebsd-11-stable/sbin/mksnap_ffs/mksnap_ffs.c
/freebsd-11-stable/sbin/mount/extern.h
/freebsd-11-stable/sbin/mount_fusefs/mount_fusefs.c
/freebsd-11-stable/sbin/mount_msdosfs/mount_msdosfs.c
/freebsd-11-stable/sbin/nandfs/lssnap.c
/freebsd-11-stable/sbin/nandfs/mksnap.c
/freebsd-11-stable/sbin/nandfs/nandfs.c
/freebsd-11-stable/sbin/nandfs/nandfs.h
/freebsd-11-stable/sbin/nandfs/rmsnap.c
/freebsd-11-stable/sbin/newfs_msdos/newfs_msdos.c
/freebsd-11-stable/sbin/newfs_nandfs/newfs_nandfs.c
/freebsd-11-stable/sbin/nos-tun/nos-tun.c
/freebsd-11-stable/sbin/nvmecontrol/devlist.c
/freebsd-11-stable/sbin/nvmecontrol/firmware.c
/freebsd-11-stable/sbin/nvmecontrol/identify.c
/freebsd-11-stable/sbin/nvmecontrol/logpage.c
/freebsd-11-stable/sbin/nvmecontrol/nvmecontrol.c
/freebsd-11-stable/sbin/nvmecontrol/nvmecontrol.h
/freebsd-11-stable/sbin/nvmecontrol/perftest.c
/freebsd-11-stable/sbin/nvmecontrol/reset.c
/freebsd-11-stable/sbin/pfctl/parse.y
/freebsd-11-stable/sbin/pfctl/pf_print_state.c
/freebsd-11-stable/sbin/pfctl/pfctl.c
/freebsd-11-stable/sbin/pfctl/pfctl.h
/freebsd-11-stable/sbin/pfctl/pfctl_parser.c
/freebsd-11-stable/sbin/pfctl/pfctl_parser.h
/freebsd-11-stable/sbin/pfctl/pfctl_radix.c
/freebsd-11-stable/sbin/pfctl/pfctl_table.c
/freebsd-11-stable/sbin/rcorder/rcorder.c
/freebsd-11-stable/sbin/reboot/nextboot.sh
/freebsd-11-stable/sbin/spppcontrol/spppcontrol.c
/freebsd-11-stable/usr.bin/ar/acplex.l
/freebsd-11-stable/usr.bin/ar/acpyacc.y
/freebsd-11-stable/usr.bin/ar/ar.h
/freebsd-11-stable/usr.bin/ar/read.c
/freebsd-11-stable/usr.bin/ar/util.c
/freebsd-11-stable/usr.bin/ar/write.c
/freebsd-11-stable/usr.bin/asa/asa.c
/freebsd-11-stable/usr.bin/at/at.c
/freebsd-11-stable/usr.bin/at/at.h
/freebsd-11-stable/usr.bin/at/panic.c
/freebsd-11-stable/usr.bin/at/panic.h
/freebsd-11-stable/usr.bin/at/parsetime.c
/freebsd-11-stable/usr.bin/at/parsetime.h
/freebsd-11-stable/usr.bin/at/perm.c
/freebsd-11-stable/usr.bin/at/perm.h
/freebsd-11-stable/usr.bin/at/privs.h
/freebsd-11-stable/usr.bin/bluetooth/bthost/bthost.c
/freebsd-11-stable/usr.bin/bluetooth/btsockstat/btsockstat.c
/freebsd-11-stable/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sdp.c
/freebsd-11-stable/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c
/freebsd-11-stable/usr.bin/brandelf/brandelf.c
/freebsd-11-stable/usr.bin/bsdiff/bsdiff/bsdiff.c
/freebsd-11-stable/usr.bin/bsdiff/bspatch/bspatch.c
/freebsd-11-stable/usr.bin/c89/c89.c
/freebsd-11-stable/usr.bin/c99/c99.c
/freebsd-11-stable/usr.bin/calendar/dates.c
/freebsd-11-stable/usr.bin/calendar/events.c
/freebsd-11-stable/usr.bin/calendar/ostern.c
/freebsd-11-stable/usr.bin/calendar/parsedata.c
/freebsd-11-stable/usr.bin/calendar/paskha.c
/freebsd-11-stable/usr.bin/calendar/sunpos.c
/freebsd-11-stable/usr.bin/cmp/link.c
/freebsd-11-stable/usr.bin/colldef/parse.y
/freebsd-11-stable/usr.bin/colldef/scan.l
/freebsd-11-stable/usr.bin/compress/zopen.h
/freebsd-11-stable/usr.bin/cpuset/cpuset.c
/freebsd-11-stable/usr.bin/csplit/csplit.c
/freebsd-11-stable/usr.bin/ctlstat/ctlstat.c
/freebsd-11-stable/usr.bin/dtc/checking.cc
/freebsd-11-stable/usr.bin/dtc/checking.hh
/freebsd-11-stable/usr.bin/dtc/dtb.cc
/freebsd-11-stable/usr.bin/dtc/dtb.hh
/freebsd-11-stable/usr.bin/dtc/dtc.cc
/freebsd-11-stable/usr.bin/dtc/fdt.cc
/freebsd-11-stable/usr.bin/dtc/fdt.hh
/freebsd-11-stable/usr.bin/dtc/input_buffer.cc
/freebsd-11-stable/usr.bin/dtc/input_buffer.hh
/freebsd-11-stable/usr.bin/dtc/string.cc
/freebsd-11-stable/usr.bin/dtc/util.hh
/freebsd-11-stable/usr.bin/elf2aout/elf2aout.c
/freebsd-11-stable/usr.bin/elfdump/elfdump.c
/freebsd-11-stable/usr.bin/env/envopts.c
/freebsd-11-stable/usr.bin/env/envopts.h
/freebsd-11-stable/usr.bin/fetch/fetch.c
/freebsd-11-stable/usr.bin/finger/pathnames.h
/freebsd-11-stable/usr.bin/fstat/functions.h
/freebsd-11-stable/usr.bin/fstat/fuser.c
/freebsd-11-stable/usr.bin/fstat/main.c
/freebsd-11-stable/usr.bin/fsync/fsync.c
/freebsd-11-stable/usr.bin/gcore/elfcore.c
/freebsd-11-stable/usr.bin/gencat/gencat.c
/freebsd-11-stable/usr.bin/getent/getent.c
file.c
grep.c
grep.h
queue.c
regex/fastmatch.c
regex/hashtable.c
regex/tre-fastmatch.c
util.c
/freebsd-11-stable/usr.bin/gzip/gzip.c
/freebsd-11-stable/usr.bin/gzip/unbzip2.c
/freebsd-11-stable/usr.bin/gzip/unpack.c
/freebsd-11-stable/usr.bin/gzip/unxz.c
/freebsd-11-stable/usr.bin/iconv/iconv.c
/freebsd-11-stable/usr.bin/indent/indent.h
/freebsd-11-stable/usr.bin/ipcrm/ipcrm.c
/freebsd-11-stable/usr.bin/ipcs/ipc.c
/freebsd-11-stable/usr.bin/ipcs/ipc.h
/freebsd-11-stable/usr.bin/ipcs/ipcs.c
/freebsd-11-stable/usr.bin/iscsictl/iscsictl.c
/freebsd-11-stable/usr.bin/iscsictl/iscsictl.h
/freebsd-11-stable/usr.bin/iscsictl/parse.y
/freebsd-11-stable/usr.bin/iscsictl/periphs.c
/freebsd-11-stable/usr.bin/iscsictl/token.l
/freebsd-11-stable/usr.bin/killall/killall.c
/freebsd-11-stable/usr.bin/ktrdump/ktrdump.c
/freebsd-11-stable/usr.bin/lastcomm/readrec.c
/freebsd-11-stable/usr.bin/ldd/extern.h
/freebsd-11-stable/usr.bin/ldd/ldd.c
/freebsd-11-stable/usr.bin/ldd/sods.c
/freebsd-11-stable/usr.bin/locale/locale.c
/freebsd-11-stable/usr.bin/locate/locate/concatdb.sh
/freebsd-11-stable/usr.bin/locate/locate/mklocatedb.sh
/freebsd-11-stable/usr.bin/locate/locate/updatedb.sh
/freebsd-11-stable/usr.bin/lockf/lockf.c
/freebsd-11-stable/usr.bin/login/login.h
/freebsd-11-stable/usr.bin/logins/logins.c
/freebsd-11-stable/usr.bin/m4/gnum4.c
/freebsd-11-stable/usr.bin/m4/trace.c
/freebsd-11-stable/usr.bin/man/man.sh
/freebsd-11-stable/usr.bin/mkcsmapper/ldef.h
/freebsd-11-stable/usr.bin/mkcsmapper/lex.l
/freebsd-11-stable/usr.bin/mkcsmapper/yacc.y
/freebsd-11-stable/usr.bin/mkesdb/ldef.h
/freebsd-11-stable/usr.bin/mkesdb/lex.l
/freebsd-11-stable/usr.bin/mkesdb/yacc.y
/freebsd-11-stable/usr.bin/mktemp/mktemp.c
/freebsd-11-stable/usr.bin/mkuzip/mkuzip.c
/freebsd-11-stable/usr.bin/ncal/ncal.c
/freebsd-11-stable/usr.bin/netstat/bpf.c
/freebsd-11-stable/usr.bin/netstat/netisr.c
/freebsd-11-stable/usr.bin/newgrp/newgrp.c
/freebsd-11-stable/usr.bin/nl/nl.c
/freebsd-11-stable/usr.bin/passwd/passwd.c
/freebsd-11-stable/usr.bin/pathchk/pathchk.c
/freebsd-11-stable/usr.bin/perror/perror.c
/freebsd-11-stable/usr.bin/procstat/procstat.c
/freebsd-11-stable/usr.bin/procstat/procstat.h
/freebsd-11-stable/usr.bin/procstat/procstat_args.c
/freebsd-11-stable/usr.bin/procstat/procstat_auxv.c
/freebsd-11-stable/usr.bin/procstat/procstat_basic.c
/freebsd-11-stable/usr.bin/procstat/procstat_bin.c
/freebsd-11-stable/usr.bin/procstat/procstat_cred.c
/freebsd-11-stable/usr.bin/procstat/procstat_files.c
/freebsd-11-stable/usr.bin/procstat/procstat_kstack.c
/freebsd-11-stable/usr.bin/procstat/procstat_rlimit.c
/freebsd-11-stable/usr.bin/procstat/procstat_sigs.c
/freebsd-11-stable/usr.bin/procstat/procstat_threads.c
/freebsd-11-stable/usr.bin/procstat/procstat_vm.c
/freebsd-11-stable/usr.bin/protect/protect.c
/freebsd-11-stable/usr.bin/rctl/rctl.c
/freebsd-11-stable/usr.bin/revoke/revoke.c
/freebsd-11-stable/usr.bin/seq/seq.c
/freebsd-11-stable/usr.bin/setchannel/setchannel.c
/freebsd-11-stable/usr.bin/sockstat/sockstat.c
/freebsd-11-stable/usr.bin/sort/bwstring.c
/freebsd-11-stable/usr.bin/sort/bwstring.h
/freebsd-11-stable/usr.bin/sort/coll.c
/freebsd-11-stable/usr.bin/sort/coll.h
/freebsd-11-stable/usr.bin/sort/file.c
/freebsd-11-stable/usr.bin/sort/file.h
/freebsd-11-stable/usr.bin/sort/mem.c
/freebsd-11-stable/usr.bin/sort/mem.h
/freebsd-11-stable/usr.bin/sort/radixsort.c
/freebsd-11-stable/usr.bin/sort/radixsort.h
/freebsd-11-stable/usr.bin/sort/sort.c
/freebsd-11-stable/usr.bin/sort/sort.h
/freebsd-11-stable/usr.bin/sort/vsort.c
/freebsd-11-stable/usr.bin/sort/vsort.h
/freebsd-11-stable/usr.bin/ssh-copy-id/ssh-copy-id.sh
/freebsd-11-stable/usr.bin/stat/stat.c
/freebsd-11-stable/usr.bin/stdbuf/stdbuf.c
/freebsd-11-stable/usr.bin/systat/convtbl.c
/freebsd-11-stable/usr.bin/systat/convtbl.h
/freebsd-11-stable/usr.bin/systat/devs.h
/freebsd-11-stable/usr.bin/systat/ifcmds.c
/freebsd-11-stable/usr.bin/systat/ifstat.c
/freebsd-11-stable/usr.bin/tabs/tabs.c
/freebsd-11-stable/usr.bin/tr/cmap.c
/freebsd-11-stable/usr.bin/tr/cmap.h
/freebsd-11-stable/usr.bin/tr/cset.c
/freebsd-11-stable/usr.bin/tr/cset.h
/freebsd-11-stable/usr.bin/truncate/truncate.c
/freebsd-11-stable/usr.bin/truss/truss.h
/freebsd-11-stable/usr.bin/unifdef/unifdef.c
/freebsd-11-stable/usr.bin/unifdef/unifdef.h
/freebsd-11-stable/usr.bin/unifdef/unifdefall.sh
/freebsd-11-stable/usr.bin/units/units.c
/freebsd-11-stable/usr.bin/unzip/unzip.c
/freebsd-11-stable/usr.bin/usbhidaction/usbhidaction.c
/freebsd-11-stable/usr.bin/usbhidctl/usbhid.c
/freebsd-11-stable/usr.bin/whereis/pathnames.h
/freebsd-11-stable/usr.bin/whereis/whereis.c
/freebsd-11-stable/usr.bin/which/which.c
/freebsd-11-stable/usr.bin/who/who.c
/freebsd-11-stable/usr.bin/ypcat/ypcat.c
/freebsd-11-stable/usr.bin/ypmatch/ypmatch.c
/freebsd-11-stable/usr.bin/ypwhich/ypwhich.c
/freebsd-11-stable/usr.sbin/ac/ac.c
/freebsd-11-stable/usr.sbin/acpi/acpiconf/acpiconf.c
/freebsd-11-stable/usr.sbin/acpi/acpidb/acpidb.c
/freebsd-11-stable/usr.sbin/acpi/acpidump/acpi.c
/freebsd-11-stable/usr.sbin/acpi/acpidump/acpi_user.c
/freebsd-11-stable/usr.sbin/acpi/acpidump/acpidump.c
/freebsd-11-stable/usr.sbin/acpi/acpidump/acpidump.h
/freebsd-11-stable/usr.sbin/adduser/adduser.sh
/freebsd-11-stable/usr.sbin/adduser/rmuser.sh
/freebsd-11-stable/usr.sbin/apmd/apmd.c
/freebsd-11-stable/usr.sbin/apmd/apmd.h
/freebsd-11-stable/usr.sbin/apmd/apmdlex.l
/freebsd-11-stable/usr.sbin/apmd/apmdparse.y
/freebsd-11-stable/usr.sbin/asf/asf.c
/freebsd-11-stable/usr.sbin/asf/asf.h
/freebsd-11-stable/usr.sbin/asf/asf_kld.c
/freebsd-11-stable/usr.sbin/asf/asf_kvm.c
/freebsd-11-stable/usr.sbin/asf/asf_prog.c
/freebsd-11-stable/usr.sbin/bhyve/acpi.c
/freebsd-11-stable/usr.sbin/bhyve/acpi.h
/freebsd-11-stable/usr.sbin/bhyve/ahci.h
/freebsd-11-stable/usr.sbin/bhyve/bhyverun.c
/freebsd-11-stable/usr.sbin/bhyve/bhyverun.h
/freebsd-11-stable/usr.sbin/bhyve/block_if.c
/freebsd-11-stable/usr.sbin/bhyve/block_if.h
/freebsd-11-stable/usr.sbin/bhyve/consport.c
/freebsd-11-stable/usr.sbin/bhyve/dbgport.c
/freebsd-11-stable/usr.sbin/bhyve/dbgport.h
/freebsd-11-stable/usr.sbin/bhyve/inout.c
/freebsd-11-stable/usr.sbin/bhyve/inout.h
/freebsd-11-stable/usr.sbin/bhyve/ioapic.c
/freebsd-11-stable/usr.sbin/bhyve/ioapic.h
/freebsd-11-stable/usr.sbin/bhyve/mem.c
/freebsd-11-stable/usr.sbin/bhyve/mem.h
/freebsd-11-stable/usr.sbin/bhyve/mevent.c
/freebsd-11-stable/usr.sbin/bhyve/mevent.h
/freebsd-11-stable/usr.sbin/bhyve/mevent_test.c
/freebsd-11-stable/usr.sbin/bhyve/mptbl.c
/freebsd-11-stable/usr.sbin/bhyve/mptbl.h
/freebsd-11-stable/usr.sbin/bhyve/pci_ahci.c
/freebsd-11-stable/usr.sbin/bhyve/pci_emul.c
/freebsd-11-stable/usr.sbin/bhyve/pci_emul.h
/freebsd-11-stable/usr.sbin/bhyve/pci_hostbridge.c
/freebsd-11-stable/usr.sbin/bhyve/pci_lpc.c
/freebsd-11-stable/usr.sbin/bhyve/pci_lpc.h
/freebsd-11-stable/usr.sbin/bhyve/pci_passthru.c
/freebsd-11-stable/usr.sbin/bhyve/pci_uart.c
/freebsd-11-stable/usr.sbin/bhyve/pci_virtio_block.c
/freebsd-11-stable/usr.sbin/bhyve/pci_virtio_net.c
/freebsd-11-stable/usr.sbin/bhyve/pm.c
/freebsd-11-stable/usr.sbin/bhyve/post.c
/freebsd-11-stable/usr.sbin/bhyve/rtc.c
/freebsd-11-stable/usr.sbin/bhyve/rtc.h
/freebsd-11-stable/usr.sbin/bhyve/smbiostbl.c
/freebsd-11-stable/usr.sbin/bhyve/smbiostbl.h
/freebsd-11-stable/usr.sbin/bhyve/spinup_ap.c
/freebsd-11-stable/usr.sbin/bhyve/spinup_ap.h
/freebsd-11-stable/usr.sbin/bhyve/uart_emul.c
/freebsd-11-stable/usr.sbin/bhyve/uart_emul.h
/freebsd-11-stable/usr.sbin/bhyve/virtio.c
/freebsd-11-stable/usr.sbin/bhyve/virtio.h
/freebsd-11-stable/usr.sbin/bhyve/xmsr.c
/freebsd-11-stable/usr.sbin/bhyve/xmsr.h
/freebsd-11-stable/usr.sbin/bhyvectl/bhyvectl.c
/freebsd-11-stable/usr.sbin/bhyveload/bhyveload.c
/freebsd-11-stable/usr.sbin/bluetooth/bcmfw/bcmfw.c
/freebsd-11-stable/usr.sbin/bluetooth/bt3cfw/bt3cfw.c
/freebsd-11-stable/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.c
/freebsd-11-stable/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.h
/freebsd-11-stable/usr.sbin/bluetooth/bthidcontrol/hid.c
/freebsd-11-stable/usr.sbin/bluetooth/bthidcontrol/sdp.c
/freebsd-11-stable/usr.sbin/bluetooth/bthidd/bthid_config.h
/freebsd-11-stable/usr.sbin/bluetooth/bthidd/bthidd.c
/freebsd-11-stable/usr.sbin/bluetooth/bthidd/bthidd.h
/freebsd-11-stable/usr.sbin/bluetooth/bthidd/client.c
/freebsd-11-stable/usr.sbin/bluetooth/bthidd/hid.c
/freebsd-11-stable/usr.sbin/bluetooth/bthidd/kbd.c
/freebsd-11-stable/usr.sbin/bluetooth/bthidd/kbd.h
/freebsd-11-stable/usr.sbin/bluetooth/bthidd/lexer.l
/freebsd-11-stable/usr.sbin/bluetooth/bthidd/parser.y
/freebsd-11-stable/usr.sbin/bluetooth/bthidd/server.c
/freebsd-11-stable/usr.sbin/bluetooth/bthidd/session.c
/freebsd-11-stable/usr.sbin/bluetooth/btpand/bnep.c
/freebsd-11-stable/usr.sbin/bluetooth/btpand/bnep.h
/freebsd-11-stable/usr.sbin/bluetooth/btpand/btpand.c
/freebsd-11-stable/usr.sbin/bluetooth/btpand/btpand.h
/freebsd-11-stable/usr.sbin/bluetooth/btpand/channel.c
/freebsd-11-stable/usr.sbin/bluetooth/btpand/client.c
/freebsd-11-stable/usr.sbin/bluetooth/btpand/event.c
/freebsd-11-stable/usr.sbin/bluetooth/btpand/event.h
/freebsd-11-stable/usr.sbin/bluetooth/btpand/packet.c
/freebsd-11-stable/usr.sbin/bluetooth/btpand/sdp.c
/freebsd-11-stable/usr.sbin/bluetooth/btpand/sdp.h
/freebsd-11-stable/usr.sbin/bluetooth/btpand/server.c
/freebsd-11-stable/usr.sbin/bluetooth/btpand/tap.c
/freebsd-11-stable/usr.sbin/bluetooth/hccontrol/hccontrol.c
/freebsd-11-stable/usr.sbin/bluetooth/hccontrol/hccontrol.h
/freebsd-11-stable/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c
/freebsd-11-stable/usr.sbin/bluetooth/hccontrol/info.c
/freebsd-11-stable/usr.sbin/bluetooth/hccontrol/link_control.c
/freebsd-11-stable/usr.sbin/bluetooth/hccontrol/link_policy.c
/freebsd-11-stable/usr.sbin/bluetooth/hccontrol/node.c
/freebsd-11-stable/usr.sbin/bluetooth/hccontrol/send_recv.c
/freebsd-11-stable/usr.sbin/bluetooth/hccontrol/status.c
/freebsd-11-stable/usr.sbin/bluetooth/hccontrol/util.c
/freebsd-11-stable/usr.sbin/bluetooth/hcsecd/hcsecd.c
/freebsd-11-stable/usr.sbin/bluetooth/hcsecd/hcsecd.h
/freebsd-11-stable/usr.sbin/bluetooth/hcsecd/lexer.l
/freebsd-11-stable/usr.sbin/bluetooth/hcsecd/parser.y
/freebsd-11-stable/usr.sbin/bluetooth/hcseriald/hcseriald.c
/freebsd-11-stable/usr.sbin/bluetooth/l2control/l2cap.c
/freebsd-11-stable/usr.sbin/bluetooth/l2control/l2control.c
/freebsd-11-stable/usr.sbin/bluetooth/l2control/l2control.h
/freebsd-11-stable/usr.sbin/bluetooth/l2ping/l2ping.c
/freebsd-11-stable/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.c
/freebsd-11-stable/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.c
/freebsd-11-stable/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.h
/freebsd-11-stable/usr.sbin/bluetooth/sdpcontrol/search.c
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/bgd.c
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/dun.c
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/ftrn.c
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/gn.c
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/irmc.c
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/irmc_command.c
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/lan.c
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/log.c
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/log.h
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/main.c
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/nap.c
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/opush.c
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/panu.c
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/profile.c
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/profile.h
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/provider.c
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/provider.h
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/sar.c
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/scr.c
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/sd.c
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/server.c
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/server.h
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/sp.c
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/srr.c
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/ssar.c
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/ssr.c
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/sur.c
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/uuid-private.h
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/uuid.c
/freebsd-11-stable/usr.sbin/boot0cfg/boot0cfg.c
/freebsd-11-stable/usr.sbin/bsdinstall/distextract/distextract.c
/freebsd-11-stable/usr.sbin/bsdinstall/distfetch/distfetch.c
/freebsd-11-stable/usr.sbin/bsdinstall/partedit/diskeditor.c
/freebsd-11-stable/usr.sbin/bsdinstall/partedit/diskeditor.h
/freebsd-11-stable/usr.sbin/bsdinstall/partedit/gpart_ops.c
/freebsd-11-stable/usr.sbin/bsdinstall/partedit/part_wizard.c
/freebsd-11-stable/usr.sbin/bsdinstall/partedit/partedit.c
/freebsd-11-stable/usr.sbin/bsdinstall/partedit/partedit.h
/freebsd-11-stable/usr.sbin/bsdinstall/partedit/partedit_generic.c
/freebsd-11-stable/usr.sbin/bsdinstall/partedit/partedit_powerpc.c
/freebsd-11-stable/usr.sbin/bsdinstall/partedit/partedit_sparc64.c
/freebsd-11-stable/usr.sbin/bsdinstall/partedit/partedit_x86.c
/freebsd-11-stable/usr.sbin/bsdinstall/partedit/scripted.c
/freebsd-11-stable/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_addrs.c
/freebsd-11-stable/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_if.c
/freebsd-11-stable/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_pf.c
/freebsd-11-stable/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
/freebsd-11-stable/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_snmp.c
/freebsd-11-stable/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_snmp.h
/freebsd-11-stable/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
/freebsd-11-stable/usr.sbin/bsnmpd/modules/snmp_hast/hast_snmp.c
/freebsd-11-stable/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c
/freebsd-11-stable/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_snmp.c
/freebsd-11-stable/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_snmp.h
/freebsd-11-stable/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c
/freebsd-11-stable/usr.sbin/btxld/btx.h
/freebsd-11-stable/usr.sbin/btxld/btxld.c
/freebsd-11-stable/usr.sbin/btxld/elfh.c
/freebsd-11-stable/usr.sbin/btxld/elfh.h
/freebsd-11-stable/usr.sbin/chkgrp/chkgrp.c
/freebsd-11-stable/usr.sbin/ckdist/ckdist.c
/freebsd-11-stable/usr.sbin/clear_locks/clear_locks.c
/freebsd-11-stable/usr.sbin/cpucontrol/amd.c
/freebsd-11-stable/usr.sbin/cpucontrol/amd.h
/freebsd-11-stable/usr.sbin/cpucontrol/cpucontrol.c
/freebsd-11-stable/usr.sbin/cpucontrol/cpucontrol.h
/freebsd-11-stable/usr.sbin/cpucontrol/intel.c
/freebsd-11-stable/usr.sbin/cpucontrol/intel.h
/freebsd-11-stable/usr.sbin/cpucontrol/via.c
/freebsd-11-stable/usr.sbin/cpucontrol/via.h
/freebsd-11-stable/usr.sbin/crunch/crunchide/exec_elf32.c
/freebsd-11-stable/usr.sbin/crunch/crunchide/exec_elf64.c
/freebsd-11-stable/usr.sbin/crunch/crunchide/extern.h
/freebsd-11-stable/usr.sbin/ctladm/ctladm.h
/freebsd-11-stable/usr.sbin/ctladm/util.c
/freebsd-11-stable/usr.sbin/ctld/ctld.c
/freebsd-11-stable/usr.sbin/ctld/ctld.h
/freebsd-11-stable/usr.sbin/ctld/discovery.c
/freebsd-11-stable/usr.sbin/ctld/kernel.c
/freebsd-11-stable/usr.sbin/ctld/keys.c
/freebsd-11-stable/usr.sbin/ctld/log.c
/freebsd-11-stable/usr.sbin/ctld/login.c
/freebsd-11-stable/usr.sbin/ctld/parse.y
/freebsd-11-stable/usr.sbin/ctld/pdu.c
/freebsd-11-stable/usr.sbin/ctld/token.l
/freebsd-11-stable/usr.sbin/ctm/ctm_dequeue/ctm_dequeue.c
/freebsd-11-stable/usr.sbin/daemon/daemon.c
/freebsd-11-stable/usr.sbin/devinfo/devinfo.c
/freebsd-11-stable/usr.sbin/digictl/digictl.c
/freebsd-11-stable/usr.sbin/diskinfo/diskinfo.c
/freebsd-11-stable/usr.sbin/dumpcis/cardinfo.h
/freebsd-11-stable/usr.sbin/dumpcis/cis.h
/freebsd-11-stable/usr.sbin/dumpcis/main.c
/freebsd-11-stable/usr.sbin/dumpcis/printcis.c
/freebsd-11-stable/usr.sbin/dumpcis/readcis.c
/freebsd-11-stable/usr.sbin/dumpcis/readcis.h
/freebsd-11-stable/usr.sbin/eeprom/eeprom.c
/freebsd-11-stable/usr.sbin/eeprom/ofw_options.c
/freebsd-11-stable/usr.sbin/eeprom/ofw_options.h
/freebsd-11-stable/usr.sbin/etcupdate/etcupdate.sh
/freebsd-11-stable/usr.sbin/extattr/rmextattr.c
/freebsd-11-stable/usr.sbin/extattrctl/extattrctl.c
/freebsd-11-stable/usr.sbin/fdcontrol/fdcontrol.c
/freebsd-11-stable/usr.sbin/fdformat/fdformat.c
/freebsd-11-stable/usr.sbin/fdread/fdread.c
/freebsd-11-stable/usr.sbin/fdread/fdutil.c
/freebsd-11-stable/usr.sbin/fdread/fdutil.h
/freebsd-11-stable/usr.sbin/fifolog/fifolog_create/fifolog_create.c
/freebsd-11-stable/usr.sbin/fifolog/fifolog_reader/fifolog_reader.c
/freebsd-11-stable/usr.sbin/fifolog/fifolog_writer/fifolog_writer.c
/freebsd-11-stable/usr.sbin/fifolog/lib/fifolog.h
/freebsd-11-stable/usr.sbin/fifolog/lib/fifolog_create.c
/freebsd-11-stable/usr.sbin/fifolog/lib/fifolog_int.c
/freebsd-11-stable/usr.sbin/fifolog/lib/fifolog_reader.c
/freebsd-11-stable/usr.sbin/fifolog/lib/fifolog_write.h
/freebsd-11-stable/usr.sbin/fifolog/lib/fifolog_write_poll.c
/freebsd-11-stable/usr.sbin/fifolog/lib/libfifolog.h
/freebsd-11-stable/usr.sbin/fifolog/lib/libfifolog_int.h
/freebsd-11-stable/usr.sbin/fifolog/lib/miniobj.h
/freebsd-11-stable/usr.sbin/flowctl/flowctl.c
/freebsd-11-stable/usr.sbin/freebsd-update/freebsd-update.sh
/freebsd-11-stable/usr.sbin/getfmac/getfmac.c
/freebsd-11-stable/usr.sbin/getpmac/getpmac.c
/freebsd-11-stable/usr.sbin/gpioctl/gpioctl.c
/freebsd-11-stable/usr.sbin/gssd/gssd.c
/freebsd-11-stable/usr.sbin/gstat/gstat.c
/freebsd-11-stable/usr.sbin/i2c/i2c.c
/freebsd-11-stable/usr.sbin/inetd/builtins.c
/freebsd-11-stable/usr.sbin/iscsid/discovery.c
/freebsd-11-stable/usr.sbin/iscsid/iscsid.c
/freebsd-11-stable/usr.sbin/iscsid/iscsid.h
/freebsd-11-stable/usr.sbin/iscsid/keys.c
/freebsd-11-stable/usr.sbin/iscsid/log.c
/freebsd-11-stable/usr.sbin/iscsid/login.c
/freebsd-11-stable/usr.sbin/iscsid/pdu.c
/freebsd-11-stable/usr.sbin/jail/command.c
/freebsd-11-stable/usr.sbin/jail/config.c
/freebsd-11-stable/usr.sbin/jail/jail.c
/freebsd-11-stable/usr.sbin/jail/jaillex.l
/freebsd-11-stable/usr.sbin/jail/jailp.h
/freebsd-11-stable/usr.sbin/jail/jailparse.y
/freebsd-11-stable/usr.sbin/jail/state.c
/freebsd-11-stable/usr.sbin/jexec/jexec.c
/freebsd-11-stable/usr.sbin/jls/jls.c
/freebsd-11-stable/usr.sbin/kbdcontrol/kbdcontrol.c
/freebsd-11-stable/usr.sbin/kbdcontrol/lex.h
/freebsd-11-stable/usr.sbin/kbdcontrol/lex.l
/freebsd-11-stable/usr.sbin/kbdmap/kbdmap.c
/freebsd-11-stable/usr.sbin/kbdmap/kbdmap.h
/freebsd-11-stable/usr.sbin/kgzip/aouthdr.c
/freebsd-11-stable/usr.sbin/kgzip/aouthdr.h
/freebsd-11-stable/usr.sbin/kgzip/elfhdr.c
/freebsd-11-stable/usr.sbin/kgzip/elfhdr.h
/freebsd-11-stable/usr.sbin/kgzip/kgz.h
/freebsd-11-stable/usr.sbin/kgzip/kgzcmp.c
/freebsd-11-stable/usr.sbin/kgzip/kgzip.c
/freebsd-11-stable/usr.sbin/kgzip/kgzip.h
/freebsd-11-stable/usr.sbin/kgzip/kgzld.c
/freebsd-11-stable/usr.sbin/kgzip/xio.c
/freebsd-11-stable/usr.sbin/kldxref/ef_amd64.c
/freebsd-11-stable/usr.sbin/kldxref/ef_i386.c
/freebsd-11-stable/usr.sbin/kldxref/ef_nop.c
/freebsd-11-stable/usr.sbin/kldxref/ef_powerpc.c
/freebsd-11-stable/usr.sbin/kldxref/ef_sparc64.c
/freebsd-11-stable/usr.sbin/lastlogin/lastlogin.c
/freebsd-11-stable/usr.sbin/lpr/chkprintcap/skimprintcap.c
/freebsd-11-stable/usr.sbin/lpr/chkprintcap/skimprintcap.h
/freebsd-11-stable/usr.sbin/lpr/common_source/ctlinfo.c
/freebsd-11-stable/usr.sbin/lpr/common_source/ctlinfo.h
/freebsd-11-stable/usr.sbin/lpr/common_source/lp.cdefs.h
/freebsd-11-stable/usr.sbin/lpr/common_source/matchjobs.c
/freebsd-11-stable/usr.sbin/lpr/common_source/matchjobs.h
/freebsd-11-stable/usr.sbin/lpr/filters.ru/koi2855/koi2855.c
/freebsd-11-stable/usr.sbin/lpr/filters.ru/koi2alt/koi2alt.c
/freebsd-11-stable/usr.sbin/lpr/lp/lp.sh
/freebsd-11-stable/usr.sbin/lpr/lpc/movejobs.c
/freebsd-11-stable/usr.sbin/lptcontrol/lptcontrol.c
/freebsd-11-stable/usr.sbin/mailwrapper/mailwrapper.c
/freebsd-11-stable/usr.sbin/mailwrapper/pathnames.h
/freebsd-11-stable/usr.sbin/makefs/cd9660.c
/freebsd-11-stable/usr.sbin/makefs/cd9660.h
/freebsd-11-stable/usr.sbin/makefs/cd9660/cd9660_archimedes.c
/freebsd-11-stable/usr.sbin/makefs/cd9660/cd9660_archimedes.h
/freebsd-11-stable/usr.sbin/makefs/cd9660/cd9660_conversion.c
/freebsd-11-stable/usr.sbin/makefs/cd9660/cd9660_debug.c
/freebsd-11-stable/usr.sbin/makefs/cd9660/cd9660_eltorito.c
/freebsd-11-stable/usr.sbin/makefs/cd9660/cd9660_eltorito.h
/freebsd-11-stable/usr.sbin/makefs/cd9660/cd9660_strings.c
/freebsd-11-stable/usr.sbin/makefs/cd9660/cd9660_write.c
/freebsd-11-stable/usr.sbin/makefs/cd9660/iso9660_rrip.c
/freebsd-11-stable/usr.sbin/makefs/cd9660/iso9660_rrip.h
/freebsd-11-stable/usr.sbin/makefs/ffs.h
/freebsd-11-stable/usr.sbin/makefs/ffs/buf.c
/freebsd-11-stable/usr.sbin/makefs/ffs/buf.h
/freebsd-11-stable/usr.sbin/makefs/ffs/ffs_bswap.c
/freebsd-11-stable/usr.sbin/makefs/ffs/newfs_extern.h
/freebsd-11-stable/usr.sbin/makefs/ffs/ufs_bswap.h
/freebsd-11-stable/usr.sbin/makefs/makefs.c
/freebsd-11-stable/usr.sbin/makefs/makefs.h
/freebsd-11-stable/usr.sbin/makefs/mtree.c
/freebsd-11-stable/usr.sbin/makefs/walk.c
/freebsd-11-stable/usr.sbin/memcontrol/memcontrol.c
/freebsd-11-stable/usr.sbin/mfiutil/mfi_bbu.c
/freebsd-11-stable/usr.sbin/mfiutil/mfi_cmd.c
/freebsd-11-stable/usr.sbin/mfiutil/mfi_config.c
/freebsd-11-stable/usr.sbin/mfiutil/mfi_drive.c
/freebsd-11-stable/usr.sbin/mfiutil/mfi_evt.c
/freebsd-11-stable/usr.sbin/mfiutil/mfi_flash.c
/freebsd-11-stable/usr.sbin/mfiutil/mfi_foreign.c
/freebsd-11-stable/usr.sbin/mfiutil/mfi_patrol.c
/freebsd-11-stable/usr.sbin/mfiutil/mfi_properties.c
/freebsd-11-stable/usr.sbin/mfiutil/mfi_show.c
/freebsd-11-stable/usr.sbin/mfiutil/mfi_volume.c
/freebsd-11-stable/usr.sbin/mfiutil/mfiutil.c
/freebsd-11-stable/usr.sbin/mfiutil/mfiutil.h
/freebsd-11-stable/usr.sbin/mlxcontrol/command.c
/freebsd-11-stable/usr.sbin/mlxcontrol/config.c
/freebsd-11-stable/usr.sbin/mlxcontrol/interface.c
/freebsd-11-stable/usr.sbin/mlxcontrol/mlxcontrol.h
/freebsd-11-stable/usr.sbin/mlxcontrol/util.c
/freebsd-11-stable/usr.sbin/moused/moused.c
/freebsd-11-stable/usr.sbin/mptable/mptable.c
/freebsd-11-stable/usr.sbin/mtest/mtest.c
/freebsd-11-stable/usr.sbin/nandsim/nandsim.c
/freebsd-11-stable/usr.sbin/nandsim/nandsim_cfgparse.c
/freebsd-11-stable/usr.sbin/nandsim/nandsim_cfgparse.h
/freebsd-11-stable/usr.sbin/nandtool/nand_erase.c
/freebsd-11-stable/usr.sbin/nandtool/nand_info.c
/freebsd-11-stable/usr.sbin/nandtool/nand_read.c
/freebsd-11-stable/usr.sbin/nandtool/nand_readoob.c
/freebsd-11-stable/usr.sbin/nandtool/nand_write.c
/freebsd-11-stable/usr.sbin/nandtool/nand_writeoob.c
/freebsd-11-stable/usr.sbin/nandtool/nandtool.c
/freebsd-11-stable/usr.sbin/nandtool/nandtool.h
/freebsd-11-stable/usr.sbin/nandtool/usage.h
/freebsd-11-stable/usr.sbin/newsyslog/extern.h
/freebsd-11-stable/usr.sbin/pciconf/err.c
/freebsd-11-stable/usr.sbin/pkg/config.c
/freebsd-11-stable/usr.sbin/pkg/config.h
/freebsd-11-stable/usr.sbin/pkg/dns_utils.c
/freebsd-11-stable/usr.sbin/pkg/dns_utils.h
/freebsd-11-stable/usr.sbin/pkg/pkg.c
/freebsd-11-stable/usr.sbin/pmcannotate/pmcannotate.c
/freebsd-11-stable/usr.sbin/pmccontrol/pmccontrol.c
/freebsd-11-stable/usr.sbin/pmcstat/pmcpl_annotate.c
/freebsd-11-stable/usr.sbin/pmcstat/pmcpl_annotate.h
/freebsd-11-stable/usr.sbin/pmcstat/pmcpl_annotate_cg.c
/freebsd-11-stable/usr.sbin/pmcstat/pmcpl_annotate_cg.h
/freebsd-11-stable/usr.sbin/pmcstat/pmcpl_callgraph.c
/freebsd-11-stable/usr.sbin/pmcstat/pmcpl_callgraph.h
/freebsd-11-stable/usr.sbin/pmcstat/pmcpl_calltree.c
/freebsd-11-stable/usr.sbin/pmcstat/pmcpl_calltree.h
/freebsd-11-stable/usr.sbin/pmcstat/pmcpl_gprof.c
/freebsd-11-stable/usr.sbin/pmcstat/pmcpl_gprof.h
/freebsd-11-stable/usr.sbin/pmcstat/pmcstat.c
/freebsd-11-stable/usr.sbin/pmcstat/pmcstat.h
/freebsd-11-stable/usr.sbin/pmcstat/pmcstat_log.c
/freebsd-11-stable/usr.sbin/pmcstat/pmcstat_log.h
/freebsd-11-stable/usr.sbin/pmcstat/pmcstat_top.h
/freebsd-11-stable/usr.sbin/portsnap/make_index/make_index.c
/freebsd-11-stable/usr.sbin/portsnap/phttpget/phttpget.c
/freebsd-11-stable/usr.sbin/portsnap/portsnap/portsnap.sh
/freebsd-11-stable/usr.sbin/powerd/powerd.c
/freebsd-11-stable/usr.sbin/ppp/acf.c
/freebsd-11-stable/usr.sbin/ppp/acf.h
/freebsd-11-stable/usr.sbin/ppp/arp.c
/freebsd-11-stable/usr.sbin/ppp/arp.h
/freebsd-11-stable/usr.sbin/ppp/async.c
/freebsd-11-stable/usr.sbin/ppp/async.h
/freebsd-11-stable/usr.sbin/ppp/auth.c
/freebsd-11-stable/usr.sbin/ppp/auth.h
/freebsd-11-stable/usr.sbin/ppp/bundle.c
/freebsd-11-stable/usr.sbin/ppp/bundle.h
/freebsd-11-stable/usr.sbin/ppp/cbcp.c
/freebsd-11-stable/usr.sbin/ppp/cbcp.h
/freebsd-11-stable/usr.sbin/ppp/ccp.c
/freebsd-11-stable/usr.sbin/ppp/ccp.h
/freebsd-11-stable/usr.sbin/ppp/chap.c
/freebsd-11-stable/usr.sbin/ppp/chap.h
/freebsd-11-stable/usr.sbin/ppp/chap_ms.c
/freebsd-11-stable/usr.sbin/ppp/chap_ms.h
/freebsd-11-stable/usr.sbin/ppp/chat.c
/freebsd-11-stable/usr.sbin/ppp/chat.h
/freebsd-11-stable/usr.sbin/ppp/command.c
/freebsd-11-stable/usr.sbin/ppp/command.h
/freebsd-11-stable/usr.sbin/ppp/datalink.c
/freebsd-11-stable/usr.sbin/ppp/datalink.h
/freebsd-11-stable/usr.sbin/ppp/deflate.c
/freebsd-11-stable/usr.sbin/ppp/deflate.h
/freebsd-11-stable/usr.sbin/ppp/defs.c
/freebsd-11-stable/usr.sbin/ppp/defs.h
/freebsd-11-stable/usr.sbin/ppp/descriptor.h
/freebsd-11-stable/usr.sbin/ppp/ether.c
/freebsd-11-stable/usr.sbin/ppp/ether.h
/freebsd-11-stable/usr.sbin/ppp/exec.c
/freebsd-11-stable/usr.sbin/ppp/exec.h
/freebsd-11-stable/usr.sbin/ppp/filter.c
/freebsd-11-stable/usr.sbin/ppp/filter.h
/freebsd-11-stable/usr.sbin/ppp/fsm.c
/freebsd-11-stable/usr.sbin/ppp/fsm.h
/freebsd-11-stable/usr.sbin/ppp/hdlc.c
/freebsd-11-stable/usr.sbin/ppp/hdlc.h
/freebsd-11-stable/usr.sbin/ppp/i4b.h
/freebsd-11-stable/usr.sbin/ppp/id.c
/freebsd-11-stable/usr.sbin/ppp/id.h
/freebsd-11-stable/usr.sbin/ppp/iface.c
/freebsd-11-stable/usr.sbin/ppp/iface.h
/freebsd-11-stable/usr.sbin/ppp/ip.c
/freebsd-11-stable/usr.sbin/ppp/ip.h
/freebsd-11-stable/usr.sbin/ppp/ipcp.c
/freebsd-11-stable/usr.sbin/ppp/ipcp.h
/freebsd-11-stable/usr.sbin/ppp/iplist.c
/freebsd-11-stable/usr.sbin/ppp/iplist.h
/freebsd-11-stable/usr.sbin/ppp/ipv6cp.c
/freebsd-11-stable/usr.sbin/ppp/ipv6cp.h
/freebsd-11-stable/usr.sbin/ppp/layer.h
/freebsd-11-stable/usr.sbin/ppp/lcp.c
/freebsd-11-stable/usr.sbin/ppp/lcp.h
/freebsd-11-stable/usr.sbin/ppp/link.c
/freebsd-11-stable/usr.sbin/ppp/link.h
/freebsd-11-stable/usr.sbin/ppp/log.c
/freebsd-11-stable/usr.sbin/ppp/log.h
/freebsd-11-stable/usr.sbin/ppp/lqr.c
/freebsd-11-stable/usr.sbin/ppp/lqr.h
/freebsd-11-stable/usr.sbin/ppp/main.c
/freebsd-11-stable/usr.sbin/ppp/main.h
/freebsd-11-stable/usr.sbin/ppp/mbuf.c
/freebsd-11-stable/usr.sbin/ppp/mbuf.h
/freebsd-11-stable/usr.sbin/ppp/mp.c
/freebsd-11-stable/usr.sbin/ppp/mp.h
/freebsd-11-stable/usr.sbin/ppp/mppe.c
/freebsd-11-stable/usr.sbin/ppp/mppe.h
/freebsd-11-stable/usr.sbin/ppp/nat_cmd.c
/freebsd-11-stable/usr.sbin/ppp/nat_cmd.h
/freebsd-11-stable/usr.sbin/ppp/ncp.c
/freebsd-11-stable/usr.sbin/ppp/ncp.h
/freebsd-11-stable/usr.sbin/ppp/ncpaddr.c
/freebsd-11-stable/usr.sbin/ppp/ncpaddr.h
/freebsd-11-stable/usr.sbin/ppp/netgraph.c
/freebsd-11-stable/usr.sbin/ppp/netgraph.h
/freebsd-11-stable/usr.sbin/ppp/pap.c
/freebsd-11-stable/usr.sbin/ppp/pap.h
/freebsd-11-stable/usr.sbin/ppp/pred.c
/freebsd-11-stable/usr.sbin/ppp/pred.h
/freebsd-11-stable/usr.sbin/ppp/probe.c
/freebsd-11-stable/usr.sbin/ppp/probe.h
/freebsd-11-stable/usr.sbin/ppp/prompt.c
/freebsd-11-stable/usr.sbin/ppp/prompt.h
/freebsd-11-stable/usr.sbin/ppp/proto.c
/freebsd-11-stable/usr.sbin/ppp/proto.h
/freebsd-11-stable/usr.sbin/ppp/radius.c
/freebsd-11-stable/usr.sbin/ppp/radius.h
/freebsd-11-stable/usr.sbin/ppp/route.c
/freebsd-11-stable/usr.sbin/ppp/route.h
/freebsd-11-stable/usr.sbin/ppp/server.c
/freebsd-11-stable/usr.sbin/ppp/server.h
/freebsd-11-stable/usr.sbin/ppp/sig.c
/freebsd-11-stable/usr.sbin/ppp/sig.h
/freebsd-11-stable/usr.sbin/ppp/sync.c
/freebsd-11-stable/usr.sbin/ppp/sync.h
/freebsd-11-stable/usr.sbin/ppp/systems.c
/freebsd-11-stable/usr.sbin/ppp/systems.h
/freebsd-11-stable/usr.sbin/ppp/tcp.c
/freebsd-11-stable/usr.sbin/ppp/tcp.h
/freebsd-11-stable/usr.sbin/ppp/tcpmss.c
/freebsd-11-stable/usr.sbin/ppp/tcpmss.h
/freebsd-11-stable/usr.sbin/ppp/throughput.c
/freebsd-11-stable/usr.sbin/ppp/throughput.h
/freebsd-11-stable/usr.sbin/ppp/timer.c
/freebsd-11-stable/usr.sbin/ppp/timer.h
/freebsd-11-stable/usr.sbin/ppp/tty.c
/freebsd-11-stable/usr.sbin/ppp/tty.h
/freebsd-11-stable/usr.sbin/ppp/tun.c
/freebsd-11-stable/usr.sbin/ppp/tun.h
/freebsd-11-stable/usr.sbin/ppp/ua.h
/freebsd-11-stable/usr.sbin/ppp/udp.c
/freebsd-11-stable/usr.sbin/ppp/udp.h
/freebsd-11-stable/usr.sbin/ppp/vjcomp.c
/freebsd-11-stable/usr.sbin/ppp/vjcomp.h
/freebsd-11-stable/usr.sbin/pppctl/pppctl.c
/freebsd-11-stable/usr.sbin/pw/bitmap.c
/freebsd-11-stable/usr.sbin/pw/bitmap.h
/freebsd-11-stable/usr.sbin/pw/cpdir.c
/freebsd-11-stable/usr.sbin/pw/grupd.c
/freebsd-11-stable/usr.sbin/pw/psdate.c
/freebsd-11-stable/usr.sbin/pw/psdate.h
/freebsd-11-stable/usr.sbin/pw/pw.c
/freebsd-11-stable/usr.sbin/pw/pw.h
/freebsd-11-stable/usr.sbin/pw/pw_conf.c
/freebsd-11-stable/usr.sbin/pw/pw_group.c
/freebsd-11-stable/usr.sbin/pw/pw_log.c
/freebsd-11-stable/usr.sbin/pw/pw_nis.c
/freebsd-11-stable/usr.sbin/pw/pw_user.c
/freebsd-11-stable/usr.sbin/pw/pw_vpw.c
/freebsd-11-stable/usr.sbin/pw/pwupd.c
/freebsd-11-stable/usr.sbin/pw/pwupd.h
/freebsd-11-stable/usr.sbin/pw/rm_r.c
/freebsd-11-stable/usr.sbin/quot/quot.c
/freebsd-11-stable/usr.sbin/rarpd/rarpd.c
/freebsd-11-stable/usr.sbin/rpc.lockd/kern.c
/freebsd-11-stable/usr.sbin/rpc.umntall/mounttab.c
/freebsd-11-stable/usr.sbin/rpc.umntall/mounttab.h
/freebsd-11-stable/usr.sbin/rpc.umntall/rpc.umntall.c
/freebsd-11-stable/usr.sbin/rpcbind/util.c
/freebsd-11-stable/usr.sbin/rtadvctl/rtadvctl.c
/freebsd-11-stable/usr.sbin/rtadvd/advcap.h
/freebsd-11-stable/usr.sbin/rtadvd/control.c
/freebsd-11-stable/usr.sbin/rtadvd/control.h
/freebsd-11-stable/usr.sbin/rtadvd/control_client.c
/freebsd-11-stable/usr.sbin/rtadvd/control_client.h
/freebsd-11-stable/usr.sbin/rtadvd/control_server.c
/freebsd-11-stable/usr.sbin/rtadvd/control_server.h
/freebsd-11-stable/usr.sbin/rtprio/rtprio.c
/freebsd-11-stable/usr.sbin/sa/db.c
/freebsd-11-stable/usr.sbin/sa/extern.h
/freebsd-11-stable/usr.sbin/sa/main.c
/freebsd-11-stable/usr.sbin/sa/pathnames.h
/freebsd-11-stable/usr.sbin/sa/pdb.c
/freebsd-11-stable/usr.sbin/sa/usrdb.c
/freebsd-11-stable/usr.sbin/service/service.sh
/freebsd-11-stable/usr.sbin/services_mkdb/extern.h
/freebsd-11-stable/usr.sbin/services_mkdb/services_mkdb.c
/freebsd-11-stable/usr.sbin/services_mkdb/uniq.c
/freebsd-11-stable/usr.sbin/setfmac/setfmac.c
/freebsd-11-stable/usr.sbin/setpmac/setpmac.c
/freebsd-11-stable/usr.sbin/smbmsg/pathnames.h
/freebsd-11-stable/usr.sbin/smbmsg/smbmsg.c
/freebsd-11-stable/usr.sbin/snapinfo/snapinfo.c
/freebsd-11-stable/usr.sbin/spkrtest/spkrtest.sh
/freebsd-11-stable/usr.sbin/spray/spray.c
/freebsd-11-stable/usr.sbin/traceroute/findsaddr-udp.c
/freebsd-11-stable/usr.sbin/uathload/uathload.c
/freebsd-11-stable/usr.sbin/ugidfw/ugidfw.c
/freebsd-11-stable/usr.sbin/uhsoctl/uhsoctl.c
/freebsd-11-stable/usr.sbin/unbound/local-setup/local-unbound-setup.sh
/freebsd-11-stable/usr.sbin/usbconfig/dump.c
/freebsd-11-stable/usr.sbin/usbconfig/dump.h
/freebsd-11-stable/usr.sbin/usbconfig/usbconfig.c
/freebsd-11-stable/usr.sbin/usbdump/usbdump.c
/freebsd-11-stable/usr.sbin/utx/utx.c
/freebsd-11-stable/usr.sbin/vidcontrol/decode.c
/freebsd-11-stable/usr.sbin/vidcontrol/vidcontrol.c
/freebsd-11-stable/usr.sbin/wake/wake.c
/freebsd-11-stable/usr.sbin/watch/watch.c
/freebsd-11-stable/usr.sbin/watchdogd/watchdogd.c
/freebsd-11-stable/usr.sbin/wlandebug/wlandebug.c
/freebsd-11-stable/usr.sbin/ypbind/ypbind.c
/freebsd-11-stable/usr.sbin/yppoll/yppoll.c
/freebsd-11-stable/usr.sbin/ypset/ypset.c
328461 27-Jan-2018 kevans

MFC r326483: grep test: Fix copyright notice

The copyright notice was erroneously introduced as one from the NetBSD
foundation due to it being copied from a file in the NetBSD test suite, but
this file itself is not derived from or supplied with the NetBSD test suite.

323903 22-Sep-2017 emaste

MFC r323611: fastmatch.h: remove duplicate #defines

323443 11-Sep-2017 kevans

bsdgrep: add a primitive literal matcher to unbreak fgrep in some scenarios

MFC r322825: bsdgrep: add some additional tests for fgrep

Previously added tests only check that fgrep is somewhat sane and works. Add
some more tests that check that the implementation is basically functional
and not producing incorrect results with various flags.

MFC r322826: bsdgrep: add a primitive literal matcher

fgrep/grep -F will error out at runtime if compiled with a regex(3)
that does not define REG_NOSPEC or REG_LITERAL. glibc is one such regex(3)
implementation, and as it turns out they don't support literal matching at
all.

Provide a primitive literal matcher for use with glibc and other
implementations that don't support literal matching so that we don't
completely lose fgrep/grep -F if compiled against libgnuregex on stable/10,
stable/11, or other systems that we don't necessarily support.

This is a wholly unoptimized implementation with no plans to optimize it as
of now. This is due to both its use-case being primarily on unsupported
systems in the near-distant future and that it's reinventing the wheel that
we already have available as a feature of regex(3).

PR: 222201
Approved by: emaste (mentor, blanket MFC)

322777 22-Aug-2017 kevans

MFC r321450: bsdgrep(1): Don't exit before processing every file

Given an empty pattern (i.e. grep "" A B), bsdgrep(1) would previously
exit() with the appropriate exit code upon encountering an empty file.
Likely intended as an optimization, but this behavior is technically
incorrect since an empty pattern should match every line.

PR: 220924
Approved by: emaste (mentor, blanket MFC)

322625 17-Aug-2017 kevans

bsdgrep: bump version number to 2.6.0 and update copyright information

MFC r319132: bsdgrep: bump version number and add Kyle Evans copyright

The following changes have been made over the last couple of months:

Features:

- With bsdgrep -r, the working directory is implied if no directory is
specified
- bsdgrep will now behave as bsdgrep -r does when it's named rgrep
- bsdgrep now understands -z/--null-data to use \0 as EOL
- GNU regex compatibility is now indicated with a "GNU compatible" in
the version string

Fixes:

- --mmap no longer hangs when coming across an EOF without an
accompanying EOL
- -o/--color matching generally improved, now produces earliest /
longest matches
- Context output now more closely aligns with GNU grep
- Zero-length matches no longer exhibit broken behavior
- Every output line now honors -b/-H/-n flags

Tests have been added for previous regressions as well as other
previously untested behaviors.

Various other fixes have been commited, and refactoring for further /
later improvements has taken place.

(The original submission changed the version string to 2.5.2, but I
decided to use 2.6.0 to reflect the addition of new features.)

MFC r320754: Update copyright e-mail address to @FreeBSD.org address

Approved by: emaste (mentor, blanket MFC)

322624 17-Aug-2017 kevans

MFC r318916: bsdgrep: use safer sizeof() construct

Approved by: emaste (mentor, blanket MFC)

322622 17-Aug-2017 kevans

MFC r318914: bsdgrep: correct assumptions to prepare for chunking

Correct a couple of minor BSD grep assumptions that are valid for line
processing but not future chunk-based processing.

Approved by: emaste (mentor, blanket MFC)

322619 17-Aug-2017 kevans

bsdgrep: fix build when linking against libgnuregex

MFC r322618: bsdgrep: cast pmatch.rm_so to fix build when linking against
libgnuregex

Approved by: emaste (mentor)

322610 17-Aug-2017 kevans

MFC r318574: bsdgrep: Correct per-line line metadata printing

Metadata printing with -b, -H, or -n flags suffered from a few flaws:

1) -b/offset printing was broken when used in conjunction with -o

2) With -o, bsdgrep did not print metadata for every match/line, just
the first match of a line

3) There were no tests for this

Address these issues by outputting this data per-match if the -o flag is
specified, and prior to outputting any matches if -o but not --color,
since --color alone will not generate a new line of output for every
iteration over the matches.

To correct -b output, fudge the line offset as we're printing matches.

While here, make sure we're using grep_printline in -A context. Context
printing should *never* look at the parsing context, just the line.

The tests included do not pass with gnugrep in base due to it exhibiting
similar quirky behavior that bsdgrep previously exhibited.

Approved by: emaste (mentor, blanket MFC)

322609 17-Aug-2017 kevans

MFC r318571: bsdgrep: emit more than MAX_LINE_MATCHES per line

We should not set an arbitrary cap on the number of matches on a line,
and in any case MAX_LINE_MATCHES of 32 is much too low. Instead, if we
match more than MAX_LINE_MATCHES, keep processing and matching from the
last match until all are found.

For the regression test, we produce 4096 matches (larger than we expect
we'll ever set MAX_LINE_MATCHES) and make sure we actually get 4096
lines of output with the -o flag.

We'll also make sure that every distinct line is getting its own line
number to detect line metadata not being printed as appropriate along
the way.

PR: 218811
Approved by: emaste (mentor, blanket MFC)

322608 17-Aug-2017 kevans

bsdgrep: fix segfault with --mmap and add relevant test

MFC r318565: bsdgrep: fix segfault with --mmap

r313948 partially fixed --mmap behavior but was incomplete. This commit
generally reverts it and does it the more correct way- by just consuming
the rest of the buffer and moving on.

MFC r318908: bsdgrep: add --mmap tests

Basic sanity tests as well as coverage for the bug fixed in r318565.

PR: 219402
Approved by: emaste (mentor, blanket MFC)

322607 17-Aug-2017 kevans

bsdgrep: Don't allow negative context flags, add more tests

MFC r318302: bsdgrep: don't allow negative -A / -B / -C

Previously, when given a negative -A/-B/-C argument bsdgrep would
overflow the respective context flag(s) and exhibited surprising
behavior.

Fix this by removing unsignedness of Aflag/Bflag and erroring out if
we're given a value < 0. Also adjust the type used to track 'tail'
context in procfile() so that it accurately reflects the Aflag value
rather than overflowing and losing trailing context.

This also fixes an inconsistency previously existing between -n and
-C "n" behavior. They are now both limited to LLONG_MAX, to be
consistent.

Add some test cases to make sure grep errors out properly for both
negative context values as well as non-numeric context values rather
than giving bogus matches.

MFC r318317: bsdgrep: add more tests for different binary flags

The existing 'binary' test in netbsd-tests/ does a basic check of the
default treatment for binary behavior, but not much more than that.
Given some opportunity for breakage recently that did not trigger any
failures, add some tests to cover the three different binary file
behaviors (a, -I, -U) and their --binary-files= equivalent values.

Approved by: emaste (mentor, blanket MFC)

322597 16-Aug-2017 kevans

MFC r317705: bsdgrep: avoid use of magic number for REG_NOSPEC

Approved by: emaste (mentor, blanket MFC)

322587 16-Aug-2017 kevans

bsdgrep: fix -w flag matching with an empty pattern

MFC r317703: bsdgrep: fix -w flag matching with an empty pattern

-w flag matching with an empty pattern was generally 'broken', allowing
matches to occur on any line whether or not it actually matches -w
criteria.

This fix required a good amount of refactoring to address. procline()
is altered to *only* process the line and return whether it was a match
or not, necessary to be able to short-circuit the whole function in case
of this matchall flag. -m flag handling is moved out as well because it
suffers from the same fate as context handling if we bypass any actual
pattern matching.

The matching context (matches, mostly) didn't previously exist outside
of procline(), so we go ahead and create context object for file
processing bits to pass around. grep_printline() was created due to
this, for the scenarios where the matches don't actually matter and we
just want to print a line or two, a la flushing the context queue and
no -o or --color specified.

Damage from this broken behavior would have been mitigated by the fact
that it is unlikely users would invoke grep -w with an empty pattern.

This was identified while checking PR 105221 for problems it this may
cause in BSD grep, but PR 105221 is *not* a report of this behavior.

MFC r317741: bsdgrep: correct uninitialized variable introduced in r317703

MFC r317842: bsdgrep: don't ouptut matches with -c, -l, -L

Refactoring done in r317703 broke -c, -l, and -L flags implying
suppression of match printing. Fortunately this is just a matter of not
doing any printing of the resulting matches and context printing was not
broken in this refactoring.

Add some regression tests since this area may still see further
refactoring, include different context flags as well even though they
were not broken in this case.

PR: 219077
Approved by: emaste (mentor, blanket MFC)

322586 16-Aug-2017 kevans

bsdgrep: fix escape map building when using TRE (BSD_GREP_FASTMATCH)

MFC r317700: bsdgrep: use calloc where appropriate in grep's tre-fastmatch

Also apply style(9) to a related NULL check.

MFC r317701: bsdgrep: correct test sense from r317700

Kyle's change in review D10098 was correct. I introduced the error when
extracting a portion of that change.

MFC r317704: bsdgrep: fix escape map building for multibyte strings

In BSD grep, fix escape map building in the regex parser. It was
previously using memory not explicitly initialized, and the MBS escape
map was being built based on a version of the pattern with escapes
already parsed out.

This is Kyle's change, but I restored the broken style that already
exists in this file.

Approved by: emaste (mentor, blanket MFC)

322584 16-Aug-2017 kevans

MFC r317678: bsdgrep: Add GNU compatible version string indicator

As reported in r218614 it's useful to have an indication of whether or not
BSD grep was built with GNU_GREP_COMPAT.

Approved by: emaste (mentor, blanket MFC)

322583 16-Aug-2017 kevans

MFC r317665: bsdgrep: fix -w -v matching improperly with certain patterns

-w and -v flag matching was mostly functional but had some minor
problems:

1. -w flag processing only allowed one iteration through pattern
matching on a line. This was problematic if one pattern could match
more than once, or if there were multiple patterns and the earliest/
longest match was not the most ideal, and

2. Previous work "fixed" things to not further process a line if the
first iteration through patterns produced no matches. This is clearly
wrong if we're dealing with the more restrictive -w matching.

#2 breakage could have also occurred before recent broad rewrites, but
it would be more arbitrary based on input patterns as to whether or not
it actually affected things.

Fix both of these by forcing a retry of the patterns after advancing
just past the start of the first match if we're doing more restrictive
-w matching and we didn't get any hits to start with. Also move -v flag
processing outside of the loop so that we have a greater change to match
in the more restrictive cases. This wasn't strictly wrong, but it could
be a little more error prone.

While here, introduce some regressions tests for this behavior and fix
some excessive wrapping nearby that hindered readability. GNU grep
passes these new tests.

PR: 218467, 218811
Approved by: emaste (mentor, blanket MFC)

322582 16-Aug-2017 kevans

MFC r317254: bsdgrep: add BSD_GREP_FASTMATCH knob for built-in fastmatch

Bugs have been found in the fastmatch implementation as used in bsdgrep.
Some have been fixed (r316495) while fixes for others are in review
(D10098).

In comparison with the fastmatch implementation, Kyle Evans found that:

- regex(3)'s performance with literal expressions offers a speed
improvement over fastmatch

- regex(3)'s performance, both with simple BREs and EREs, seems to be
comparable

The regex implementation was imported in r226035, and the commit message
reports:

This is a temporary solution until the whole regex library is
not replaced so that BSD grep development can continue and the
backported code gets some review and testing. This change only
improves scalability slightly, there is no big performance boost
yet but several minor bugs have been found and fixed.

Introduce a WITH_/WITHOUT_BSD_GREP_FASTMATCH knob to support testing
of both approaches.

Regenerate src.conf(5) as per the original commit

PR: 175314, 194823
Approved by: emaste (mentor, blanket MFC)

322577 16-Aug-2017 kevans

MFC r303444 (ed): Call basename() in a portable way.

Pull a copy of the filename string before calling basename(). Change the
loop to not return on its own, so we can put a free() statement at the
bottom.

Approved by: emaste (mentor, blanket MFC)

322564 16-Aug-2017 kevans

bsdgrep: Use implied working directory for -r if no directories are passed

MFC r317050: bsdgrep: for -r, use the working directory if none specified

This is more sensible than the previous behaviour of grepping stdin,
and matches newer GNU grep behaviour.

MFC r317300 (ngie): Only expect :grep_r_implied to pass with bsdgrep(1)

The test fails with gnu grep from base and ports.

MFC r319002 (ngie): :rgrep : use atf-check to check the exit code/save the
output of grep -r instead of calling grep -r without it, and saving the
output to a file

This ensures that any errors thrown via grep -r are caught, not lost, and
uses existing atf-sh idioms for saving files.

PR: 216307
Approved by: emaste (mentor, blanket MFC)
Relnotes: yes

322562 16-Aug-2017 kevans

MFC r317051: bsdgrep: remove output separators between overlapping segments

Make bsdgrep more sensitive to context overlaps. If it's printing
context that either overlaps or is immediately adjacent to another bit
of context, don't print a separator.

- Non-overlapping segments no longer have two separators between them

- Overlapping segments no longer have separators between them with
overlapping sections repeated

Approved by: emaste (mentor, blanket MFC)

322560 16-Aug-2017 kevans

bsdgrep: add -z/--null-data support and update NLS catalogs accordingly

MFC r317049: bsdgrep: add -z/--null-data support

-z treats input and output data as sequences of lines terminated by a
zero byte instead of a newline. This brings it more in line with GNU grep
and brings us closer to passing the current tests with BSD grep.

MFC r317679: bsdgrep: correct nls usage data after r317049

r317049 added -z/--null-data to BSD grep but missed the update to nls
catalogs.

Approved by: emaste (mentor, blanket MFC)
Relnotes: yes

322559 16-Aug-2017 kevans

MFC r316542: bsdgrep: Handle special case of single-byte NUL pattern

PR: 202022
Approved by: emaste (mentor, blanket MFC)

322558 16-Aug-2017 kevans

MFC r316495: bsdgrep(1): Fix errors with invalid expressions

Invalid expressions with an ultimate compiled pattern length of 0 (e.g.,
"grep -E {") were not taken into account and caused a segfault while trying
to fill in the good suffix table.

Approved by: emaste (mentor, blanket MFC)

322557 16-Aug-2017 kevans

MFC r316492: bsdgrep(1): Rip out "xmalloc" bits

xmalloc was a debug malloc implementation, but the x{malloc,calloc,free}
functions default to calling the malloc(3) equivalents.

Instead of relying on this malloc shim, we can devise better ways to debug
malloc issues that aren't misleading upon initial inspection. (I.e., using
jemalloc's various built-in debugging capabilities.)

Approved by: emaste (mentor, blanket MFC)

322555 16-Aug-2017 kevans

bsdgrep: Fix matching behavior and add regression tests

MFC r316477: bsdgrep: fix matching behaviour

- Set REG_NOTBOL if we've already matched beginning of line and we're
examining later parts

- For each pattern we examine, apply it to the remaining bits of the
line rather than (potentially) smaller subsets

- Check for REG_NOSUB after we've looked at all patterns initially
matching the line

- Keep track of the last match we made to later determine if we're
simply not matching any longer or if we need to proceed another byte
because we hit a zero-length match

- Match the earliest and longest bit of each line before moving the
beginning of what we match to further in the line, past the end of the
longest match; this generally matches how gnugrep(1) seems to behave,
and seems like pretty good behavior to me

- Finally, bail out of printing any matches if we were set to print all
(empty pattern) but -o (output matches) was set

MFC r316489: bsdgrep: Initialize vars to avoid a false positive GCC warning

MFC r316491: bsdgrep: revert color changes from r316477

r316477 changed the color output to match exactly the in-tree GNU grep,
but introduces unnecessary escape sequences.

MFC r316536: bsdgrep: create additional tests for coverage on recent fixes

Create additional tests to cover regressions that were discovered by
PRs linked to reviews D10098, D10102, and D10104.

It is worth noting that neither bsdgrep(1) nor gnugrep(1) in the base
system currently pass all of these tests, and gnugrep(1) not quite being
up to snuff was also noted in at least one of the PRs.

MFC r317052: bsdgrep: fix zero-length matches without the -o flag

r316477 broke zero-length matches when not using the -o flag, by
skipping over them entirely.

Add a regression test so that it doesn't break again in the future.

PR: 175314, 180990, 181263, 195763, 197531, 197555, 202022, 209116
Approved by: emaste (mentor, blanket MFC)
Relnotes: yes

322525 15-Aug-2017 kevans

bsdgrep: treat rgrep as grep -r and install rgrep symlink

MFC r316473: bsdgrep: treat rgrep as grep -r

MFC r316484: bsdgrep(1): create rgrep link

Create a convenience rgrep link for bsdgrep(1) that observes 'grep -r'
behavior.

A follow-up to r316473.

Approved by: emaste (mentor)

322520 14-Aug-2017 kevans

MFC r313948: bsdgrep: fix EOF handling with --mmap

Rework part of the loop in grep_fgetln to return the rest of the line
and ensure that we still advance the buffer by the length of the rest
of the line.

PR: 165471
Approved by: emaste (mentor)

318650 22-May-2017 gjb

MFC r313955 (emaste):
bsdgrep: document ignored option -u

MSDOS and Windows GNU grep uses -u to mean "print byte offsets as if
running on an UNIX system." The option has no effect on systems that
do not use CRLF line endings.

PR: 171200
Sponsored by: The FreeBSD Foundation

303888 09-Aug-2016 dim

MFC r303676:

Fix a segfault in bsdgrep when parsing the invalid extended regexps "?"
or "+" (these are invalid, because there is no preceding operand).

When bsdgrep attempts to emulate GNU grep in discarding and ignoring the
invalid ? or + operators, some later logic in tre_compile_fast() goes
beyond the end of the buffer, leading to a crash.

Fix this by bailing out, and reporting a bad pattern instead.

Approved by: re (gjb, kib)
Reported by: Steve Kargl

302408 08-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


/freebsd-11-stable/MAINTAINERS
/freebsd-11-stable/cddl
/freebsd-11-stable/cddl/contrib/opensolaris
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/zfs
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs
/freebsd-11-stable/contrib/amd
/freebsd-11-stable/contrib/apr
/freebsd-11-stable/contrib/apr-util
/freebsd-11-stable/contrib/atf
/freebsd-11-stable/contrib/binutils
/freebsd-11-stable/contrib/bmake
/freebsd-11-stable/contrib/byacc
/freebsd-11-stable/contrib/bzip2
/freebsd-11-stable/contrib/com_err
/freebsd-11-stable/contrib/compiler-rt
/freebsd-11-stable/contrib/dialog
/freebsd-11-stable/contrib/dma
/freebsd-11-stable/contrib/dtc
/freebsd-11-stable/contrib/ee
/freebsd-11-stable/contrib/elftoolchain
/freebsd-11-stable/contrib/elftoolchain/ar
/freebsd-11-stable/contrib/elftoolchain/brandelf
/freebsd-11-stable/contrib/elftoolchain/elfdump
/freebsd-11-stable/contrib/expat
/freebsd-11-stable/contrib/file
/freebsd-11-stable/contrib/gcc
/freebsd-11-stable/contrib/gcclibs/libgomp
/freebsd-11-stable/contrib/gdb
/freebsd-11-stable/contrib/gdtoa
/freebsd-11-stable/contrib/groff
/freebsd-11-stable/contrib/ipfilter
/freebsd-11-stable/contrib/ldns
/freebsd-11-stable/contrib/ldns-host
/freebsd-11-stable/contrib/less
/freebsd-11-stable/contrib/libarchive
/freebsd-11-stable/contrib/libarchive/cpio
/freebsd-11-stable/contrib/libarchive/libarchive
/freebsd-11-stable/contrib/libarchive/libarchive_fe
/freebsd-11-stable/contrib/libarchive/tar
/freebsd-11-stable/contrib/libc++
/freebsd-11-stable/contrib/libc-vis
/freebsd-11-stable/contrib/libcxxrt
/freebsd-11-stable/contrib/libexecinfo
/freebsd-11-stable/contrib/libpcap
/freebsd-11-stable/contrib/libstdc++
/freebsd-11-stable/contrib/libucl
/freebsd-11-stable/contrib/libxo
/freebsd-11-stable/contrib/llvm
/freebsd-11-stable/contrib/llvm/projects/libunwind
/freebsd-11-stable/contrib/llvm/tools/clang
/freebsd-11-stable/contrib/llvm/tools/lldb
/freebsd-11-stable/contrib/llvm/tools/llvm-dwarfdump
/freebsd-11-stable/contrib/llvm/tools/llvm-lto
/freebsd-11-stable/contrib/mdocml
/freebsd-11-stable/contrib/mtree
/freebsd-11-stable/contrib/ncurses
/freebsd-11-stable/contrib/netcat
/freebsd-11-stable/contrib/ntp
/freebsd-11-stable/contrib/nvi
/freebsd-11-stable/contrib/one-true-awk
/freebsd-11-stable/contrib/openbsm
/freebsd-11-stable/contrib/openpam
/freebsd-11-stable/contrib/openresolv
/freebsd-11-stable/contrib/pf
/freebsd-11-stable/contrib/sendmail
/freebsd-11-stable/contrib/serf
/freebsd-11-stable/contrib/sqlite3
/freebsd-11-stable/contrib/subversion
/freebsd-11-stable/contrib/tcpdump
/freebsd-11-stable/contrib/tcsh
/freebsd-11-stable/contrib/tnftp
/freebsd-11-stable/contrib/top
/freebsd-11-stable/contrib/top/install-sh
/freebsd-11-stable/contrib/tzcode/stdtime
/freebsd-11-stable/contrib/tzcode/zic
/freebsd-11-stable/contrib/tzdata
/freebsd-11-stable/contrib/unbound
/freebsd-11-stable/contrib/vis
/freebsd-11-stable/contrib/wpa
/freebsd-11-stable/contrib/xz
/freebsd-11-stable/crypto/heimdal
/freebsd-11-stable/crypto/openssh
/freebsd-11-stable/crypto/openssl
/freebsd-11-stable/gnu/lib
/freebsd-11-stable/gnu/usr.bin/binutils
/freebsd-11-stable/gnu/usr.bin/cc/cc_tools
/freebsd-11-stable/gnu/usr.bin/gdb
/freebsd-11-stable/lib/libc/locale/ascii.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris
/freebsd-11-stable/sys/contrib/dev/acpica
/freebsd-11-stable/sys/contrib/ipfilter
/freebsd-11-stable/sys/contrib/libfdt
/freebsd-11-stable/sys/contrib/octeon-sdk
/freebsd-11-stable/sys/contrib/x86emu
/freebsd-11-stable/sys/contrib/xz-embedded
/freebsd-11-stable/usr.sbin/bhyve/atkbdc.h
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.c
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.h
/freebsd-11-stable/usr.sbin/bhyve/console.c
/freebsd-11-stable/usr.sbin/bhyve/console.h
/freebsd-11-stable/usr.sbin/bhyve/pci_fbuf.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.h
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.c
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.h
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.c
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.h
/freebsd-11-stable/usr.sbin/bhyve/rfb.c
/freebsd-11-stable/usr.sbin/bhyve/rfb.h
/freebsd-11-stable/usr.sbin/bhyve/sockstream.c
/freebsd-11-stable/usr.sbin/bhyve/sockstream.h
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.c
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.h
/freebsd-11-stable/usr.sbin/bhyve/usb_mouse.c
/freebsd-11-stable/usr.sbin/bhyve/vga.c
/freebsd-11-stable/usr.sbin/bhyve/vga.h
299094 04-May-2016 ngie

Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed
after r298107

Summary of changes:

- Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that
namespacing is kept with FILES appropriately, and that this shouldn't need
to be repeated if the namespace changes -- only the definition of PACKAGE
needs to be changed
- Allow PACKAGE to be overridden by callers instead of forcing it to always be
`tests`. In the event we get to the point where things can be split up
enough in the base system, it would make more sense to group the tests
with the blocks they're a part of, e.g. byacc with byacc-tests, etc
- Remove PACKAGE definitions where possible, i.e. where FILES wasn't used
previously.
- Remove unnecessary TESTSPACKAGE definitions; this has been elided into
bsd.tests.mk
- Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES;
${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk.
- Fix installation of files under data/ subdirectories in lib/libc/tests/hash
and lib/libc/tests/net/getaddrinfo
- Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup)

Document the proposed changes in share/examples/tests/tests/... via examples
so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of
replacing FILES. share/mk/bsd.README didn't seem like the appropriate method
of communicating that info.

MFC after: never probably
X-MFC with: r298107
PR: 209114
Relnotes: yes
Tested with: buildworld, installworld, checkworld; buildworld, packageworld
Sponsored by: EMC / Isilon Storage Division


298107 16-Apr-2016 gjb

Merge the projects/release-pkg branch to head.

This allows packaging the base system with pkg(8), including
but not limited to providing the ability to provide upstream
binary update possibilities for non-tier-1 architectures.

This merge is a requirement of the 11.0-RELEASE, and as such,
thank you to everyone that has tested the project branch.

Documentation in build(7) etc. is still somewhat sparse, but
updates to those parts will follow.

Sponsored by: The FreeBSD Foundation


296799 13-Mar-2016 ian

Fix a bug in bsdgrep that caused the program to hang in a tight loop for
some combinations of command line options and search patterns. The code was
examining regexec flags looking for a regcomp flag value. The fix is to
look in the struct field where the decoded regcomp flag was stored when the
regex was compiled.

With this fix, it's possible to build WITHOUT_GNU_GREP_COMPAT and
WITH_BSDGREP and have a usable GPL-free grep (which of course lacks gnugrep
extensions). It now passes the kyua tests except for one test that requires
the -z/--null-data gnu extension, and one test involving outputting context
lines across multiple files which appears to sometimes output an extra
delimiter line ("--") between matches (a rather obscure failure of a rather
obscure feature, so bsdgrep should be generally usable now).


296587 09-Mar-2016 bdrewery

DIRDEPS_BUILD: Connect MK_TESTS.

Sponsored by: EMC / Isilon Storage Division


289172 12-Oct-2015 ngie

Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and
netbsd-tests.test.mk (r289151)

- Eliminate explicit OBJTOP/SRCTOP setting
- Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk
- Remove unnecessary TESTSDIR setting
- Use SRCTOP where possible for clarity

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Divison


285884 26-Jul-2015 pfg

Bump GCC max-inline-insns-single in libiconv_modules and grep

This is required by our FORTIFY_SOURCE implementation as it
does more inlining. As a rule of thumb, FORTIFY_SOURCE doubles
the number of inlines except that in grep inlining
blows up for some reason.


284481 16-Jun-2015 sjg

new depends


284345 13-Jun-2015 sjg

Add META_MODE support.

Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision: D2796
Reviewed by: brooks imp


280307 21-Mar-2015 pfg

bsdgrep: fix regression in the -f option since r268799

Caused by an incomplete merge from NetBSD.

PR: 198725
MFC after: 3 days


277939 30-Jan-2015 ngie

Create MANLINKS for lzgrep, etc when MK_LZMA_SUPPORT != no

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division


277463 21-Jan-2015 delphij

Fix xz handling for files larger than 32K.

Submitted by: Stefan Ehmann <shoesoft gmx net>
PR: bin/186861
MFC after: 2 weeks


277273 16-Jan-2015 will

Add a ${CP} alias for copying files in the build.

Some users build FreeBSD as non-root in Perforce workspaces. By default,
Perforce sets files read-only unless they're explicitly being edited.
As a result, the -f argument must be used to cp in order to override the
read-only flag when copying source files to object directories. Bare use of
'cp' should be avoided in the future.

Update all current users of 'cp' in the src tree.

Reviewed by: emaste
MFC after: 1 week
Sponsored by: Spectra Logic


275042 25-Nov-2014 bapt

Convert to usr.bin/ to LIBADD
Reduce overlinking


272784 09-Oct-2014 ngie

Integrate usr.bin/grep/tests from NetBSD into atf/kyua

Sponsored by: EMC / Isilon Storage Division


272127 25-Sep-2014 pfg

bsdgrep: Work-around for segmentation fault.

Fix by David Carlier.

Obtained from: HardenedBSD
PR: 167921
MFC after: 1 month


271771 18-Sep-2014 will

Fix incremental builds involving non-root users with read-only source files.

Makefiles should not assume that source files can be overwritten. This is the
common case for Perforce source trees.

This is a followup commit to r211243 in the same vein.

MFC after: 1 month
Sponsored by: Spectra Logic
MFSpectraBSD: r1036319 on 2014/01/29, r1046711 on 2014/03/06


270132 18-Aug-2014 gabor

- Do not look for more matching lines if -L is specified

Submitted by: eadler (based on)
MFC after: 2 weeks


268801 17-Jul-2014 pfg

grep: fix some memory leaks.
Add memory leak fix missing from r268799.

Obtained from: NetBSD


268799 17-Jul-2014 pfg

grep: fix some memory leaks.

Bring a couple of changes from NetBSD:

queue.c (CVS Rev. 1.4. 1.5)
Fix memory leaks.
NULL does not need a cast.

grep.c (CVS Rev. 1.6)
Use the more portable getline.

Obtained from: NetBSD
MFC after: 3 days


268798 17-Jul-2014 pfg

grep: Fix type.

Obtained from: NetBSD (CVS rev. 1.17)
MFC after: 3 days


267693 20-Jun-2014 gjb

Fix a bug in bsdgrep(1) where patterns are not correctly
detected.

Certain criteria must be met for this bug to show up:

* the -w flag is specified, and
* neither -o or --color are specified, and
* the pattern is part of another word in the line, and
* the other word that contains the pattern occurs first

PR: 181973
MFC after: 3 days
Sponsored by: The FreeBSD Foundation


265420 06-May-2014 imp

Use src.opts.mk in preference to bsd.own.mk except where we need stuff
from the latter.


264744 21-Apr-2014 pfg

Various style(9) fixes and typos in grep, sort and patch.

MFC after: 3 days


263997 01-Apr-2014 imp

Don't test WITHOUT_FOO in program makefiles, test MK_FOO instead.


261634 08-Feb-2014 joel

mdoc: minor paragraph fixes.


253810 30-Jul-2013 ache

grep -i does not work for simple patterns and single byte locales, like
LANG=ru_RU.KOI8-R grep -i <some single KOI8-R letter>
Fix it.

MFC after: 3 days


251468 06-Jun-2013 jkim

Adjust CFLAGS to pick up correct regex.h and posix/regex.h. Note this
actually reverts r250860 and r250861.

Reported by: gjb, tinderbox


248214 12-Mar-2013 markj

Revert r246917, as it is causing incorrect behaviour as reported on
freebsd-current.

PR: bin/175213
Approved by: emaste (co-mentor)


246917 17-Feb-2013 markj

Strengthen the check in IS_OUT_OF_BOUNDS to ensure that (j - 1) is a
valid index into the input buffer.

PR: bin/175213
Reviewed by: gabor
Approved by: emaste (co-mentor)
MFC after: 1 week


245688 20-Jan-2013 gabor

- Avoid unnecessary strdup()

Submitted by: ache
MFC after: 5 days


245171 08-Jan-2013 obrien

Following r226271, allow disabling lzma support with "WITHOUT_LZMA_SUPPORT".
Correct r226271 which should have used WITHOUT_BZIP2_SUPPORT per r166255.

Obtained from: Juniper Networks


245075 05-Jan-2013 markj

Fix a segfault when bsdgrep -i is given an empty pattern string.

PR: bin/172865
Reviewed by: gabor
Approved by: emaste (co-mentor)
MFC after: 1 week


245057 05-Jan-2013 gabor

- Fix handling of the case when multiple patterns are specified in a single
command line argument, separated by newlines

PR: bin/173673
Submitted by: ache
MFC after: 1 week


244493 20-Dec-2012 eadler

Make bsdgrep behave as gnugrep and as documented: -m should only stop
reading the specific file, not any file.

Tested by: frogs (irc)
Reviewed by: gabor
Approved by: cperciva (implicit)
MFC after: 1 week


241737 19-Oct-2012 ed

More -Wmissing-variable-declarations fixes.

In addition to adding `static' where possible:

- bin/date: Move `retval' into extern.h to make it visible to date.c.
- bin/ed: Move globally used variables into ed.h.
- sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings.
- usr.bin/calendar: Remove unneeded variables.
- usr.bin/chat: Make `line' local instead of global.
- usr.bin/elfdump: Comment out unneeded function.
- usr.bin/rlogin: Use _Noreturn instead of __dead2.
- usr.bin/tset: Pull `Ospeed' into extern.h.
- usr.sbin/mfiutil: Put global variables in mfiutil.h.
- usr.sbin/pkg: Remove unused `os_corres'.
- usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'.


230141 15-Jan-2012 eadler

Remove duplicate line from usage

PR: bin/164139
Submitted by: Yuri Pankov <yuri.pankov@gmail.com>
Approved by: nwhitehorn
MFC after: 3 days


228395 10-Dec-2011 ed

Add missing "static const" to long options table.

This table is only used in this C file and passed to getopt_long(), so
we can safely add static and const to it.


228319 07-Dec-2011 gabor

- Match GNU behavior of exit code
- Rename variable that has a different meaning now

PR: bin/162930
Submitted by: Jan Beich <jbeich@tormail.net>
MFC after: 1 week


228099 28-Nov-2011 gabor

- Create links to the xz and lzma versions even if BSD grep is not the
default. Nor GNU nor liblzma in base provides such functionality so
it may be useful.

MFC after: 3 days


228097 28-Nov-2011 gabor

- Call warnx() instead of errx() if a directory is not readable when using
a recursive search. This is the expected behavior instead of aborting.

PR: bin/162907
Submitted by: Jan Beich <jbeich@tormail.net>
MFC after: 3 days


228093 28-Nov-2011 gabor

- Fix behavior of --null to match GNU grep

PR: bin/162906
Submitted by: Jan Beich <jbeich@tormail.net>
MFC after: 3 days


226664 23-Oct-2011 gabor

- Fix installation when WITH_BSD_GREP is set to yes

Submitted by: Aleksandr Rybalko <ray@ddteam.net>


226273 12-Oct-2011 gabor

- Fix counting of match limit (-m)

Reported by: Nali Toja <nalitoja@gmail.com>
Approved by: delphij (mentor)


226271 11-Oct-2011 gabor

- Use getprogname() instead of __progname
- Allow disabling bzip2 support with WITHOUT_BZIP2
- Fix handling patterns that start with a dot
- Remove superfluous semicolon

Approved by: delphij (mentor)


226047 06-Oct-2011 delphij

Fix build on i386 and arm.

Tested with: make universe
Pointy hat to: delphij


226035 05-Oct-2011 gabor

Update BSD grep to the latest development version. It has some code
backported that was written for the TRE integration project in Google
Summer of Code 2011. This is a temporary solution until the whole
regex library is not replaced so that BSD grep development can continue
and the backported code gets some review and testing. This change only
improves scalability slightly, there is no big performance boost yet
but several minor bugs have been found and fixed.

Approved by: delphij (mentor)
Sposored by: Google Summer of Code 2011
MFC after: 1 week


224938 17-Aug-2011 gabor

- Fix exclusion of directories from a recursive search
- Use FTS_SKIP for exclusion instead of custom code

Submitted by: ttsestt@gmail.com
Approved by: re (kib), delphij (mentor)


224937 17-Aug-2011 gabor

- Fix handling of environmental variables when they are set to empty string

Submitted by: ttsestt@gmail.com
Approved by: re (kib), delphij (mentor)


223009 12-Jun-2011 gabor

- Use REG_NOSUB to bypass submatch counting when not necessary. This may
yield in somewhat better performance in a few cases.

Approved by: delphij (mentor)


223008 12-Jun-2011 gabor

- Fix -w behavior
- Make -F and -w work together
- Fix --color to colorize all of the matches

PR: bin/156826
Submitted by: Yuri Pankov <yuri.pankov@gmail.com>
Approved by: delphij (mentor)


222772 06-Jun-2011 ed

Remove redundant assignments to WARNS.

For these directories, WARNS is already implied to be 6.


222273 25-May-2011 obrien

Build and install a BSD licensed grep.
If WITH_BSD_GREP is not set, it will be 'bsdgrep' and GNUgrep will be
'[ef]grep'. Otherwise, BSD-grep will be the grep family, and GNUgrep
will be 'gnugrep'.

Discussed with: brooks


220422 07-Apr-2011 gabor

- Adjust a comment to actual behaviour
- Makefile nit
- Add more CVS/SVN keywords to make it easier to track changes from NetBSD
in case they add further improvements

Approved by: delphij (mentor)
Obtained from: The NetBSD Project


220421 07-Apr-2011 gabor

- Simplify the fixed string pattern preprocessing code
- Improve readability

Approved by: delphij (mentor)
Obtained from: The NetBSD Project


220420 07-Apr-2011 gabor

- Replace some strcpy()-family functions with memcpy() ones. It has been
discussed earlier that the extra safeness is not required in these
cases and we can avoid the overhead by using the more general
memory copy functions.

Approved by: delphij (mentor)
Obtained from: The NetBSD Project


212927 20-Sep-2010 delphij

Add Simplified Chinese messages for BSD grep.


211519 19-Aug-2010 delphij

Revert a minor part of revision 211364:

- Imply -h if single file is grepped, this is the GNU behaviour

This is already done by code above the change and have caused a regression
since this instance of code does not check Hflag.

Reported by: davidxu
Pointy hat to: delphij


211496 19-Aug-2010 des

UTFize my name.


211463 18-Aug-2010 gabor

- Refactor file reading code to use pure syscalls and an internal buffer
instead of stdio. This gives BSD grep a very big performance boost,
its speed is now almost comparable to GNU grep.

Submitted by: Dimitry Andric <dimitry@andric.com>
Approved by: delphij (mentor)


211364 15-Aug-2010 gabor

- 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)


210927 06-Aug-2010 gabor

- Some fixes to Ukranian catalog

Submitted by: avg, Alex Kozlov <spam@rm-rf.kiev.ua>


210652 30-Jul-2010 joel

Fix spelling.


210639 30-Jul-2010 gabor

- Add Ukranian catalog

Submitted by: Alex Kozlov <spam@rm-rf.kiev.ua>


210622 29-Jul-2010 gabor

- Some minor changes to the messages to increase usefulness of error msgs

Reviewed by: hrs (Japanese catalogs),
pluknet <pluknet at gmail dot com> (Russian catalog)
Approved by: delphij (mentor)


210579 29-Jul-2010 gabor

- Add Japanese NLS catalogs

Submitted by: hrs
Approved by: delphij (mentor)


210578 29-Jul-2010 gabor

- Use the traditional behaviour for filename and directory name inclusion
and exclusion patterns [1]
- Some improvements on the exiting code, like replacing memcpy with
strlcpy/strcpy

Approved by: delphij (mentor)
Pointed out by: bf [1], des [1]


210479 25-Jul-2010 gabor

- Fix -l and -L by really surpressing output and just showing filenames

Submitted by: swell.k@gmail.com
Approved by: delphij (mentor)


210461 25-Jul-2010 gabor

- 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)


210430 23-Jul-2010 delphij

Fix crashes when using grep -R:

- Explicitly pre-zero memory for fts_open parameters.
- Don't test against directory patterns when we are testing direct
leaf of current directory.

While I'm there plug a few of memory leaks.


210426 23-Jul-2010 gabor

- Add Russian catalog [1]
- Fix two minor nits in manpage [2]
- style.Makefile(5)

Submitted by: pluknet <pluknet at gmail.com> [1],
Alex Kozlov <spam@rm-rf.kiev.ua> [2]
Reviewed by: delphij


210389 22-Jul-2010 gabor

Add BSD grep to the base system and make it our default grep.

Deliverables: Small and clean code (1,4 KSLOC vs GNU's 8,5 KSLOC),
lower memory usage than GNU grep, GNU compatibility,
BSD license.

TODO: Performance is somewhat behind GNU grep but it is only
significant for bigger searches. The reason is complex, the
most important factor is that GNU grep uses lots of
optimizations to improve the speed of the regex library.
First, we need a modern regex library (practically by adopting
TRE), add support for GNU-style non-standard regexes and then
reevalute the performance issues and look for bottlenecks. In
the meantime, for those, who need better performance, it is
possible to build GNU grep by setting WITH_GNU_GREP.

Approved by: delphij (mentor)
Obtained from: OpenBSD (http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/grep/),
freegrep (http://github.com/howardjp/freegrep)
Sponsored by: Google SoC 2008
Portbuild tests run by: kris, pav, erwin
Acknowledgements to: fjoe (as SoC 2008 mentor),
everyone who helped in reviewing and testing