Removed filter generating code - this should never be used now
[exim-website.git] / filter / mkfilter.pl
diff --git a/filter/mkfilter.pl b/filter/mkfilter.pl
deleted file mode 100644 (file)
index 41dbfbb..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/usr/bin/perl
-#
-use strict;
-use FileHandle;
-
-\f
-
-sub process_refile {
-    my $fn = shift;
-
-    my $re;
-    print STDERR "Opening $fn\n";
-    my $fh = FileHandle->new($fn, 'r') || die $!;
-    while (<$fh>) {
-       chomp();
-       # process includes
-       if (/^\#include\s/) {
-           my($junk, $nfn) = split;
-           $re .= process_refile($nfn);
-           next;
-       }
-       # ignore comments starting at the begining of the line
-       next if (/^\#/);
-       # dispose of comments with their leading spaces
-       s/\s+\#.*$//;
-       # recode \" -> "
-       s/\\\"/\"/g;
-       # double all \ (twice)
-       s/\\/\\\\/g;
-       s/\\/\\\\/g;
-       # escape " again
-       s/\"/\\\"/g;
-       # remove all space
-       s/\s+//g;
-       # add to re
-       $re .= $_;
-    }
-    return $re;
-}
-
-\f
-
-sub process_recfile {
-    my $fn = shift;
-
-    my $re;
-    print STDERR "Opening $fn\n";
-    my $fh = FileHandle->new($fn, 'r') || die $!;
-    while (<$fh>) {
-       chomp();
-       # process includes
-       if (/^\#include\s/) {
-           my($junk, $nfn) = split;
-           $re .= process_recfile($nfn);
-           next;
-       }
-       # skip comment only and blank lines
-       next if (/^\#/);
-       next if (/^\s*$/);
-       $re .= "#\t$_\n";
-    }
-    return $re;
-}
-
-\f
-
-# main
-{
-    while(<>) {
-       s/\[\[([a-z0-9_]+)\]\]/process_refile($1)/ge;
-       s/\[\<([a-z0-9_]+)\>\]/process_recfile($1)/ge;
-       print;
-    }
-}