#!/usr/bin/perl -w
#
# p4_changes_2_html for Safari
# Copyright (c) 1999 by Barrie Slaymaker, rbs@telerama.com
#
# You may distribute under the terms of either the GNU General Public
# License or the Artistic License, as specified in the README file.
#
use strict ;
use HTML::Entities qw( encode_entities ) ;
my $up_to_project = $ENV{SAF_UP_TO_PROJECT} ;
my @output ;
while (<>) {
chomp ;
if ( m/^(.*)(Change\s+)(\d+)(.*)/ ) {
$_ = join( '',
encode_entities( $1 ),
qq{<A HREF="$3.html">},
encode_entities( $2 . $3 ),
qq{</A> [ <A HREF="$up_to_project\@$3/Default/">Browse</A> ]},
encode_entities( $4 ),
) ;
}
else {
$_ = encode_entities( $_ ) ;
}
push( @output, $_ ) ;
}
print <<TOHERE ;
<HTML>
<HEAD>
<TITLE>Changes</TITLE>
</HEAD>
<BODY>
TOHERE
print( join( "<BR>\n", @output ) ) ;
print <<TOHERE ;
</BODY>
</HTML>
TOHERE
0 ;