* bin/autom4te.in (handle_output): Handle @__@.

This commit is contained in:
Akim Demaille 2001-08-20 14:44:26 +00:00
parent ad80ccfe86
commit 22d6c214ea
2 changed files with 15 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2001-08-20 Akim Demaille <akim@epita.fr>
* bin/autom4te.in (handle_output): Handle @__@.
2001-08-20 Akim Demaille <akim@epita.fr>
* lib/autoconf/autoconf.m4, lib/autoconf/oldnames.m4,

View File

@ -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.