X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=docs%2Fexdoc;h=517956c3e6387b07137055ee91f9d5f64b62c09d;hb=96374a84a65d22f30782120044f48965daed3c49;hp=e161a0c3d42ebbbe4362f555889af8a70b1b3ca4;hpb=3331634f37c395ea87d15a2f3338b2bc66a8470a;p=mono.git diff --git a/docs/exdoc b/docs/exdoc index e161a0c3d42..517956c3e63 100644 --- a/docs/exdoc +++ b/docs/exdoc @@ -1,17 +1,27 @@ #!/usr/bin/perl if ($ARGV[0] eq "-h"){ - $dir = $ARGV[1]; + $sourcedir = $ARGV[1]; + $dir = $sourcedir; $html = 1; shift @ARGV; shift @ARGV; } +open (FILE, "$dir/api-style.css" || die "Did not find $dir/api-style.css"); +while (){ + $css = $css . $_; +} + +if ($ARGV[0] eq "-t"){ + $dir = $ARGV[1]; + shift @ARGV; +} if ($html){ - opendir (D, "$dir/sources/") || die "Can not open $dir"; + opendir (D, "$sourcedir/sources/") || die "Can not open $dir"; while ($n = readdir (D)){ if ($n =~ /mono-api-.*\.html$/){ - open (IN, "$dir/sources/$n") || die "Can not open $n"; + open (IN, "$sourcedir/sources/$n") || die "Can not open $n"; $files[$filecount] = $n; while (){ @files_content[$filecount] .= $_; @@ -43,109 +53,114 @@ if ($html){ - $name - +
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 "

"; + print OUT " \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 = "Prototype: $api"; + $proto = "$api"; } -print OUT< -
-
$api
+ print OUT< +
+
$api$strikeextra
+
+
+
+
-
$proto
-

+

Syntax
+
$proto
+

EOF - &opt_print ("Parameters", $arguments{$api}, 1); - &opt_print ("Returns", $returns{$api}, 1); - &opt_print ("Remarks", $bodies{$api}, 0); - print OUT "\n"; + $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 =~ /^"; + 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/^\/\/\/\///; - print HACKOUT $_; + + # Remove the junk wrapper generated by AgilityPack + if ($line==1){ + s///; + } + if (/