summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-01-01 15:28:14 +0100
committerDaniel Friesel <derf@derf.homelinux.org>2009-01-01 15:28:14 +0100
commit8d9ab22a6cfeaf95005f9c056336f26e906e004a (patch)
tree2f1b43fb655b7b0c9567d95e85ad0720b0a7e4be /bin
parentb640948bc1831dd72b6575d0037046924a4f7de6 (diff)
tibtoa: Configurable footer and header length
Diffstat (limited to 'bin')
-rwxr-xr-xbin/tibtoa6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/tibtoa b/bin/tibtoa
index a9cd03a..2837880 100755
--- a/bin/tibtoa
+++ b/bin/tibtoa
@@ -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;