tools scripts: fix mix of spaces & tabs
This commit is contained in:
@@ -6,30 +6,30 @@
|
||||
# Jonathan Westhues, April 2004
|
||||
|
||||
if(@ARGV == 0) {
|
||||
die "usage: $0 file-to-endian-swap.s19 > out.s19\n";
|
||||
die "usage: $0 file-to-endian-swap.s19 > out.s19\n";
|
||||
}
|
||||
|
||||
while(<>) {
|
||||
chomp;
|
||||
chomp;
|
||||
|
||||
if(/^S0/) {
|
||||
next;
|
||||
}
|
||||
if(/^S7/) {
|
||||
print "$_\n";
|
||||
next;
|
||||
}
|
||||
if(/^S0/) {
|
||||
next;
|
||||
}
|
||||
if(/^S7/) {
|
||||
print "$_\n";
|
||||
next;
|
||||
}
|
||||
|
||||
if(not /^S3(..)(........)(.*)(..)$/) {
|
||||
die "bad S record at line $.\n";
|
||||
}
|
||||
if(not /^S3(..)(........)(.*)(..)$/) {
|
||||
die "bad S record at line $.\n";
|
||||
}
|
||||
|
||||
$data = $3;
|
||||
$checksum = $4;
|
||||
$data = $3;
|
||||
$checksum = $4;
|
||||
|
||||
print "S3$1$2";
|
||||
while($data =~ m#(..)(..)(..)(..)#g) {
|
||||
print "$4$3$2$1";
|
||||
}
|
||||
print "$checksum\n";
|
||||
print "S3$1$2";
|
||||
while($data =~ m#(..)(..)(..)(..)#g) {
|
||||
print "$4$3$2$1";
|
||||
}
|
||||
print "$checksum\n";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user