From 46a811b9e7c0e9fefb75864d198f9a4f3fd0e6cf Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Wed, 11 Jun 2008 09:14:26 -0600 Subject: 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 | 3 +++ 1 file changed, 3 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 750b15e47..3f2a8db74 100644 --- a/NEWS +++ b/NEWS @@ -29,6 +29,9 @@ GNU coreutils NEWS -*- outline -*- HP-UX 11, Tru64, AIX, IRIX 6.5, and Cygwin, "ls -l" now displays the presence of an ACL on a file via a '+' sign after the mode, and "cp -p" copies ACLs. + od now aligns fields across lines when printing multiple -t + specifiers, and no longer prints fields that resulted entirely from + padding the input out to the least common multiple width. * Noteworthy changes in release 6.12 (2008-05-31) [stable] -- cgit v1.2.3-54-g00ecf