gbranden pushed a commit to branch master
in repository groff.
commit 548aab8c8e131b826623b117943bebb39c808144
Author: G. Branden Robinson <[email protected]>
AuthorDate: Tue Jul 29 07:21:00 2025 -0500
[mm]: Fix code style nit in `mmroff`.
* contrib/mm/mmroff.pl: Rename scalar `no_exec` to
`want_only_xref_update` for clarity. Manipulate it like a Boolean,
not a counter.
---
contrib/mm/ChangeLog | 5 +++++
contrib/mm/mmroff.pl | 8 ++++----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index 9cad96643..8a2698601 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,8 @@
+2025-07-29 G. Branden Robinson <[email protected]>
+
+ * mmroff.pl: Rename scalar `no_exec` to `want_only_xref_update`
+ for clarity. Manipulate it like a Boolean, not a counter.
+
2025-07-29 G. Branden Robinson <[email protected]>
* mmroff.pl: Better parallelize usage message with man page.
diff --git a/contrib/mm/mmroff.pl b/contrib/mm/mmroff.pl
index 3f150938f..e0cbb6d6c 100644
--- a/contrib/mm/mmroff.pl
+++ b/contrib/mm/mmroff.pl
@@ -1,5 +1,5 @@
#!@PERL@
-# Copyright (C) 1989-2023 Free Software Foundation, Inc.
+# Copyright (C) 1989-2025 Free Software Foundation, Inc.
#
# This file is part of groff.
#
@@ -29,7 +29,7 @@ use Config;
# I do agree however that the previous way opened a whole bunch
# of security holes.
-my $no_exec;
+my $want_only_xref_update = 0;
if (grep(/^--help$/, @ARGV)) {
print <<EOF;
@@ -54,7 +54,7 @@ if (grep(/^--version$/, @ARGV)) {
# check for -x and remove it
if (grep(/^-x$/, @ARGV)) {
- $no_exec++;
+ $want_only_xref_update = 1;
@ARGV = grep(!/^-x$/, @ARGV);
}
@@ -148,7 +148,7 @@ if ($rfilename) {
close(OUT);
}
-exit 0 if $no_exec;
+exit 0 if $want_only_xref_update;
exit system($second_pass);
sub print_index {
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit