This is basically a ``C compilation'' of the former whereis.pl file,
employing the same algorithms, and aiming at being mostly
UI-compatible to the old (legally tainted) 4.3BSD whereis(1). In
comparision, the 4.4BSD-Lite version is just another variant of
which(1) only, where in particular the option to search for source
directories is sorely missing.
While i was at it, i added two more options which i contemplated doing
long since. -x will suppress the run of locate(1) to find sources
that could not be found otherwise, potentially saving a lot of time
(but obviously, risking to not find some sources that are well hidden
in the tree). -q will omit the leading name of the query, so in
particular, you can now do something like:
cd `whereis -qs ls`
I'd explicitly like to thank johan for his review which was quite a
bit more than an average review, including sending me a lot of diffs.
Reviewed by: johan
keyword and in the description of rp's hints.
Didn't fix rp's hints being mostly in comments so that they are harder to
use (they don't get linted either way because makeLINT.sh strips them and
there is no compile-time syntax checking of hints anyway).
alphas:
.../elf2aout.c:130: warning: cast increases required alignment of
target type
The warning is about casting ((char *)e + phoff) to a struct pointer,
where e is aligned but phoff might be garbage, so I think the warning
should be emitted on most machines (even on i386's, alignment checking
might be on) and the correct fix would involve validation phoff before
using it.
most of the time (unless fork fails). This should fix the problem where
FreeBSD won't respond to a remote host and therefor the remote hosts
tries indefinitely to contact the FreeBSD hosts thereby irritating the
system administrator.
PR: misc/27810
fatal on alphas.
Fixed setting of WARNS. WARNS should never be set unconditionally, since
this breaks testing of different WARNS values by setting it at a higher
level (e.g., on the command line).
to the Makefile didn't affect this bug because WFORMAT only controls
higher- level format checking (not the -Wformat that is implicit in
-Wall).
Fixed a nearby printf format error that was benign and 3 nearby style bugs.