summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-11-19 01:20:25 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-11-19 01:20:25 +0000
commit41b8a4db179c8440f8e1d020c3ce6ce6685cbf05 (patch)
treea6daea8e02a34a0132f6ab20a043845ccbb630f2
parent0b596bb9d74fad7c67fd05be71214e88285c1d9c (diff)
downloadmandoc-41b8a4db179c8440f8e1d020c3ce6ce6685cbf05.tar.gz
Support the ".if v" conditional operator (vroff mode, always false)
for groff compatibility because pod2man(1) uses it that way. Weirdly, groff documents it as "for compatibility with other troff versions" but neither Heirloom nor Plan 9 have it. Issue reported by giovanni@ via sthen@.
-rw-r--r--roff.74
-rw-r--r--roff.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/roff.7 b/roff.7
index 30568620..6998a133 100644
--- a/roff.7
+++ b/roff.7
@@ -747,9 +747,11 @@ If the first character of COND is
.Pq even page ,
.Sq r
.Pq register accessed ,
-or
.Sq t
.Pq troff mode ,
+or
+.Sq v
+.Pq vroff mode ,
COND evaluates to false.
.It
If COND starts with a parenthesis or with an optionally signed
diff --git a/roff.c b/roff.c
index 7489a2db..08a4f922 100644
--- a/roff.c
+++ b/roff.c
@@ -1272,6 +1272,8 @@ roff_evalcond(struct roff *r, int ln, const char *v, int *pos)
case 'r':
/* FALLTHROUGH */
case 't':
+ /* FALLTHROUGH */
+ case 'v':
(*pos)++;
return(!wanttrue);
default: