[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: POSIX misunderstanding
From: |
Paul Eggert |
Subject: |
Re: POSIX misunderstanding |
Date: |
Wed, 18 Aug 2004 20:34:03 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
Albert Cahalan <address@hidden> writes:
> On Wed, 2004-08-18 at 13:49, Paul Eggert wrote:
>> Albert Cahalan <address@hidden> writes:
>>
>> > Well, so does the --lines option.
>>
>> No, that uses an allowed extension. It's not prohibited, the way that
>> multi-digit options are prohibited.
>
> Where?
Guideline 3 says "Multi-digit options should not be allowed."
That's an explicit prohibition.
> You can have a "-W lines=42" option.
True.
> Guideline 10 seems to require that "head --help"
> be interpreted as "head -- help".
No, it talks only about the argument "--". "head --help" does not
have an argument "--"; it has an argument "--help".
> the long options violate guideline 3.
I don't see why. Guideline 3 is about short options.
> The "head" command is described using the word "follows", instead of
> the words "conforms to". (for "head", the standard says "This
> standard version of head follows the Utility Syntax Guidelines."
I don't know where you're getting that wording. The current edition
of the standard says "The head utility shall conform to the Base
Definitions volume of IEEE Std 1003.1-2001, Section 12.2, Utility
Syntax Guidelines." This is a "shall" constraint on implementations
that claim conformance to the standard. It's pretty straightforward. See:
<http://www.opengroup.org/onlinepubs/000095399/utilities/head.html>
>> > Guideline 11 isn't even a problem at all, unless you
>> > artificially make it a problem.
>>
>> Sure it is. It says that order shouldn't matter unless the options
>> are mutually exclusive and one is documented to override the other.
>> Hence if options like "-1" are and "-3" are allowed, then "-13" must
>> be equivalent to "-1 -3" which in turn should be equivalent to "-3 -1"
>> or "-31". I suspect that this problem is part of the reason that
>> multi-digit options were disallowed.
>
> As an implementation-specific option, this is multi-digit.
> So there is no ordering problem.
OK, I guess I was assuming that we were trying to escape from
Guideline 3 by saying that "1" and "3" are single-digit options and
"-13" combines them. If we're not trying to do that, then fine,
Guideline 11 is not a problem. However, we still run afoul of
Guideline 3.
> Why would the standard warn that some systems might not be standard?
The standard contains several warnings of that sort. It's a pragmatic
document. It hasn't been taken over by lawyers (yet :-).
> the standard does indeed mention that the utility syntax guidelines
> might be violated by some standard-conforming implementation
No, it doesn't say that. It doesn't say that such an implementation
conforms to the standard.
- POSIX misunderstanding, Albert Cahalan, 2004/08/17
- Re: POSIX misunderstanding, Alfred M. Szmidt, 2004/08/17
- Re: POSIX misunderstanding, Paul Eggert, 2004/08/18
- Re: POSIX misunderstanding, Albert Cahalan, 2004/08/18
- Re: POSIX misunderstanding, Paul Eggert, 2004/08/18
- Re: POSIX misunderstanding, Albert Cahalan, 2004/08/18
- Re: POSIX misunderstanding,
Paul Eggert <=
- Re: POSIX misunderstanding, Albert Cahalan, 2004/08/19
- Re: POSIX misunderstanding, Paul Eggert, 2004/08/19
- Re: POSIX misunderstanding, Albert Cahalan, 2004/08/24
- Re: POSIX misunderstanding, Paul Eggert, 2004/08/24
- Re: POSIX misunderstanding, Albert Cahalan, 2004/08/26
- Re: POSIX misunderstanding, Paul Jarc, 2004/08/27
- Re: POSIX misunderstanding, Albert Cahalan, 2004/08/27
- Re: POSIX misunderstanding, Albert Cahalan, 2004/08/27
- Re: POSIX misunderstanding, Daniel Reed, 2004/08/28