aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--eqn.c3
-rw-r--r--libmandoc.h101
-rw-r--r--man.h11
-rw-r--r--mandoc.h38
-rw-r--r--mdoc.h11
-rw-r--r--roff.h25
-rw-r--r--tbl.c3
7 files changed, 96 insertions, 96 deletions
diff --git a/eqn.c b/eqn.c
index f8a4bdfa..220f3f88 100644
--- a/eqn.c
+++ b/eqn.c
@@ -1,4 +1,4 @@
-/* $Id: eqn.c,v 1.3 2011/03/15 16:23:51 kristaps Exp $ */
+/* $Id: eqn.c,v 1.4 2011/03/22 09:48:13 kristaps Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -25,7 +25,6 @@
#include <time.h>
#include "mandoc.h"
-#include "roff.h"
#include "libmandoc.h"
#include "libroff.h"
diff --git a/libmandoc.h b/libmandoc.h
index 6f4a318a..eb85d052 100644
--- a/libmandoc.h
+++ b/libmandoc.h
@@ -1,4 +1,4 @@
-/* $Id: libmandoc.h,v 1.13 2011/03/20 16:02:05 kristaps Exp $ */
+/* $Id: libmandoc.h,v 1.14 2011/03/22 09:48:13 kristaps Exp $ */
/*
* Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -17,18 +17,97 @@
#ifndef LIBMANDOC_H
#define LIBMANDOC_H
+enum rofferr {
+ ROFF_CONT, /* continue processing line */
+ ROFF_RERUN, /* re-run roff interpreter with offset */
+ ROFF_APPEND, /* re-run main parser, appending next line */
+ ROFF_REPARSE, /* re-run main parser on the result */
+ ROFF_SO, /* include another file */
+ ROFF_IGN, /* ignore current line */
+ ROFF_TBL, /* a table row was successfully parsed */
+ ROFF_EQN, /* an equation was successfully parsed */
+ ROFF_ERR /* badness: puke and stop */
+};
+
+/*
+ * Available registers (set in libroff, accessed elsewhere).
+ */
+enum regs {
+ REG_nS = 0,
+ REG__MAX
+};
+
+/*
+ * A register (struct reg) can consist of many types: this consists of
+ * normalised types from the original string form.
+ */
+union regval {
+ unsigned u; /* unsigned integer */
+};
+
+/*
+ * A single register entity. If "set" is zero, the value of the
+ * register should be the default one, which is per-register. It's
+ * assumed that callers know which type in "v" corresponds to which
+ * register value.
+ */
+struct reg {
+ int set; /* whether set or not */
+ union regval v; /* parsed data */
+};
+
+/*
+ * The primary interface to setting register values is in libroff,
+ * although libmdoc and libman from time to time will manipulate
+ * registers (such as `.Sh SYNOPSIS' enabling REG_nS).
+ */
+struct regset {
+ struct reg regs[REG__MAX];
+};
+
__BEGIN_DECLS
-void mandoc_msg(enum mandocerr, struct mparse *,
- int, int, const char *);
-void mandoc_vmsg(enum mandocerr, struct mparse *,
- int, int, const char *, ...);
-int mandoc_special(char *);
-char *mandoc_strdup(const char *);
-char *mandoc_getarg(struct mparse *, char **, int, int *);
-char *mandoc_normdate(struct mparse *, char *, int, int);
-int mandoc_eos(const char *, size_t, int);
-int mandoc_hyph(const char *, const char *);
+struct roff;
+struct mdoc;
+struct man;
+
+void mandoc_msg(enum mandocerr, struct mparse *,
+ int, int, const char *);
+void mandoc_vmsg(enum mandocerr, struct mparse *,
+ int, int, const char *, ...);
+int mandoc_special(char *);
+char *mandoc_strdup(const char *);
+char *mandoc_getarg(struct mparse *, char **, int, int *);
+char *mandoc_normdate(struct mparse *, char *, int, int);
+int mandoc_eos(const char *, size_t, int);
+int mandoc_hyph(const char *, const char *);
+
+void mdoc_free(struct mdoc *);
+struct mdoc *mdoc_alloc(struct regset *, struct mparse *);
+void mdoc_reset(struct mdoc *);
+int mdoc_parseln(struct mdoc *, int, char *, int);
+int mdoc_endparse(struct mdoc *);
+int mdoc_addspan(struct mdoc *, const struct tbl_span *);
+int mdoc_addeqn(struct mdoc *, const struct eqn *);
+
+void man_free(struct man *);
+struct man *man_alloc(struct regset *, struct mparse *);
+void man_reset(struct man *);
+int man_parseln(struct man *, int, char *, int);
+int man_endparse(struct man *);
+int man_addspan(struct man *, const struct tbl_span *);
+int man_addeqn(struct man *, const struct eqn *);
+
+void roff_free(struct roff *);
+struct roff *roff_alloc(struct regset *, struct mparse *);
+void roff_reset(struct roff *);
+enum rofferr roff_parseln(struct roff *, int,
+ char **, size_t *, int, int *);
+void roff_endparse(struct roff *);
+
+const struct tbl_span *roff_span(const struct roff *);
+const struct eqn *roff_eqn(const struct roff *);
+
__END_DECLS
diff --git a/man.h b/man.h
index f41ba9b4..e40f967b 100644
--- a/man.h
+++ b/man.h
@@ -1,4 +1,4 @@
-/* $Id: man.h,v 1.55 2011/03/20 16:02:05 kristaps Exp $ */
+/* $Id: man.h,v 1.56 2011/03/22 09:48:13 kristaps Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -116,15 +116,6 @@ __BEGIN_DECLS
struct man;
-void man_free(struct man *);
-struct man *man_alloc(struct regset *, struct mparse *);
-void man_reset(struct man *);
-int man_parseln(struct man *, int, char *, int);
-int man_endparse(struct man *);
-int man_addspan(struct man *,
- const struct tbl_span *);
-int man_addeqn(struct man *, const struct eqn *);
-
const struct man_node *man_node(const struct man *);
const struct man_meta *man_meta(const struct man *);
diff --git a/mandoc.h b/mandoc.h
index 55d38c81..0505eb91 100644
--- a/mandoc.h
+++ b/mandoc.h
@@ -1,4 +1,4 @@
-/* $Id: mandoc.h,v 1.64 2011/03/20 16:05:21 kristaps Exp $ */
+/* $Id: mandoc.h,v 1.65 2011/03/22 09:48:13 kristaps Exp $ */
/*
* Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -277,42 +277,6 @@ struct eqn {
};
/*
- * Available registers (set in libroff, accessed elsewhere).
- */
-enum regs {
- REG_nS = 0,
- REG__MAX
-};
-
-/*
- * A register (struct reg) can consist of many types: this consists of
- * normalised types from the original string form.
- */
-union regval {
- unsigned u; /* unsigned integer */
-};
-
-/*
- * A single register entity. If "set" is zero, the value of the
- * register should be the default one, which is per-register. It's
- * assumed that callers know which type in "v" corresponds to which
- * register value.
- */
-struct reg {
- int set; /* whether set or not */
- union regval v; /* parsed data */
-};
-
-/*
- * The primary interface to setting register values is in libroff,
- * although libmdoc and libman from time to time will manipulate
- * registers (such as `.Sh SYNOPSIS' enabling REG_nS).
- */
-struct regset {
- struct reg regs[REG__MAX];
-};
-
-/*
* A punctuation delimiter, used only in mdoc(7) documents, is opening,
* closing, or "middle mark" punctuation. These govern spacing.
* Opening punctuation (e.g., the opening parenthesis) suppresses the
diff --git a/mdoc.h b/mdoc.h
index 901ab284..8d157e5b 100644
--- a/mdoc.h
+++ b/mdoc.h
@@ -1,4 +1,4 @@
-/* $Id: mdoc.h,v 1.119 2011/03/20 16:02:05 kristaps Exp $ */
+/* $Id: mdoc.h,v 1.120 2011/03/22 09:48:13 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -423,17 +423,8 @@ __BEGIN_DECLS
struct mdoc;
-void mdoc_free(struct mdoc *);
-struct mdoc *mdoc_alloc(struct regset *, struct mparse *);
-void mdoc_reset(struct mdoc *);
-int mdoc_parseln(struct mdoc *, int, char *, int);
const struct mdoc_node *mdoc_node(const struct mdoc *);
const struct mdoc_meta *mdoc_meta(const struct mdoc *);
-int mdoc_endparse(struct mdoc *);
-int mdoc_addspan(struct mdoc *,
- const struct tbl_span *);
-int mdoc_addeqn(struct mdoc *,
- const struct eqn *);
__END_DECLS
diff --git a/roff.h b/roff.h
index 019b80e4..171033f8 100644
--- a/roff.h
+++ b/roff.h
@@ -1,4 +1,4 @@
-/* $Id: roff.h,v 1.25 2011/03/20 16:02:05 kristaps Exp $ */
+/* $Id: roff.h,v 1.26 2011/03/22 09:48:13 kristaps Exp $ */
/*
* Copyright (c) 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -17,31 +17,8 @@
#ifndef ROFF_H
#define ROFF_H
-enum rofferr {
- ROFF_CONT, /* continue processing line */
- ROFF_RERUN, /* re-run roff interpreter with offset */
- ROFF_APPEND, /* re-run main parser, appending next line */
- ROFF_REPARSE, /* re-run main parser on the result */
- ROFF_SO, /* include another file */
- ROFF_IGN, /* ignore current line */
- ROFF_TBL, /* a table row was successfully parsed */
- ROFF_EQN, /* an equation was successfully parsed */
- ROFF_ERR /* badness: puke and stop */
-};
-
__BEGIN_DECLS
-struct roff;
-
-void roff_free(struct roff *);
-struct roff *roff_alloc(struct regset *, struct mparse *);
-void roff_reset(struct roff *);
-enum rofferr roff_parseln(struct roff *, int,
- char **, size_t *, int, int *);
-void roff_endparse(struct roff *);
-const struct tbl_span *roff_span(const struct roff *);
-const struct eqn *roff_eqn(const struct roff *);
-
__END_DECLS
#endif /*!ROFF_H*/
diff --git a/tbl.c b/tbl.c
index 504957d6..9b331e86 100644
--- a/tbl.c
+++ b/tbl.c
@@ -1,4 +1,4 @@
-/* $Id: tbl.c,v 1.23 2011/03/20 16:02:05 kristaps Exp $ */
+/* $Id: tbl.c,v 1.24 2011/03/22 09:48:13 kristaps Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org>
@@ -22,7 +22,6 @@
#include <time.h>
#include "mandoc.h"
-#include "roff.h"
#include "libmandoc.h"
#include "libroff.h"