gbranden pushed a commit to branch master in repository groff. commit 2b52c44830d17dbe2eaec9925fcaae58b94e0a4a Author: G. Branden Robinson <g.branden.robin...@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.robin...@gmail.com> + + * mmroff.pl: Trivially refactor. Rename scalars. + - `check_macro` -> `first_pass` + - `run_macro` -> `second_pass` + 2023-04-01 G. Branden Robinson <g.branden.robin...@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) = @_; _______________________________________________ Groff-commit mailing list Groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit