I'm having a hard time understanding some of the guidelines in
http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.htm...
Guideline 8 says (my emphasis):
When multiple option-arguments are specified to follow a single
option, they should be presented as a single argument, using
^^^^^^^^^^^^
commas within that argument or <blank>s within that argument
to separate them.
I'm mystified by the underlined words. What does "presented" mean
in this context? Presented to whom and by whom? Who/what is
responsible for enforcing this guideline? If option -x of utility
foo accepts multiple arguments, and one issues the following command
% foo -x bar baz frobozz
are "baz" and "frobozz" passed along with "bar" as part of the
multiple arguments of "-x"? Or does need something like this:
% foo -x 'bar baz frobozz'
or
% foo -x bar,baz,frobozz
?
Guideline 3 includes the following:
The -W (capital-W) option shall be reserved for vendor options.
What are examples of the types of vendors this guideline refers
to? Does anyone know of a real-world example of the use of this
guideline?
Guideline 6 refers to item (2) of
http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.htm...
which I can't make any sense of at all. (BTW, I thought the answers
to all my questions on this item would be simply matters of
definition, but I didn't find any helpful definitions in the
Definitions section, at
http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap03.html
) This item says:
2. Option-arguments are sometimes shown separated from their
options by <blank>s, sometimes directly adjacent. This
reflects the situation that in some cases an option-argument
is included within the same argument string as the option;
in most cases it is the next argument. The Utility Syntax
Guidelines in Utility Syntax Guidelines require that the
option be a separate argument from its option-argument, but
there are some exceptions in IEEE Std 1003.1-2001 to ensure
continued operation of historical applications:
a. If the SYNOPSIS of a standard utility shows a <space>
between an option and option-argument (as with [ -c
option_argument] in the example), a conforming application
shall use separate arguments for that option and its
option-argument.
b. If a <space> is not shown (as with [ -f option_argument]
in the example), a conforming application shall place an
option and its option-argument directly adjacent in the
same argument string, without intervening <blank>s.
c. Notwithstanding the preceding requirements on conforming
applications, a conforming implementation shall permit
an application to specify options and option-arguments
as a single argument or as separate arguments whether or
not a <space> is shown on the synopsis line, [XSI] [Option
Start] except in those cases (marked with the XSI
portability warning) where an option-argument is optional
and no separation can be used. [Option End]
d. A standard utility may also be implemented to operate
correctly when the required separation into multiple
arguments is violated by a non-conforming application.
Part (a) seems to suggest that a program should comply with the
stipulations of the documentation (i.e. its SYNOPSIS) which sounds
backwards to me. In other words, I would have written that the
SYNOPSIS should reflect the behavior of the program not the other
way around; the program is the "independent variable" IMO, not the
SYNOPSIS.
Part (c) refers to "conforming applications" and "conforming
implementations". What exactly is the difference between these
two? I imagine that "applications" here refers to utilities, which
is the subject of the whole chapter (12). But, what does "conforming
implementations" refer to?
Any clues on any of the questions above would be much appreciated.
Many thanks in advance!
kj
--
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded.