Work on writing tree files

This commit is contained in:
Leeland Heins 2019-03-07 08:59:16 -06:00 committed by GitHub
parent e7fd625bd5
commit 0c133140b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1708,9 +1708,11 @@ sub write_file {
$file_storage_type = 0x30; $file_storage_type = 0x30;
# Create the master index block. # Create the master index block.
##FIXME my @master_index = ();
my $masterblknum = pop @free_blocks;
# Add master index block to used blocks # Add master index block to used blocks
##FIXME push @used_blocks, $masterblknum;
# Create the subindex blocks. # Create the subindex blocks.
##FIXME ##FIXME
@ -1721,6 +1723,19 @@ sub write_file {
##FIXME ##FIXME
# Add each block to used blocks list. # Add each block to used blocks list.
##FIXME ##FIXME
# Write out the index blocks.
##FIXME
# Add each index block to the master block.
##FIXME
# Write out the master index block.
my $masterbuf = pack "C*", @master_index;
if (!write_blk($pofile, $masterblknum, \$masterbuf)) {
print "I/O Error writing block $masterblknum\n";
return 0;
}
} }
# Read & rewrite the file descriptive entry out. # Read & rewrite the file descriptive entry out.