summaryrefslogtreecommitdiffstats
path: root/mdoc.c
diff options
context:
space:
mode:
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 *,