groff-commit
[Top][All Lists]
Advanced

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

[groff] 30/35: [sboxes]: Follow groff ms(7) naming convention.


From: G. Branden Robinson
Subject: [groff] 30/35: [sboxes]: Follow groff ms(7) naming convention.
Date: Mon, 25 Oct 2021 03:32:42 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 9c6538e2ae8c1badf8c8083793c5dac603e7decc
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sun Oct 24 18:58:21 2021 +1100

    [sboxes]: Follow groff ms(7) naming convention.
    
    * contrib/sboxes/sboxes.tmac: Rename existing macros to use the groff
      ms(7) naming convention.  None of the macros in this "module" seem
      meant to be visible to other modules, so suffix the module name with
      '*' instead of '@'.
    
    Also indent macro definitions and appendments more consistently, and
    wrap a long line.
---
 contrib/sboxes/ChangeLog   |  4 +++
 contrib/sboxes/sboxes.tmac | 72 ++++++++++++++++++++++++----------------------
 2 files changed, 41 insertions(+), 35 deletions(-)

diff --git a/contrib/sboxes/ChangeLog b/contrib/sboxes/ChangeLog
index da7b952..7710769 100644
--- a/contrib/sboxes/ChangeLog
+++ b/contrib/sboxes/ChangeLog
@@ -2,6 +2,10 @@
 
        * sboxes.tmac: Rename strings and macro I introduced so that
          they fit Deri's selection within the name space (prefix "bx").
+         Rename existing macros to use the groff ms(7) naming
+         convention.  None of the macros in this "module" seem meant to
+         be visible to other modules, so suffix the module name with
+         '*' instead of '@'.
 
 2021-10-24  G. Branden Robinson <g.branden.robinson@gmail.com>
 
diff --git a/contrib/sboxes/sboxes.tmac b/contrib/sboxes/sboxes.tmac
index 6bfa945..0e6db3d 100644
--- a/contrib/sboxes/sboxes.tmac
+++ b/contrib/sboxes/sboxes.tmac
@@ -46,7 +46,7 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>.
 .if '\*[.T]'pdf' \
 .  nr GSBOX 1
 .
-.nr bx@stack 0
+.nr bx*stack 0
 .
 .de bx*error
 .  tm \*[bx*name]:\\n[.F]:\\n[.c]: error: \\$*
@@ -60,45 +60,45 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>.
 .
 .\" Link into ms macros to trap footnote growth
 .am fn@print-sep
-.nr bx@pb \\n[nl]u-2p
-.nop \!x X pdf: background footnote \\n[bx@pb]z
-.rr bx@pb
+.  nr bx*pb \\n[nl]u-2p
+.  nop \!x X pdf: background footnote \\n[bx*pb]z
+.  rr bx*pb
 ..
 .\" Has PD been actioned?
 .am par*start
-.nr bx@PD \\n[PD]
+.  nr bx*PD \\n[PD]
 ..
 .
 .de BOXSTART
 .  fl
-.  nr bx@stack \\n[bx@stack]+1u
-.  nr bx@shad 0
-.  nr bx@outl 0
-.  nr bx@ind 1P
-.  ds bx@wt 0
-.  ds bx@type "\"
+.  nr bx*stack \\n[bx*stack]+1u
+.  nr bx*shad 0
+.  nr bx*outl 0
+.  nr bx*ind 1P
+.  ds bx*wt 0
+.  ds bx*type "\"
 .  while \\n[.$] \{\
 .    ie 'SHADED'\\$1' \{\
 .       nop \\M[\\$2]\c
-.       nr bx@shad 1
-.       as bx@type "fill\"
+.       nr bx*shad 1
+.       as bx*type "fill\"
 .       shift 2
 .    \}
 .    el \{\
 .     ie 'OUTLINED'\\$1' \{\
 .       nop \\m[\\$2]\c
-.       nr bx@outl 1
-.       as bx@type "box\"
+.       nr bx*outl 1
+.       as bx*type "box\"
 .       shift 2
 .     \}
 .     el \{\
 .       ie 'WEIGHT'\\$1' \{\
-.         ds bx@wt \\$2
+.         ds bx*wt \\$2
 .         shift 2
 .       \}
 .       el \{\
 .         ie 'INDENT'\\$1' \{\
-.           nr bx@ind \\$2
+.           nr bx*ind \\$2
 .           shift 2
 .         \}
 .         el \{\
@@ -110,28 +110,30 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>.
 .    \}
 .  \}
 .
