mirror of
https://gitlab.com/fbb-git/cppannotations
synced 2024-11-16 07:48:44 +01:00
6881bc3814
Annotations. The branches and tags directory are empty, since I couldn't svnadmin import a repostitory dump. Many earlier versions exist, though, and if you want the full archive, just let me know and I'll send you the svnadmin dump of my full C++ Annotations archive. Frank B. Brokken <f.b.brokken@rug.nl> git-svn-id: https://cppannotations.svn.sourceforge.net/svnroot/cppannotations/trunk@3 f6dd340e-d3f9-0310-b409-bdd246841980
61 lines
1.1 KiB
Perl
Executable file
61 lines
1.1 KiB
Perl
Executable file
#!/usr/bin/perl
|
|
|
|
$mark_in = "<pre>";
|
|
$mark_out = "</pre>";
|
|
|
|
sub marked_section
|
|
{
|
|
@marked = ("$_[0]$mark_in\n");
|
|
|
|
while ($line = <>)
|
|
{
|
|
push @marked, $line;
|
|
last if $line =~ /$mark_out/;
|
|
}
|
|
|
|
print $marked[0];
|
|
for ($from = 1; $marked[$from] =~ /^\s*$/; $from++) # $from: at 1st to
|
|
{} # print
|
|
|
|
for ($to = $#marked - 1; $marked[$to] =~ /^\s*$/; $to--)# $to: last to pnt
|
|
{}
|
|
|
|
for ( ; $from <= $to; $from++)
|
|
{
|
|
print $marked[$from];
|
|
}
|
|
|
|
print $marked[$#marked];
|
|
|
|
while ($line = <>)
|
|
{
|
|
last if $line !~ /^\s*$/;
|
|
}
|
|
|
|
if ($line =~ /(.*)$mark_in\s*/)
|
|
{
|
|
marked_section($1);
|
|
}
|
|
else
|
|
{
|
|
print $line;
|
|
}
|
|
}
|
|
|
|
while ($line = <>)
|
|
{
|
|
# added $1 to pick up leading text. $2 now used to be $1
|
|
if ($line =~ m#(.*)<title>\s*<center>(.*)</center>\s*</title>#)
|
|
{
|
|
print("$1<title>$2</title>\n");
|
|
next;
|
|
}
|
|
elsif ($line =~ /(.*)$mark_in\s*/)
|
|
{
|
|
marked_section($1);
|
|
}
|
|
else
|
|
{
|
|
print $line;
|
|
}
|
|
}
|