From 8d9ab22a6cfeaf95005f9c056336f26e906e004a Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 1 Jan 2009 15:28:14 +0100 Subject: tibtoa: Configurable footer and header length --- bin/tibtoa | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bin') 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 = ; close(PRGM); # The last two bytes don't contain program code -substr($program, -2, 2, ''); +substr($program, -$footer, $footer, ''); $length = length($program); $offset = 0; -- cgit v1.2.3