summaryrefslogtreecommitdiffstats
path: root/mdoc.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-01-20 13:44:05 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-01-20 13:44:05 +0000
commit50f9604d3b055e8ec8c5617c792e62d6e01219a3 (patch)
tree39fcd3980a3ce1ed22e07f3f0b0d813f92061772 /mdoc.c
parentffd36f32dbbe968941923914f7f8630c797a1206 (diff)
downloadmandoc-50f9604d3b055e8ec8c5617c792e62d6e01219a3.tar.gz
Re-merged old port-building routines.
Diffstat (limited to 'mdoc.c')
-rw-r--r--mdoc.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/mdoc.c b/mdoc.c
index ca45b4ae..eab289de 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -26,6 +26,12 @@
#include "private.h"
+/*
+ * Main caller in the libmdoc library. This begins the parsing routine,
+ * handles allocation of data, and so forth. Most of the "work" is done
+ * in macro.c, but this orchestrates who does what, when.
+ */
+
const char *const __mdoc_macronames[MDOC_MAX] = {
"\\\"", "Dd", "Dt", "Os",
"Sh", "Ss", "Pp", "D1",
@@ -83,6 +89,8 @@ const char *const __mdoc_argnames[MDOC_ARG_MAX] = {
"emphasis", "symbolic",
};
+/* Central table of library: who gets parsed how. */
+
const struct mdoc_macro __mdoc_macros[MDOC_MAX] = {
{ NULL, 0 }, /* \" */
{ macro_constant, MDOC_PROLOGUE }, /* Dd */
@@ -199,7 +207,6 @@ const char * const *mdoc_macronames = __mdoc_macronames;
const char * const *mdoc_argnames = __mdoc_argnames;
const struct mdoc_macro * const mdoc_macros = __mdoc_macros;
-
static struct mdoc_arg *argdup(size_t, const struct mdoc_arg *);
static void argfree(size_t, struct mdoc_arg *);
static void argcpy(struct mdoc_arg *,