X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/a23935eaa0bc6038f06a3c8b59454d4282f1d1a0..5d2780eadfd496a6ef5d4aa4f11199fda8b0f276:/manpage.c diff --git a/manpage.c b/manpage.c index 99824d18..70eb06b6 100644 --- a/manpage.c +++ b/manpage.c @@ -1,4 +1,4 @@ -/* $Id: manpage.c,v 1.6 2013/12/31 03:41:14 schwarze Exp $ */ +/* $Id: manpage.c,v 1.9 2014/08/17 03:24:47 schwarze Exp $ */ /* * Copyright (c) 2012 Kristaps Dzonsons * Copyright (c) 2013 Ingo Schwarze @@ -15,9 +15,9 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif + +#include #include #include @@ -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, NULL, &res, &sz); + ch = mansearch(&search, &paths, argc, argv, &res, &sz); manpath_free(&paths); if (0 == ch) @@ -107,9 +108,8 @@ main(int argc, char *argv[]) for (i = 0; i < sz; i++) { printf("%6zu %s: %s\n", - i + 1, res[i].names, res[i].desc); + i + 1, res[i].names, res[i].output); free(res[i].names); - free(res[i].desc); free(res[i].output); }