diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2009-01-01 15:28:14 +0100 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2009-01-01 15:28:14 +0100 |
commit | 8d9ab22a6cfeaf95005f9c056336f26e906e004a (patch) | |
tree | 2f1b43fb655b7b0c9567d95e85ad0720b0a7e4be /bin | |
parent | b640948bc1831dd72b6575d0037046924a4f7de6 (diff) |
tibtoa: Configurable footer and header length
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/tibtoa | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -8,6 +8,8 @@ use utf8; use Getopt::Std; binmode(STDOUT, ':utf8'); +my $header = 74; +my $footer = 2; my ($char, $char2); my $out; my $cache; @@ -618,12 +620,12 @@ getopts('i', \%opts); open(PRGM, '<', shift) or die; binmode(PRGM); # Remove header added by tilp2 -seek(PRGM, 74, 0); +seek(PRGM, $header, 0); $program = <PRGM>; close(PRGM); # The last two bytes don't contain program code -substr($program, -2, 2, ''); +substr($program, -$footer, $footer, ''); $length = length($program); $offset = 0; |