From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 129063 invoked by alias); 29 Jun 2017 21:06:32 -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 129051 invoked by uid 89); 29 Jun 2017 21:06:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_SORBS_SPAM,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 spammy= X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 29 Jun 2017 21:06:29 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id v5TL6MGx019533 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 29 Jun 2017 17:06:26 -0400 Received: by simark.ca (Postfix, from userid 112) id 03E181E8CB; Thu, 29 Jun 2017 17:06:22 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 641001E5BA; Thu, 29 Jun 2017 17:06:21 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 29 Jun 2017 21:06:00 -0000 From: Simon Marchi To: Sergio Durigan Junior Cc: GDB Patches , Jerome Guitton Subject: Re: [PATCH] PR cli/21688: Fix multi-line/inline command differentiation In-Reply-To: <87d19mmv7q.fsf@redhat.com> References: <20170629020527.468-1-sergiodj@redhat.com> <90d0a1563dea6893b5dbcd8df19d0285@polymtl.ca> <87d19mmv7q.fsf@redhat.com> Message-ID: X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.0 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Thu, 29 Jun 2017 21:06:22 +0000 X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg00801.txt.bz2 On 2017-06-29 21:48, Sergio Durigan Junior wrote: > On Thursday, June 29 2017, Simon Marchi wrote: >> Another (maybe simpler) way would be to check >> >> else if (command_name_equals (cmd, "python") && *cmd_name == '\0') >> >> It's not clear when expressed like this though because cmd_name is not >> well named at this point (it points just after the command name). > > Hm, right. Would you prefer this way instead? I don't have a strong > opinion on this. My opinion is the solution with the least code is probably best, if they are equivalent otherwise, but I don't really mind. It's just a suggestion. Simon