X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
X-Authority-Analysis: v=1.0 c=1 a=xe8BsctaAAAA:8 a=Dgf6X_ih2j7IlbgbQA8A:9  a=ANK9KOoGUTyCMINGFjcA:7 a=DXYA0tLNSxJ656c0FZ6WsyiRdD0A:4 a=eDFNAWYWrCwA:10  a=rPt6xJ-oxjAA:10
Message-ID: <484F56C0.7080201@byu.net>
Date: Tue, 10 Jun 2008 22:38:24 -0600
From: Eric Blake <ebb9@byu.net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080421 Thunderbird/2.0.0.14 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: cygwin@cygwin.com, garyjohn@spk.agilent.com
Subject: Re: [OT] Is od broken?
References: <17764646.post@talk.nabble.com> <484EFB14.65C9E56F@dessent.net> <17766865.post@talk.nabble.com> <20080610233030.GB18434@suncomp1.spk.agilent.com> <20080610234243.GC18434@suncomp1.spk.agilent.com>
In-Reply-To: <20080610234243.GC18434@suncomp1.spk.agilent.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

-----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/

