From a18f94dc5b99c78bbb57dfb3a7459903b3def594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Thu, 14 Sep 2006 09:41:08 +0000 Subject: [PATCH] added support for three lines signatures git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18830 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/tools/docbook/headersampler/HeaderSampler.pl | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/tools/docbook/headersampler/HeaderSampler.pl b/src/tools/docbook/headersampler/HeaderSampler.pl index bf37b543ad..e87fae97f4 100644 --- a/src/tools/docbook/headersampler/HeaderSampler.pl +++ b/src/tools/docbook/headersampler/HeaderSampler.pl @@ -217,18 +217,22 @@ sub ValidateDocbook { open(IN2, $gDocbookpath) || die "Can't open '$gDocbookpath'"; my $line = ""; - my $last = ""; - my $input = $_; + my $last1 = ""; + my $last2 = ""; + my $input = $_ ; + my $pattern = "" . $_ . "" ; my $found = 0; while () { chomp; s/^[\t ]+//; - $line = $last . $_ ; - if ( index($line, $input) >= 0 ) { + s/[\t ]+$//; + $line = $last1 . $last2 . " " . $_ ; + if ( index($line, $pattern) >= 0 ) { $found = 1; break; } - $last = $_; + $last1 = $last2; + $last2 = $_; } if ( $found == 0 ) { print $input . "\n" ;