groff-commit
[Top][All Lists]
Advanced

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

[groff] 28/34: [sboxes]: Add more prerequisite checking.


From: G. Branden Robinson
Subject: [groff] 28/34: [sboxes]: Add more prerequisite checking.
Date: Sat, 16 Oct 2021 23:07:28 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit f1f0470136212658dedc7a3f84b8ffffdecd02a7
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sun Oct 17 10:29:53 2021 +1100

    [sboxes]: Add more prerequisite checking.
    
    * contrib/sboxes/sboxes.tmac: Add more prerequisite checking.  Check
      `GS` register for groff ms macros specifically.  Check installed
      version of groff since the gropdf in earlier versions won't implement
      the underlying feature.  Add new string to introduce diagnostic
      messages now that we have more than one (that we can emit without
      limp-along AT&T compatibility mode).
    
      (sboxes*error): Use new string in diagnostic message.
---
 contrib/sboxes/ChangeLog   | 10 ++++++++++
 contrib/sboxes/sboxes.tmac | 14 +++++++++++++-
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/contrib/sboxes/ChangeLog b/contrib/sboxes/ChangeLog
index d2bcd2c..3ecd282 100644
--- a/contrib/sboxes/ChangeLog
+++ b/contrib/sboxes/ChangeLog
@@ -1,5 +1,15 @@
 2021-10-17  G. Branden Robinson <g.branden.robinson@gmail.com>
 
+       * sboxes.tmac: Add more prerequisite checking.  Check `GS`
+       register for groff ms macros specifically.  Check installed
+       version of groff since the gropdf in earlier versions won't
+       implement the underlying feature.  Add new string to introduce
+       diagnostic messages now that we have more than one (that we can
+       emit without limp-along AT&T compatibility mode).
+       (sboxes*error): Use new string in diagnostic message.
+
+2021-10-17  G. Branden Robinson <g.branden.robinson@gmail.com>
+
        * sboxes.tmac (sboxes*error): Add new macro to produce
        diagnostic message in a standard format.
        (BoxStart): Use it.
diff --git a/contrib/sboxes/sboxes.tmac b/contrib/sboxes/sboxes.tmac
index 63e4c1e..3733720 100644
--- a/contrib/sboxes/sboxes.tmac
+++ b/contrib/sboxes/sboxes.tmac
@@ -26,13 +26,25 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>.
 .if \n(.C \
 .  ab groff sboxes macros do not work in compatibility mode; aborting
 .
+.\" Define a string for use in diagnostic messages.
+.ds sboxes*name sboxes.tmac\"
+.
+.if !r GS \
+.  ab \*[sboxes*name]: ms macros must be loaded first; aborting
+.
+.if (\n[.x]\n[.y] < 123) \{\
+.  ds sboxes*msg \*[sboxes*name]: groff 1.23 or later is required,\"
+.  as sboxes*msg " but found groff \n[.x].\n[.y]; aborting\"
+.  ab \*[sboxes*msg]
+.\}
+.
 .\" See if already loaded.
 .if r GSBOX .nx
 .nr GSBOX 1
 .nr bx@stack 0
 .
 .de sboxes*error
-.  tm sboxes.tmac:\\n[.F]:\\n[.c]: error: \\$*
+.  tm \*[sboxes*name]:\\n[.F]:\\n[.c]: error: \\$*
 ..
 .
 .de pdfbackground



reply via email to

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