chiark / gitweb /
update-xfonts-traditional: Rename log file handle variables to $logfh
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 1 May 2016 11:26:23 +0000 (12:26 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 1 May 2016 11:41:29 +0000 (12:41 +0100)
In some places $logfile was used - but that's also a global for the
leafname of the logfile.  In some places $log was used, which is
somewhat ambiguous.

No functional change.

update-xfonts-traditional

index a2e81e0e3fa5ebaca61a606c68eec8f723f4a7d2..f0961774867f4747653f865eca0e2b24cd3aaac0 100755 (executable)
@@ -55,7 +55,7 @@ sub loadrules ($) {
 }
 
 sub processbdf ($$$$) {
 }
 
 sub processbdf ($$$$) {
-    my ($inbdf,$outbdf,$logfile,$what) = @_;
+    my ($inbdf,$outbdf,$logfh,$what) = @_;
     my $state='idle';
     my ($foundry,$font);
     my ($w,$h,$xo,$yo,$y,$bitmap,$glyph);
     my $state='idle';
     my ($foundry,$font);
     my ($w,$h,$xo,$yo,$y,$bitmap,$glyph);
@@ -131,10 +131,10 @@ sub processbdf ($$$$) {
     return 'no bdf data' # also special cased in processpcfgz
        if !$anyinput;
     if ($modified) {
     return 'no bdf data' # also special cased in processpcfgz
        if !$anyinput;
     if ($modified) {
-       printf $logfile "%s: %d glyphs changed\n", $what, $modified
+       printf $logfh "%s: %d glyphs changed\n", $what, $modified
            or die $!;
     } else {
            or die $!;
     } else {
-       printf $logfile "%s: unchanged - no rules matched\n", $what
+       printf $logfh "%s: unchanged - no rules matched\n", $what
            or die $!;
     }
     return $modified;
            or die $!;
     }
     return $modified;
@@ -178,7 +178,7 @@ sub filter_st_isok ($) {
 }
 
 sub processpcfgz ($$$$) {
 }
 
 sub processpcfgz ($$$$) {
-    my ($inpcfgz,$outpcfgz,$logfile,$what) = @_;
+    my ($inpcfgz,$outpcfgz,$logfh,$what) = @_;
     print $reportfh "processing $inpcfgz to $outpcfgz\n" if $verbose>=2;
     my $current = new IO::File $inpcfgz, '<' or die "$inpcfgz $!";
     my ($usread,$uswrite);
     print $reportfh "processing $inpcfgz to $outpcfgz\n" if $verbose>=2;
     my $current = new IO::File $inpcfgz, '<' or die "$inpcfgz $!";
     my ($usread,$uswrite);
@@ -227,7 +227,7 @@ sub processpcfgz ($$$$) {
            $current = $reader;
        }
     }
            $current = $reader;
        }
     }
-    my $r = processbdf($usread,$uswrite,$logfile,$what);
+    my $r = processbdf($usread,$uswrite,$logfh,$what);
     my $none = $r !~ m/^\d/;
 
     $ch{'gunzip'}{SigOK}{13} = 1;
     my $none = $r !~ m/^\d/;
 
     $ch{'gunzip'}{SigOK}{13} = 1;
@@ -312,7 +312,7 @@ sub processfontdir ($) {
 
     my $logpath = "$fontdir/$logfile";
     unlink "$logpath" or $!==&ENOENT or die "$logpath $!";
 
     my $logpath = "$fontdir/$logfile";
     unlink "$logpath" or $!==&ENOENT or die "$logpath $!";
-    my $log = new IO::File $logpath, ">>" or die "$logpath $!";
+    my $logfh = new IO::File $logpath, ">>" or die "$logpath $!";
 
     if (!$wanted_parallel) {
        $wanted_parallel = Sys::CPU::cpu_count();
 
     if (!$wanted_parallel) {
        $wanted_parallel = Sys::CPU::cpu_count();
@@ -379,10 +379,10 @@ sub processfontdir ($) {
        if (!$child) {
            my $r = processpcfgz("$fontdir/$dent",
                                 "$fontdir/$outdent.new",
        if (!$child) {
            my $r = processpcfgz("$fontdir/$dent",
                                 "$fontdir/$outdent.new",
-                                $log, $dent);
+                                $logfh, $dent);
            my $rc;
            if ($r !~ m/^\d/) {
            my $rc;
            if ($r !~ m/^\d/) {
-               printf $log "%s: unchanged - %s\n", $dent, $r;
+               printf $logfh "%s: unchanged - %s\n", $dent, $r;
                unlink "$fontdir/$outdent.new" or die "$fontdir $outdent $!";
                $rc = 2;
            } else {
                unlink "$fontdir/$outdent.new" or die "$fontdir $outdent $!";
                $rc = 2;
            } else {
@@ -390,7 +390,7 @@ sub processfontdir ($) {
                    or die "$fontdir $outdent $!";
                $rc = 0;
            }
                    or die "$fontdir $outdent $!";
                $rc = 0;
            }
-           $log->flush or die "$logpath $!";
+           $logfh->flush or die "$logpath $!";
            exit $rc;
        }
        $inprogress{$child} = {
            exit $rc;
        }
        $inprogress{$child} = {