bugGNU troff - Bugs: bug #55136, [PATCH] s.tmac: Check the closure...

 
 

bug #55136: [PATCH] s.tmac: Check the closure of the .DS macro (display)

Submitted by:  Bjarni Ingi Gislason <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 Planned Release:  None

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 29 Nov 2018 09:53:49 PM UTC, original submission:  

From 8047d1a28f564663fe397839c305f3b5e03a21dc Mon Sep 17 00:00:00 2001
From: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
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 <bjarniig@rhi.hi.is>
---
 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

Bjarni Ingi Gislason <bjarniig>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bjarniig (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.5