* eval.c (s_scm_copy_tree): idem.
[bpt/guile.git] / libguile / guile-func-name-check.in
index fcd29b1..adf5594 100644 (file)
@@ -1,9 +1,28 @@
 #!/usr/bin/awk -f
+#
+#  Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+# 
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, 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 General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with this software; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+# Boston, MA 02111-1307 USA
+#
 # Written by Greg J. Badros, <gjb@cs.washington.edu>
 # 11-Jan-2000
 
 BEGIN {
   filename = ARGV[1];
+  in_a_func = 0;
 }
 
 /^SCM_DEFINE/ { 
@@ -14,7 +33,7 @@ BEGIN {
   in_a_func = 1;
 }
 
-in_a_func && /^\{/ {
+/^\{/ && 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";
@@ -39,7 +58,7 @@ in_a_func && /^\{/ {
   next_line_better_be_undef = 0;
 }
 
-in_a_func && /^\}/ {
+/^\}/ && in_a_func {
   next_line_better_be_undef = 1;
 }