summaryrefslogtreecommitdiff
path: root/font
diff options
context:
space:
mode:
authorG. Branden Robinson <g.branden.robinson@gmail.com>2022-06-03 03:02:52 -0500
committerG. Branden Robinson <g.branden.robinson@gmail.com>2022-06-03 04:01:12 -0500
commitafa7128d7b939ca5c8cd082f2547f42e4e563674 (patch)
tree8eff6e940f6971e7ec94778f028f5fd906b57a78 /font
parent5c667fd5e79e26b7e8fc74b2d9a6e3238e1ef9e1 (diff)
downloadgroff-git-afa7128d7b939ca5c8cd082f2547f42e4e563674.tar.gz
[font/devpdf]: Revise path component separation.
* font/devpdf/devpdf.am (font/devpdf/util/BuildFoundries): Generate script using the `PATH_SEPARATOR` Automake macro. * font/devpdf/util/BuildFoundries.pl: Add `pathsep` scalar to house the build-time path separator. (LocateFile): Use it. (LoadFoundry, CheckFoundry): Stop using spaces as part of the path separation delimiter. It is not idiomatic. Also add editor aid comment and correct inconsistent indentation.
Diffstat (limited to 'font')
-rw-r--r--font/devpdf/devpdf.am1
-rw-r--r--font/devpdf/util/BuildFoundries.pl26
2 files changed, 18 insertions, 9 deletions
diff --git a/font/devpdf/devpdf.am b/font/devpdf/devpdf.am
index 91a384266..fbc656fc5 100644
--- a/font/devpdf/devpdf.am
+++ b/font/devpdf/devpdf.am
@@ -74,6 +74,7 @@ font/devpdf/util/BuildFoundries: \
sed -f $(SH_DEPS_SED_SCRIPT) \
-e "s|/usr/bin/perl|$(PERL)|" \
-e "s|[@]GROFF_GHOSTSCRIPT_INTERPRETERS[@]|$(GHOSTSCRIPT)|" \
+ -e "s|[@]PATH_SEPARATOR[@]|$(PATH_SEPARATOR)|" \
-e "s|[@]VERSION[@]|$(VERSION)|" \
-e "s|[@]GROFF_FONT_DIR[@]|$(fontdir)|" \
$(devpdf_srcdir)/util/BuildFoundries.pl \
diff --git a/font/devpdf/util/BuildFoundries.pl b/font/devpdf/util/BuildFoundries.pl
index d1df440bb..33ec7add8 100644
--- a/font/devpdf/util/BuildFoundries.pl
+++ b/font/devpdf/util/BuildFoundries.pl
@@ -24,6 +24,8 @@
use strict;
use Getopt::Long;
+my $pathsep='@PATH_SEPARATOR@';
+
my $check=0;
my $dirURW='';
@@ -85,10 +87,10 @@ sub LoadFoundry
{
Warn("\nThe path(s) used for searching:\n$foundrypath\n") if $notFoundFont;
$foundry=uc($r[1]);
- $foundrypath='';
- $foundrypath.="$dirURW : " if $dirURW;
- $foundrypath.=$r[2].' : '.$devps;
- $foundrypath=~s/\(gs\)/$GSpath /;
+ $foundrypath='';
+ $foundrypath.="$dirURW:" if $dirURW;
+ $foundrypath.=$r[2].':'.$devps;
+ $foundrypath=~s/\(gs\)/$GSpath/;
$notFoundFont=0;
}
else
@@ -275,7 +277,7 @@ sub LocateFile
return($res);
}
- my (@paths)=split(/ (:|;)/,$path);
+ my (@paths)=split(/$pathsep/,$path);
foreach my $p (@paths)
{
@@ -493,10 +495,10 @@ sub CheckFoundry
if (lc($r[0]) eq 'foundry')
{
$foundry=uc($r[1]);
- $foundrypath='';
- $foundrypath.="$dirURW : " if $dirURW;
- $foundrypath.=$r[2].' : '.$devps;
- $foundrypath=~s/\(gs\)/$GSpath /;
+ $foundrypath='';
+ $foundrypath.="$dirURW:" if $dirURW;
+ $foundrypath.=$r[2].':'.$devps;
+ $foundrypath=~s/\(gs\)/$GSpath/;
}
else
{
@@ -536,3 +538,9 @@ sub CheckFoundry
close(F);
}
+
+# Local Variables:
+# fill-column: 72
+# mode: CPerl
+# End:
+# vim: set cindent noexpandtab shiftwidth=4 softtabstop=4 textwidth=72: