summaryrefslogtreecommitdiffstats
path: root/mdoc_macro.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-03-17 11:30:23 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-03-17 11:30:23 +0000
commitb8834ed2b38344025a694c113bdc5c9247d8dc7e (patch)
tree43048b0e3e1a25b8e7392ddd5ca0f540934aa492 /mdoc_macro.c
parentff909bf468538a284ebc9c54861cd32cbd19251c (diff)
downloadmandoc-b8834ed2b38344025a694c113bdc5c9247d8dc7e.tar.gz
Clean-up in libmdoc: fix last checks for mdoc_*msg return value, then
make mdoc_vmsg not return an int. libmdoc is now completely clean of return-value checks from the message subsystem.
Diffstat (limited to 'mdoc_macro.c')
-rw-r--r--mdoc_macro.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c
index 74e80d19..d1354c6e 100644
--- a/mdoc_macro.c
+++ b/mdoc_macro.c
@@ -710,8 +710,7 @@ blk_exp_close(MACRO_PROT_ARGS)
if ( ! (MDOC_CALLABLE & mdoc_macros[tok].flags)) {
/* FIXME: do this in validate */
if (buf[*pos])
- if ( ! mdoc_pmsg(m, line, ppos, MANDOCERR_ARGSLOST))
- return(0);
+ mdoc_pmsg(m, line, ppos, MANDOCERR_ARGSLOST);
if ( ! rew_sub(MDOC_BODY, m, tok, line, ppos))
return(0);
@@ -854,9 +853,9 @@ in_line(MACRO_PROT_ARGS)
return(0);
} else if ( ! nc && 0 == cnt) {
mdoc_argv_free(arg);
- if ( ! mdoc_pmsg(m, line, ppos, MANDOCERR_MACROEMPTY))
- return(0);
+ mdoc_pmsg(m, line, ppos, MANDOCERR_MACROEMPTY);
}
+
if ( ! mdoc_macro(m, ntok, line, la, pos, buf))
return(0);
if ( ! nl)
@@ -936,8 +935,7 @@ in_line(MACRO_PROT_ARGS)
return(0);
} else if ( ! nc && 0 == cnt) {
mdoc_argv_free(arg);
- if ( ! mdoc_pmsg(m, line, ppos, MANDOCERR_MACROEMPTY))
- return(0);
+ mdoc_pmsg(m, line, ppos, MANDOCERR_MACROEMPTY);
}
if ( ! nl)
@@ -1299,9 +1297,9 @@ blk_part_imp(MACRO_PROT_ARGS)
* is ugly behaviour nodding its head to OpenBSD's overwhelming
* crufty use of `Op' breakage.
*/
- if (n != body && ! mdoc_vmsg(m, MANDOCERR_SCOPENEST,
- line, ppos, "%s broken", mdoc_macronames[tok]))
- return(0);
+ if (n != body)
+ mdoc_vmsg(m, MANDOCERR_SCOPENEST, line, ppos,
+ "%s broken", mdoc_macronames[tok]);
if (n && ! rew_sub(MDOC_BODY, m, tok, line, ppos))
return(0);
@@ -1673,7 +1671,8 @@ static int
obsolete(MACRO_PROT_ARGS)
{
- return(mdoc_pmsg(m, line, ppos, MANDOCERR_MACROOBS));
+ mdoc_pmsg(m, line, ppos, MANDOCERR_MACROOBS);
+ return(1);
}