summaryrefslogtreecommitdiff
path: root/update-xfonts-traditional
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2012-01-08 19:11:41 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2012-01-08 19:11:41 +0000
commit30c6d632b398f014cfaeb07dde5e4f7fcee17127 (patch)
tree21b9e82a983b58dff2058a3450e623ec452a8704 /update-xfonts-traditional
parenta94959e6226a210101a74f7a0e9d3c488f70dccf (diff)
wip update
Diffstat (limited to 'update-xfonts-traditional')
-rwxr-xr-xupdate-xfonts-traditional21
1 files changed, 17 insertions, 4 deletions
diff --git a/update-xfonts-traditional b/update-xfonts-traditional
index 6063259..e8ed7ab 100755
--- a/update-xfonts-traditional
+++ b/update-xfonts-traditional
@@ -153,6 +153,17 @@ sub loadfoundries () {
die "no foundry maps\n" unless %foundrymap;
}
+sub processpcfgz ($$) {
+ my ($inpcfgz,$outpcfgz) = @_;
+ my $inh = new IO::File $inpcfgz, 'r', or die "$inpcfgz $!";
+ my $outh = new IO::File $outpcfgz, 'w' or die "$outpcfgz $!";
+ my $inpipe = new IO:Handle or die $!;
+ my $outpipe = new IO:Handle or die $!;
+ my $inchild = open $inpipe, "-|"; defined $inchild or die $!;
+ if (!$inchild) {
+
+ opne
+
sub processfontdir ($) {
my ($fontdir) = @_;
if (!opendir FD, $fontdir) {
@@ -160,9 +171,9 @@ sub processfontdir ($) {
return;
}
my $olddone = do "$fontdir/$donefile";
- if (!$done) {
+ if (!$olddone) {
die "$fontdir $! $@ " unless $!==&ENOENT;
- $done = { };
+ $olddone = { };
}
my $newdone = { };
my $log = new IO::File "$fontdir/$logfile", "w"
@@ -185,7 +196,7 @@ sub processfontdir ($) {
}
die "$fontdir $dent" unless -f _;
my $stats = join ' ', ((stat _)[1,7,9,10]);
- $tdone = $olddone->{$dent};
+ my $tdone = $olddone->{$dent};
if (defined $tdone && $tdone eq $stats) {
$found{$dent} = 2;
$newdone->{$dent} = $stats;
@@ -193,7 +204,9 @@ sub processfontdir ($) {
}
my $outdent = $fontprefix.$dent;
- my $r = processpcfgz("$fontdir/$dent","$fontdir/$outdent.new");
+ my $r = processpcfgz("$fontdir/$dent",
+ "$fontdir/$outdent.new",
+ $dent");
if ($r !~ m/^\d/) {
print $logfile "%s: unchanged - %s\n", $dent, $r;
unlink "$fontdir/$outdent.new" or die "$fontdir $outdent $!";