summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2014-09-09 01:11:13 +0100
committerColin Watson <cjwatson@debian.org>2014-09-09 01:11:13 +0100
commit58ba1a2a8322c59095bf46e6aec117767d082caf (patch)
tree415dbcea6618a2c8e94df9f29b1989956bf8986b
parent53d7a3909c06f15fd2e2ead7a6ea2dc544204105 (diff)
catman: Honour program name transformations
* src/catman.c (parse_for_sec): Execute MAN rather than "man".
-rw-r--r--src/catman.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/catman.c b/src/catman.c
index 30daea42..6ebb5ad2 100644
--- a/src/catman.c
+++ b/src/catman.c
@@ -241,7 +241,7 @@ static int parse_for_sec (const char *manpath, const char *section)
if (rdopen_db () || dbver_rd (dbf))
return 1;
- basecmd = pipecmd_new ("man");
+ basecmd = pipecmd_new (MAN);
pipecmd_clearenv (basecmd);
/* As we supply a NULL environment to save precious execve() space,
@@ -255,7 +255,7 @@ static int parse_for_sec (const char *manpath, const char *section)
pipecmd_args (basecmd, "-caM", manpath, NULL); /* manpath */
pipecmd_args (basecmd, "-S", section, NULL); /* section */
- initial_bit += sizeof "man" + sizeof "-caM" +
+ initial_bit += sizeof MAN + sizeof "-caM" +
strlen (manpath) + strlen (section) + 2;
cmd = pipecmd_dup (basecmd);