Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Sep 2006 00:06:52 +0400
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        "David O'Brien" <obrien@FreeBSD.org>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/usr.bin/awk main.c.diff
Message-ID:  <20060919200652.GC23360@rambler-co.ru>
In-Reply-To: <20060919194959.GA3692@dragon.NUXI.org>
References:  <200609151328.k8FDSAGM094520@repoman.freebsd.org> <20060919194959.GA3692@dragon.NUXI.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--UPT3ojh+0CqEDtpF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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=20
> >   Log:
> >   Don't require a space between -[fv] and its argument.
> >   PR:             bin/86514
>=20
> 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.
>=20
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...]
:=20
:    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.
:=20
: [...]
:=20
:     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:
:=20
:          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.
:=20
:          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.
:=20
:          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]
:                                                                          =
                                      =20
:          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.   =20

> >   MFC after:      3 days
>=20
> Please don't.
>   =20
Too late.


Cheers,
--=20
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer

--UPT3ojh+0CqEDtpF
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)

iD8DBQFFEE3cqRfpzJluFF4RAtCwAJ4ksnhPbNVQX0q9VK5cu4uVBrMGAgCglg07
MGYIpRe9B88l7xO28Am1kKU=
=tl51
-----END PGP SIGNATURE-----

--UPT3ojh+0CqEDtpF--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060919200652.GC23360>