This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [OT] Is od broken?


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Gary Johnson on 6/10/2008 5:42 PM:
| That looks horrible!  The results are the same on my Red Hat
| Enterprise Linux WS release 4 box, but on both my SunOS 5.8 and
| HP-UX 11.11 machines I see the neatly-aligned outputs I'm used to:

POSIX allows either behavior, and GNU coreutils has behaved that way for
years.

|
| This looks like a defect in the upstream od code for Linux.  Should
| I report it (to bug DASH coreutils AT gnu DOT org), or is this
| misalignment of the character and hex values a new "feature"?

Not a compliance bug, but you are certainly welcome to report it upstream
as an QoI enhancement request.  I've taken a first shot at looking at the
code, to see what it would take, and it seems a bit complicated.  GNU
coreutils intentionally minimizes the padding so that if only a single -t
option is present, all entries are aligned with only one space in between.
~ Now consider 'od -to4 -tu2'; the minimal alignment for o4 is 11 and for
u2 is 5.  It takes two u2 entries to match o4, so that's 10 bytes.  But
how do you align 10 vs. 11 bytes?  Alternate between 1 and 2 spaces per u2
output chunk?

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhPVsAACgkQ84KuGfSFAYBKKQCfa57XBzP8Eqd6LWvTljl1Vgdo
g/cAnjX+iljL/8fSBXAjgOq+mpG00fpn
=480C
-----END PGP SIGNATURE-----

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]