From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14410 invoked by alias); 7 May 2013 14:02:05 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 14359 invoked by uid 89); 7 May 2013 14:01:58 -0000 X-Spam-SWARE-Status: No, score=-7.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS,TW_RG autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 07 May 2013 14:01:58 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r47E1ujf005089 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 7 May 2013 10:01:57 -0400 Received: from barimba (ovpn-113-163.phx2.redhat.com [10.3.113.163]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r47E1tik006118 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 7 May 2013 10:01:56 -0400 From: Tom Tromey To: Phil Muldoon Cc: "gdb-patches\@sourceware.org" Subject: Re: [patch][python] 2 of 5 - Frame filter MI code changes. References: <51876882.3010301@redhat.com> <87ppx3x2k3.fsf@fleche.redhat.com> <5188BA12.4050508@redhat.com> Date: Tue, 07 May 2013 14:02:00 -0000 In-Reply-To: <5188BA12.4050508@redhat.com> (Phil Muldoon's message of "Tue, 07 May 2013 09:23:46 +0100") Message-ID: <878v3qx50s.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-05/txt/msg00216.txt.bz2 >>>>> "Phil" == Phil Muldoon writes: Phil> I'm not sure how I would write them just using oind. oind will be an Phil> integer index to the last option in the argv list parsed. Sorry about that. I didn't express myself well, maybe I was not thinking well also. Phil> Would fail on the first "if" condition check: Phil> if ((argc > 3) || (argc == 2 && oind) || (argc == 1 && ! oind)) I think what I don't get is that this tests "oind" or "! oind". It seems like it should be examining only "argc - oind". That is, it is the relationship between oind and argc that matters (how many arguments are left) not the value of oind (how many arguments were parsed). This is especially true if you consider future changes that add new options. Tom