* mdocml: header cleanup: * add missing forward declarations * remove
@ 2014-12-01 8:06 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2014-12-01 8:06 UTC (permalink / raw)
To: source
Log Message:
-----------
header cleanup:
* add missing forward declarations
* remove needless header inclusions
* some style unification
Modified Files:
--------------
mdocml:
Makefile.depend
html.h
libmandoc.h
libroff.h
main.h
man_hash.c
man_html.c
mandoc.h
mansearch.h
mansearch_const.c
mdoc_html.c
msec.c
out.h
term.h
term_ps.c
Revision Data
-------------
Index: main.h
===================================================================
RCS file: /home/cvs/mdocml/mdocml/main.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -Lmain.h -Lmain.h -u -p -r1.18 -r1.19
--- main.h
+++ main.h
@@ -15,13 +15,13 @@
* 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
Index: mansearch_const.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/mansearch_const.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lmansearch_const.c -Lmansearch_const.c -u -p -r1.6 -r1.7
--- mansearch_const.c
+++ mansearch_const.c
@@ -20,7 +20,6 @@
#include <stdint.h>
-#include "manpath.h"
#include "mansearch.h"
const int mansearch_keymax = 40;
Index: libmandoc.h
===================================================================
RCS file: /home/cvs/mdocml/mdocml/libmandoc.h,v
retrieving revision 1.50
retrieving revision 1.51
diff -Llibmandoc.h -Llibmandoc.h -u -p -r1.50 -r1.51
--- libmandoc.h
+++ 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;
Index: mandoc.h
===================================================================
RCS file: /home/cvs/mdocml/mdocml/mandoc.h,v
retrieving revision 1.175
retrieving revision 1.176
diff -Lmandoc.h -Lmandoc.h -u -p -r1.175 -r1.176
--- mandoc.h
+++ mandoc.h
@@ -414,12 +414,12 @@ 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);
Index: term_ps.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/term_ps.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -Lterm_ps.c -Lterm_ps.c -u -p -r1.69 -r1.70
--- term_ps.c
+++ 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
Index: man_hash.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/man_hash.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -Lman_hash.c -Lman_hash.c -u -p -r1.28 -r1.29
--- man_hash.c
+++ man_hash.c
@@ -24,7 +24,6 @@
#include <string.h>
#include "man.h"
-#include "mandoc.h"
#include "libman.h"
#define HASH_DEPTH 6
Index: Makefile.depend
===================================================================
RCS file: /home/cvs/mdocml/mdocml/Makefile.depend,v
retrieving revision 1.6
retrieving revision 1.7
diff -LMakefile.depend -LMakefile.depend -u -p -r1.6 -r1.7
--- Makefile.depend
+++ Makefile.depend
@@ -15,12 +15,12 @@ demandoc.o: demandoc.c config.h man.h md
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_f
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
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
Index: mdoc_html.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/mdoc_html.c,v
retrieving revision 1.214
retrieving revision 1.215
diff -Lmdoc_html.c -Lmdoc_html.c -u -p -r1.214 -r1.215
--- mdoc_html.c
+++ 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
Index: mansearch.h
===================================================================
RCS file: /home/cvs/mdocml/mdocml/mansearch.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -Lmansearch.h -Lmansearch.h -u -p -r1.22 -r1.23
--- mansearch.h
+++ 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 */
Index: man_html.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/man_html.c,v
retrieving revision 1.104
retrieving revision 1.105
diff -Lman_html.c -Lman_html.c -u -p -r1.104 -r1.105
--- man_html.c
+++ 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. */
Index: out.h
===================================================================
RCS file: /home/cvs/mdocml/mdocml/out.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -Lout.h -Lout.h -u -p -r1.25 -r1.26
--- out.h
+++ 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); } \
@@ -61,6 +59,10 @@ __BEGIN_DECLS
do { (p)->unit = SCALE_EN; \
(p)->scale = (v); } \
while (/* CONSTCOND */ 0)
+
+__BEGIN_DECLS
+
+struct tbl_span;
int a2roffsu(const char *, struct roffsu *, enum roffscale);
void tblcalc(struct rofftbl *tbl,
Index: libroff.h
===================================================================
RCS file: /home/cvs/mdocml/mdocml/libroff.h,v
retrieving revision 1.32
retrieving revision 1.33
diff -Llibroff.h -Llibroff.h -u -p -r1.32 -r1.33
--- libroff.h
+++ 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 */
@@ -63,6 +61,8 @@ struct eqn_def {
char *val;
size_t valsz;
};
+
+__BEGIN_DECLS
struct tbl_node *tbl_alloc(int, int, struct mparse *);
void tbl_restart(int, int, struct tbl_node *);
Index: msec.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/msec.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -Lmsec.c -Lmsec.c -u -p -r1.12 -r1.13
--- msec.c
+++ msec.c
@@ -20,7 +20,6 @@
#include <string.h>
-#include "mandoc.h"
#include "libmandoc.h"
#define LINE(x, y) \
Index: term.h
===================================================================
RCS file: /home/cvs/mdocml/mdocml/term.h,v
retrieving revision 1.106
retrieving revision 1.107
diff -Lterm.h -Lterm.h -u -p -r1.106 -r1.107
--- term.h
+++ 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 {
@@ -101,6 +99,11 @@ struct termp {
const void *argf; /* arg for headf/footf */
struct termp_ps *ps;
};
+
+__BEGIN_DECLS
+
+struct tbl_span;
+struct eqn;
const char *ascii_uc2str(int);
Index: html.h
===================================================================
RCS file: /home/cvs/mdocml/mdocml/html.h,v
retrieving revision 1.68
retrieving revision 1.69
diff -Lhtml.h -Lhtml.h -u -p -r1.68 -r1.69
--- html.h
+++ 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,
@@ -143,6 +141,11 @@ struct html {
int oflags; /* output options */
#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 *);
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-12-01 8:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-01 8:06 mdocml: header cleanup: * add missing forward declarations * remove schwarze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).