]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* ifnames.sh: Put the opening brace on the same line with
authorPavel Roskin <proski@gnu.org>
Thu, 2 Nov 2000 17:03:32 +0000 (17:03 +0000)
committerPavel Roskin <proski@gnu.org>
Thu, 2 Nov 2000 17:03:32 +0000 (17:03 +0000)
        patterns. Reported by Paul Martinolich.
        * tests/tools.at (AWK portability): Check ifnames.
        (ifnames): New test for ifnames.
        * THANKS: Updated.

ChangeLog
THANKS
bin/ifnames.in
ifnames.in
ifnames.sh
tests/tools.at

index 8aad1547d79ccdba617f9b5d33d0e391fc491060..83195cf2ebb7bf41b0af899b5f22e7d13c94b25d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2000-11-02  Pavel Roskin  <proski@gnu.org>
+
+       * ifnames.sh: Put the opening brace on the same line with
+       patterns. Reported by Paul Martinolich.
+       * tests/tools.at (AWK portability): Check ifnames.
+       (ifnames): New test for ifnames.
+       * THANKS: Updated.
+
 2000-11-02  Pavel Roskin  <proski@gnu.org>
 
        * m4/atconfig.m4 (AT_CONFIG): s/AT_TESTPATH/AUTOTEST_PATH/
diff --git a/THANKS b/THANKS
index efea2b25d5d321910a1e8968666c3dc7f41ad7d5..60f3b42898ab3028abda5a21dc4c10fab1566756 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -98,6 +98,7 @@ Ossama Othman         ossama@debian.org
 Patrick Tullmann       tullmann@cs.utah.edu
 Paul Eggert            eggert@twinsun.com
 Paul Gampe             paulg@apnic.net
+Paul Martinolich       martinol@datasync.com
 Pavel Roskin           pavel_roskin@geocities.com
 Peter Eisentraut       peter_e@gmx.net
 Peter Simons           simons@research.cys.de
index 912cbfcce2581dba9cdd63378b70260695d9265d..4f16d1f82800791c2ac609b987d6cec4c4f31963 100644 (file)
@@ -103,8 +103,7 @@ $AWK '
     }
   }
 
-  /^[\t ]*#/
-  {
+  /^[\t ]*#/ {
     if (sub(/^[\t ]*#[\t ]*ifn?def[\t ]+/, "", $0))
     {
       sub(/[^A-Za-z_0-9].*/, "", $0)
@@ -125,8 +124,7 @@ $AWK '
     }
   }
 
-  END
-  {
+  END {
     for (sym in files)
     {
       print sym files[sym]
index 912cbfcce2581dba9cdd63378b70260695d9265d..4f16d1f82800791c2ac609b987d6cec4c4f31963 100644 (file)
@@ -103,8 +103,7 @@ $AWK '
     }
   }
 
-  /^[\t ]*#/
-  {
+  /^[\t ]*#/ {
     if (sub(/^[\t ]*#[\t ]*ifn?def[\t ]+/, "", $0))
     {
       sub(/[^A-Za-z_0-9].*/, "", $0)
@@ -125,8 +124,7 @@ $AWK '
     }
   }
 
-  END
-  {
+  END {
     for (sym in files)
     {
       print sym files[sym]
index 912cbfcce2581dba9cdd63378b70260695d9265d..4f16d1f82800791c2ac609b987d6cec4c4f31963 100644 (file)
@@ -103,8 +103,7 @@ $AWK '
     }
   }
 
-  /^[\t ]*#/
-  {
+  /^[\t ]*#/ {
     if (sub(/^[\t ]*#[\t ]*ifn?def[\t ]+/, "", $0))
     {
       sub(/[^A-Za-z_0-9].*/, "", $0)
@@ -125,8 +124,7 @@ $AWK '
     }
   }
 
-  END
-  {
+  END {
     for (sym in files)
     {
       print sym files[sym]
index 9ddf2346b0f58f881a83542d5d5efd2d91a323b2..59fd81b53ba4993c20c1e0595715e0181d026fd0 100644 (file)
@@ -368,6 +368,55 @@ if (gawk --version) >/dev/null 2>&1; then
   # Tracing.
   AT_CHECK([AWK='gawk --posix' autoconf --autoconf-dir .. -l $at_srcdir -t AC_INIT], 0,
            ignore, [])
+  # Syntax correctness of ifnames.
+  AT_CHECK([AWK='gawk --posix' ifnames empty], 0,
+           [], [])
 fi
 
 AT_CLEANUP(configure)
+
+
+
+
+
+## --------- ##
+## ifnames.  ##
+## --------- ##
+
+AT_SETUP(ifnames)
+
+AT_DATA([iftest1.c],
+[[#ifdef DEF1
+#ifndef DEF2
+#if !defined(DEF3) && defined(DEF4) /* but not defined(DEF5) */
+    # if SPACES
+       #       if      TABS
+/* #if C_COMMENTS */
+// #if CXX_COMMENTS
+#if LINE1 = \
+LINE2
+#if (VAL1*VAL2)==VAL3+VAL4 /* Not VAL5 !!! */
+]])
+
+AT_DATA([iftest2.c],
+[[#ifdef IFTEST2
+#if VAL1
+]])
+
+AT_CHECK([ifnames iftest1.c iftest2.c], 0,
+[DEF1 iftest1.c
+DEF2 iftest1.c
+DEF3 iftest1.c
+DEF4 iftest1.c
+IFTEST2 iftest2.c
+LINE1 iftest1.c
+LINE2 iftest1.c
+SPACES iftest1.c
+TABS iftest1.c
+VAL1 iftest1.c iftest2.c
+VAL2 iftest1.c
+VAL3 iftest1.c
+VAL4 iftest1.c
+], [])
+
+AT_CLEANUP(configure)