#!/usr/local/bin/perl

#
# Hardcodes the HREF's in PCW
#
#  (that is, changes all relative references to hard references)
#

$* = 1;
$/ = "\n\n";

$dir = "http://www.netlib.org/utk/lsi/pcwLSI/text/";

while ( $line = <> )
{
    $line =~ s#HREF[^=]*=[^"]*\"#HREF=\"$dir#gi unless $line =~ m#hpfa#;
    $line =~ s#http://www.npac.syr.edu/icons//##gi;
    $line =~ s#SRC[^=]*=[^"]*\"#SRC=\"$dir#gi;

    print("$line");
}