1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
#!/usr/bin/perl -w
# David Rowe 16/1/03
# used to modify first pass sgml files to include hyperlinks to ref doc
($file_in,$file_out)=@ARGV;
print "input: $file_in output: $file_out\n";
open(FIN, $file_in) || die "Couldn't open $file_in: $!\n";
@text_in = <FIN>;
close(FIN);
foreach $s (@text_in) {
if ($s=~ /<function>(vpb_.*)\(\)<\/function>/){
$foo=$1;
$foo =~ s/_/-/g;
$s=~ s/<function>(vpb_.*)\(\)<\/function>/<function><link linkend=\"$foo\">$1\(\)<\/link><\/function>/;
}
@text_out = (@text_out, $s);
}
open(FOUT, ">$file_out") || die "Couldn't open $file_out: $!\n";
print FOUT @text_out;
close(FOUT);
|