diff options
Diffstat (limited to 'mdoc.c')
-rw-r--r-- | mdoc.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Id: mdoc.c,v 1.40 2009/01/20 13:05:28 kristaps Exp $ */ +/* $Id: mdoc.c,v 1.41 2009/01/20 13:44:05 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se> * @@ -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 *, |