wip update
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 8 Jan 2012 19:11:41 +0000 (19:11 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 8 Jan 2012 19:11:41 +0000 (19:11 +0000)
update-xfonts-traditional

index 6063259..e8ed7ab 100755 (executable)
@@ -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 $!";