gbranden pushed a commit to branch master
in repository groff.

commit 7c277092082d396dd24e7ad9173ff50f85550adc
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Oct 16 10:27:07 2026 -0500

    contrib/mm/mmroff.pl: Clarify error diagnostics.
    
    * contrib/mm/mmroff.pl: When dying on the "first pass", inform the user
      that we were attempting to run a pipeline.  Tweak wording; favor
      "cannot" over "unable to".
---
 contrib/mm/ChangeLog | 6 ++++++
 contrib/mm/mmroff.pl | 7 ++++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index bd25c0d40..00609b0ba 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,9 @@
+2026-10-16  G. Branden Robinson <[email protected]>
+
+       * mmroff.pl: Clarify error diagnostics.  When dying on the
+       "first pass", inform the user that we were attempting to run a
+       pipeline.  Tweak wording; favor "cannot" over "unable to".
+
 2026-09-22  G. Branden Robinson <[email protected]>
 
        Fix Savannah #68689.
diff --git a/contrib/mm/mmroff.pl b/contrib/mm/mmroff.pl
index faf739efc..e202b90b9 100644
--- a/contrib/mm/mmroff.pl
+++ b/contrib/mm/mmroff.pl
@@ -94,7 +94,8 @@ my $second_pass = "$groff -mm @ARGV";
 my (%cur, $rfilename, $imacro, @out, @indi);
 my $max_height = 0;
 my $max_width = 0;
-open(MACRO, "$first_pass 2>&1 |") || Die("run $first_pass: $!");
+open(MACRO, "$first_pass 2>&1 |")
+       || Die("cannot run pipeline \"$first_pass\": $!");
 while(<MACRO>) {
        if (m#^\.\\" Rfilename: (\S+)#) {
                # remove all directories just to be more secure
@@ -151,7 +152,7 @@ if ($rfilename) {
        push(@out, ".nr pict*max-width $max_width\n") if defined $max_width;
 
        open(OUT, ">$rfilename")
-               or Die("unable to create $rfilename:$!");
+               or Die("cannot create file \"$rfilename\": $!");
        print OUT '.\" references', "\n";
        my $i;
        for $i (@out) {
@@ -166,7 +167,7 @@ exit system($second_pass);
 sub print_index {
        my ($f, $ind, $macro) = @_;
 
-       open(OUT, ">$f") or Die("unable to create $f:$!");
+       open(OUT, ">$f") or Die("cannot create file \"$f\": $!");
        my $i;
        for $i (sort @$ind) {
                if ($macro) {

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to