diff options
author | Colin Watson <cjwatson@debian.org> | 2022-09-23 22:56:44 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2022-09-23 22:56:45 +0100 |
commit | fdf2f3db554c777cf40d7e26b947f33a67b67b46 (patch) | |
tree | bb28c26a7c7aa03233fd1637bdb0f0b737490562 /libdb | |
parent | c75db17332c9154c0b1648e022e0f2d6f4ca6e7a (diff) |
Move manual page file name utilities to lib/
* src/filenames.c: Move to ...
* lib/filenames.c: ... here.
* src/filenames.h: Move to ...
* lib/filenames.h: ... here. Update positioning of all includes.
* lib/Makefile.am (libman_la_SOURCES): Add `filenames.c` and
`filenames.h`.
* src/Makefile.am (man_recode_LDADD): Link with `$(LIBMAN)` instead of
`$(LIBMANDB)`.
(lexgrog_SOURCES, man_SOURCES, mandb_SOURCES): Remove `filenames.c` and
`filenames.h`.
* po/POTFILES.in: Rename `src/filenames.c` to `lib/filenames.c`.
* lib/filenames.c (gripe_bogus_manpage): Remove `quiet < 2` condition.
(filename_info): Add `warn_if_bogus` parameter; only call
`gripe_bogus_manpage` if it is set. Update all callers.
* lib/filename.h (filename_info): Update prototype.
* libdb/db_storage.h (struct mandata): Move to ...
* lib/filenames.h (struct mandata): ... here. Add includes where
necessary.
Diffstat (limited to 'libdb')
-rw-r--r-- | libdb/db_delete.c | 1 | ||||
-rw-r--r-- | libdb/db_lookup.c | 1 | ||||
-rw-r--r-- | libdb/db_storage.h | 21 | ||||
-rw-r--r-- | libdb/db_store.c | 1 |
4 files changed, 4 insertions, 20 deletions
diff --git a/libdb/db_delete.c b/libdb/db_delete.c index 6e1c137c..6d8870f1 100644 --- a/libdb/db_delete.c +++ b/libdb/db_delete.c @@ -41,6 +41,7 @@ #include "appendstr.h" #include "debug.h" +#include "filenames.h" #include "glcontainers.h" #include "mydbm.h" diff --git a/libdb/db_lookup.c b/libdb/db_lookup.c index 40bb9427..4606d984 100644 --- a/libdb/db_lookup.c +++ b/libdb/db_lookup.c @@ -51,6 +51,7 @@ #include "debug.h" #include "fatal.h" +#include "filenames.h" #include "glcontainers.h" #include "wordfnmatch.h" #include "xregcomp.h" diff --git a/libdb/db_storage.h b/libdb/db_storage.h index 5d585b11..47f82ac9 100644 --- a/libdb/db_storage.h +++ b/libdb/db_storage.h @@ -47,29 +47,10 @@ #define FIELDS 10 /* No of fields in each database page `content' */ -#include "timespec.h" +#include "filenames.h" #include "mydbm.h" -struct mandata { - char *addr; /* ptr to memory containing the fields */ - - char *name; /* Name of page, if != key */ - - /* The following are all const because they should be pointers to - * parts of strings allocated elsewhere (often the addr field above) - * and should not be written through or freed themselves. - */ - const char *ext; /* Filename ext w/o comp ext */ - const char *sec; /* Section name/number */ - char id; /* id for this entry */ - const char *pointer; /* id related file pointer */ - const char *comp; /* Compression extension */ - const char *filter; /* filters needed for the page */ - const char *whatis; /* whatis description for page */ - struct timespec mtime; /* mod time for file */ -}; - struct name_ext { const char *name; const char *ext; diff --git a/libdb/db_store.c b/libdb/db_store.c index 505207fd..cc87c14f 100644 --- a/libdb/db_store.c +++ b/libdb/db_store.c @@ -42,6 +42,7 @@ #include "manconfig.h" #include "debug.h" +#include "filenames.h" #include "glcontainers.h" #include "mydbm.h" |