Cleanup
This commit is contained in:
parent
92b2ccb866
commit
4e55c056b9
15
dos33.pl
15
dos33.pl
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
#
|
#
|
||||||
# dos33 version 0.1
|
# dos33 version 0.1
|
||||||
# by Vince Weaver <vince\@deater.net>
|
# by Vince Weaver <vince@deater.net>
|
||||||
# Perl port 20190225 by Leeland Heins <softwarejanitor\@yahoo.com>\n
|
# Perl port 20190225 by Leeland Heins <softwarejanitor@yahoo.com>
|
||||||
#
|
#
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
@ -65,7 +65,7 @@ my $SEEK_SET = 0;
|
||||||
|
|
||||||
my $VERSION = "0.1";
|
my $VERSION = "0.1";
|
||||||
|
|
||||||
# Helper Macros
|
# Helper Subs
|
||||||
sub TS_TO_INT {
|
sub TS_TO_INT {
|
||||||
my ($x, $y) = @_;
|
my ($x, $y) = @_;
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ sub dos33_char_to_type {
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
# dos33 filenames have top bit set on ascii chars
|
# dos33 filenames have high bit set on ascii chars
|
||||||
# and are padded with spaces
|
# and are padded with spaces
|
||||||
sub dos33_filename_to_ascii {
|
sub dos33_filename_to_ascii {
|
||||||
my ($dest, $src, $len) = @_;
|
my ($dest, $src, $len) = @_;
|
||||||
|
@ -248,7 +248,6 @@ sub dos33_free_space {
|
||||||
return $sectors_free * $BYTES_PER_SECTOR;
|
return $sectors_free * $BYTES_PER_SECTOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Get a T/S value from a Catalog Sector
|
# Get a T/S value from a Catalog Sector
|
||||||
sub dos33_get_catalog_ts {
|
sub dos33_get_catalog_ts {
|
||||||
my ($fd) = @_;
|
my ($fd) = @_;
|
||||||
|
@ -345,7 +344,6 @@ sub dos33_print_file_info {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Checks if "filename" exists
|
# Checks if "filename" exists
|
||||||
# returns entry/track/sector
|
# returns entry/track/sector
|
||||||
sub dos33_check_file_exists {
|
sub dos33_check_file_exists {
|
||||||
|
@ -435,7 +433,6 @@ sub find_first_one {
|
||||||
return $i;
|
return $i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub dos33_free_sector {
|
sub dos33_free_sector {
|
||||||
my ($fd, $track, $sector) = @_;
|
my ($fd, $track, $sector) = @_;
|
||||||
|
|
||||||
|
@ -622,7 +619,6 @@ sub dos33_force_allocate_sector {
|
||||||
return (($found_track << 8) + $found_sector);
|
return (($found_track << 8) + $found_sector);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
my $ERROR_INVALID_FILENAME = 1;
|
my $ERROR_INVALID_FILENAME = 1;
|
||||||
my $ERROR_FILE_NOT_FOUND = 2;
|
my $ERROR_FILE_NOT_FOUND = 2;
|
||||||
my $ERROR_NO_SPACE = 3;
|
my $ERROR_NO_SPACE = 3;
|
||||||
|
@ -1194,7 +1190,6 @@ got_a_dentry:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# load a file. fts=entry/track/sector
|
# load a file. fts=entry/track/sector
|
||||||
sub dos33_load_file {
|
sub dos33_load_file {
|
||||||
my ($fd, $fts, $filename) = @_;
|
my ($fd, $fts, $filename) = @_;
|
||||||
|
@ -1429,7 +1424,6 @@ sub dos33_undelete_file {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub dos33_delete_file {
|
sub dos33_delete_file {
|
||||||
my ($fd, $fsl) = @_;
|
my ($fd, $fsl) = @_;
|
||||||
|
|
||||||
|
@ -1527,7 +1521,6 @@ sub dump_sector {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub dos33_dump {
|
sub dos33_dump {
|
||||||
my ($fd) = @_;
|
my ($fd) = @_;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue