freebsd-nq/usr.bin
Kyle Evans 05ad821531 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).

Reviewed by:	cem, emaste, ngie
Approved by:	emaste (mentor)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D12056
2017-08-24 01:23:33 +00:00
..
addr2line
alias
apply Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
ar ar: handle partial writes from archive_write_data 2017-07-24 21:25:49 +00:00
asa
at
atm
awk
banner
basename Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
bc
biff
bluetooth
bmake Import bmake-20170720 2017-07-24 04:38:05 +00:00
brandelf
bsdcat Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
bsdiff
bzip2
bzip2recover
c89
c99
caesar
calendar Clarify the fact that Andrey (ache) passed away in Moscow 2017-08-18 07:34:34 +00:00
cap_mkdb
catman Make catman(1) use mandoc(1) by default 2017-05-21 22:28:28 +00:00
chat
chkey
chpass
cksum
clang Improve the coverage of debug symbols for MK_DEBUG_FILES. 2017-08-23 23:30:25 +00:00
cmp Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
col Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
colldef
colrm
column
comm Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
compile_et
compress Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
cpio Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
cpuset
csplit Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
ctags
ctlstat
cut MFhead@r322021 2017-08-03 17:43:26 +00:00
cxxfilt
dc
diff Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
diff3 Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
dirname Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
dpv
drill
dtc dtc: Update to upstream 9ce35ff8 2017-06-23 20:21:53 +00:00
du Add supporting changes for Add limited sandbox capability to "make check" 2017-08-14 19:21:37 +00:00
ee
elf2aout
elfcopy
elfdump
enigma
env
expand
factor Delete obsolete paragraph; primes(6) is now able to list primes for the 2017-06-04 02:45:18 +00:00
false
fetch
file
file2c Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
find
finger The variable nargv is allocated but never freed, so free it when the it 2017-06-13 15:50:16 +00:00
fmt
fold
fortune
from
fstat fstat: catch up with r318997 and use 64 bits to store fsid 2017-06-10 20:38:52 +00:00
fsync
ftp
gcore Store a 32-bit PT_LWPINFO struct for 32-bit process core dumps. 2017-06-29 21:31:13 +00:00
gencat
getaddrinfo
getconf Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
getent
getopt
gprof
grdc
grep bsdgrep: add a primitive literal matcher 2017-08-24 01:23:33 +00:00
gzip Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
head
hesinfo
hexdump Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
host
iconv
id
ident Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
indent Add supporting changes for Add limited sandbox capability to "make check" 2017-08-14 19:21:37 +00:00
ipcrm
ipcs
iscsictl
join Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
jot Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
kdump Decode arguments to rtprio_thread() (same as rtprio()). 2017-06-10 01:32:18 +00:00
keylogin
keylogout
killall
ktrace Improve the ktrace(1) man page to make it slightly more obvious that there 2017-07-24 16:58:54 +00:00
ktrdump
lam
last Fix a memory leak with last 2017-06-02 20:25:25 +00:00
lastcomm Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
ldd o Replace __riscv__ with __riscv 2017-08-07 14:09:57 +00:00
leave
less
lessecho
lesskey
lex
limits Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
locale
localedef
locate
lock
lockf
logger
login
logins
logname
look
lorder
lsvfs
lzmainfo
m4 Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
mail
man
mandoc Update mandoc to 1.14.2 2017-07-31 19:34:38 +00:00
mesg
minigzip
ministat
mkcsmapper
mkcsmapper_static
mkdep
mkesdb Set usage() to show -d flag 2017-08-12 15:51:46 +00:00
mkesdb_static
mkfifo
mkimg Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
mklocale
mkstr
mktemp
mkuzip Doh, fix some botched "fix" in r320277. 2017-06-23 23:11:05 +00:00
morse
msgs
mt Add historical notes on QIC tape drives and fix a couple of issues in mt(1). 2017-08-11 18:43:52 +00:00
nc
ncal Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
netstat After inpcb route caching was put back in place there is no need for 2017-07-27 13:03:36 +00:00
newgrp
newkey
nfsstat Add RPC count reporting for the two new RPCs added by r320322. 2017-06-24 20:09:23 +00:00
nice
nl
nm
nohup
numactl
number
opieinfo
opiekey
opiepasswd
pagesize
pamtest
passwd
paste
patch patch(1): add support for git generated diffs. 2017-07-02 21:00:30 +00:00
pathchk
perror
pom
pr Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
primes Using results from 2017-06-04 02:36:37 +00:00
printenv
printf Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
proccontrol
procstat MFhead@r322057 2017-08-04 17:41:49 +00:00
protect
quota
random
rctl Use proper capitalization with .Dd. 2017-06-01 15:03:43 +00:00
readelf
renice
resizewin Improve terminology in a comment. 2017-06-26 16:08:28 +00:00
rev
revoke
rlogin Add deprecation notices for all rcmd tools 2017-07-04 15:44:30 +00:00
rpcgen
rpcinfo
rs
rsh Add deprecation notices for all rcmd tools 2017-07-04 15:44:30 +00:00
rup
ruptime rwho/ruptime/rwhod shouldn't be gated by RCMDS. 2017-08-08 20:17:07 +00:00
rusers
rwall
rwho rwho/ruptime/rwhod shouldn't be gated by RCMDS. 2017-08-08 20:17:07 +00:00
script
sdiff Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
sdiotool Added new tool for doing experiments with SDIO card. 2017-07-09 17:05:48 +00:00
sed Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
send-pr
seq
setchannel
shar
showmount
size
smbutil
sockstat
soelim Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
sort
split
ssh-copy-id
stat Add HAS_TESTS to all Makefiles that use the SUBDIR.${MK_TESTS}+= tests idiom 2017-08-02 08:14:06 +00:00
stdbuf stdbuf(1): Add buffer definition "B" to the usage message 2017-07-08 17:08:42 +00:00
strings
su
svn
systat
tabs
tail Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
talk
tar Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
tcopy
tee
telnet
tests
tftp
time
timeout Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
tip
top Enhance top(1) to filter on multiple usernames 2017-08-07 08:45:08 +00:00
touch
tput
tr Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
true
truncate Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
truss Upgrade to the latest sources generated from the CloudABI specification. 2017-07-26 06:57:15 +00:00
tset The memory assigned to the local variable 'copy' needs to be freed. 2017-06-06 21:40:35 +00:00
tsort
tty
ul
uname - Add a simple example to uname(1) manual page to show how the hardware 2017-05-31 03:44:31 +00:00
unexpand
unifdef
uniq Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
units Add supporting changes for Add limited sandbox capability to "make check" 2017-08-14 19:21:37 +00:00
unvis
unzip
usbhidaction
usbhidctl
users
uudecode Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
uuencode Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
vacation
vgrind
vi
vis
vmstat vmstat: Always emit a space after the free-memory column 2017-08-08 12:18:11 +00:00
vtfontcvt
w Fix singular/plural "users" output. 2017-07-27 14:34:57 +00:00
wall
wc
what
whereis
which
who
whois
write
xargs Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
xinstall Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
xlint o Replace __riscv__ with __riscv 2017-08-07 14:09:57 +00:00
xo Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
xohtml Update from libxo-0.8.1 to 0.8.4: 2017-08-03 15:47:42 +00:00
xolint Merge libxo-0.8.2: 2017-06-16 06:29:21 +00:00
xopo Merge libxo-0.8.2: 2017-06-16 06:29:21 +00:00
xstr
xz
xzdec
yacc Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
yes style(9) fixes. 2017-06-13 16:19:32 +00:00
ypcat
ypmatch
ypwhich
zstd
Makefile rwho/ruptime/rwhod shouldn't be gated by RCMDS. 2017-08-08 20:17:07 +00:00
Makefile.amd64
Makefile.arm
Makefile.i386
Makefile.inc
Makefile.powerpc
Makefile.sparc64