From owner-freebsd-audit Thu Mar 21 21:13:48 2002 Delivered-To: freebsd-audit@freebsd.org Received: from descent.robbins.dropbear.id.au (049.b.006.mel.iprimus.net.au [210.50.45.49]) by hub.freebsd.org (Postfix) with ESMTP id 0E04A37B404; Thu, 21 Mar 2002 21:13:41 -0800 (PST) Received: (from tim@localhost) by descent.robbins.dropbear.id.au (8.11.6/8.11.6) id g2M582p01423; Fri, 22 Mar 2002 16:08:02 +1100 (EST) (envelope-from tim) Date: Fri, 22 Mar 2002 16:08:02 +1100 From: "Tim J. Robbins" To: "J. Mallett" Cc: freebsd-audit@FreeBSD.ORG Subject: Re: patch for review: xargs standards compliance Message-ID: <20020322160802.B1338@descent.robbins.dropbear.id.au> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020322035231.A23277@FreeBSD.ORG>; from jmallett@FreeBSD.ORG on Fri, Mar 22, 2002 at 03:52:31AM +0000 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 On Fri, Mar 22, 2002 at 03:52:31AM +0000, J. Mallett wrote: > On Sat, Mar 16, 2002 at 10:14:35AM +0000, J. Mallett wrote: > > http://people.freebsd.org/~jmallett/xargs.patch3 > > I take it nobody objects to this version of my patch then? I don't like the wording here: + .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. Wouldn't this be better? .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 . (or similar; mdoc-ing hasn't been checked). 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) + if (this == NULL) + goto done; This goto could be changed to a break, simplifying it a bit. Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message