From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4108 invoked by alias); 30 Jun 2008 14:25:04 -0000 Received: (qmail 4060 invoked by uid 22791); 30 Jun 2008 14:25:02 -0000 X-Spam-Check-By: sourceware.org Received: from ns.suse.de (HELO mx1.suse.de) (195.135.220.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 30 Jun 2008 14:24:03 +0000 Received: from Relay2.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id AB58141400; Mon, 30 Jun 2008 16:24:00 +0200 (CEST) From: Andreas Schwab To: luisgpm@linux.vnet.ibm.com Cc: Daniel Jacobowitz , gdb-patches@sourceware.org Subject: Re: [PATCH] Listing cpp source code in mainless binaries References: <1213122525.10042.148.camel@gargoyle> <20080626141754.GJ22726@caradoc.them.org> <1214834098.21286.46.camel@gargoyle> X-Yow: Look! A ladder! Maybe it leads to heaven, or a sandwich! Date: Mon, 30 Jun 2008 18:04:00 -0000 In-Reply-To: <1214834098.21286.46.camel@gargoyle> (Luis Machado's message of "Mon, 30 Jun 2008 10:54:58 -0300") Message-ID: User-Agent: Gnus/5.110009 (No Gnus v0.9) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes 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 X-SW-Source: 2008-06/txt/msg00590.txt.bz2 Luis Machado writes: > @@ -260,14 +261,15 @@ > { > const char *name = s->filename; > int len = strlen (name); > - if (!(len > 2 && strcmp(&name[len - 2], ".h") == 0)) > + if (!(len > 2 && (strcmp (&name[len - 2], ".h") == 0 > + || strcmp (name, "<>") == 0))) Indentation is wrong here. > @@ -275,7 +277,8 @@ > { > const char *name = ps->filename; > int len = strlen (name); > - if (!(len > 2 && strcmp (&name[len - 2], ".h") == 0)) > + if (!(len > 2 && (strcmp (&name[len - 2], ".h") == 0 > + || strcmp (name, "<>") == 0))) Likewise. Alternatively, drop the inner pair of parens, the semantics will be the same. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."