From: Akim Demaille Date: Mon, 20 Aug 2001 14:44:26 +0000 (+0000) Subject: * bin/autom4te.in (handle_output): Handle @__@. X-Git-Tag: AUTOCONF-2.52d~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22d6c214eacd3a65c05cd337ee32d85fb6283886;p=thirdparty%2Fautoconf.git * bin/autom4te.in (handle_output): Handle @__@. --- diff --git a/ChangeLog b/ChangeLog index 8d635574c..7085a3412 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2001-08-20 Akim Demaille + + * bin/autom4te.in (handle_output): Handle @__@. + 2001-08-20 Akim Demaille * lib/autoconf/autoconf.m4, lib/autoconf/oldnames.m4, diff --git a/bin/autom4te.in b/bin/autom4te.in index b2223efef..b4e83a974 100644 --- a/bin/autom4te.in +++ b/bin/autom4te.in @@ -581,6 +581,7 @@ sub handle_output ($$) my $separate = 0; my $oline = 0; my %prohibited; + my $res; while ($_ = $in->getline) { s/\s+$//; @@ -599,12 +600,13 @@ sub handle_output ($$) $oline++; s/__oline__/$oline/g; + s/\@<:\@/[/g; s/\@:>\@/]/g; s/\@S\|\@/\$/g; s/\@%:\@/#/g; - print $out "$_\n"; + $res = $_; # Don't complain in comments. Well, until we have something # better, don't consider `#include' etc. are comments. @@ -615,6 +617,14 @@ sub handle_output ($$) $prohibited{$_} = $oline if /$forbidden/o && !/$allowed/o && ! exists $prohibited{$_}; } + + # Performed *last*: the empty quadrigraph. Handling it last + # makes it possible to generate quadrigraphs, e.g. `@<@__@:@' + # produces `@<:@'. In addition, it provides a means to + # explicitly allow some *occurrences* of forbidden patterns. + $res =~ s/\@__\@//g; + + print $out "$res\n"; } # If no forbidden words, we're done.