bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: POSIX misunderstanding


From: Albert Cahalan
Subject: Re: POSIX misunderstanding
Date: 27 Aug 2004 08:11:13 -0400

On Fri, 2004-08-27 at 00:09, Paul Jarc wrote:
> Albert Cahalan <address@hidden> wrote:
> > ---------------- begin quote ---------------
> > XBD ERN 16 Utilities that have extensions violating the Utility Syntax
> > Guidelines Accept as marked.
> >
> > It was agreed that an interpretation be made , that the standard
> > is clear and no change is required. The standard permits
> > implementations to have extensions that violate the Utility
> > Syntax Guidelines so long as when the utility is used in
> > line with the forms defined by the standard that it follows
> > the Utility Syntax Guidelines. Thus head --42 file
> > and ls --help are permitted as extensions.
> > ---------------- end quote -----------------
> 
> This doesn't mean what you think it means.  Note that it allows --42
> (which is no help, since old code doesn't use that), not -42.  "when
> the utility is used in line with the forms defined by the standard" -
> i.e., when it matches the syntax of the guidelines - then "it follows
> the Utility Syntax Guidelines" - i.e., it obeys the semantic
> requirements of the guidelines.
> 
> > (note that this implies that "ls --help" does violate
> > the Utility Syntax Guidelines, but that it's OK to do so)
> 
> Right - since it doesn't follow the syntax, the guidelines don't have
> anything to say about the meaning of --help.  But the guidelines do
> have something to say about the meaning of anything that does follow
> the syntax, including -42 (specifically, that its meaning should be
> the same as the meaning of -24, -2 -4, and -4 -2).  I'm no happier
> about this than you are, but that's what the standard says.

Nope. That was a typo. I've quoted the continuing discussion
of the austin-group-l list below. Note that Andrew Josey has
made edits to the rationale regarding this.

Posting order: Schwarz Konrad, Andrew Josey, Joerg Schilling,
Andrew Josey, Joerg Schilling, Andrew Josey

:::::: Shouldn't this be:
::::::
:::::: Thus head -42 file and ls --help are permitted as extensions.
:::::
::::: Yes it should be
::::
:::: I am not sure if the discussion did went the right way....
::::
:::: I would agree that --longopt is a permitted
:::: extensions, but I don't call -42 a long option,
:::: so I see no reason toallow --42.
::::
:::: Explanation:
::::
:::: -41 is a _zero_ length option that is followed
:::: by a numeric argument.
::::
:::: As the numeric argument may be negative, -42 and --42
:::: are definitely different things.
:::
::: Your assumption appears to be that extensions have to
::: follow the utility syntax guidelines, when they do not.
::
:: Sorry, I don't understand you.
::
:: I thought that extensions should extend existing
:: practice and not contradit it.
:
: There's a difference between recommendations and
: requirements. Also a difference between required
: features for an interface and extensions. Extensions
: are allowed so long as standard features are not affected.
:
: XBD 12.2 has a clause allowing extensions that
: are in violation of the utility syntax guidelines. 
:
: The case for head -42 is especially  clear since
: it was previously defined by the standard. There was
: no intent to disallow the previously allowed syntax.
: I put further rationale in XBD ERN 16






reply via email to

[Prev in Thread] Current Thread [Next in Thread]