summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-02-21 17:04:04 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-02-21 17:04:04 +0000
commit2f7c8c955676532577e6625e400ddb47f1a5051a (patch)
treeb8339b642bf0af9379193fa6570c19d835e40798 /main.c
parenta0fae72b9a0f2054d8a657d258c048bf423d95c3 (diff)
downloadmandoc-2f7c8c955676532577e6625e400ddb47f1a5051a.tar.gz
Drop support for building without SQLite.
There whole point of the 1.13 branch is SQLite support after all.
Diffstat (limited to 'main.c')
-rw-r--r--main.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/main.c b/main.c
index de0937e6..fef85ba8 100644
--- a/main.c
+++ b/main.c
@@ -81,11 +81,7 @@ struct curparse {
struct manoutput *outopts; /* output options */
};
-
-#if HAVE_SQLITE3
int mandocdb(int, char *[]);
-#endif
-
static int fs_lookup(const struct manpaths *,
size_t ipath, const char *,
const char *, const char *,
@@ -146,11 +142,9 @@ main(int argc, char *argv[])
setprogname(progname);
#endif
-#if HAVE_SQLITE3
if (strncmp(progname, "mandocdb", 8) == 0 ||
strcmp(progname, BINM_MAKEWHATIS) == 0)
return mandocdb(argc, argv);
-#endif
#if HAVE_PLEDGE
if (pledge("stdio rpath tmppath tty proc exec flock", NULL) == -1)
@@ -371,20 +365,10 @@ main(int argc, char *argv[])
/* Access the mandoc database. */
manconf_parse(&conf, conf_file, defpaths, auxpaths);
-#if HAVE_SQLITE3
mansearch_setup(1);
if ( ! mansearch(&search, &conf.manpath,
argc, argv, &res, &sz))
usage(search.argmode);
-#else
- if (search.argmode != ARG_NAME) {
- fputs("mandoc: database support not compiled in\n",
- stderr);
- return (int)MANDOCLEVEL_BADARG;
- }
- sz = 0;
-#endif
-
if (sz == 0) {
if (search.argmode == ARG_NAME)
fs_search(&search, &conf.manpath,
@@ -537,10 +521,8 @@ main(int argc, char *argv[])
out:
if (search.argmode != ARG_FILE) {
manconf_free(&conf);
-#if HAVE_SQLITE3
mansearch_free(res, sz);
mansearch_setup(0);
-#endif
}
free(defos);
@@ -682,10 +664,8 @@ fs_lookup(const struct manpaths *paths, size_t ipath,
return 0;
found:
-#if HAVE_SQLITE3
warnx("outdated mandoc.db lacks %s(%s) entry, run %s %s",
name, sec, BINM_MAKEWHATIS, paths->paths[ipath]);
-#endif
*res = mandoc_reallocarray(*res, ++*ressz, sizeof(struct manpage));
page = *res + (*ressz - 1);
page->file = file;