chiark / gitweb /
update-xfonts-traditional: Break out filter_st_isok (no functional change)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 1 May 2016 10:59:57 +0000 (11:59 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 1 May 2016 11:41:29 +0000 (12:41 +0100)
update-xfonts-traditional

index 51ab164d4d942dbb3c2fe2c405659ae1e520e8e4..a2e81e0e3fa5ebaca61a606c68eec8f723f4a7d2 100755 (executable)
@@ -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}".