From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.lisp.guile.devel Subject: [PATCH] Make guile-func-name-check ignore a string literal =?utf-8?b?4oCYRlVOQ19OQU1F4oCZLg==?= Date: Fri, 25 Jun 2010 14:20:26 +0200 Message-ID: <87y6e3e22d.fsf@ambire.localdomain> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1277492786 29203 80.91.229.12 (25 Jun 2010 19:06:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 25 Jun 2010 19:06:26 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Jun 25 21:06:24 2010 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OSEEF-0004os-6R for guile-devel@m.gmane.org; Fri, 25 Jun 2010 21:06:19 +0200 Original-Received: from localhost ([127.0.0.1]:57282 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OSE3g-0005Dl-5t for guile-devel@m.gmane.org; Fri, 25 Jun 2010 14:55:24 -0400 Original-Received: from [140.186.70.92] (port=54743 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OSD2n-0004ra-CB for guile-devel@gnu.org; Fri, 25 Jun 2010 13:50:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OS820-0004WF-53 for guile-devel@gnu.org; Fri, 25 Jun 2010 08:29:17 -0400 Original-Received: from smtp204.alice.it ([82.57.200.100]:54657) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OS81z-0004SU-RL for guile-devel@gnu.org; Fri, 25 Jun 2010 08:29:16 -0400 Original-Received: from ambire.localdomain (95.244.64.152) by smtp204.alice.it (8.5.124.08) id 4C1A26020091F94A for guile-devel@gnu.org; Fri, 25 Jun 2010 14:29:14 +0200 Original-Received: from ttn by ambire.localdomain with local (Exim 4.69) (envelope-from ) id 1OS7zd-0004wQ-4W for guile-devel@gnu.org; Fri, 25 Jun 2010 14:26:49 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:10569 Archived-At: --=-=-= This silences the warning for memoize.c. thi _________________________________________ --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0004-maint-Make-guile-func-name-check-ignore-a-string-lit.patch >From 6801c670136253eea1463e850c17fe56e89467a6 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Fri, 25 Jun 2010 11:27:23 +0200 Subject: [PATCH 4/8] =?utf-8?q?[maint]=20Make=20guile-func-name-check=20ignore=20a=20string=20literal=20=E2=80=98FUNC=5FNAME=E2=80=99.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit * libguile/guile-func-name-check : If the last line contains a C string literal, do nothing. --- libguile/guile-func-name-check | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libguile/guile-func-name-check b/libguile/guile-func-name-check index f00b522..5a20275 100644 --- a/libguile/guile-func-name-check +++ b/libguile/guile-func-name-check @@ -38,10 +38,12 @@ BEGIN { # Check that for "SCM_DEFINE (foo, ...)", we see: # #define FUNC_NAME s_foo # { -# FIXME: This loses for C string-literal (#define FUNC_NAME "foo"). # FIXME: This loses if #define is inside the curly brace. /^\{/ && in_a_func { - if (!match (last_line, /^#define[ \t]+FUNC_NAME[ \t]+/)) { + if (match (last_line, /".+"/)) + # Do nothing for C string-literal (#define FUNC_NAME "foo"). + ; + else if (!match (last_line, /^#define[ \t]+FUNC_NAME[ \t]+/)) { printf filename ":" NR ":***" > "/dev/stderr"; print "Missing or erroneous `#define FUNC_NAME s_" \ func_name "'" > "/dev/stderr"; -- 1.6.3.2 --=-=-=--