<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/usr/local/bin/perl
#
# $Date: 2001/09/05 16:04:08 $ 

for ($i=0; $i &lt;= $#ARGV; $i++) {
    $file = $ARGV[$i];
    system("/bin/cp $file $file.$$");
    open(IN, "$file.$$") or die "Unable to open $file\n";
    open(OUT, "&gt;$file") or die "Unable to create $file\n";

    while (&lt;IN&gt;) {
	print OUT $_;
	if (/&lt;!--X-NavButtons-Start--&gt;/) {
	    while (&lt;IN&gt;) {
		last  if /&lt;!--X-NavButtons-End--&gt;/;
	    }
	    print OUT "&lt;p align=center&gt;\n";
	    if ($i &gt; 0) {
		print OUT qq{[&lt;a href="}, $ARGV[$i-1], qq{"&gt;Prev&lt;/a&gt;]};
	    } else {
		print OUT qq{[Prev]};
	    }
	    if ($i &lt; $#ARGV) {
		print OUT qq{[&lt;a href="}, $ARGV[$i+1], qq{"&gt;Next&lt;/a&gt;]};
	    } else {
		print OUT qq{[Next]};
	    }
	    print OUT qq{[&lt;a href="faq.html"&gt;TOC&lt;/a&gt;]};
	    print OUT qq{[&lt;a href="http://www.mhonarc.org/"&gt;Home&lt;/a&gt;]};
	    print OUT qq{\n&lt;/p&gt;\n&lt;!--X-NavButtons-End--&gt;\n};
	}
    }

    close IN;
    close OUT;
    unlink "$file.$$";
}

exit 0;
</pre></body></html>