aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-01-10 13:47:00 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-01-10 13:47:00 +0000
commit7fc8bcc7ce494daa94a0e6fced0c1d78947c2125 (patch)
tree02cadf682a60bc4693ebf41f5c2c24563478686c /mdoc_term.c
parentf313579fbb5a5318367521793dc24d2567da2fde (diff)
downloadmandoc-7fc8bcc7ce494daa94a0e6fced0c1d78947c2125.tar.gz
mandoc-7fc8bcc7ce494daa94a0e6fced0c1d78947c2125.tar.zst
mandoc-7fc8bcc7ce494daa94a0e6fced0c1d78947c2125.zip
unify names of AST node flags; no change of cpp output
Diffstat (limited to 'mdoc_term.c')
-rw-r--r--mdoc_term.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 8d434999..ccd3e931 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.337 2017/01/10 12:53:07 schwarze Exp $ */
+/* $Id: mdoc_term.c,v 1.338 2017/01/10 13:47:00 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012-2016 Ingo Schwarze <schwarze@openbsd.org>
@@ -319,7 +319,7 @@ print_mdoc_node(DECL_ARGS)
chld = 1;
offset = p->offset;
rmargin = p->rmargin;
- n->flags &= ~MDOC_ENDED;
+ n->flags &= ~NODE_ENDED;
n->prev_font = p->fonti;
memset(&npair, 0, sizeof(struct termpair));
@@ -330,7 +330,7 @@ print_mdoc_node(DECL_ARGS)
* invoked in a prior line, revert it to PREKEEP.
*/
- if (p->flags & TERMP_KEEP && n->flags & MDOC_LINE) {
+ if (p->flags & TERMP_KEEP && n->flags & NODE_LINE) {
p->flags &= ~TERMP_KEEP;
p->flags |= TERMP_PREKEEP;
}
@@ -342,19 +342,19 @@ print_mdoc_node(DECL_ARGS)
switch (n->type) {
case ROFFT_TEXT:
- if (' ' == *n->string && MDOC_LINE & n->flags)
+ if (' ' == *n->string && NODE_LINE & n->flags)
term_newln(p);
- if (MDOC_DELIMC & n->flags)
+ if (NODE_DELIMC & n->flags)
p->flags |= TERMP_NOSPACE;
term_word(p, n->string);
- if (MDOC_DELIMO & n->flags)
+ if (NODE_DELIMO & n->flags)
p->flags |= TERMP_NOSPACE;
break;
case ROFFT_EQN:
- if ( ! (n->flags & MDOC_LINE))
+ if ( ! (n->flags & NODE_LINE))
p->flags |= TERMP_NOSPACE;
term_eqn(p, n->eqn);
- if (n->next != NULL && ! (n->next->flags & MDOC_LINE))
+ if (n->next != NULL && ! (n->next->flags & NODE_LINE))
p->flags |= TERMP_NOSPACE;
break;
case ROFFT_TBL:
@@ -384,7 +384,7 @@ print_mdoc_node(DECL_ARGS)
case ROFFT_EQN:
break;
default:
- if ( ! termacts[n->tok].post || MDOC_ENDED & n->flags)
+ if ( ! termacts[n->tok].post || NODE_ENDED & n->flags)
break;
(void)(*termacts[n->tok].post)(p, &npair, meta, n);
@@ -394,7 +394,7 @@ print_mdoc_node(DECL_ARGS)
* that it must not call the post handler again.
*/
if (ENDBODY_NOT != n->end)
- n->body->flags |= MDOC_ENDED;
+ n->body->flags |= NODE_ENDED;
/*
* End of line terminating an implicit block
@@ -406,7 +406,7 @@ print_mdoc_node(DECL_ARGS)
break;
}
- if (MDOC_EOS & n->flags)
+ if (NODE_EOS & n->flags)
p->flags |= TERMP_SENTENCE;
if (MDOC_ll != n->tok) {
@@ -1051,7 +1051,7 @@ termp_fl_pre(DECL_ARGS)
if (!(n->child == NULL &&
(n->next == NULL ||
n->next->type == ROFFT_TEXT ||
- n->next->flags & MDOC_LINE)))
+ n->next->flags & NODE_LINE)))
p->flags |= TERMP_NOSPACE;
return 1;
@@ -1096,7 +1096,7 @@ static int
termp_ns_pre(DECL_ARGS)
{
- if ( ! (MDOC_LINE & n->flags))
+ if ( ! (NODE_LINE & n->flags))
p->flags |= TERMP_NOSPACE;
return 1;
}
@@ -1262,7 +1262,7 @@ synopsis_pre(struct termp *p, const struct roff_node *n)
* Obviously, if we're not in a SYNOPSIS or no prior macros
* exist, do nothing.
*/
- if (NULL == n->prev || ! (MDOC_SYNPRETTY & n->flags))
+ if (NULL == n->prev || ! (NODE_SYNPRETTY & n->flags))
return;
/*
@@ -1411,7 +1411,7 @@ static void
termp_lb_post(DECL_ARGS)
{
- if (SEC_LIBRARY == n->sec && MDOC_LINE & n->flags)
+ if (SEC_LIBRARY == n->sec && NODE_LINE & n->flags)
term_newln(p);
}
@@ -1439,7 +1439,7 @@ static int
termp_ft_pre(DECL_ARGS)
{
- /* NB: MDOC_LINE does not effect this! */
+ /* NB: NODE_LINE does not effect this! */
synopsis_pre(p, n);
term_fontpush(p, TERMFONT_UNDER);
return 1;
@@ -1451,7 +1451,7 @@ termp_fn_pre(DECL_ARGS)
size_t rmargin = 0;
int pretty;
- pretty = MDOC_SYNPRETTY & n->flags;
+ pretty = NODE_SYNPRETTY & n->flags;
synopsis_pre(p, n);
@@ -1617,7 +1617,7 @@ termp_bd_pre(DECL_ARGS)
break;
}
if (p->flags & TERMP_NONEWLINE ||
- (nn->next && ! (nn->next->flags & MDOC_LINE)))
+ (nn->next && ! (nn->next->flags & NODE_LINE)))
continue;
term_flushln(p);
p->flags |= TERMP_NOSPACE;
@@ -1718,7 +1718,7 @@ static void
termp_pf_post(DECL_ARGS)
{
- if ( ! (n->next == NULL || n->next->flags & MDOC_LINE))
+ if ( ! (n->next == NULL || n->next->flags & NODE_LINE))
p->flags |= TERMP_NOSPACE;
}
@@ -1773,7 +1773,7 @@ termp_in_pre(DECL_ARGS)
synopsis_pre(p, n);
- if (MDOC_SYNPRETTY & n->flags && MDOC_LINE & n->flags) {
+ if (NODE_SYNPRETTY & n->flags && NODE_LINE & n->flags) {
term_fontpush(p, TERMFONT_BOLD);
term_word(p, "#include");
term_word(p, "<");
@@ -1790,13 +1790,13 @@ static void
termp_in_post(DECL_ARGS)
{
- if (MDOC_SYNPRETTY & n->flags)
+ if (NODE_SYNPRETTY & n->flags)
term_fontpush(p, TERMFONT_BOLD);
p->flags |= TERMP_NOSPACE;
term_word(p, ">");
- if (MDOC_SYNPRETTY & n->flags)
+ if (NODE_SYNPRETTY & n->flags)
term_fontpop(p);
}
@@ -2003,7 +2003,7 @@ termp_fo_pre(DECL_ARGS)
size_t rmargin = 0;
int pretty;
- pretty = MDOC_SYNPRETTY & n->flags;
+ pretty = NODE_SYNPRETTY & n->flags;
if (n->type == ROFFT_BLOCK) {
synopsis_pre(p, n);
@@ -2049,7 +2049,7 @@ termp_fo_post(DECL_ARGS)
p->flags |= TERMP_NOSPACE;
term_word(p, ")");
- if (MDOC_SYNPRETTY & n->flags) {
+ if (NODE_SYNPRETTY & n->flags) {
p->flags |= TERMP_NOSPACE;
term_word(p, ";");
term_flushln(p);