From: Karel Zak Date: Mon, 2 Feb 2015 10:15:47 +0000 (+0100) Subject: whereis: lookup also info docs X-Git-Tag: v2.26-rc2~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db0ccb761dca25632a93d8fbe30af3ad96562bf5;p=thirdparty%2Futil-linux.git whereis: lookup also info docs Signed-off-by: Karel Zak --- diff --git a/misc-utils/whereis.1 b/misc-utils/whereis.1 index 652f69bc75..5e63e9b48f 100644 --- a/misc-utils/whereis.1 +++ b/misc-utils/whereis.1 @@ -100,7 +100,8 @@ searches for binaries, by a whitespace-separated list of directories. .IP "\fB\-M \fIlist\fP" Limit the places where .B whereis -searches for manuals, by a whitespace-separated list of directories. +searches for manuals and documentation in Info format, by a +whitespace-separated list of directories. .IP "\fB\-S \fIlist\fP" Limit the places where .B whereis diff --git a/misc-utils/whereis.c b/misc-utils/whereis.c index e6f5b41668..9fc5ee7ee8 100644 --- a/misc-utils/whereis.c +++ b/misc-utils/whereis.c @@ -154,6 +154,7 @@ static const char *mandirs[] = { "/usr/X11/man/*", "/usr/TeX/man/*", "/usr/interviews/man/mann", + "/usr/share/info", NULL }; @@ -193,8 +194,8 @@ static void __attribute__((__noreturn__)) usage(FILE *out) fputs(USAGE_OPTIONS, out); fputs(_(" -b search only for binaries\n"), out); fputs(_(" -B define binaries lookup path\n"), out); - fputs(_(" -m search only for manuals\n"), out); - fputs(_(" -M define man lookup path\n"), out); + fputs(_(" -m search only for manuals and infos\n"), out); + fputs(_(" -M define man and info lookup path\n"), out); fputs(_(" -s search only for sources\n"), out); fputs(_(" -S define sources lookup path\n"), out); fputs(_(" -f terminate argument list\n"), out); @@ -372,7 +373,7 @@ static int filename_equal(const char *cp, const char *dp) { int i = strlen(dp); - /*DBG(printf("compare '%s' and '%s'", cp, dp));*/ + DBG(SEARCH, ul_debug("compare '%s' and '%s'", cp, dp)); if (dp[0] == 's' && dp[1] == '.' && filename_equal(cp, dp + 2)) return 1;