summaryrefslogtreecommitdiff
path: root/src/straycats.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2019-08-23 23:04:13 +0100
committerColin Watson <cjwatson@debian.org>2019-08-23 23:46:45 +0100
commita97d977b0bfc1ed34c3021b8d6702b047e8251af (patch)
tree2011975ced8b59b506cf391a4f0734b39f5615df /src/straycats.c
parent036aa910ea000d716bcf0f4bcbcee3a54a848be7 (diff)
Pass database file name in function parameters
Storing it in a global variable with an unresolved symbol from libmandb was never very clean, and caused linking complications on some platforms. Fixes Savannah bug #56734. * libdb/mydbm.h (database): Remove external symbol. * src/accessdb.c: Remove obsolete comment. * src/catman.c (database): Remove global variable. (parse_for_sec): Add database parameter. Update all callers. (main): Declare database locally. * src/check_mandirs.c (gripe_rwopen_failed, testmandirs, update_db_time, create_db, update_db, purge_missing): Add database parameter. Update all callers. * src/check_mandirs.h (create_db, update_db, purge_missing): Update prototypes. * src/mandb.c (database): Remove global variable. (update_one_file, update_db_wrapper): Add database parameter. Update all callers. (mandb, process_manpath): Declare database locally. * src/straycats.c (straycats): Add database parameter. Update all callers. * src/whatis.c (database): Remove global variable. (search): Declare database locally. * include/manconfig.h.in (straycats): Update prototype. * NEWS: Document this.
Diffstat (limited to 'src/straycats.c')
-rw-r--r--src/straycats.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/straycats.c b/src/straycats.c
index 0f4c50ee..577eab07 100644
--- a/src/straycats.c
+++ b/src/straycats.c
@@ -333,7 +333,7 @@ static int open_catdir (MYDBM_FILE dbf)
return strays;
}
-int straycats (const char *manpath)
+int straycats (const char *database, const char *manpath)
{
MYDBM_FILE dbf;
char *catpath;