Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 92338 invoked from network); 3 Aug 2006 22:09:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Aug 2006 22:09:28 -0000 Received: (qmail 78011 invoked by uid 500); 3 Aug 2006 22:09:28 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 77959 invoked by uid 500); 3 Aug 2006 22:09:28 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 77948 invoked by uid 99); 3 Aug 2006 22:09:28 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Aug 2006 15:09:28 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [208.30.140.160] (HELO moroha.quovadx.com) (208.30.140.160) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Aug 2006 15:09:27 -0700 Received: from qxvcexch01.ad.quovadx.com (qxvcexch01.ad.quovadx.com [192.168.170.59]) by moroha.quovadx.com (8.13.6/8.13.4) with ESMTP id k73M93PZ022935 for ; Thu, 3 Aug 2006 22:09:03 GMT Received: from [10.70.3.113] ([10.70.3.113]) by qxvcexch01.ad.quovadx.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 3 Aug 2006 16:09:12 -0600 Message-ID: <44D27401.2090802@roguewave.com> Date: Thu, 03 Aug 2006 16:09:05 -0600 From: Martin Sebor Organization: Rogue Wave Software User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050920 X-Accept-Language: en-us, en MIME-Version: 1.0 To: stdcxx-dev@incubator.apache.org Subject: Re: [PATCH] problems in eval_options() References: <44D23732.8010808@roguewave.com> <44D266CC.2030803@roguewave.com> In-Reply-To: <44D266CC.2030803@roguewave.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 03 Aug 2006 22:09:13.0323 (UTC) FILETIME=[73FF13B0:01C6B749] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Andrew Black wrote: > Greetings Martin > > I've glanced over the patch and have attached a revised version that I > feel is a tad more consistent. What? The consistency of my patch being challenged?! ;-) > * Invalid/missing options error messages are now routed through the > (new) bad_value and missing_value functions. I prefer these to calling > terminate(), as they also display the usage instructions when the option > is incorrectly used. I don't think we should be displaying the entire help screen for each typo. I have reservations about doing that for invalid option, let alone for their arguments. The help text is long and might drown out the error message itself. It's also not how most implementations of utilities behave. So unless you have a really good argument for doing so I'll remove this bit. > * the -d and -x switches now check for a missing value for consistency > with the -t switch. Okay. > * use 'sizeof option - 1' rather than a magic constant for parameter 3 > when calling get_long_val Ah, I missed those. Good catch. > * Removed superfluous assignment to optname for the compat and nocompat > switches (This one's debatable). I tried to be (but wasn't) consistent about the assignment even where it wasn't needed in case we made changes in the future that assumed the variables were non-null. I suppose since we don't set the variables for options like -q or -h we might as well avoid setting them for these two. > * Moved declaration of act struct in one conditional Martin