summaryrefslogtreecommitdiffstats
path: root/usr.bin/whereis/whereis.c
Commit message (Collapse)AuthorAgeFilesLines
* Reencode files from latin1 to UTF-8.uqs2011-12-301-1/+1
| | | | | | | This makes a tiny percentage of entries in calendars ugly for latin1 users, but fixes them for UTF-8 users. This badly needs a solution involving locale-dependent re-encoding.
* Mark global functions and/or variables in whereis(1) static where possible.ed2011-11-061-16/+16
| | | | This allows compilers and static analyzers to more thorough analysis.
* Make the search for sources in PATH_PORTS more accurate. I onlyjoerg2008-06-201-2/+21
| | | | | | | | | | noticed that a "whereis -qs qemu" matched the distfiles subdir of qemu rather than /usr/ports/emulators/qemu. It now ignores all dot entries in /usr/ports, plus all entries starting with a capital letter (maintenance stuff like Templates, but also includes subdir CVS), plus /usr/ports/distfiles which is simply a magic name in that respect.
* Remove unused variables.stefanf2005-04-091-2/+1
|
* Fixed usage().ru2005-02-101-2/+3
|
* Respect locale settings from the environment.tjr2004-07-151-0/+3
|
* Add the -a option to report all matches instead of only thejohan2002-08-221-53/+132
| | | | | | first of each requested type. Approved by: joerg, sheldonh (mentor)
* Correctly handle empty path arguments, e.g., whereis -S -f biff.johan2002-08-181-7/+3
| | | | Approved by: joerg, sheldonh (mentor)
* Define all paths in pathnames.hjohan2002-07-251-2/+2
| | | | Approved by: joerg, sheldonh (mentor)
* Teach whereis(1) about games.johan2002-07-241-2/+4
| | | | Approved by: joerg, sheldonh (mentor)
* Complete rewrite, once again.joerg2002-07-111-85/+549
| | | | | | | | | | | | | | | | | | | | | | | 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
* Restore copyright and RCSID.johan2002-07-041-6/+11
| | | | | | | Remove duplicate $FreeBSD$, $NetBSD$. Submitted by: mike Approved by: sheldonh (mentor)
* compact synopsisjohan2002-07-031-1/+1
| | | | | | | s/program [program ...]/program .../ s/program [...]/program .../ Approved by: sheldonh (mentor)
* Remove -p flag.johan2002-07-031-26/+16
| | | | | | | | | OpenBSD's implementation lacks -p, and we don't want to support the option now, only to lose it if/when we later switch to OpenBSD's implementation. This functionality is provided by which(1). Approved by: sheldonh (mentor)
* Add __FBSDID.johan2002-07-031-7/+2
| | | | | | Remove __COPYRIGHT, __RCSID which caused an assembler warning. Approved by: sheldonh (mentor)
* Change to NetBSDs version of whereis.johan2002-07-031-0/+139
| | | | | Approved by: sheldonh (mentor) Obtained from: NetBSD
* A totally revamped whereis(1), bringing back all the functionality ofjoerg1996-06-151-115/+0
| | | | | | | | the 4.3BSD command. Rewritten from scratch after the old man page, taking account for the different situation with man pages and source tree hierarchy (re: /usr/src/gnu) of the FreeBSD project. Reviewed by: wosch (actually loooong time ago)
* BSD 4.4 Lite Usr.bin Sourcesrgrimes1994-05-271-0/+115
OpenPOWER on IntegriCloud