xref: /freebsd/usr.bin/whereis/pathnames.h (revision 1f05bc6c92b037a24315c8408aab875bbd6453b8)
1e97f67f5SJoerg Wunsch /*
2e97f67f5SJoerg Wunsch  * Copyright � 2002, J�rg Wunsch
3e97f67f5SJoerg Wunsch  *
4e97f67f5SJoerg Wunsch  * Redistribution and use in source and binary forms, with or without
5e97f67f5SJoerg Wunsch  * modification, are permitted provided that the following conditions
6e97f67f5SJoerg Wunsch  * are met:
7e97f67f5SJoerg Wunsch  * 1. Redistributions of source code must retain the above copyright
8e97f67f5SJoerg Wunsch  *    notice, this list of conditions and the following disclaimer.
9e97f67f5SJoerg Wunsch  * 2. Redistributions in binary form must reproduce the above copyright
10e97f67f5SJoerg Wunsch  *    notice, this list of conditions and the following disclaimer in the
11e97f67f5SJoerg Wunsch  *    documentation and/or other materials provided with the distribution.
12e97f67f5SJoerg Wunsch  *
13e97f67f5SJoerg Wunsch  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
14e97f67f5SJoerg Wunsch  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15e97f67f5SJoerg Wunsch  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16e97f67f5SJoerg Wunsch  * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
17e97f67f5SJoerg Wunsch  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18e97f67f5SJoerg Wunsch  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
19e97f67f5SJoerg Wunsch  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20e97f67f5SJoerg Wunsch  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21e97f67f5SJoerg Wunsch  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22e97f67f5SJoerg Wunsch  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
23e97f67f5SJoerg Wunsch  * POSSIBILITY OF SUCH DAMAGE.
24e97f67f5SJoerg Wunsch  *
25e97f67f5SJoerg Wunsch  * $FreeBSD$
26e97f67f5SJoerg Wunsch  */
27e97f67f5SJoerg Wunsch 
28103d6646SJohan Karlsson /* Where to look for libexec and games */
29103d6646SJohan Karlsson #define PATH_LIBEXEC "/usr/libexec"
30103d6646SJohan Karlsson #define PATH_GAMES "/usr/games"
31103d6646SJohan Karlsson 
32e97f67f5SJoerg Wunsch /* Where to look for sources. */
33e97f67f5SJoerg Wunsch #define PATH_SOURCES					\
34e97f67f5SJoerg Wunsch "/usr/src/bin:/usr/src/usr.bin:/usr/src/sbin:"		\
35e97f67f5SJoerg Wunsch "/usr/src/usr.sbin:/usr/src/libexec:"			\
36e97f67f5SJoerg Wunsch "/usr/src/gnu/bin:/usr/src/gnu/usr.bin:"		\
37e97f67f5SJoerg Wunsch "/usr/src/gnu/sbin:/usr/src/gnu/usr.sbin:"		\
38e97f67f5SJoerg Wunsch "/usr/src/gnu/libexec:/usr/src/contrib:"		\
39e97f67f5SJoerg Wunsch "/usr/src/secure/bin:/usr/src/secure/usr.bin:"		\
40e97f67f5SJoerg Wunsch "/usr/src/secure/sbin:/usr/src/secure/usr.sbin:"	\
418e4c33e9SJohan Karlsson "/usr/src/secure/libexec:/usr/src/crypto:"		\
428e4c33e9SJohan Karlsson "/usr/src/games"
43e97f67f5SJoerg Wunsch 
44e97f67f5SJoerg Wunsch /* Each subdirectory of PATH_PORTS will be appended to PATH_SOURCES. */
45e97f67f5SJoerg Wunsch #define PATH_PORTS "/usr/ports"
46e97f67f5SJoerg Wunsch 
47e97f67f5SJoerg Wunsch /* How to query the current manpath. */
48e97f67f5SJoerg Wunsch #define MANPATHCMD "manpath -q"
49e97f67f5SJoerg Wunsch 
50e97f67f5SJoerg Wunsch /* How to obtain the location of manpages, and how to match this result. */
518e4c33e9SJohan Karlsson #define MANWHEREISCMD "man -S1:8:6 -w %s 2>/dev/null"
521f05bc6cSJohan Karlsson #define MANWHEREISALLCMD "man -a -w %s 2>/dev/null"
53e97f67f5SJoerg Wunsch #define MANWHEREISMATCH "^.* [(]source: (.*)[)]$"
54e97f67f5SJoerg Wunsch 
55e97f67f5SJoerg Wunsch /* Command used to locate sources that have not been found yet. */
56e97f67f5SJoerg Wunsch #define LOCATECMD "locate '*'/%s 2>/dev/null"
57