From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 20:10:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 610201065670; Thu, 16 Sep 2010 20:10:54 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0A1E38FC0A; Thu, 16 Sep 2010 20:10:53 +0000 (UTC) Received: by iwn34 with SMTP id 34so1532987iwn.13 for ; Thu, 16 Sep 2010 13:10:53 -0700 (PDT) Received: by 10.231.30.68 with SMTP id t4mr3782981ibc.129.1284667853281; Thu, 16 Sep 2010 13:10:53 -0700 (PDT) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.231.20.3 with HTTP; Thu, 16 Sep 2010 13:10:33 -0700 (PDT) In-Reply-To: <20100916212043.N724@delplex.bde.org> References: <201009091927.o89JReXm022426@svn.freebsd.org> <20100916084442.GB21622@dragon.NUXI.org> <20100916212043.N724@delplex.bde.org> From: Juli Mallett Date: Thu, 16 Sep 2010 13:10:33 -0700 X-Google-Sender-Auth: UUzjeBZF4ot2haCGvwoLT9XjlMQ Message-ID: To: Bruce Evans Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, David O'Brien Subject: Re: svn commit: r212374 - head/usr.bin/printf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 20:10:54 -0000 On Thu, Sep 16, 2010 at 04:36, Bruce Evans wrote: > WHat about the lesser burder on a character or two for putting -- in the > synopsis where it is more visible: > > =A0 =A0 =A0 =A0printf [--] format [arguments ...] Right, that's what I've been thinking about. For that matter, does printf(1) need to use getopt(3) at all? It seems like simply checking for "--" could be sufficient. Does POSIX require that it exit with an error if it's given any options? At the very least, it seems like it would be more productive to have printf(1) give unusually-helpful error messages (perhaps merely changing its usage output to match that synopsis) if it encounters a string beginning with '-' other than "--".