[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: od question
From: |
Paul Eggert |
Subject: |
Re: od question |
Date: |
Mon, 27 Sep 2004 18:15:41 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
Nick Stoughton <address@hidden> writes:
> In coreutils, the od command --help says:
> od --traditional [FILE] [[+]OFFSET [[+]LABEL]]
That has changed since coreutils 5.2.1.
The current od --help says this instead:
Usage: od [OPTION]... [FILE]...
or: od [-abcdfilosx]... [FILE] [[+]OFFSET[.][b]]
or: od --traditional [OPTION]... [FILE] [[+]OFFSET[.][b] [+][LABEL][.][b]]
> Is this a bug in the code (I think so) or a bug in the usage
> statement (and man page)?
Both. Here's a slightly mangled copy of the patch that fixed these
and some other compatibility bugs:
<http://www.mail-archive.com/address@hidden/msg02553.html>
(Normally I'd give a GNU URL but I can't reach lists.gnu.org right now.)
> The XSI version of
>
> od [-bcdosx][file] [[+]offset[.][b]]
>
> does not appear to be supported at all. Is this changing?
Yes, the XSI version is now supported, as described in the above patch.
> (i.e. the --traditional flag isn't needed)
That flag is still needed for usages like "od --traditional file 1 2".
> Would you like me to develop a patch?
I would dearly love having someone look over the current
implementation's behavior and conformance. It is a messy area. For
example, in responding to your email I just discovered a bug in the
post-5.2.1 changes, and installed the following fix which should
propagate to savannah in a few days. Other than this patch you can
retrieve the current od implementation via CVS or via the web (e.g.,
<http://savannah.gnu.org/cgi-bin/viewcvs/coreutils/coreutils/src/od.c>).
2004-09-27 Paul Eggert <address@hidden>
* src/od.c (format_address_paren): c is optional, so don't output
it if it's '\0'.
--- old/src/od.c 6 Sep 2004 07:46:43 -0000 1.151
+++ new/src/od.c 28 Sep 2004 01:09:03 -0000 1.152
@@ -1138,7 +1138,8 @@ format_address_paren (uintmax_t address,
{
putchar ('(');
format_address_std (address, ')');
- putchar (c);
+ if (c)
+ putchar (c);
}
static void
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: od question,
Paul Eggert <=