aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2018-01-03 16:02:29 -0800
committerH. Peter Anvin <hpa@zytor.com>2018-01-03 16:02:29 -0800
commit9ea07a33186052a9b7c32e374ae081f924796ee7 (patch)
tree39534ea9a39646c9cd2f7c2c2119263b8b6a3983
parent2660b9308d0d501456b374fc33f88942bf27a736 (diff)
downloadabc80-9ea07a33186052a9b7c32e374ae081f924796ee7.tar.gz
abc80-9ea07a33186052a9b7c32e374ae081f924796ee7.tar.xz
abc80-9ea07a33186052a9b7c32e374ae081f924796ee7.zip
bin2bac.pl: fix undefined variable and add comments
-rwxr-xr-xdata/bin2bac.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/data/bin2bac.pl b/data/bin2bac.pl
index edc67bd..65673a4 100755
--- a/data/bin2bac.pl
+++ b/data/bin2bac.pl
@@ -2,6 +2,7 @@
use bytes;
+# Pad out to the next block. $final = 1 if and only if this is the last block.
sub genpad($$) {
my($left, $final) = @_;
@@ -11,6 +12,7 @@ sub genpad($$) {
return $o;
}
+# Generate a line in a .bac file; pad the previous block if necessary
sub bacstmt($$$) {
my($line, $left, $data) = @_;
my $l = length($data) + 4;
@@ -21,7 +23,7 @@ sub bacstmt($$$) {
}
$$left -= $l;
- return $pad.$d;
+ return $d;
}
# Take a list of relocations as 16-bit numbers and convert them