Fail* directories reorganized, Code-cleanup (-> coding-style), Typos+comments fixed.

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1321 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
adrian
2012-06-08 20:09:43 +00:00
parent d474a5b952
commit 2575604b41
866 changed files with 1848 additions and 1879 deletions

View File

@ -0,0 +1,54 @@
#!/bin/sh
exec perl -x $0 $*; echo "Could not exec perl!"; exit 1
# The line above allows perl to be anywhere, as long as it's in your
# PATH environment variable.
#!perl
#
# fix-titles.pl
# $Id$
#
# The HTML stylesheet likes to print html has the ends of tags on a different
# line, like this:
# <HTML
# ><HEAD
# ><TITLE
# >FreeBSD</TITLE
# >
#
# Glimpse, which is indexing our website, finds this very confusing and
# it cannot pick out the title from this mess. This script takes a list
# of HTML files on the command line and attempts to make the <TITLE> tag
# look more normal so that glimpse can understand it.
#
# WARNING: This is a hack. It's made to work on docbook generated html, but
# may do strange things on anything else.
use strict;
foreach my $file (@ARGV) {
print "Fixing $file\n";
rename $file, "$file.orig";
open (IN, "$file.orig") || die "open $file.orig";
open (OUT, ">$file") || die "open $file for writing";
while (<IN>) {
if (/^<HTML$/) {
print OUT "<HTML>\n";
} elsif (/^><HEAD$/) {
print OUT "<HEAD>\n";
} elsif (/^><TITLE$/) {
print OUT "<TITLE>";
} elsif (/^>(.*)<\/TITLE$/) {
print OUT "$1</TITLE>\n";
# next line has one extra >, so read it and remove it.
$_ = <IN>;
s/^>//;
print OUT;
} else {
print OUT;
}
}
close IN;
close OUT;
unlink "$file.orig";
}