mirror of
https://github.com/softwarejanitor/ProDOS.git
synced 2024-05-29 02:41:31 +00:00
Work on writing tree files
This commit is contained in:
parent
e7fd625bd5
commit
0c133140b6
19
ProDOS.pm
19
ProDOS.pm
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user