=================================================================== RCS file: /cvs/mandoc/main.c,v retrieving revision 1.273.2.8 retrieving revision 1.273.2.9 diff -u -p -r1.273.2.8 -r1.273.2.9 --- mandoc/main.c 2017/02/17 14:50:13 1.273.2.8 +++ mandoc/main.c 2017/02/21 17:04:04 1.273.2.9 @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.273.2.8 2017/02/17 14:50:13 schwarze Exp $ */ +/* $Id: main.c,v 1.273.2.9 2017/02/21 17:04:04 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010-2012, 2014-2017 Ingo Schwarze @@ -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;