aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roff.7
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-08-19 17:46:14 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-08-19 17:46:14 +0000
commitef62f27d014f39ece5e16500f0a58cdf13c32030 (patch)
tree2533306af4fe8d2dba7ad5265900817bd690cda4 /roff.7
parent6773fbde9b5bf91ad32caf6aefb8902ba59181fa (diff)
downloadmandoc-ef62f27d014f39ece5e16500f0a58cdf13c32030.tar.gz
mandoc-ef62f27d014f39ece5e16500f0a58cdf13c32030.tar.zst
mandoc-ef62f27d014f39ece5e16500f0a58cdf13c32030.zip
Mostly complete implementation of the 'c' (character available)
roff conditional, except that the .char request still isn't supported and that behaviour differs from groff in many edge cases. But at least valid character names and numbers are now distinguished from invalid ones. This also fixes the bug that parsing of the 'c' conditional was incomplete, which resulted in leaking the tested character to the input parser at the beginning of the body when the condition was inverted.
Diffstat (limited to 'roff.7')
-rw-r--r--roff.725
1 files changed, 19 insertions, 6 deletions
diff --git a/roff.7 b/roff.7
index 5377103c..5bf3ed25 100644
--- a/roff.7
+++ b/roff.7
@@ -1,4 +1,4 @@
-.\" $Id: roff.7,v 1.100 2018/08/18 21:37:01 schwarze Exp $
+.\" $Id: roff.7,v 1.101 2018/08/19 17:46:14 schwarze Exp $
.\"
.\" Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2010-2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -15,7 +15,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: August 18 2018 $
+.Dd $Mdocdate: August 19 2018 $
.Dt ROFF 7
.Os
.Sh NAME
@@ -1005,13 +1005,13 @@ is
or
.Sq o
.Pq odd page ,
-it evaluates to true.
+it evaluates to true, and the
+.Ar body
+starts with the next character.
.It
If the first character of
.Ar condition
is
-.Sq c
-.Pq character available ,
.Sq e
.Pq even page ,
.Sq t
@@ -1019,7 +1019,20 @@ is
or
.Sq v
.Pq vroff mode ,
-it evaluates to false.
+it evaluates to false, and the
+.Ar body
+starts with the next character.
+.It
+If the first character of
+.Ar condition
+is
+.Sq c
+.Pq character available ,
+it evaluates to true if the following character is an ASCII character
+or a valid character escape sequence, or to false otherwise.
+The
+.Ar body
+starts with the character following that next character.
.It
If the first character of
.Ar condition