summaryrefslogtreecommitdiffstats
path: root/macro.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-03-22 19:01:11 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-03-22 19:01:11 +0000
commitd8fb2ddbfa0e39add9075bcc8fee890e73f1c661 (patch)
treee6ef428548e3a1f066c118602efedf57c03d6cc1 /macro.c
parentc045dee3b0c15ec8f2e1054b209abc29fb0f2414 (diff)
downloadmandoc-d8fb2ddbfa0e39add9075bcc8fee890e73f1c661.tar.gz
Stripping of Xo/Xc macros in main.c (ifdef STRIP_XO).
Diffstat (limited to 'macro.c')
-rw-r--r--macro.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/macro.c b/macro.c
index 2cd2bdfe..830b5e87 100644
--- a/macro.c
+++ b/macro.c
@@ -33,6 +33,7 @@
/* FIXME: .Fl, .Ar, .Cd handling of `|'. */
enum mwarn {
+ WIMPBRK,
WMACPARM,
WOBS
};
@@ -236,6 +237,9 @@ pwarn(struct mdoc *mdoc, int line, int pos, enum mwarn type)
p = NULL;
switch (type) {
+ case (WIMPBRK):
+ p = "crufty end-of-line scope violation";
+ break;
case (WMACPARM):
p = "macro-like parameter";
break;
@@ -1058,6 +1062,9 @@ blk_part_imp(MACRO_PROT_ARGS)
if (body == n)
break;
+ if (NULL == n && ! pwarn(mdoc, body->line, body->pos, WIMPBRK))
+ return(0);
+
if (n && ! rew_last(mdoc, body))
return(0);