Wikia

CHDK Wiki

Watchlist Recent changes

Gpl renumber.pl

#!/usr/bin/perl -w
#
# add offset to hexdump -C
# and strings -t x

$offset = hex $ARGV[0] or do {
	print "usage: $0 0xff810000 < infile > outfile\n";
	exit;
};


print "off: $offset \n";

while (<STDIN>) {

	($addr, $line) = $_ =~ m/\s*(\w+) (.*)/;
	if (defined $addr) {
		$addr = hex $addr;
		printf "%08x %s\n", $addr + $offset, $line;
	} else {
		print $_;
	}
}

Pages on CHDK Wiki

Add a Page
496pages on
this wiki
Advertisement | Your ad here

Latest Photos

Add a Photo
746photos on this wiki
See more >

Recent Wiki Activity

See more >

Around Wikia's network

Random Wiki