[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 11/27: [build]: Tweak BuildFoundries diagnostic messages.
From: |
G. Branden Robinson |
Subject: |
[groff] 11/27: [build]: Tweak BuildFoundries diagnostic messages. |
Date: |
Tue, 3 May 2022 14:27:16 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 00f98ee5dde8eaff81ccd6714865cf9e306454af
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Mon May 2 10:23:14 2022 -0500
[build]: Tweak BuildFoundries diagnostic messages.
* font/devpdf/util/BuildFoundries.pl (LoadFoundry, WriteDownload,
CheckFoundry): Recast for specificity and consistent style.
(Die): Stop reporting line number with fatal errors; none of the call
sites are parsing input.
Also add a clarifying comment: BuildFoundries reads an existing download
file (for application outside the groff source tree?), but this is not a
prerequisite to its operation. (We'd have a circular dependency if it
were.)
---
ChangeLog | 10 ++++++++++
font/devpdf/util/BuildFoundries.pl | 10 +++++-----
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f381868e..a190d6e2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2022-05-02 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [build]: Tweak diagnostic messages in BuildFoundries script.
+
+ * font/devpdf/util/BuildFoundries.pl (LoadFoundry,
+ WriteDownload, CheckFoundry): Recast for specificity and
+ consistent style.
+ (Die): Stop reporting line number with fatal errors; none of the
+ call sites are parsing input.
+
2022-05-02 G. Branden Robinson <g.branden.robinson@gmail.com>
[refer]: Fix off-by-one error in line number for some
diff --git a/font/devpdf/util/BuildFoundries.pl
b/font/devpdf/util/BuildFoundries.pl
index 3a01d401..7ddec1d2 100644
--- a/font/devpdf/util/BuildFoundries.pl
+++ b/font/devpdf/util/BuildFoundries.pl
@@ -47,7 +47,7 @@ if ($check)
}
else
{
- LoadDownload("download");
+ LoadDownload("download"); # not required
LoadFoundry("Foundry");
WriteDownload("download");
}
@@ -61,7 +61,7 @@ sub LoadFoundry
my $foundrypath='';
$notFoundFont=0;
- open(F,"<$fn") or Die("No $fn file found");
+ open(F,"<$fn") or Die("file '$fn' not found or not readable");
while (<F>)
{
@@ -442,7 +442,7 @@ sub WriteDownload
my $fn=shift;
my $top=1;
- open(F,">$fn") or Die("Can't Create new file '$fn'");
+ open(F,">$fn") or Die("can't create new file '$fn'");
print F join("\n",@downloadpreamble),"\n";
@@ -468,7 +468,7 @@ sub Warn {
sub Die {
my $msg=shift;
- Msg("error: line $lct: $msg");
+ Msg("error: $msg");
exit 2;
}
@@ -483,7 +483,7 @@ sub CheckFoundry
my $foundrypath='';
$notFoundFont=0;
- open(F,"<$fn") or Die("No $fn file found");
+ open(F,"<$fn") or Die("file '$fn' not found or not readable");
while (<F>)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 11/27: [build]: Tweak BuildFoundries diagnostic messages.,
G. Branden Robinson <=