version 1.39, 2009/01/20 12:51:28 |
version 1.41, 2009/01/20 13:44:05 |
|
|
|
|
#include "private.h" |
#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] = { |
const char *const __mdoc_macronames[MDOC_MAX] = { |
"\\\"", "Dd", "Dt", "Os", |
"\\\"", "Dd", "Dt", "Os", |
"Sh", "Ss", "Pp", "D1", |
"Sh", "Ss", "Pp", "D1", |
Line 83 const char *const __mdoc_argnames[MDOC_ARG_MAX] = { |
|
Line 89 const char *const __mdoc_argnames[MDOC_ARG_MAX] = { |
|
"emphasis", "symbolic", |
"emphasis", "symbolic", |
}; |
}; |
|
|
|
/* Central table of library: who gets parsed how. */ |
|
|
const struct mdoc_macro __mdoc_macros[MDOC_MAX] = { |
const struct mdoc_macro __mdoc_macros[MDOC_MAX] = { |
{ NULL, 0 }, /* \" */ |
{ NULL, 0 }, /* \" */ |
{ macro_constant, MDOC_PROLOGUE }, /* Dd */ |
{ macro_constant, MDOC_PROLOGUE }, /* Dd */ |
Line 199 const char * const *mdoc_macronames = __mdoc_macroname |
|
Line 207 const char * const *mdoc_macronames = __mdoc_macroname |
|
const char * const *mdoc_argnames = __mdoc_argnames; |
const char * const *mdoc_argnames = __mdoc_argnames; |
const struct mdoc_macro * const mdoc_macros = __mdoc_macros; |
const struct mdoc_macro * const mdoc_macros = __mdoc_macros; |
|
|
|
|
static struct mdoc_arg *argdup(size_t, const struct mdoc_arg *); |
static struct mdoc_arg *argdup(size_t, const struct mdoc_arg *); |
static void argfree(size_t, struct mdoc_arg *); |
static void argfree(size_t, struct mdoc_arg *); |
static void argcpy(struct mdoc_arg *, |
static void argcpy(struct mdoc_arg *, |
Line 432 mdoc_node_append(struct mdoc *mdoc, struct mdoc_node * |
|
Line 439 mdoc_node_append(struct mdoc *mdoc, struct mdoc_node * |
|
break; |
break; |
} |
} |
|
|
|
/* This sort-of works (re-opening of text macros...). */ |
if (mdoc->linetok > MDOC_LINEARG_SOFTMAX) |
if (mdoc->linetok > MDOC_LINEARG_SOFTMAX) |
if ( ! mdoc_nwarn(mdoc, p, WARN_COMPAT, |
if ( ! mdoc_nwarn(mdoc, p, WARN_COMPAT, |
"suggested %d tokens per line exceeded (has %d)", |
"suggested %d tokens per line exceeded (has %d)", |