URL:
<https://savannah.gnu.org/bugs/?55136>
Summary: [PATCH] s.tmac: Check the closure of the .DS macro
(display)
Project: GNU troff
Submitted by: bjarniig
Submitted on: Thu 29 Nov 2018 09:53:49 PM UTC
Category: Macro - ms
Severity: 3 - Normal
Item Group: New feature
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
_______________________________________________________
Details:
>From 8047d1a28f564663fe397839c305f3b5e03a21dc Mon Sep 17 00:00:00 2001
From: Bjarni Ingi Gislason <[email protected]>
Date: Thu, 29 Nov 2018 21:28:00 +0000
Subject: [PATCH] s.tmac: Check the closure of the .DS macro (display)
If the display macro is not properly ended, its content doesn't go to
the output.
Aborting is necessary to avoid missing pieces of text in the output.
Signed-off-by: Bjarni Ingi Gislason <[email protected]>
---
tmac/s.tmac | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tmac/s.tmac b/tmac/s.tmac
index 6dda23b7..5737dfd3 100644
--- a/tmac/s.tmac
+++ b/tmac/s.tmac
@@ -965,6 +965,14 @@ along with this program. If not, see
<http://www.gnu.org/licenses/>.
.el .@error-recover \\$0: mismatched DE
..
.de DS
+.\" Check if an earlier display has be closed with .DE
+.if r \\n[.ev]:ds-type \{
+. if !\\n[\\n[.ev]:ds-type]==0 \{\
+.\" "@warning" leaves the "display" empty
+. @fatal \\$0: New .DS used without closing a former one.
+. \}
+.\}
+.
.br
.di ds*div
.ie '\\$1'B' \{\
--
2.19.2
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?55136>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
_______________________________________________
bug-groff mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-groff