cvs commit: src/usr.bin/awk main.c.diff
Ruslan Ermilov
ru at FreeBSD.org
Tue Sep 19 13:06:56 PDT 2006
On Tue, Sep 19, 2006 at 12:49:59PM -0700, David O'Brien wrote:
> On Fri, Sep 15, 2006 at 01:28:10PM +0000, Ruslan Ermilov wrote:
> > ru 2006-09-15 13:28:10 UTC
> > FreeBSD src repository
> > Modified files:
> > usr.bin/awk main.c.diff
> > Log:
> > Don't require a space between -[fv] and its argument.
> > PR: bin/86514
>
> I really don't think changes like this should be committed unless they
> also get upstream first. We have BWK awk and by changing it, things
> "tested" on FreeBSD aren't portable other platforms using BWK awk.
>
I'm pretty sure it will be accepted by Brian since another option
already allowed its argument to be specified without a preceding
space, and I don't share your argument of "this is BWK awk". I
think it's more important to be POSIX-compliant than BWK-compliant,
even if it means to change vendor code. Of a particular interest
is item 2.c of POSIX's Utility Argument Syntax.
: The awk utility shall conform to the Base Definitions volume of
: IEEE Std 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
: Utility Syntax Guidelines
: [...]
: Guideline 6:
: Each option and option-argument should be a separate argument,
: except as noted in Utility Argument
: Syntax , item (2).
: Utility Argument Syntax
: utility_name[-a][-b][-c option_argument]
: [-d|-e][-foption_argument][operand...]
:
: The notation used for the SYNOPSIS sections imposes requirements
: on the implementors of the standard utilities and provides a
: simple reference for the application developer or system user.
:
: [...]
:
: 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.
> > MFC after: 3 days
>
> Please don't.
>
Too late.
Cheers,
--
Ruslan Ermilov
ru at FreeBSD.org
FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-src/attachments/20060919/0f536b8d/attachment.pgp
More information about the cvs-src
mailing list