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: [PATCHES] various commenting, whitespace changes Date: Fri, 25 Jun 2010 14:16:53 +0200 Message-ID: <87bpazfgsq.fsf@ambire.localdomain> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1277492786 29199 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 1OSEED-0004os-US for guile-devel@m.gmane.org; Fri, 25 Jun 2010 21:06:18 +0200 Original-Received: from localhost ([127.0.0.1]:57704 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OSE4H-0005S7-MI for guile-devel@m.gmane.org; Fri, 25 Jun 2010 14:56:01 -0400 Original-Received: from [140.186.70.92] (port=45818 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OSD30-0003Zj-I6 for guile-devel@gnu.org; Fri, 25 Jun 2010 13:50:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OS7t3-0000A7-TF for guile-devel@gnu.org; Fri, 25 Jun 2010 08:20:03 -0400 Original-Received: from smtp205.alice.it ([82.57.200.101]:45999) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OS7t3-00006k-FO for guile-devel@gnu.org; Fri, 25 Jun 2010 08:20:01 -0400 Original-Received: from ambire.localdomain (95.244.64.152) by smtp205.alice.it (8.5.124.08) id 4C1A2645009191FA for guile-devel@gnu.org; Fri, 25 Jun 2010 14:20:00 +0200 Original-Received: from ttn by ambire.localdomain with local (Exim 4.69) (envelope-from ) id 1OS7qh-0004vl-0E for guile-devel@gnu.org; Fri, 25 Jun 2010 14:17:35 +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:10568 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable If you examine branch =E2=80=98ttn/janitor=E2=80=99, you will see these com= mits, each preceding the "actual change". I lump them together because they aren't very interesting by themselves. thi _____________________________________________________ --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0003-Comment-whitespace-munging-nfc.patch >From 9c6b71e9b3334439ae6348b38412ae6a8fb154ad Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Fri, 25 Jun 2010 11:12:21 +0200 Subject: [PATCH 3/8] Comment, whitespace munging; nfc. * libguile/guile-func-name-check: Add comments; refill; kill eol whitespace. --- libguile/guile-func-name-check | 81 +++++++++++++++++++++++---------------- 1 files changed, 48 insertions(+), 33 deletions(-) diff --git a/libguile/guile-func-name-check b/libguile/guile-func-name-check index 8b4924e..f00b522 100644 --- a/libguile/guile-func-name-check +++ b/libguile/guile-func-name-check @@ -1,65 +1,80 @@ #!/usr/bin/awk -f # -# Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc. -# +# guile-func-name-check +# +# Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc. +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 3, or (at # your option) any later version. -# +# # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. -# +# # You should have received a copy of the GNU Lesser General Public # License along with this software; see the file COPYING.LESSER. If # not, write to the Free Software Foundation, Inc., 51 Franklin # Street, Fifth Floor, Boston, MA 02110-1301 USA # -# Written by Greg J. Badros, -# 11-Jan-2000 +# Author: Greg J. Badros, BEGIN { - filename = ARGV[1]; - in_a_func = 0; + filename = ARGV[1]; + in_a_func = 0; } -/^SCM_DEFINE/ { - func_name = $0; - sub(/^[^\(\n]*\([ \t]*/,"", func_name); - sub(/[ \t]*,.*/,"", func_name); -# print func_name; # GJB:FIXME:: flag to do this to list primitives? - in_a_func = 1; +# Extract the function name from "SCM_DEFINE (foo, ...". +# FIXME: This loses if the open paren is on the next line. +/^SCM_DEFINE/ { + func_name = $0; + sub (/^[^\(\n]*\([ \t]*/, "", func_name); + sub (/[ \t]*,.*/, "", func_name); + in_a_func = 1; } +# 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]+/)) { - printf filename ":" NR ":***" > "/dev/stderr"; - print "Missing or erroneous `#define FUNC_NAME s_" func_name "'" > "/dev/stderr"; - } else { - sub(/^#define[ \t]+FUNC_NAME[ \t]+s_/, "", last_line); - sub(/[ \t]*$/,"",last_line); - if (last_line != func_name) { - printf filename ":" NR ":***" > "/dev/stderr"; - print "Mismatching FUNC_NAME. Should be: `#define FUNC_NAME s_" func_name "'" > "/dev/stderr"; + 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"; + } else { + sub (/^#define[ \t]+FUNC_NAME[ \t]+s_/, "", last_line); + sub (/[ \t]*$/, "", last_line); + if (last_line != func_name) { + printf filename ":" NR ":***" > "/dev/stderr"; + print "Mismatching FUNC_NAME. Should be: " \ + "`#define FUNC_NAME s_" func_name "'" > "/dev/stderr"; + } } - } } +# If previous line closed the function, check that we see "#undef FUNC_NAME". +# FIXME: This loses if #undef is inside the curly brace. 1 == next_line_better_be_undef { - if (!match($0,/^#undef FUNC_NAME[ \t]*$/)) { - printf filename ":" NR ":***" > "/dev/stderr"; - print "Missing or erroneous #undef for " func_name ": " - "Got `" $0 "' instead." > "/dev/stderr"; - } - in_a_func = ""; - func_name = ""; - next_line_better_be_undef = 0; + if (!match ($0, /^#undef FUNC_NAME[ \t]*$/)) { + printf filename ":" NR ":***" > "/dev/stderr"; + print "Missing or erroneous #undef for " func_name ": " \ + "Got `" $0 "' instead." > "/dev/stderr"; + } + in_a_func = ""; + func_name = ""; + next_line_better_be_undef = 0; } +# Note function closing. /^\}/ && in_a_func { - next_line_better_be_undef = 1; + next_line_better_be_undef = 1; } +# Remember this line for the next cycle. { last_line = $0; } + +# guile-func-name-check ends here -- 1.6.3.2 --=-=-= _____________________________________________________ --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0005-Comment-whitespace-munging-nfc.patch >From 408b58584050c8568c0cc82174b3b130527b4611 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Fri, 25 Jun 2010 12:09:39 +0200 Subject: [PATCH 5/8] Comment, whitespace munging; nfc. * libguile/pairs.c: Add space after sentence end; kill eol whitespace; selectively untabify; add "ends here" comment. --- libguile/pairs.c | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/libguile/pairs.c b/libguile/pairs.c index 68fa4c9..da0d7b9 100644 --- a/libguile/pairs.c +++ b/libguile/pairs.c @@ -1,5 +1,6 @@ -/* Copyright (C) 1995,1996,2000,2001, 2004, 2005, 2006, 2008, 2009 Free Software Foundation, Inc. - * +/* Copyright (C) 1995, 1996, 2000, 2001, 2004, 2005, 2006, 2008, + * 2009 Free Software Foundation, Inc. + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 3 of @@ -79,14 +80,14 @@ SCM_DEFINE (scm_cons, "cons", 2, 0, 0, #undef FUNC_NAME -SCM +SCM scm_cons2 (SCM w, SCM x, SCM y) { return scm_cons (w, scm_cons (x, y)); } -SCM_DEFINE (scm_pair_p, "pair?", 1, 0, 0, +SCM_DEFINE (scm_pair_p, "pair?", 1, 0, 0, (SCM x), "Return @code{#t} if @var{x} is a pair; otherwise return\n" "@code{#f}.") @@ -129,13 +130,13 @@ SCM_DEFINE (scm_set_cdr_x, "set-cdr!", 2, 0, 0, * two bits is only needed to indicate when cxr-ing is ready. This is the * case, when all remaining pairs of bits equal 00. */ -/* The compiler should unroll this. */ +/* The compiler should unroll this. */ #define CHASE_PAIRS(tree, FUNC_NAME, pattern) \ scm_t_uint32 pattern_var = pattern; \ do \ { \ if (!scm_is_pair (tree)) \ - scm_wrong_type_arg_msg (FUNC_NAME, 0, tree, "pair"); \ + scm_wrong_type_arg_msg (FUNC_NAME, 0, tree, "pair"); \ tree = (pattern_var & 1) ? SCM_CAR (tree) : SCM_CDR (tree); \ pattern_var >>= 2; \ } \ @@ -278,3 +279,5 @@ scm_init_pairs () c-file-style: "gnu" End: */ + +/* pairs.c ends here */ -- 1.6.3.2 --=-=-= _____________________________________________________ --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0007-Add-copyright-notice-to-acinclude.m4.patch >From db33d0b49a746810a36bc73b43cf8180c1c9d0c2 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Fri, 25 Jun 2010 13:28:09 +0200 Subject: [PATCH 7/8] Add copyright notice to acinclude.m4. * acinclude.m4: Add copyright notice, with years derived from "git log" output. --- acinclude.m4 | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 8cfe1d4..ec42743 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1,5 +1,26 @@ dnl -*- Autoconf -*- +dnl Copyright (C) 1997, 1999, 2000, 2001, 2002, 2004, 2006, +dnl 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +dnl +dnl This file is part of GUILE +dnl +dnl GUILE is free software; you can redistribute it and/or modify it under +dnl the terms of the GNU Lesser General Public License as published by the +dnl Free Software Foundation; either version 3, or (at your option) any +dnl later version. +dnl +dnl GUILE is distributed in the hope that it will be useful, but WITHOUT +dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +dnl License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with GUILE; see the file COPYING.LESSER. If not, write +dnl to the Free Software Foundation, Inc., 51 Franklin Street, Fifth +dnl Floor, Boston, MA 02110-1301, USA. + + dnl On the NeXT, #including doesn't give you a definition for dnl struct utime, unless you #define _POSIX_SOURCE. @@ -439,3 +460,5 @@ AC_DEFUN([GUILE_READLINE], [ AC_SUBST(LIBGUILEREADLINE_INTERFACE_AGE) AC_SUBST(LIBGUILEREADLINE_INTERFACE) ]) + +dnl acinclude.m4 ends here -- 1.6.3.2 --=-=-=--