From: Ian Jackson Date: Sun, 1 May 2016 11:26:23 +0000 (+0100) Subject: update-xfonts-traditional: Rename log file handle variables to $logfh X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=xfonts-traditional.git;a=commitdiff_plain;h=2b5b1a7d495b3415f5f6694da6ac7139d13bced3 update-xfonts-traditional: Rename log file handle variables to $logfh 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. --- diff --git a/update-xfonts-traditional b/update-xfonts-traditional index a2e81e0..f096177 100755 --- a/update-xfonts-traditional +++ b/update-xfonts-traditional @@ -55,7 +55,7 @@ sub loadrules ($) { } 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); @@ -131,10 +131,10 @@ sub processbdf ($$$$) { 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 { - printf $logfile "%s: unchanged - no rules matched\n", $what + printf $logfh "%s: unchanged - no rules matched\n", $what or die $!; } return $modified; @@ -178,7 +178,7 @@ sub filter_st_isok ($) { } 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); @@ -227,7 +227,7 @@ sub processpcfgz ($$$$) { $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; @@ -312,7 +312,7 @@ sub processfontdir ($) { 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(); @@ -379,10 +379,10 @@ sub processfontdir ($) { if (!$child) { my $r = processpcfgz("$fontdir/$dent", "$fontdir/$outdent.new", - $log, $dent); + $logfh, $dent); 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 { @@ -390,7 +390,7 @@ sub processfontdir ($) { or die "$fontdir $outdent $!"; $rc = 0; } - $log->flush or die "$logpath $!"; + $logfh->flush or die "$logpath $!"; exit $rc; } $inprogress{$child} = {