+++ /dev/null
---- t-prot-x 2002-03-25 02:15:50.000000000 +0100
-+++ t-prot 2002-03-25 03:24:03.000000000 +0100
-@@ -14,7 +14,7 @@
-
- # Version info
- $VER = '0.54';
--$REV = '';
-+$REV = '-ftr';
- $REL = q$Revision: 1.51 $; chop($REL);
- # From <sysexits.h>
- # (you might have to adjust those if not using GNU libc)
-@@ -75,6 +75,7 @@
- my $S = shift; # array to store removed lines in
- my $F = shift; # footers dir name
- my $O = shift; # remove only one footer?
-+ my $V = shift; # allow footers match before end of message
-
- if ($F && scalar(@$L)) {
- opendir(DIR, $F) || die "Could not open $F: $!";
-@@ -85,25 +86,27 @@
- open(IN, "$F/$f") || die "Could not open $F/$f: $!";
- my @l = <IN>;
- close IN;
-+ for (my $z=0; $z<=$#l; $z++) { chomp($l[$z]); }
-
-- while (scalar(@l)<=scalar(@$L)) {
-- my $y = 0;
-- for(my $x=1; $x<=scalar(@l); $x++) {
-- chomp($l[scalar(@l)-$x]);
-- if (index($$L[scalar(@$L)-$x], $l[scalar(@l)-$x])!=0) {
-- $y = 1;
-- }
-- }
-- if (!$y) {
-- unshift(@$S, @$L[$#$L-$#l..$#$L]);
-- splice(@$L, $#$L-$#l);
-- while (scalar(@$L) && $$L[$#$L] =~ /^\s*$/) {
-- unshift(@$S, pop(@$L));
-- }
-- if ($O) { last; }
-- }
-- else { last; }
-- }
-+ WIPE: for (my $z=$V?(scalar(@$L)-scalar(@l)):0; $z>=0; $z--)
-+ {
-+ if (scalar(@l)+$z<=scalar(@$L)) {
-+ my $y = 0;
-+ for(my $x=1; $x<=scalar(@l); $x++) {
-+ if (index($$L[scalar(@$L)-$x-$z], $l[scalar(@l)-$x])!=0) {
-+ $y = 1;
-+ }
-+ }
-+ if (!$y) {
-+ unshift(@$S, @$L[$#$L-$#l-$z..$#$L]);
-+ splice(@$L, $#$L-$#l-$z);
-+ while (scalar(@$L) && $$L[$#$L] =~ /^\s*$/) {
-+ unshift(@$S, pop(@$L));
-+ }
-+ if ($O) { last; } else { goto WIPE; }
-+ }
-+ }
-+ }
- }
- }
- }
-@@ -269,10 +272,10 @@
- }
-
- # Remove ML footers:
-- remove_footers($lines, \@ftr, $footers, undef);
-+ remove_footers($lines, \@ftr, $footers, undef, undef);
-
- # Remove ad footers:
-- remove_footers($lines, \@ads, $ads, undef);
-+ remove_footers($lines, \@ads, $ads, undef, '1');
-
- # Remove signature:
- if (scalar(@$lines)) {