From owner-freebsd-audit Fri Mar 22 7:36:43 2002 Delivered-To: freebsd-audit@freebsd.org Received: from sunny.newgold.net (Durham-ar1-4-64-252-018.dsl.genuity.net [4.64.252.18]) by hub.freebsd.org (Postfix) with ESMTP id 2FF2437B404; Fri, 22 Mar 2002 07:36:38 -0800 (PST) Received: from sunny.newgold.net (freebsd@localhost [IPv6:::1]) by sunny.newgold.net (8.12.1/8.12.1) with ESMTP id g2MFDmII007719; Fri, 22 Mar 2002 15:15:23 GMT Received: (from freebsd@localhost) by sunny.newgold.net (8.12.1/8.12.1/Submit) id g2MFDc9u006649; Fri, 22 Mar 2002 15:13:38 GMT Date: Fri, 22 Mar 2002 15:12:15 +0000 From: "J. Mallett" To: "Tim J. Robbins" Cc: "J. Mallett" , freebsd-audit@FreeBSD.ORG Subject: Re: patch for review: xargs standards compliance Message-ID: <20020322151214.A26549@FreeBSD.ORG> References: <20020315231100.A20942@FreeBSD.ORG> <20020316192629.A5254@descent.robbins.dropbear.id.au> <20020316090004.A26394@FreeBSD.ORG> <20020316093507.B26394@FreeBSD.ORG> <20020316101434.A2192@FreeBSD.ORG> <20020322035231.A23277@FreeBSD.ORG> <20020322160802.B1338@descent.robbins.dropbear.id.au> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="ibTvN161/egqYuK8" Content-Disposition: inline In-Reply-To: <20020322160802.B1338@descent.robbins.dropbear.id.au> User-Agent: Mutt/1.3.21i Organisation: FreeBSD Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --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