aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_macro.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-05-04 17:48:28 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-05-04 17:48:28 +0000
commit6cff4f9d35431af8274477e9e1cd8dbb193f159a (patch)
tree915d9a7213a5eb4bcdd275befff13cc2a5e27720 /mdoc_macro.c
parent094f88dec3c7fd9ede485ab47df6943bd7686330 (diff)
downloadmandoc-6cff4f9d35431af8274477e9e1cd8dbb193f159a.tar.gz
mandoc-6cff4f9d35431af8274477e9e1cd8dbb193f159a.tar.zst
mandoc-6cff4f9d35431af8274477e9e1cd8dbb193f159a.zip
Parser reorg:
Generate the first node on the roff level: .br Fix some column numbers in diagnostic messages while here.
Diffstat (limited to 'mdoc_macro.c')
-rw-r--r--mdoc_macro.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c
index af6ac5c6..30ef7e4d 100644
--- a/mdoc_macro.c
+++ b/mdoc_macro.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_macro.c,v 1.220 2017/04/29 12:45:42 schwarze Exp $ */
+/* $Id: mdoc_macro.c,v 1.221 2017/05/04 17:48:29 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012-2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -197,7 +197,6 @@ const struct mdoc_macro __mdoc_macros[MDOC_MAX - MDOC_Dd] = {
{ blk_part_imp, MDOC_CALLABLE | MDOC_PARSED | MDOC_JOIN }, /* En */
{ in_line_argn, MDOC_CALLABLE | MDOC_PARSED }, /* Dx */
{ in_line_eoln, MDOC_JOIN }, /* %Q */
- { in_line_eoln, 0 }, /* br */
{ in_line_eoln, 0 }, /* sp */
{ in_line_eoln, 0 }, /* %U */
{ phrase_ta, MDOC_CALLABLE | MDOC_PARSED | MDOC_JOIN }, /* Ta */
@@ -251,7 +250,7 @@ lookup(struct roff_man *mdoc, int from, int line, int ppos, const char *p)
if (res != TOKEN_NONE) {
if (mdoc_macros[res].flags & MDOC_CALLABLE)
return res;
- if (res != MDOC_br && res != MDOC_sp && res != MDOC_ll)
+ if (res != MDOC_sp && res != MDOC_ll)
mandoc_msg(MANDOCERR_MACRO_CALL,
mdoc->parse, line, ppos, p);
}
@@ -682,8 +681,8 @@ blk_exp_close(MACRO_PROT_ARGS)
* Stray .Ec without previous .Eo:
* Break the output line, keep the arguments.
*/
- roff_elem_alloc(mdoc, line, ppos, MDOC_br);
- rew_elem(mdoc, MDOC_br);
+ roff_elem_alloc(mdoc, line, ppos, ROFF_br);
+ rew_elem(mdoc, ROFF_br);
}
} else if (endbody == NULL) {
rew_last(mdoc, body);
@@ -1023,8 +1022,8 @@ blk_full(MACRO_PROT_ARGS)
if (tok == MDOC_It && (n == NULL || n->tok != MDOC_Bl)) {
mandoc_vmsg(MANDOCERR_IT_STRAY, mdoc->parse,
line, ppos, "It %s", buf + *pos);
- roff_elem_alloc(mdoc, line, ppos, MDOC_br);
- rew_elem(mdoc, MDOC_br);
+ roff_elem_alloc(mdoc, line, ppos, ROFF_br);
+ rew_elem(mdoc, ROFF_br);
return;
}
}