-.  if '\\*[bx@type]'' .ds bx@type "fill"
-.  nr bx@l \\n[\\n[.ev]:li]s+\\n[.o]s-\\n[bx@ind]u
-.  nr bx@r \\n[bx@l]u+\\n[.l]-\\n[\\n[.ev]:li]+(\\n[bx@ind]u*2u)
-.  nr bx@gap \\n[.v]-\\n[.ps]+\\*[bx@wt]
-.  nr bx@bot \\n[.p]u-\\n[FM]u+\\n[bx@ind]u+\\n[.ps]u
-.  nr bx@top \\n[HM]-\\n[bx@ind]u+\\n[bx@gap]u
-.  ne \\n[bx@ind]u+2v+\\*[bx@wt]
-.  sp -(2v-(\\n[bx@PD]u*2u))u
-.  pdfbackground \\*[bx@type] \\n[bx@l]z \\n[bx@top]z \\n[bx@r]z \\n[bx@bot]z 
\\*[bx@wt] \\n[nl]z
-.  sp (\\n[bx@ind]u-1v)u
-.  if (\\n[bx@shad]=1) .nop \\M[]\c
-.  if (\\n[bx@outl]=1) .nop \\m[]\c
-.  ds bx@ind\\n[bx@stack] \\n[bx@ind]
-.  rr bx@shad bx@outl bx@ind bx@bot bx@top bx@l bx@r
+.  if '\\*[bx*type]'' .ds bx*type "fill"
+.  nr bx*l \\n[\\n[.ev]:li]s+\\n[.o]s-\\n[bx*ind]u
+.  nr bx*r \\n[bx*l]u+\\n[.l]-\\n[\\n[.ev]:li]+(\\n[bx*ind]u*2u)
+.  nr bx*gap \\n[.v]-\\n[.ps]+\\*[bx*wt]
+.  nr bx*bot \\n[.p]u-\\n[FM]u+\\n[bx*ind]u+\\n[.ps]u
+.  nr bx*top \\n[HM]-\\n[bx*ind]u+\\n[bx*gap]u
+.  ne \\n[bx*ind]u+2v+\\*[bx*wt]
+.  sp -(2v-(\\n[bx*PD]u*2u))u
+.  pdfbackground \\*[bx*type] \\n[bx*l]z \\n[bx*top]z \
+                              \\n[bx*r]z \\n[bx*bot]z \
+                              \\*[bx*wt] \\n[nl]z
+.  sp (\\n[bx*ind]u-1v)u
+.  if (\\n[bx*shad]=1) .nop \\M[]\c
+.  if (\\n[bx*outl]=1) .nop \\m[]\c
+.  ds bx*ind\\n[bx*stack] \\n[bx*ind]
+.  rr bx*shad bx*outl bx*ind bx*bot bx*top bx*l bx*r
 .  rm wt type
-.  sp -(\\n[bx@gap]u)
-.  nr bx@PD 0
+.  sp -(\\n[bx*gap]u)
+.  nr bx*PD 0
 ..
 .de BOXSTOP
-.  sp \\*[bx@ind\\n[bx@stack]]u-\\n[.psr]u
+.  sp \\*[bx*ind\\n[bx*stack]]u-\\n[.psr]u
 .  pdfbackground off
-.  nr bx@stack \\n[bx@stack]-1u
+.  nr bx*stack \\n[bx*stack]-1u
 ..
 .\" Local Variables:
 .\" mode: nroff



reply via email to

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