groff-commit
[Top][All Lists]
Advanced

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

[groff] 22/35: [afmtodit]: Clarify diagnostic message.


From: G. Branden Robinson
Subject: [groff] 22/35: [afmtodit]: Clarify diagnostic message.
Date: Fri, 15 Jul 2022 23:11:59 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 26384a9f84aaccc8a156f0f6b3ca517591062013
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sun Jul 10 04:32:48 2022 -0500

    [afmtodit]: Clarify diagnostic message.
    
    * src/utils/afmtodit/afmtodit.pl: When we have excess Adobe Glyph List
      mappings for a groff special character identifier (making the reverse
      mapping from groff special character to font glyph name ambiguous),
      report that we're ignoring the excess.  Use "print STDERR" instead of
      Perl "warn" built-in since we want diagnostic messages to start with
      the name of the program emitting them.
---
 ChangeLog                      | 12 ++++++++++++
 src/utils/afmtodit/afmtodit.pl |  6 ++++--
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ab484ffd..c49cb05c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2022-07-10  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       [afmtodit]: Clarify diagnostic message.
+
+       * src/utils/afmtodit/afmtodit.pl: When we have excess Adobe
+       Glyph List mappings for a groff special character identifier
+       {making the reverse mapping from groff special character to font
+       glyph name ambiguous}, report that we're ignoring the excess.
+       Use "print STDERR" instead of Perl "warn" built-in since we want
+       diagnostic messages to start with the name of the program
+       emitting them.
+
 2022-07-10  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        [build]: Name and place PS->groff glyph name maps consistently.
diff --git a/src/utils/afmtodit/afmtodit.pl b/src/utils/afmtodit/afmtodit.pl
index c7f8a441..79b2b934 100644
--- a/src/utils/afmtodit/afmtodit.pl
+++ b/src/utils/afmtodit/afmtodit.pl
@@ -282,8 +282,10 @@ if (!$opt_x) {
        if ($nmap{$ch}) {
            for (my $j = 0; $j < $nmap{$ch}; $j++) {
                if (defined $mapped{$map{$ch, $j}}) {
-                   warn "$prog: both $mapped{$map{$ch, $j}} and $ch " .
-                        "map to $map{$ch, $j}";
+                   print STDERR "$prog: AGL name"
+                        . " '$mapped{$map{$ch, $j}}' already mapped to"
+                        . " groff name '$map{$ch, $j}'; ignoring AGL"
+                        . " name '$ch'\n";
                }
                else {
                    $mapped{$map{$ch, $j}} = $ch;



reply via email to

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