From 1e5410e2d62b61d49089cfd7de5714babc894c72 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Tue, 9 Dec 2014 09:14:33 +0000 Subject: Support choosing alternative binary and manual names from configure.local, to help downstream distributions avoid naming conflicts. --- main.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 7416321f..17655139 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.203 2014/12/09 07:29:42 schwarze Exp $ */ +/* $Id: main.c,v 1.204 2014/12/09 09:14:33 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010, 2011, 2012, 2014 Ingo Schwarze @@ -134,8 +134,7 @@ main(int argc, char *argv[]) ++progname; #if HAVE_SQLITE3 - if (0 == strncmp(progname, "mandocdb", 8) || - 0 == strncmp(progname, "makewhatis", 10)) + if (strcmp(progname, BINM_MAKEWHATIS) == 0) return(mandocdb(argc, argv)); #endif @@ -147,11 +146,11 @@ main(int argc, char *argv[]) memset(&search, 0, sizeof(struct mansearch)); search.outkey = "Nd"; - if (strcmp(progname, "man") == 0) + if (strcmp(progname, BINM_MAN) == 0) search.argmode = ARG_NAME; - else if (strncmp(progname, "apropos", 7) == 0) + else if (strcmp(progname, BINM_APROPOS) == 0) search.argmode = ARG_EXPR; - else if (strncmp(progname, "whatis", 6) == 0) + else if (strcmp(progname, BINM_WHATIS) == 0) search.argmode = ARG_WORD; else if (strncmp(progname, "help", 4) == 0) search.argmode = ARG_NAME; -- cgit v1.2.3