gbranden pushed a commit to branch master
in repository groff.
commit 179e896e1f8f0de675d5943f6b0ed105efb0f654
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Aug 21 08:02:25 2024 -0500
src/utils/afmtodit/afmtodit.pl: Refactor (1/4).
* src/utils/afmtodit/afmtodit.pl: Define `prog` scalar as only the
"basename" of argv[0], making diagnostic and usage messages less
garrulous; see Savannah #65110.
---
ChangeLog | 6 ++++++
src/utils/afmtodit/afmtodit.pl | 4 +++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 44b97ebb3..5613845af 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-08-21 G. Branden Robinson <[email protected]>
+
+ * src/utils/afmtodit/afmtodit.pl: Define `prog` scalar as only
+ the "basename" of argv[0], making diagnostic and usage messages
+ less garrulous; see Savannah #65110.
+
2024-08-21 G. Branden Robinson <[email protected]>
* src/roff/troff/env.cpp (environment::add_char): Declare local
diff --git a/src/utils/afmtodit/afmtodit.pl b/src/utils/afmtodit/afmtodit.pl
index d85defd6f..4088a7933 100644
--- a/src/utils/afmtodit/afmtodit.pl
+++ b/src/utils/afmtodit/afmtodit.pl
@@ -22,7 +22,9 @@ use strict;
@afmtodit.tables@
-my $prog = $0;
+use File::Spec qw(splitpath);
+(undef,undef,my $prog)=File::Spec->splitpath($0);
+
my $groff_sys_fontdir = "@FONTDIR@";
my $want_help;
my $space_width = 0;
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit