Commit Graph

5 Commits

Author SHA1 Message Date
FRIGN
7132473947 Some small changes for od(1)
1) Move usage() down above main().
2) Consistently use printaddress() across the code.
3) Use off_t instead of size_t for file offsets.
2015-09-30 19:44:10 +01:00
FRIGN
365f392d3c Properly handle namedict in od(1)
I added the [127]-index but forgot that this increases the length,
breaking a later check.
2015-09-30 19:44:10 +01:00
FRIGN
0d6d1dc02f Check explicit length in od(1)
If you pass an empty string, the null-char will always match
with strchr()!
2015-09-30 19:44:10 +01:00
FRIGN
d49bce7fc8 Refactor parts of od(1)
It was possible to make some sections of the code shorter.
Also fix a bug where the last printed address was always in hex
rather than depending on the radix chosen.
2015-09-30 19:44:10 +01:00
Greg Reagle
fd0d1e4567 Created od, with improvements suggested by FRIGN 2015-09-30 19:44:10 +01:00