groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 10/13: tmac/an.tmac: Clean up early macro return better.


From: G. Branden Robinson
Subject: [groff] 10/13: tmac/an.tmac: Clean up early macro return better.
Date: Wed, 27 Apr 2022 15:39:23 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit a73eeda596afa59ccd71a641a02f65b17b764044
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu Apr 28 00:43:01 2022 +1000

    tmac/an.tmac: Clean up early macro return better.
    
    * tmac/an.tmac (an*abbreviate-inner-footer): Clean up better before
      early returns.  Remove temporary registers.
---
 ChangeLog    |  5 +++++
 tmac/an.tmac | 11 ++++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 58ce7b9e..573e9564 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-04-27  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * tmac/an.tmac (an*abbreviate-inner-footer): Clean up better
+       before early returns.  Remove temporary registers.
+
 2022-04-27  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * tmac/fallbacks.tmac: Add fallbacks for U+02C6 MODIFIER LETTER
diff --git a/tmac/an.tmac b/tmac/an.tmac
index 89a05d83..4afa1c3f 100644
--- a/tmac/an.tmac
+++ b/tmac/an.tmac
@@ -513,11 +513,20 @@
 .  nr an*half-cfoot-width (\w'\\*[an-extra1]' / 2u)
 .  nr an*half-footer-width \
      (\w'\\*[an*ifoot]' + \\n[an*half-cfoot-width])
-.  if (\\n[an*half-footer-width] < \\n[an*half-title-width]) .return
+.  if (\\n[an*half-footer-width] < \\n[an*half-title-width]) \{\
+.    rr an*half-footer-width
+.    rr an*half-cfoot-width
+.    rr an*half-title-width
+.    return
+.  \}
 .  an*scan-string-for-backslash \\*[an*ifoot]
 .  if \\n[an*string-contains-backslash] \{\
 .    an-warn not abbreviating fourth argument to 'TH' '\\*[an*ifoot]': \
 contains unsupported escape sequence
+.    rr an*string-contains-backslash
+.    rr an*half-footer-width
+.    rr an*half-cfoot-width
+.    rr an*half-title-width
 .    return
 .  \}
 .  ds an*saved-ifoot \\*[an*ifoot]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]