From: Jon Purdy Date: Tue, 21 Feb 2017 23:15:20 +0000 (-0800) Subject: [exdoc] Fix whitespace. X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=mono.git;a=commitdiff_plain;h=85bd889b9fc7758e8c4378f0b38b5b295718b056 [exdoc] Fix whitespace. --- diff --git a/docs/exdoc b/docs/exdoc index 517956c3e63..d7390d9a9ec 100644 --- a/docs/exdoc +++ b/docs/exdoc @@ -1,6 +1,6 @@ #!/usr/bin/perl -if ($ARGV[0] eq "-h"){ +if ($ARGV[0] eq "-h") { $sourcedir = $ARGV[1]; $dir = $sourcedir; $html = 1; @@ -8,48 +8,48 @@ if ($ARGV[0] eq "-h"){ shift @ARGV; } open (FILE, "$dir/api-style.css" || die "Did not find $dir/api-style.css"); -while (){ +while () { $css = $css . $_; } -if ($ARGV[0] eq "-t"){ +if ($ARGV[0] eq "-t") { $dir = $ARGV[1]; shift @ARGV; } -if ($html){ +if ($html) { opendir (D, "$sourcedir/sources/") || die "Can not open $dir"; - while ($n = readdir (D)){ - if ($n =~ /mono-api-.*\.html$/){ - open (IN, "$sourcedir/sources/$n") || die "Can not open $n"; - $files[$filecount] = $n; - while (){ - @files_content[$filecount] .= $_; - if (/name="api:(.*?)"/){ - $_ =~ s/.*name="api:(\w+?)".*/\1/; - $apis[$filecount] .= "$_"; - } - } - $filecount++; - close IN; - } + while ($n = readdir (D)) { + if ($n =~ /mono-api-.*\.html$/) { + open (IN, "$sourcedir/sources/$n") || die "Can not open $n"; + $files[$filecount] = $n; + while () { + @files_content[$filecount] .= $_; + if (/name="api:(.*?)"/) { + $_ =~ s/.*name="api:(\w+?)".*/\1/; + $apis[$filecount] .= "$_"; + } + } + $filecount++; + close IN; + } } } -while (){ - if (/\/\*\* *\n/){ - &process_doc; - } else { - #print "IGNORING: $_"; - } +while () { + if (/\/\*\* *\n/) { + &process_doc; + } else { + #print "IGNORING: $_"; + } } -if ($html){ - for ($f = 0; $f < $filecount; $f++){ - $name = $files[$f]; - open (OUT, "> $dir/html/$name") || die "Can not create $dir/html/$name"; - print "Merging: $name\n"; - print OUT< $dir/html/$name") || die "Can not create $dir/html/$name"; + print "Merging: $name\n"; + print OUT < @@ -61,31 +61,31 @@ $css
EOF - @a = split (/\n/, $files_content[$f]); - $strikeextra = ""; - $api_shown = 0; - for ($ai = 0; $ai < $#a; $ai++){ - $line = $a[$ai]; - - ($api,$caption) = $line =~ /

(\w+)<\/a><\/h4>/; - if ($api ne ""){ - if ($api_shown == 1){ - print OUT "

\n\n"; - if ($deprecated{$api}){ - $strike = "mapi-strike"; - $strikeextra = "
\n\n"; + if ($deprecated{$api}) { + $strike = "mapi-strike"; + $strikeextra = "
Deprecated: " . $deprecated{$api}; + } else { + $strike = ""; + $strikeextra = ""; + } + } + $api_shown = 1; + $proto = $prototype{$api}; + if ($proto eq "") { + $proto = "$api"; + } + + print OUT <
$api$strikeextra
@@ -99,152 +99,152 @@ EOF

EOF $ppars = $arguments{$api}; - if ($ppars ne "" && (!($ppars =~ /^[ \t]+$/))){ - print OUT "

Parameters
\n"; - print OUT " ".${arguments{$api}}."
"; - } - - &opt_print ("Return value", $returns{$api}, 0); - &opt_print ("Description", $bodies{$api}, 0); - print OUT "
\n
\n"; - } else { - if ($line =~ /@API_IDX@/){ - $apis_toc = &create_toc ($apis[$f]); - $line =~ s/\@API_IDX\@/$apis_toc/; - } - if ($line =~ /^

\n"; - $api_shown = 0; - } - if ($line =~ /`/){ - } - print OUT "$line\n"; - } - } - print OUT<Parameters\n"; + print OUT " ".${arguments{$api}}."
"; + } + + &opt_print ("Return value", $returns{$api}, 0); + &opt_print ("Description", $bodies{$api}, 0); + print OUT " \n \n"; + } else { + if ($line =~ /@API_IDX@/) { + $apis_toc = &create_toc ($apis[$f]); + $line =~ s/\@API_IDX\@/$apis_toc/; + } + if ($line =~ /^

\n"; + $api_shown = 0; + } + if ($line =~ /`/) { + } + print OUT "$line\n"; + } + } + print OUT < EOF - close OUT; - system ("$ENV{runtimedir}/mono-wrapper convert.exe $dir/html/$name $dir/html/x-$name"); - - - # clean up the mess that AgilityPack does, it CDATAs our CSS - open HACK, "$dir/html/x-$name" || die "Could not open $dir/html/x-$name"; - open HACKOUT, ">$dir/deploy/$name" || die "Could not open output"; - - $line = 0; - $doprint = 0; - while (){ - print HACKOUT $last if ($doprint); - $line++; - s/^\/\/\/\///; - - # Remove the junk wrapper generated by AgilityPack - if ($line==1){ - s///; - } - if (/