od: align multiple -t specs
authorEric Blake <ebb9@byu.net>
Wed, 11 Jun 2008 15:14:26 +0000 (09:14 -0600)
committerJim Meyering <meyering@redhat.com>
Fri, 13 Jun 2008 21:06:03 +0000 (23:06 +0200)
commit46a811b9e7c0e9fefb75864d198f9a4f3fd0e6cf
tree8f3007517c9197342afa85dde87e9638d7d84ad7
parentbbbc35c9ed194b0d458f2a2827dfbceb9056ef7d
od: align multiple -t specs

* src/od.c (struct tspec): Add pad_width field, and adjust
print_function prototype.
(decode_one_format): Rewrite all fmt_string values to account for
pad width.
(FMT_BYTES_ALLOCATED): Adjust to new format style.
(main): Compute pad width per spec.
(write_block): Account for pad width.
(dump): Don't print padding-only fields.
(PRINT_TYPE, print_named_ascii, print_ascii): All print functions
adjusted to use variable pad width.
* tests/Makefile.am (TESTS): Add test.
* tests/misc/od-multiple-t: New file.
* THANKS: Update.
* NEWS: Mention the improvement.
Reported by Gary Johnson.
NEWS
THANKS
src/od.c
tests/Makefile.am
tests/misc/od-multiple-t [new file with mode: 0755]