diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-08-16 23:04:25 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-08-16 23:04:25 +0000 |
commit | e787f86b365b1779d9ea4b2c1b4b35617a18d0ba (patch) | |
tree | 99794137b11a26bbda78403db11f7d76c5634afb /main.c | |
parent | 793fa839780278ce837bbf49d61586b868ac4eb4 (diff) | |
download | mandoc-e787f86b365b1779d9ea4b2c1b4b35617a18d0ba.tar.gz |
When BUILD_DB is active, link apropos(1) into the mandoc binary.
This is the first step on the way to a man(1) implementation.
The new ./configure is flexible enough to make this step quite easy.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -68,6 +68,10 @@ struct curparse { char outopts[BUFSIZ]; /* buf of output opts */ }; +#if HAVE_SQLITE3 +int apropos(int, char**); +#endif + static int moptions(int *, char *); static void mmsg(enum mandocerr, enum mandoclevel, const char *, int, int, const char *); @@ -96,6 +100,12 @@ main(int argc, char *argv[]) else ++progname; +#if HAVE_SQLITE3 + if (0 == strncmp(progname, "apropos", 7) || + 0 == strncmp(progname, "whatis", 6)) + return(apropos(argc, argv)); +#endif + memset(&curp, 0, sizeof(struct curparse)); options = MPARSE_SO; |