diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-05-01 11:59:57 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-05-01 12:41:29 +0100 |
commit | 0c09768ac8cbf1b78d9672c336dc4c1d2ab49339 (patch) | |
tree | 8242b38c11880561402b00eccadda984273785e7 /update-xfonts-traditional | |
parent | 45e18a620e048522c5a90d52b538799b9c66197d (diff) |
update-xfonts-traditional: Break out filter_st_isok (no functional change)
Diffstat (limited to 'update-xfonts-traditional')
-rwxr-xr-x | update-xfonts-traditional | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/update-xfonts-traditional b/update-xfonts-traditional index 51ab164..a2e81e0 100755 --- a/update-xfonts-traditional +++ b/update-xfonts-traditional @@ -171,6 +171,12 @@ sub loadfoundries () { die "no foundry maps\n" unless %foundrymap; } +sub filter_st_isok ($) { + my ($ch) = @_; + my $st = $ch->{St}; + return !$st || $ch->{SigOK}{($st & ~128)}; +} + sub processpcfgz ($$$$) { my ($inpcfgz,$outpcfgz,$logfile,$what) = @_; print $reportfh "processing $inpcfgz to $outpcfgz\n" if $verbose>=2; @@ -255,15 +261,9 @@ sub processpcfgz ($$$$) { $ch->{St} = $?; } - my $st_isok = sub { - my ($ch) = @_; - my $st = $ch->{St}; - return !$st || $ch->{SigOK}{($st & ~128)}; - }; - if ($tolerate_bad_fonts && $r eq 'no bdf data' && - $st_isok->($ch{'gunzip'}) && + filter_st_isok($ch{'gunzip'}) && ($ch{'pcf2bdf'}{St} & ~128) == 6) { $r = "pcf2bdf failed ($ch{'pcf2bdf'}{St})"; @@ -271,7 +271,7 @@ sub processpcfgz ($$$$) { $ch{'pcf2bdf'}{SigOK}{6} = 1; } foreach my $ch (@children) { - if (!$st_isok->($ch)) { + if (!filter_st_isok($ch)) { die "update-xfonts-traditional:". " $ch->{Exe} [$ch->{Pid}] for $inpcfgz". " failed $ch->{St}". |