From 41b8a4db179c8440f8e1d020c3ce6ce6685cbf05 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Wed, 19 Nov 2014 01:20:25 +0000 Subject: 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@. --- roff.7 | 4 +++- roff.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) 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: -- cgit