diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-08-17 03:24:47 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-08-17 03:24:47 +0000 |
commit | 7eba87a5fd2f971ba9c0cd6cb0db96ae643dc9e7 (patch) | |
tree | 32368e4ff54dbb527aa87b8a65b05397b77846e9 /manpage.c | |
parent | 7d593fa69b20a5bf1d8d8b1280a0aacd5296026c (diff) | |
download | mandoc-7eba87a5fd2f971ba9c0cd6cb0db96ae643dc9e7.tar.gz mandoc-7eba87a5fd2f971ba9c0cd6cb0db96ae643dc9e7.tar.zst mandoc-7eba87a5fd2f971ba9c0cd6cb0db96ae643dc9e7.zip |
Fully integrate apropos(1) into mandoc(1).
Switch the argmode on the progname, including man(1).
Provide -f and -k options to switch the argmode.
Store the argmode inside struct search, generalizing the flags.
Derive the deftype from the argmode when needed instead of storing it.
Store the outkey inside struct search instead of passing it alone.
While here, get rid of the trailing blanks in Makefile.depend.
Diffstat (limited to 'manpage.c')
-rw-r--r-- | manpage.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $Id: manpage.c,v 1.8 2014/08/10 23:54:41 schwarze Exp $ */ +/* $Id: manpage.c,v 1.9 2014/08/17 03:24:47 schwarze Exp $ */ /* * Copyright (c) 2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2013 Ingo Schwarze <schwarze@openbsd.org> @@ -87,10 +87,11 @@ main(int argc, char *argv[]) if (0 == argc) goto usage; - search.deftype = TYPE_Nm | TYPE_Nd; + search.outkey = "Nd"; + search.argmode = ARG_EXPR; manpath_parse(&paths, conf_file, defpaths, auxpaths); - ch = mansearch(&search, &paths, argc, argv, "Nd", &res, &sz); + ch = mansearch(&search, &paths, argc, argv, &res, &sz); manpath_free(&paths); if (0 == ch) |