From 3690be6ec251dbce20a23ecadfcebabd645f874d Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 24 Apr 2017 23:06:17 +0000 Subject: 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[]. --- man_term.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'man_term.c') 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 * Copyright (c) 2010-2015, 2017 Ingo Schwarze @@ -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 -- cgit v1.2.3-56-ge451