summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/manconfig.h25
-rw-r--r--lib/appendstr.c2
-rw-r--r--lib/cleanup.c2
-rw-r--r--lib/encodings.c7
-rw-r--r--lib/encodings.h2
-rw-r--r--lib/orderfiles.c1
-rw-r--r--lib/pathsearch.c1
-rw-r--r--lib/sandbox.c2
-rw-r--r--lib/util.c2
-rw-r--r--lib/wordfnmatch.c1
-rw-r--r--lib/xregcomp.c3
-rw-r--r--libdb/db_btree.c2
-rw-r--r--libdb/db_delete.c1
-rw-r--r--libdb/db_gdbm.c1
-rw-r--r--libdb/db_lookup.c1
-rw-r--r--libdb/db_ndbm.c1
-rw-r--r--libdb/db_store.c1
-rw-r--r--libdb/db_ver.c1
-rw-r--r--libdb/db_xdbm.c1
-rw-r--r--libdb/mydbm.h4
-rw-r--r--src/accessdb.c1
-rw-r--r--src/catman.c1
-rw-r--r--src/check_mandirs.c1
-rw-r--r--src/compression.c1
-rw-r--r--src/convert.c2
-rw-r--r--src/descriptions.c2
-rw-r--r--src/descriptions_store.c1
-rw-r--r--src/filenames.c1
-rw-r--r--src/globbing.c2
-rw-r--r--src/lexgrog.h2
-rw-r--r--src/lexgrog.l4
-rw-r--r--src/lexgrog_test.c1
-rw-r--r--src/man-recode.c2
-rw-r--r--src/man.c4
-rw-r--r--src/manconv.c2
-rw-r--r--src/manconv.h2
-rw-r--r--src/manconv_client.c1
-rw-r--r--src/manconv_client.h4
-rw-r--r--src/manconv_main.c1
-rw-r--r--src/mandb.c1
-rw-r--r--src/manp.c2
-rw-r--r--src/straycats.c1
-rw-r--r--src/ult_src.c2
-rw-r--r--src/whatis.c1
-rw-r--r--src/zsoelim.l1
-rw-r--r--src/zsoelim_main.c1
46 files changed, 76 insertions, 29 deletions
diff --git a/include/manconfig.h b/include/manconfig.h
index 509cccd3..b3d46972 100644
--- a/include/manconfig.h
+++ b/include/manconfig.h
@@ -21,19 +21,9 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/*--------------------------------------------------------------------------*/
-/* This file contains the paths/binary locations of the programs used by */
-/* these utilities and various C pre-processor definitions that modify the */
-/* behaviour of the man-db suite. You may like to check that all of the */
-/* formatters are from the same package. Ie, that we are not using a native */
-/* UNIX nroff with GNU tbl. */
-/*--------------------------------------------------------------------------*/
-
#ifndef MANCONFIG_H
#define MANCONFIG_H
-#include "xvasprintf.h"
-
/* STD_SECTIONS must contain all of your man hierarchy subdirectories. The
order is important. Manual pages will be displayed in this order. Ie
if "1" comes before "2", then a kill(1) will be displayed in preference to
@@ -90,10 +80,6 @@
#define DBMODE 0644 /* u=rw,go=r */
-/* The name of the databases. DB_EXT depends on the database type in use */
-#define MAN_DB "/index" DB_EXT
-#define mkdbname(path) xasprintf ("%s%s", path, MAN_DB)
-
/*------------------------------------------------------------------*/
/* The following definitions are best left alone by the uninitiated */
/*------------------------------------------------------------------*/
@@ -175,17 +161,6 @@ struct compression {
extern struct compression comp_list[];
-/*-------------------------------------*/
-/* Now for some function prototypes... */
-/*-------------------------------------*/
-
-/* some library function declarations */
-#include <stddef.h> /* for size_t */
-#include "xalloc.h"
-#include "xstrndup.h"
-
-struct pipeline;
-
extern int quiet; /* be quiet(er) if 1 */
/*--------------------------*/
diff --git a/lib/appendstr.c b/lib/appendstr.c
index 011522d7..21cdae1f 100644
--- a/lib/appendstr.c
+++ b/lib/appendstr.c
@@ -23,6 +23,8 @@
#include <string.h>
#include <stdarg.h>
+#include "xalloc.h"
+
#include "manconfig.h"
#include "appendstr.h"
diff --git a/lib/cleanup.c b/lib/cleanup.c
index e7935e12..6c7c18ae 100644
--- a/lib/cleanup.c
+++ b/lib/cleanup.c
@@ -30,6 +30,8 @@
#include <unistd.h>
#include <string.h>
+#include "xalloc.h"
+
#include "manconfig.h" /* for FATAL */
#include "cleanup.h"
diff --git a/lib/encodings.c b/lib/encodings.c
index 15745436..c1ed8067 100644
--- a/lib/encodings.c
+++ b/lib/encodings.c
@@ -30,12 +30,15 @@
#include <stdlib.h>
#include <unistd.h>
#include <assert.h>
+#include <locale.h>
+#include <ctype.h>
#include "attribute.h"
#include "gettext.h"
#include "localcharset.h"
-#include <locale.h>
-#include <ctype.h>
+#include "xalloc.h"
+#include "xstrndup.h"
+#include "xvasprintf.h"
#include "manconfig.h"
diff --git a/lib/encodings.h b/lib/encodings.h
index 85346484..6f07f0c6 100644
--- a/lib/encodings.h
+++ b/lib/encodings.h
@@ -22,6 +22,8 @@
#include <stdbool.h>
+struct pipeline;
+
const char *get_groff_preconv (void);
char *get_page_encoding (const char *lang);
const char *get_source_encoding (const char *lang);
diff --git a/lib/orderfiles.c b/lib/orderfiles.c
index 361b19f7..05bafe9e 100644
--- a/lib/orderfiles.c
+++ b/lib/orderfiles.c
@@ -49,6 +49,7 @@
#include "gl_rbtree_list.h"
#include "gl_xlist.h"
#include "gl_xmap.h"
+#include "xalloc.h"
#include "manconfig.h"
diff --git a/lib/pathsearch.c b/lib/pathsearch.c
index 76b21997..59b8910f 100644
--- a/lib/pathsearch.c
+++ b/lib/pathsearch.c
@@ -38,6 +38,7 @@
#define _(String) gettext (String)
#include "error.h"
+#include "xalloc.h"
#include "xgetcwd.h"
#include "xvasprintf.h"
diff --git a/lib/sandbox.c b/lib/sandbox.c
index 4b10865f..798e6d77 100644
--- a/lib/sandbox.c
+++ b/lib/sandbox.c
@@ -65,6 +65,8 @@
#include "attribute.h"
#include "error.h"
+#include "xalloc.h"
+#include "xstrndup.h"
#include "manconfig.h"
diff --git a/lib/util.c b/lib/util.c
index 83899c11..88ff28ad 100644
--- a/lib/util.c
+++ b/lib/util.c
@@ -48,6 +48,8 @@
#include "attribute.h"
#include "stat-time.h"
#include "timespec.h"
+#include "xalloc.h"
+#include "xstrndup.h"
#include "xvasprintf.h"
#include "gettext.h"
diff --git a/lib/wordfnmatch.c b/lib/wordfnmatch.c
index 613035b2..b073a88d 100644
--- a/lib/wordfnmatch.c
+++ b/lib/wordfnmatch.c
@@ -29,6 +29,7 @@
#include <ctype.h>
#include "fnmatch.h"
+#include "xalloc.h"
#include "manconfig.h"
diff --git a/lib/xregcomp.c b/lib/xregcomp.c
index cd6ed9de..6d215514 100644
--- a/lib/xregcomp.c
+++ b/lib/xregcomp.c
@@ -24,6 +24,8 @@
# include "config.h"
#endif /* HAVE_CONFIG_H */
+#include <stddef.h>
+
#include "regex.h"
#include "gettext.h"
@@ -33,6 +35,7 @@
#include "manconfig.h"
#include "error.h"
+#include "xalloc.h"
#include "xregcomp.h"
void xregcomp (regex_t *preg, const char *regex, int cflags)
diff --git a/libdb/db_btree.c b/libdb/db_btree.c
index 5eee4ad6..27edd03b 100644
--- a/libdb/db_btree.c
+++ b/libdb/db_btree.c
@@ -43,6 +43,8 @@
#include "gl_xset.h"
#include "stat-time.h"
#include "timespec.h"
+#include "xalloc.h"
+#include "xstrndup.h"
#include "manconfig.h"
diff --git a/libdb/db_delete.c b/libdb/db_delete.c
index 6b0a6c62..6e1c137c 100644
--- a/libdb/db_delete.c
+++ b/libdb/db_delete.c
@@ -32,6 +32,7 @@
#include "error.h"
#include "gl_list.h"
+#include "xalloc.h"
#include "gettext.h"
#define _(String) gettext (String)
diff --git a/libdb/db_gdbm.c b/libdb/db_gdbm.c
index 358af8ca..ef381c7b 100644
--- a/libdb/db_gdbm.c
+++ b/libdb/db_gdbm.c
@@ -36,6 +36,7 @@
#include "stat-time.h"
#include "timespec.h"
+#include "xalloc.h"
#include "manconfig.h"
diff --git a/libdb/db_lookup.c b/libdb/db_lookup.c
index b1b34817..64b8a499 100644
--- a/libdb/db_lookup.c
+++ b/libdb/db_lookup.c
@@ -41,6 +41,7 @@
#include "gl_array_list.h"
#include "gl_xlist.h"
#include "regex.h"
+#include "xalloc.h"
#include "xvasprintf.h"
#include "gettext.h"
diff --git a/libdb/db_ndbm.c b/libdb/db_ndbm.c
index 57c26e83..ed6ca3a8 100644
--- a/libdb/db_ndbm.c
+++ b/libdb/db_ndbm.c
@@ -38,6 +38,7 @@
#include "attribute.h"
#include "stat-time.h"
#include "timespec.h"
+#include "xalloc.h"
#include "xvasprintf.h"
#include "manconfig.h"
diff --git a/libdb/db_store.c b/libdb/db_store.c
index 0a963097..213ae63e 100644
--- a/libdb/db_store.c
+++ b/libdb/db_store.c
@@ -34,6 +34,7 @@
#include "attribute.h"
#include "error.h"
#include "timespec.h"
+#include "xalloc.h"
#include "xvasprintf.h"
#include "manconfig.h"
diff --git a/libdb/db_ver.c b/libdb/db_ver.c
index 66cfbd09..1472e663 100644
--- a/libdb/db_ver.c
+++ b/libdb/db_ver.c
@@ -32,6 +32,7 @@
#define _(String) gettext (String)
#include "error.h"
+#include "xalloc.h"
#include "manconfig.h"
diff --git a/libdb/db_xdbm.c b/libdb/db_xdbm.c
index f0a9932e..95a7ffc8 100644
--- a/libdb/db_xdbm.c
+++ b/libdb/db_xdbm.c
@@ -33,6 +33,7 @@
#include "gl_xlist.h"
#include "gl_xmap.h"
#include "hash-pjw-bare.h"
+#include "xalloc.h"
#include "manconfig.h"
diff --git a/libdb/mydbm.h b/libdb/mydbm.h
index cbbd07df..abe20c44 100644
--- a/libdb/mydbm.h
+++ b/libdb/mydbm.h
@@ -38,6 +38,7 @@
# define MYDBM_H
# include "timespec.h"
+# include "xvasprintf.h"
# if defined(GDBM) && !defined(NDBM) && !defined(BTREE)
@@ -197,4 +198,7 @@ extern datum copy_datum (datum dat);
extern void dbver_wr(MYDBM_FILE dbfile);
extern int dbver_rd(MYDBM_FILE dbfile);
+#define MAN_DB "/index" DB_EXT
+#define mkdbname(path) xasprintf ("%s%s", path, MAN_DB)
+
#endif /* MYDBM_H */
diff --git a/src/accessdb.c b/src/accessdb.c
index 24c2f8e5..dcd81ea2 100644
--- a/src/accessdb.c
+++ b/src/accessdb.c
@@ -38,6 +38,7 @@
#include "attribute.h"
#include "error.h"
#include "progname.h"
+#include "xalloc.h"
#include "xvasprintf.h"
#include "gettext.h"
diff --git a/src/catman.c b/src/catman.c
index 51c60f75..9a396354 100644
--- a/src/catman.c
+++ b/src/catman.c
@@ -65,6 +65,7 @@
#include "error.h"
#include "gl_list.h"
#include "progname.h"
+#include "xalloc.h"
#include "gettext.h"
#include <locale.h>
diff --git a/src/check_mandirs.c b/src/check_mandirs.c
index 9a9f5f0e..bf4cc1f9 100644
--- a/src/check_mandirs.c
+++ b/src/check_mandirs.c
@@ -53,6 +53,7 @@
#include "gl_xmap.h"
#include "stat-time.h"
#include "timespec.h"
+#include "xalloc.h"
#include "xvasprintf.h"
#include "gettext.h"
diff --git a/src/compression.c b/src/compression.c
index 314853ad..ba509545 100644
--- a/src/compression.c
+++ b/src/compression.c
@@ -39,6 +39,7 @@
#include <fcntl.h>
#include "error.h"
+#include "xstrndup.h"
#include "xvasprintf.h"
#include "manconfig.h"
diff --git a/src/convert.c b/src/convert.c
index b21209fe..542f11db 100644
--- a/src/convert.c
+++ b/src/convert.c
@@ -33,6 +33,8 @@
#endif /* HAVE_ICONV */
#include "attribute.h"
+#include "xalloc.h"
+#include "xvasprintf.h"
#include "manconfig.h"
diff --git a/src/descriptions.c b/src/descriptions.c
index ce9af612..57e53055 100644
--- a/src/descriptions.c
+++ b/src/descriptions.c
@@ -29,6 +29,8 @@
#include "gl_array_list.h"
#include "gl_xlist.h"
+#include "xalloc.h"
+#include "xstrndup.h"
#include "manconfig.h"
diff --git a/src/descriptions_store.c b/src/descriptions_store.c
index bca5efe4..7bbf69a9 100644
--- a/src/descriptions_store.c
+++ b/src/descriptions_store.c
@@ -34,6 +34,7 @@
#include "error.h"
#include "gl_list.h"
+#include "xalloc.h"
#include "manconfig.h"
diff --git a/src/filenames.c b/src/filenames.c
index 5d07323e..cbeb49cc 100644
--- a/src/filenames.c
+++ b/src/filenames.c
@@ -30,6 +30,7 @@
#include <unistd.h>
#include "error.h"
+#include "xalloc.h"
#include "xvasprintf.h"
#include "gettext.h"
diff --git a/src/globbing.c b/src/globbing.c
index 23c327a3..31144f44 100644
--- a/src/globbing.c
+++ b/src/globbing.c
@@ -43,6 +43,8 @@
#include "gl_xlist.h"
#include "gl_xmap.h"
#include "regex.h"
+#include "xalloc.h"
+#include "xstrndup.h"
#include "xvasprintf.h"
#include "manconfig.h"
diff --git a/src/lexgrog.h b/src/lexgrog.h
index 0292d399..a27acd1e 100644
--- a/src/lexgrog.h
+++ b/src/lexgrog.h
@@ -24,6 +24,8 @@
#define MANPAGE 0
#define CATPAGE 1
+struct pipeline;
+
typedef struct lexgrog {
int type;
char *whatis;
diff --git a/src/lexgrog.l b/src/lexgrog.l
index a59b5371..e1fd1cd0 100644
--- a/src/lexgrog.l
+++ b/src/lexgrog.l
@@ -52,11 +52,13 @@
#include <stdlib.h>
#include <unistd.h>
+#include "error.h"
+#include "xalloc.h"
+
#include "gettext.h"
#define _(String) gettext (String)
#include "encodings.h"
-#include "error.h"
#include "pipeline.h"
#include "sandbox.h"
#include "security.h"
diff --git a/src/lexgrog_test.c b/src/lexgrog_test.c
index d0bc21df..08c69c84 100644
--- a/src/lexgrog_test.c
+++ b/src/lexgrog_test.c
@@ -38,6 +38,7 @@
#include "error.h"
#include "gl_list.h"
#include "progname.h"
+#include "xalloc.h"
#include "gettext.h"
#define _(String) gettext (String)
diff --git a/src/man-recode.c b/src/man-recode.c
index 635a6184..8ce975e3 100644
--- a/src/man-recode.c
+++ b/src/man-recode.c
@@ -40,6 +40,8 @@
#include "gl_xlist.h"
#include "progname.h"
#include "tempname.h"
+#include "xalloc.h"
+#include "xvasprintf.h"
#include "gettext.h"
#define _(String) gettext (String)
diff --git a/src/man.c b/src/man.c
index e1dfc43a..7069b52f 100644
--- a/src/man.c
+++ b/src/man.c
@@ -71,9 +71,11 @@
#include "regex.h"
#include "stat-time.h"
#include "utimens.h"
+#include "xalloc.h"
#include "xgetcwd.h"
-#include "xvasprintf.h"
#include "xstdopen.h"
+#include "xstrndup.h"
+#include "xvasprintf.h"
#include "gettext.h"
#include <locale.h>
diff --git a/src/manconv.c b/src/manconv.c
index 543c9b47..01f329cf 100644
--- a/src/manconv.c
+++ b/src/manconv.c
@@ -49,6 +49,8 @@
#include "attribute.h"
#include "error.h"
#include "gl_list.h"
+#include "xalloc.h"
+#include "xstrndup.h"
#include "gettext.h"
#include <locale.h>
diff --git a/src/manconv.h b/src/manconv.h
index d5dbd5ea..ad8dd99a 100644
--- a/src/manconv.h
+++ b/src/manconv.h
@@ -22,4 +22,6 @@
#include "gl_list.h"
+struct pipeline;
+
void manconv (struct pipeline *p, gl_list_t from, const char *to);
diff --git a/src/manconv_client.c b/src/manconv_client.c
index 49905445..e007b9ba 100644
--- a/src/manconv_client.c
+++ b/src/manconv_client.c
@@ -31,6 +31,7 @@
#include "gl_array_list.h"
#include "gl_xlist.h"
#include "idpriv.h"
+#include "xalloc.h"
#include "xvasprintf.h"
#include "manconfig.h"
diff --git a/src/manconv_client.h b/src/manconv_client.h
index 5380eef9..58bfa513 100644
--- a/src/manconv_client.h
+++ b/src/manconv_client.h
@@ -20,4 +20,8 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "pipeline.h"
+
+struct pipeline;
+
void add_manconv (struct pipeline *p, const char *source, const char *target);
diff --git a/src/manconv_main.c b/src/manconv_main.c
index d7f941d0..0f661362 100644
--- a/src/manconv_main.c
+++ b/src/manconv_main.c
@@ -35,6 +35,7 @@
#include "gl_array_list.h"
#include "gl_xlist.h"
#include "progname.h"
+#include "xalloc.h"
#include "gettext.h"
#define _(String) gettext (String)
diff --git a/src/mandb.c b/src/mandb.c
index 61def5c3..b745575f 100644
--- a/src/mandb.c
+++ b/src/mandb.c
@@ -57,6 +57,7 @@
#include "stat-time.h"
#include "timespec.h"
#include "utimens.h"
+#include "xalloc.h"
#include "xgetcwd.h"
#include "xvasprintf.h"
diff --git a/src/manp.c b/src/manp.c
index eae84601..a1003c7a 100644
--- a/src/manp.c
+++ b/src/manp.c
@@ -66,7 +66,9 @@
#include "gl_array_list.h"
#include "gl_linkedhash_list.h"
#include "gl_xlist.h"
+#include "xalloc.h"
#include "xgetcwd.h"
+#include "xstrndup.h"
#include "xvasprintf.h"
#include "gettext.h"
diff --git a/src/straycats.c b/src/straycats.c
index 371e8726..70fdb4e3 100644
--- a/src/straycats.c
+++ b/src/straycats.c
@@ -44,6 +44,7 @@
#include "error.h"
#include "gl_array_list.h"
#include "gl_xlist.h"
+#include "xalloc.h"
#include "gettext.h"
#define _(String) gettext (String)
diff --git a/src/ult_src.c b/src/ult_src.c
index 226c64c3..8a31a0b0 100644
--- a/src/ult_src.c
+++ b/src/ult_src.c
@@ -47,6 +47,8 @@
#include "dirname.h"
#include "error.h"
#include "gl_xlist.h"
+#include "xalloc.h"
+#include "xstrndup.h"
#include "xvasprintf.h"
#include "gettext.h"
diff --git a/src/whatis.c b/src/whatis.c
index 237fa640..0dc1391b 100644
--- a/src/whatis.c
+++ b/src/whatis.c
@@ -61,6 +61,7 @@
#include "gl_xset.h"
#include "fnmatch.h"
#include "progname.h"
+#include "xalloc.h"
#include "xvasprintf.h"
#include "manconfig.h"
diff --git a/src/zsoelim.l b/src/zsoelim.l
index 9f2dad30..01202d3f 100644
--- a/src/zsoelim.l
+++ b/src/zsoelim.l
@@ -74,6 +74,7 @@
#include "error.h"
#include "gl_linkedhash_list.h"
#include "gl_xlist.h"
+#include "xalloc.h"
#include "xgetcwd.h"
#include "xvasprintf.h"
diff --git a/src/zsoelim_main.c b/src/zsoelim_main.c
index 62e5dd2a..6eba08ce 100644
--- a/src/zsoelim_main.c
+++ b/src/zsoelim_main.c
@@ -35,6 +35,7 @@
#include "error.h"
#include "gl_list.h"
#include "progname.h"
+#include "xalloc.h"
#include "xvasprintf.h"
#include "gettext.h"