From patchwork Tue May 12 15:19:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Gribov X-Patchwork-Id: 471385 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id E3235140D23 for ; Wed, 13 May 2015 01:18:58 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=bh3fVlSw; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; q=dns; s=default; b=UtmS20AOsjwexA33S tfRhBDrL8OaZ4fsTDLQuKQiwu6mUw4NEM4FEegW7G4wo/A82pg6ceOoOu4moSbVj 2BfxlZSWTDX5MROBC2R5AxNcUH7ZMrWhaikqxx28bJGb7E+1vLZbyJvpSFHMHpC7 cqFeXEzJLrY8/m3rzCne/+los8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; s=default; bh=WX2WTXJXKYOLE9era/27CwE vhTU=; b=bh3fVlSwGC026KenUHI6Kl1yFqumX6INfmSkb4aO4lgqYzrxaU5p+tP hltq4OUCwmitFHDEts7n+X9BqUtKS4GXzgSuPRlD4LZ7BjoDPjV+W7MSwLo3IFNr loeT8aUv0DYQXZO/KZdhIyiIyxNAeMseJLhODAFeMY3+2X/Tj88Y= Received: (qmail 19904 invoked by alias); 12 May 2015 15:18:49 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 19891 invoked by uid 89); 12 May 2015 15:18:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.0 required=5.0 tests=AWL, BAYES_20, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mailout4.w1.samsung.com Received: from mailout4.w1.samsung.com (HELO mailout4.w1.samsung.com) (210.118.77.14) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 12 May 2015 15:18:47 +0000 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NO8000Y3T77KB90@mailout4.w1.samsung.com> for gcc-patches@gcc.gnu.org; Tue, 12 May 2015 16:18:43 +0100 (BST) Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id C6.F7.05269.3D912555; Tue, 12 May 2015 16:18:43 +0100 (BST) Received: from [106.109.9.145] by eusync2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NO800I8AT75SLA0@eusync2.samsung.com>; Tue, 12 May 2015 16:18:43 +0100 (BST) Message-id: <555219FC.8090703@samsung.com> Date: Tue, 12 May 2015 18:19:24 +0300 From: Yury Gribov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-version: 1.0 To: GCC Patches Cc: Trevor Saunders , Diego Novillo , Tom de Vries , Jeff Law Subject: [PATCH][PING^2] Skip preprocessor directives in mklog References: <553633FB.3050206@samsung.com> <5541EFCE.3070004@samsung.com> In-reply-to: <5541EFCE.3070004@samsung.com> Content-type: multipart/mixed; boundary=------------020601010005060808070006 X-IsSubscribed: yes On 04/30/2015 12:03 PM, Yury Gribov wrote: > On 04/21/2015 02:26 PM, Yury Gribov wrote: >> Hi all, >> >> Contrib/mklog is currently faked by preprocessor directives inside >> functions to produce invalid ChangeLog. The attached patch fixes this. >> >> Tested with my local mklog testsuite and http://paste.debian.net/167999/ >> . Ok to commit? Ping. commit 23a738d05393676e72db82cb527d5fb1b3060e2f Author: Yury Gribov Date: Tue Apr 21 14:17:23 2015 +0300 2015-04-21 Yury Gribov * mklog: Ignore preprocessor directives. diff --git a/contrib/mklog b/contrib/mklog index f7974a7..455614b 100755 --- a/contrib/mklog +++ b/contrib/mklog @@ -131,7 +131,6 @@ sub is_unified_hunk_start { } # Check if line is a top-level declaration. -# TODO: ignore preprocessor directives except maybe #define ? sub is_top_level { my ($function, $is_context_diff) = (@_); if (is_unified_hunk_start ($function) @@ -143,7 +142,7 @@ sub is_top_level { } else { $function =~ s/^.//; } - return $function && $function !~ /^[\s{]/; + return $function && $function !~ /^[\s{#]/; } # Read contents of .diff file