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>
+
+ * 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/
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
}
}
- /^[\t ]*#/
- {
+ /^[\t ]*#/ {
if (sub(/^[\t ]*#[\t ]*ifn?def[\t ]+/, "", $0))
{
sub(/[^A-Za-z_0-9].*/, "", $0)
}
}
- END
- {
+ END {
for (sym in files)
{
print sym files[sym]
}
}
- /^[\t ]*#/
- {
+ /^[\t ]*#/ {
if (sub(/^[\t ]*#[\t ]*ifn?def[\t ]+/, "", $0))
{
sub(/[^A-Za-z_0-9].*/, "", $0)
}
}
- END
- {
+ END {
for (sym in files)
{
print sym files[sym]
}
}
- /^[\t ]*#/
- {
+ /^[\t ]*#/ {
if (sub(/^[\t ]*#[\t ]*ifn?def[\t ]+/, "", $0))
{
sub(/[^A-Za-z_0-9].*/, "", $0)
}
}
- END
- {
+ END {
for (sym in files)
{
print sym files[sym]
# 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)