diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2011-11-28 09:44:05 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2011-11-28 09:44:05 +0000 |
commit | fa15c8f0c4a383b1f7be983d2655c5d14dc23d15 (patch) | |
tree | ec0c00e9addccf0aa45deb362e3fff9aa3abb304 /apropos.c | |
parent | a62b6c9ed7de00f4e5d9a067932be826e1c6f67e (diff) | |
download | mandoc-fa15c8f0c4a383b1f7be983d2655c5d14dc23d15.tar.gz mandoc-fa15c8f0c4a383b1f7be983d2655c5d14dc23d15.tar.zst mandoc-fa15c8f0c4a383b1f7be983d2655c5d14dc23d15.zip |
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@
Diffstat (limited to 'apropos.c')
-rw-r--r-- | apropos.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 <kristaps@bsd.lv> * Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org> @@ -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)); |