From fa15c8f0c4a383b1f7be983d2655c5d14dc23d15 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 28 Nov 2011 09:44:05 +0000 Subject: Tweak whatis(1): * Bugfix: Use all arguments, not just the last one. * Use 'Nm~' instead of 'Nm,Nd~' to match OpenBSD behaviour. * For the progname, accept '^whatis', not '^whatis$' to ease testing. ok kristaps@ --- apropos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apropos.c') diff --git a/apropos.c b/apropos.c index 4bfdbf04..2ccdd5fe 100644 --- a/apropos.c +++ b/apropos.c @@ -1,4 +1,4 @@ -/* $Id: apropos.c,v 1.20 2011/11/27 18:54:01 kristaps Exp $ */ +/* $Id: apropos.c,v 1.21 2011/11/28 09:44:05 schwarze Exp $ */ /* * Copyright (c) 2011 Kristaps Dzonsons * Copyright (c) 2011 Ingo Schwarze @@ -53,7 +53,7 @@ main(int argc, char *argv[]) else ++progname; - whatis = 0 == strcmp(progname, "whatis"); + whatis = 0 == strncmp(progname, "whatis", 6); memset(&paths, 0, sizeof(struct manpaths)); memset(&opts, 0, sizeof(struct opts)); -- cgit v1.2.3-56-ge451