From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12266 invoked by alias); 29 Jul 2013 14:43:30 -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 12235 invoked by uid 89); 29 Jul 2013 14:43:29 -0000 X-Spam-SWARE-Status: No, score=-7.0 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RDNS_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.1 Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 29 Jul 2013 14:43:29 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6TEKHni013386 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 29 Jul 2013 10:20:17 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r6TEKAVU014027; Mon, 29 Jul 2013 10:20:16 -0400 Message-ID: <51F67A1A.8060602@redhat.com> Date: Mon, 29 Jul 2013 14:43:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Muhammad Bilal CC: "gdb-patches@sourceware.org" Subject: Re: [PATCH PR gdb/15715] 'set history filename' to by immediately converted to absolute path. References: <97B73E257CC18646B0B5D3DD77DCBDD15DA063@EU-MBX-02.mgc.mentorg.com> <97B73E257CC18646B0B5D3DD77DCBDD15DA08C@EU-MBX-02.mgc.mentorg.com> <51F27050.6060409@redhat.com> <51F607C7.7020108@codesourcery.com> In-Reply-To: <51F607C7.7020108@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-07/txt/msg00704.txt.bz2 Hello, On 07/29/2013 07:12 AM, Muhammad Bilal wrote: > 2013-07-29 Muhammad Bilal > > PR gdb/15715 > * top.c: include "filenames.h" > (set_history_filename):New function. Space after ':'. > static void > +set_history_filename (char *args, int from_tty, struct cmd_list_element *c) > +{ > + /*We include the current directory so that if the user changes > + directories the file written will be the same as the one > + that was read. */ Formatting still not right. Add a space after '/*', and then reindent. Also, there's trailing whitespace in the first two lines that should not be there. The correct format is: /* We include the current directory so that if the user changes directories the file written will be the same as the one that was read. */ > + if (!IS_ABSOLUTE_PATH (history_filename)) > + history_filename = reconcat (history_filename, current_directory, "/", > + history_filename, (char *) NULL); > +} Thanks, -- Pedro Alves