aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-04-24 23:06:17 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-04-24 23:06:17 +0000
commit3690be6ec251dbce20a23ecadfcebabd645f874d (patch)
tree5a3b8871e3ed91a8f886f916529e2e83addd34b3 /man_term.c
parentaf17862b1d7e4ad39b12a7e6df025e553d1c1dbe (diff)
downloadmandoc-3690be6ec251dbce20a23ecadfcebabd645f874d.tar.gz
mandoc-3690be6ec251dbce20a23ecadfcebabd645f874d.tar.zst
mandoc-3690be6ec251dbce20a23ecadfcebabd645f874d.zip
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 'man_term.c')
-rw-r--r--man_term.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/man_term.c b/man_term.c
index b2732d45..6e3d9e9d 100644
--- a/man_term.c
+++ b/man_term.c
@@ -1,4 +1,4 @@
-/* $Id: man_term.c,v 1.191 2017/02/15 14:10:08 schwarze Exp $ */
+/* $Id: man_term.c,v 1.192 2017/04/24 23:06:18 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -95,8 +95,7 @@ static void post_SS(DECL_ARGS);
static void post_TP(DECL_ARGS);
static void post_UR(DECL_ARGS);
-static const struct termact termacts[MAN_MAX] = {
- { pre_sp, NULL, MAN_NOTEXT }, /* br */
+static const struct termact __termacts[MAN_MAX - MAN_TH] = {
{ NULL, NULL, 0 }, /* TH */
{ pre_SH, post_SH, 0 }, /* SH */
{ pre_SS, post_SS, 0 }, /* SS */
@@ -117,6 +116,7 @@ static const struct termact termacts[MAN_MAX] = {
{ pre_I, NULL, 0 }, /* I */
{ pre_alternate, NULL, 0 }, /* IR */
{ pre_alternate, NULL, 0 }, /* RI */
+ { pre_sp, NULL, MAN_NOTEXT }, /* br */
{ pre_sp, NULL, MAN_NOTEXT }, /* sp */
{ pre_literal, NULL, 0 }, /* nf */
{ pre_literal, NULL, 0 }, /* fi */
@@ -135,6 +135,7 @@ static const struct termact termacts[MAN_MAX] = {
{ NULL, NULL, 0 }, /* UE */
{ pre_ll, NULL, MAN_NOTEXT }, /* ll */
};
+static const struct termact *termacts = __termacts - MAN_TH;
void