aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/main.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-12-09 07:29:42 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-12-09 07:29:42 +0000
commit591744f2a0ef5fa95af29f9de51a6d4dbf874947 (patch)
tree7355f0cd3cab79ab059b4d51dc373a20f36ece0b /main.c
parent5e529b3ef661c651290a0c87c7544789db7994f6 (diff)
downloadmandoc-591744f2a0ef5fa95af29f9de51a6d4dbf874947.tar.gz
mandoc-591744f2a0ef5fa95af29f9de51a6d4dbf874947.tar.zst
mandoc-591744f2a0ef5fa95af29f9de51a6d4dbf874947.zip
Integrate the makewhatis binary into the mandoc binary
just like we do it on OpenBSD. Smaller and neater. While here, let ./configure set INSTALL_TARGETS.
Diffstat (limited to 'main.c')
-rw-r--r--main.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/main.c b/main.c
index d55a5e8e..7416321f 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.202 2014/12/05 21:55:04 schwarze Exp $ */
+/* $Id: main.c,v 1.203 2014/12/09 07:29:42 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2011, 2012, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -83,6 +83,9 @@ struct curparse {
};
static int koptions(int *, char *);
+#if HAVE_SQLITE3
+int mandocdb(int, char**);
+#endif
static int moptions(int *, char *);
static void mmsg(enum mandocerr, enum mandoclevel,
const char *, int, int, const char *);
@@ -130,6 +133,12 @@ main(int argc, char *argv[])
else
++progname;
+#if HAVE_SQLITE3
+ if (0 == strncmp(progname, "mandocdb", 8) ||
+ 0 == strncmp(progname, "makewhatis", 10))
+ return(mandocdb(argc, argv));
+#endif
+
/* Search options. */
memset(&paths, 0, sizeof(struct manpaths));