diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-04-24 23:06:17 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-04-24 23:06:17 +0000 |
commit | 34d4ee2337055c6ee3b2c34dbcb0c4a24a7413d1 (patch) | |
tree | ce7efbe6ee6a0cdedc8ecc4d031b69b5516a73c1 /mdoc_markdown.c | |
parent | b6c38ba54b141f508c5d22eb714a3e7c79a6c33c (diff) | |
download | mandoc-34d4ee2337055c6ee3b2c34dbcb0c4a24a7413d1.tar.gz |
Continue parser unification:
* Make enum rofft an internal interface as enum roff_tok in "roff.h".
* Represent mdoc and man macros in enum roff_tok.
* Make TOKEN_NONE a proper enum value and use it throughout.
* Put the prologue macros first in the macro tables.
* Unify mdoc_macroname[] and man_macroname[] into roff_name[].
Diffstat (limited to 'mdoc_markdown.c')
-rw-r--r-- | mdoc_markdown.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mdoc_markdown.c b/mdoc_markdown.c index a9fba790..bee8f916 100644 --- a/mdoc_markdown.c +++ b/mdoc_markdown.c @@ -103,8 +103,7 @@ static void md_post_Pf(struct roff_node *); static void md_post_Vt(struct roff_node *); static void md_post__T(struct roff_node *); -static const struct md_act md_acts[MDOC_MAX + 1] = { - { NULL, md_pre_Ap, NULL, NULL, NULL }, /* Ap */ +static const struct md_act __md_acts[MDOC_MAX - MDOC_Dd] = { { NULL, NULL, NULL, NULL, NULL }, /* Dd */ { NULL, NULL, NULL, NULL, NULL }, /* Dt */ { NULL, NULL, NULL, NULL, NULL }, /* Os */ @@ -120,6 +119,7 @@ static const struct md_act md_acts[MDOC_MAX + 1] = { { NULL, md_pre_It, md_post_It, NULL, NULL }, /* It */ { NULL, md_pre_raw, md_post_raw, "*", "*" }, /* Ad */ { NULL, md_pre_An, NULL, NULL, NULL }, /* An */ + { NULL, md_pre_Ap, NULL, NULL, NULL }, /* Ap */ { NULL, md_pre_raw, md_post_raw, "*", "*" }, /* Ar */ { NULL, md_pre_raw, md_post_raw, "**", "**" }, /* Cd */ { NULL, md_pre_raw, md_post_raw, "**", "**" }, /* Cm */ @@ -227,8 +227,8 @@ static const struct md_act md_acts[MDOC_MAX + 1] = { { NULL, md_pre_Lk, md_post_pc, NULL, NULL }, /* %U */ { NULL, NULL, NULL, NULL, NULL }, /* Ta */ { NULL, NULL, NULL, NULL, NULL }, /* ll */ - { NULL, NULL, NULL, NULL, NULL }, /* ROOT */ }; +static const struct md_act *const md_acts = __md_acts - MDOC_Dd; static int outflags; #define MD_spc (1 << 0) /* Blank character before next word. */ |