Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Mar 2002 15:12:15 +0000
From:      "J. Mallett" <jmallett@FreeBSD.ORG>
To:        "Tim J. Robbins" <tim@robbins.dropbear.id.au>
Cc:        "J. Mallett" <jmallett@FreeBSD.ORG>, freebsd-audit@FreeBSD.ORG
Subject:   Re: patch for review: xargs standards compliance
Message-ID:  <20020322151214.A26549@FreeBSD.ORG>
In-Reply-To: <20020322160802.B1338@descent.robbins.dropbear.id.au>
References:  <20020315231100.A20942@FreeBSD.ORG> <20020316192629.A5254@descent.robbins.dropbear.id.au> <20020316090004.A26394@FreeBSD.ORG> <xzpd6y4voj9.fsf@flood.ping.uio.no> <20020316093507.B26394@FreeBSD.ORG> <xzp8z8svni7.fsf@flood.ping.uio.no> <20020316101434.A2192@FreeBSD.ORG> <20020322035231.A23277@FreeBSD.ORG> <20020322160802.B1338@descent.robbins.dropbear.id.au>

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

--ibTvN161/egqYuK8
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Mar 22, 2002 at 04:08:02PM +1100, Tim J. Robbins wrote:
> On Fri, Mar 22, 2002 at 03:52:31AM +0000, J. Mallett wrote:
>=20
> > On Sat, Mar 16, 2002 at 10:14:35AM +0000, J. Mallett wrote:
>=20
> > > http://people.freebsd.org/~jmallett/xargs.patch3
> >=20
> > I take it nobody objects to this version of my patch then?
>=20
> I don't like the wording here:
>=20
> + .It Fl I Ar replstr
> + If this option is specified up to 5 occurences of
> + .Ar replstr
> + may be replaced in the arguments to
> + .Ar utility
> + with one line of standard input.
> + .Ar Utility
> + is executed for every line of input in this mode.
> + In this mode
> + .Fl x
> + is implied.
>=20
> Wouldn't this be better?
>=20
> .It Fl I Ar replstr
> Execute
> .Ar utility
> for each input line, replacing up to 5 occurrences of
> .Ar replstr
> in the arguments with the line read.
> Implies
> .Fl x .
>=20
> (or similar; mdoc-ing hasn't been checked).

Good call on that, I believe, I've used that as a jumping off point to=20
redo -I's description, though I think it needs to be clear that it's=20
arguments to .Ar utility that will have replacement done..

>=20
> And while not really a bug, there probably should be const qualifiers
> on `match' and `replstr' in strnsubst():
> size_t strnsubst(char **str, char *match, char *replstr, size_t n)

Fair enough, my local copy of strnsubst has been cleaned with such, so I=20
have no problems with that.

>=20
> + 		if (this =3D=3D NULL)
> + 			goto done;
>=20
> This goto could be changed to a break, simplifying it a bit.

Sounds reasonable.

>=20
> Tim

Well, given all the input thus far, I'd like to commit
	http://people.freebsd.org/~jmallett/xargs.patch4

Some time this evening, as I've handled every comment I've gotten in the=20
past week of review (I believe).

Thank you,
	/j.


--ibTvN161/egqYuK8
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia

iQCVAwUBPJtJvIlNtGTEXmf1AQGGXwP/adfTESF8RfA8e41b0JI2dcmrShnaRDyl
dEuoFWgkAHdn6hF5BBjlXAIyoot2IuuxSsROWqCvnNfXPREAITjpkIFfHYP4bblq
ds9mg4600r5n45ZWsYYdn/VuxbD9ZfhksBR6UK5OBifKoIXsnPXEG4/TZV5yJ7af
Ln9MXeepVSE=
=81Kw
-----END PGP SIGNATURE-----

--ibTvN161/egqYuK8--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message




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