From: Pavel Roskin Date: Thu, 2 Nov 2000 17:03:32 +0000 (+0000) Subject: * ifnames.sh: Put the opening brace on the same line with X-Git-Tag: autoconf-2.50~480 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48f158e039f5fe614357ab8e61ed02fbfb91d596;p=thirdparty%2Fautoconf.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 8aad1547d..83195cf2e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2000-11-02 Pavel Roskin + + * 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 * m4/atconfig.m4 (AT_CONFIG): s/AT_TESTPATH/AUTOTEST_PATH/ diff --git a/THANKS b/THANKS index efea2b25d..60f3b4289 100644 --- 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 diff --git a/bin/ifnames.in b/bin/ifnames.in index 912cbfcce..4f16d1f82 100644 --- a/bin/ifnames.in +++ b/bin/ifnames.in @@ -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] diff --git a/ifnames.in b/ifnames.in index 912cbfcce..4f16d1f82 100644 --- a/ifnames.in +++ b/ifnames.in @@ -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] diff --git a/ifnames.sh b/ifnames.sh index 912cbfcce..4f16d1f82 100644 --- a/ifnames.sh +++ b/ifnames.sh @@ -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] diff --git a/tests/tools.at b/tests/tools.at index 9ddf2346b..59fd81b53 100644 --- a/tests/tools.at +++ b/tests/tools.at @@ -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)