summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.depend16
-rw-r--r--html.h7
-rw-r--r--libmandoc.h5
-rw-r--r--libroff.h4
-rw-r--r--main.h6
-rw-r--r--man_hash.c1
-rw-r--r--man_html.c3
-rw-r--r--mandoc.h4
-rw-r--r--mansearch.h2
-rw-r--r--mansearch_const.c1
-rw-r--r--mdoc_html.c3
-rw-r--r--msec.c1
-rw-r--r--out.h6
-rw-r--r--term.h11
-rw-r--r--term_ps.c3
15 files changed, 41 insertions, 32 deletions
diff --git a/Makefile.depend b/Makefile.depend
index d3c13e09..a61de19f 100644
--- a/Makefile.depend
+++ b/Makefile.depend
@@ -15,12 +15,12 @@ demandoc.o: demandoc.c config.h man.h mdoc.h mandoc.h
eqn.o: eqn.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h
eqn_html.o: eqn_html.c config.h mandoc.h out.h html.h
eqn_term.o: eqn_term.c config.h mandoc.h out.h term.h
-html.o: html.c config.h mandoc.h mandoc_aux.h libmandoc.h out.h html.h main.h
+html.o: html.c config.h mandoc.h mandoc_aux.h out.h html.h main.h
lib.o: lib.c config.h mdoc.h libmdoc.h lib.in
main.o: main.c config.h mandoc.h mandoc_aux.h main.h mdoc.h man.h manpath.h mansearch.h
man.o: man.c config.h man.h mandoc.h mandoc_aux.h libman.h libmandoc.h
-man_hash.o: man_hash.c config.h man.h mandoc.h libman.h
-man_html.o: man_html.c config.h mandoc.h mandoc_aux.h out.h html.h man.h main.h
+man_hash.o: man_hash.c config.h man.h libman.h
+man_html.o: man_html.c config.h mandoc_aux.h man.h out.h html.h main.h
man_macro.o: man_macro.c config.h man.h mandoc.h libmandoc.h libman.h
man_term.o: man_term.c config.h mandoc.h mandoc_aux.h out.h man.h term.h main.h
man_validate.o: man_validate.c config.h man.h mandoc.h mandoc_aux.h libman.h libmandoc.h
@@ -30,19 +30,19 @@ mandocdb.o: mandocdb.c config.h compat_fts.h compat_ohash.h mdoc.h man.h mandoc.
manpage.o: manpage.c config.h manpath.h mansearch.h
manpath.o: manpath.c config.h mandoc_aux.h manpath.h
mansearch.o: mansearch.c config.h compat_ohash.h mandoc.h mandoc_aux.h manpath.h mansearch.h
-mansearch_const.o: mansearch_const.c config.h manpath.h mansearch.h
+mansearch_const.o: mansearch_const.c config.h mansearch.h
mdoc.o: mdoc.c config.h mdoc.h mandoc.h mandoc_aux.h libmdoc.h libmandoc.h
mdoc_argv.o: mdoc_argv.c config.h mdoc.h mandoc.h mandoc_aux.h libmdoc.h libmandoc.h
mdoc_hash.o: mdoc_hash.c config.h mdoc.h libmdoc.h
-mdoc_html.o: mdoc_html.c config.h mandoc.h mandoc_aux.h out.h html.h mdoc.h main.h
+mdoc_html.o: mdoc_html.c config.h mandoc_aux.h mdoc.h out.h html.h main.h
mdoc_macro.o: mdoc_macro.c config.h mdoc.h mandoc.h libmdoc.h libmandoc.h
mdoc_man.o: mdoc_man.c config.h mandoc.h mandoc_aux.h out.h man.h mdoc.h main.h
mdoc_term.o: mdoc_term.c config.h mandoc.h mandoc_aux.h out.h term.h mdoc.h main.h
mdoc_validate.o: mdoc_validate.c config.h mdoc.h mandoc.h mandoc_aux.h libmdoc.h libmandoc.h
-msec.o: msec.c config.h mandoc.h libmandoc.h msec.in
+msec.o: msec.c config.h libmandoc.h msec.in
out.o: out.c config.h mandoc_aux.h mandoc.h out.h
preconv.o: preconv.c config.h mandoc.h libmandoc.h
-read.o: read.c config.h mandoc.h mandoc_aux.h libmandoc.h mdoc.h man.h main.h
+read.o: read.c config.h mandoc.h mandoc_aux.h libmandoc.h mdoc.h man.h
roff.o: roff.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h predefs.in
st.o: st.c config.h mdoc.h libmdoc.h st.in
tbl.o: tbl.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h
@@ -53,7 +53,7 @@ tbl_opts.o: tbl_opts.c config.h mandoc.h libmandoc.h libroff.h
tbl_term.o: tbl_term.c config.h mandoc.h out.h term.h
term.o: term.c config.h mandoc.h mandoc_aux.h out.h term.h main.h
term_ascii.o: term_ascii.c config.h mandoc.h mandoc_aux.h out.h term.h main.h
-term_ps.o: term_ps.c config.h mandoc.h mandoc_aux.h out.h main.h term.h
+term_ps.o: term_ps.c config.h mandoc_aux.h out.h term.h main.h
tree.o: tree.c config.h mandoc.h mdoc.h man.h main.h
test-dirent-namlen.o: test-dirent-namlen.c
test-fgetln.o: test-fgetln.c
diff --git a/html.h b/html.h
index e8d3dca8..fd5e0bce 100644
--- a/html.h
+++ b/html.h
@@ -15,8 +15,6 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-__BEGIN_DECLS
-
enum htmltag {
TAG_HTML,
TAG_HEAD,
@@ -144,6 +142,11 @@ struct html {
#define HTML_FRAGMENT (1 << 0) /* don't emit HTML/HEAD/BODY */
};
+__BEGIN_DECLS
+
+struct tbl_span;
+struct eqn;
+
void print_gen_decls(struct html *);
void print_gen_head(struct html *);
struct tag *print_otag(struct html *, enum htmltag,
diff --git a/libmandoc.h b/libmandoc.h
index 115b7511..67b4fb7a 100644
--- a/libmandoc.h
+++ b/libmandoc.h
@@ -35,6 +35,11 @@ struct buf {
__BEGIN_DECLS
+struct mparse;
+struct mchars;
+enum mandocerr;
+struct tbl_span;
+struct eqn;
struct roff;
struct mdoc;
struct man;
diff --git a/libroff.h b/libroff.h
index 328264de..3d91e92b 100644
--- a/libroff.h
+++ b/libroff.h
@@ -16,8 +16,6 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-__BEGIN_DECLS
-
enum tbl_part {
TBL_PART_OPTS, /* in options (first line) */
TBL_PART_LAYOUT, /* describing layout */
@@ -64,6 +62,8 @@ struct eqn_def {
size_t valsz;
};
+__BEGIN_DECLS
+
struct tbl_node *tbl_alloc(int, int, struct mparse *);
void tbl_restart(int, int, struct tbl_node *);
void tbl_free(struct tbl_node *);
diff --git a/main.h b/main.h
index 9c0e93eb..17087e5d 100644
--- a/main.h
+++ b/main.h
@@ -15,14 +15,14 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#define UNCONST(a) ((void *)(uintptr_t)(const void *)(a))
+
__BEGIN_DECLS
+struct mchars;
struct mdoc;
struct man;
-#define UNCONST(a) ((void *)(uintptr_t)(const void *)(a))
-
-
/*
* Definitions for main.c-visible output device functions, e.g., -Thtml
* and -Tascii. Note that ascii_alloc() is named as such in
diff --git a/man_hash.c b/man_hash.c
index 9e155277..a131d7a9 100644
--- a/man_hash.c
+++ b/man_hash.c
@@ -24,7 +24,6 @@
#include <string.h>
#include "man.h"
-#include "mandoc.h"
#include "libman.h"
#define HASH_DEPTH 6
diff --git a/man_html.c b/man_html.c
index 705d98ac..43a77e82 100644
--- a/man_html.c
+++ b/man_html.c
@@ -25,11 +25,10 @@
#include <stdlib.h>
#include <string.h>
-#include "mandoc.h"
#include "mandoc_aux.h"
+#include "man.h"
#include "out.h"
#include "html.h"
-#include "man.h"
#include "main.h"
/* TODO: preserve ident widths. */
diff --git a/mandoc.h b/mandoc.h
index a1e967ec..5588a3a4 100644
--- a/mandoc.h
+++ b/mandoc.h
@@ -414,13 +414,13 @@ enum mandoc_esc {
typedef void (*mandocmsg)(enum mandocerr, enum mandoclevel,
const char *, int, int, const char *);
+__BEGIN_DECLS
+
struct mparse;
struct mchars;
struct mdoc;
struct man;
-__BEGIN_DECLS
-
enum mandoc_esc mandoc_escape(const char **, const char **, int *);
struct mchars *mchars_alloc(void);
void mchars_free(struct mchars *);
diff --git a/mansearch.h b/mansearch.h
index 85177232..504707cc 100644
--- a/mansearch.h
+++ b/mansearch.h
@@ -97,6 +97,8 @@ struct mansearch {
__BEGIN_DECLS
+struct manpaths;
+
int mansearch_setup(int);
int mansearch(const struct mansearch *cfg, /* options */
const struct manpaths *paths, /* manpaths */
diff --git a/mansearch_const.c b/mansearch_const.c
index ac9ebf31..54768024 100644
--- a/mansearch_const.c
+++ b/mansearch_const.c
@@ -20,7 +20,6 @@
#include <stdint.h>
-#include "manpath.h"
#include "mansearch.h"
const int mansearch_keymax = 40;
diff --git a/mdoc_html.c b/mdoc_html.c
index fe333655..5ef6dcc3 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -26,11 +26,10 @@
#include <string.h>
#include <unistd.h>
-#include "mandoc.h"
#include "mandoc_aux.h"
+#include "mdoc.h"
#include "out.h"
#include "html.h"
-#include "mdoc.h"
#include "main.h"
#define INDENT 5
diff --git a/msec.c b/msec.c
index 97595063..ab276366 100644
--- a/msec.c
+++ b/msec.c
@@ -20,7 +20,6 @@
#include <string.h>
-#include "mandoc.h"
#include "libmandoc.h"
#define LINE(x, y) \
diff --git a/out.h b/out.h
index 8a692717..c30cfe59 100644
--- a/out.h
+++ b/out.h
@@ -50,8 +50,6 @@ struct rofftbl {
void *arg; /* passed to slen and len */
};
-__BEGIN_DECLS
-
#define SCALE_VS_INIT(p, v) \
do { (p)->unit = SCALE_VS; \
(p)->scale = (v); } \
@@ -62,6 +60,10 @@ __BEGIN_DECLS
(p)->scale = (v); } \
while (/* CONSTCOND */ 0)
+__BEGIN_DECLS
+
+struct tbl_span;
+
int a2roffsu(const char *, struct roffsu *, enum roffscale);
void tblcalc(struct rofftbl *tbl,
const struct tbl_span *, size_t);
diff --git a/term.h b/term.h
index b6fe8e87..8d86d87a 100644
--- a/term.h
+++ b/term.h
@@ -16,10 +16,6 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-__BEGIN_DECLS
-
-struct termp;
-
enum termenc {
TERMENC_ASCII,
TERMENC_LOCALE,
@@ -42,6 +38,8 @@ enum termfont {
#define TERM_MAXMARGIN 100000 /* FIXME */
+struct termp;
+
typedef void (*term_margin)(struct termp *, const void *);
struct termp_tbl {
@@ -102,6 +100,11 @@ struct termp {
struct termp_ps *ps;
};
+__BEGIN_DECLS
+
+struct tbl_span;
+struct eqn;
+
const char *ascii_uc2str(int);
void term_eqn(struct termp *, const struct eqn *);
diff --git a/term_ps.c b/term_ps.c
index 344db82f..1656c226 100644
--- a/term_ps.c
+++ b/term_ps.c
@@ -27,11 +27,10 @@
#include <string.h>
#include <unistd.h>
-#include "mandoc.h"
#include "mandoc_aux.h"
#include "out.h"
-#include "main.h"
#include "term.h"
+#include "main.h"
/* These work the buffer used by the header and footer. */
#define PS_BUFSLOP 128