groff-commit
[Top][All Lists]
Advanced

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

[groff] 32/126: contrib/mm/mmroff.pl: Trivially refactor.


From: G. Branden Robinson
Subject: [groff] 32/126: contrib/mm/mmroff.pl: Trivially refactor.
Date: Wed, 5 Jul 2023 17:02:48 -0400 (EDT)

gbranden pushed a commit to branch branden-2023-07-05
in repository groff.

commit 0373638230563809561aeb5d2b23e558719a4842
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Tue Jul 4 11:31:13 2023 -0500

    contrib/mm/mmroff.pl: Trivially refactor.
    
    * contrib/mm/mmroff.pl: Trivially refactor.  Rename scalars.
      - `check_macro` -> `first_pass`
      - `run_macro` -> `second_pass`
---
 contrib/mm/ChangeLog |  6 ++++++
 contrib/mm/mmroff.pl | 12 ++++++------
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index ff3e8504b..db91d6063 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,9 @@
+2023-07-04  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * mmroff.pl: Trivially refactor.  Rename scalars.
+       - `check_macro` -> `first_pass`
+       - `run_macro` -> `second_pass`
+
 2023-04-01  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * mmroff.pl: Document `--help` and `--version` options in usage
diff --git a/contrib/mm/mmroff.pl b/contrib/mm/mmroff.pl
index 9481e8329..3cdf8fd87 100644
--- a/contrib/mm/mmroff.pl
+++ b/contrib/mm/mmroff.pl
@@ -8,8 +8,8 @@
 # Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
 #
-# groff is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 # for more details.
 #
@@ -49,11 +49,11 @@ if (grep(/^-x$/, @ARGV)) {
 
 # mmroff should always have -mm, but not twice
 @ARGV = grep(!/^-mm$/, @ARGV);
-my $check_macro = "groff -rRef=1 -z -mm @ARGV";
-my $run_macro = "groff -mm @ARGV";
+my $first_pass = "groff -rRef=1 -z -mm @ARGV";
+my $second_pass = "groff -mm @ARGV";
 
 my (%cur, $rfilename, $max_height, $imacro, $max_width, @out, @indi);
-open(MACRO, "$check_macro 2>&1 |") || die "run $check_macro:$!";
+open(MACRO, "$first_pass 2>&1 |") || die "run $first_pass:$!";
 while(<MACRO>) {
        if (m#^\.\\" Rfilename: (\S+)#) {
                # remove all directories just to be more secure
@@ -120,7 +120,7 @@ if ($rfilename) {
 }
 
 exit 0 if $no_exec;
-exit system($run_macro);
+exit system($second_pass);
 
 sub print_index {
        my ($f, $ind, $macro) = @_;



reply via email to

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