<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#-*- perl -*-

##
## Comment out links that are not available. Used, e.g., for including
## the manuals in the top HTML help page. Works only for lines
## containing only the link tag.
##

while(&lt;&gt;){
    if(/^(\s*)&lt;a href=\"(.*)\"&gt;(.*)&lt;\/a&gt;\s$/i){
	if(-f $2){
	    print "$1&lt;a href=\"$2\"&gt;$3&lt;/a&gt;\n";
	}
	else{
	    $link = $2;
	    $text = $3;
	    if ($link =~ /R-[A-Za-z]+\.html$/) {
		$link =~ s+../manual+http://cran.r-project.org/doc/manuals+;
		print "$1&lt;a href=\"$link\"&gt;$text&lt;/a&gt; (on CRAN)\n";
	    } else {
		print "$1&lt;!a href=\"$link\"&gt;$text (not installed)\n";
	    }
	}
    }
    else{
	print $_;
    }
}
</pre></body></html>