autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

28-empty-quadrigraph.patch


From: Akim Demaille
Subject: 28-empty-quadrigraph.patch
Date: Mon, 20 Aug 2001 16:47:26 +0200

Index: ChangeLog
from  Akim Demaille  <address@hidden>

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

Index: bin/autom4te.in
--- bin/autom4te.in Thu, 16 Aug 2001 21:35:47 +0200 akim
+++ bin/autom4te.in Sun, 19 Aug 2001 09:37:25 +0200 akim
@@ -580,6 +581,7 @@ sub handle_output ($$)
   my $separate = 0;
   my $oline = 0;
   my %prohibited;
+  my $res;
   while ($_ = $in->getline)
     {
       s/\s+$//;
@@ -598,12 +600,13 @@ sub handle_output ($$)

       $oline++;
       s/__oline__/$oline/g;
+
       s/\@<:\@/[/g;
       s/\@:>\@/]/g;
       s/address@hidden|\@/\$/g;
       s/address@hidden:\@/#/g;

-      print $out "$_\n";
+      $res = $_;

       # Don't complain in comments.  Well, until we have something
       # better, don't consider `#include' etc. are comments.
@@ -614,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/address@hidden@//g;
+
+      print $out "$res\n";
     }

   # If no forbidden words, we're done.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]