sub apair {
	local( $_ ) = pop( @_ );
	s/^(.*)<(.*)>(.*)$/$1&lt;$2&gt;$3/;
	return $_;
	}
#
sub pairs {
	local( $_ ) = pop( @_ );
	do {
		$_ = &apair( $_ );
		} while ( /^(.*)<(.*)>(.*)$/ );
	return $_;
	}
#
sub hrule { print "<HR>\n"; }
#
#
print "<HTML>\n";
print "<TITLE>\n";
print "SALINITY-L monthly digest for XXXX 1995\n";
print "</TITLE>\n";
$in_header=0;
$in_sig=0;
CYCLE:
while( <STDIN> ) { #0
	$_ = &pairs(  $_ );
	if( $in_header == 0 ) { #1
		if ( /^From (.*) 199\d$/ ) {
						$in_header=1;
						$in_sig=0;
						&hrule;			
						print "$_<BR>\n";
						next CYCLE;
						}
		if ( /^>From (.*) 199\d$/ ) {
					s/^>(.*)$/$1/;
					$in_header=1;
					$in_sig=0;
					print "\n<BR>\n";
					&hrule;
					print "$_<BR>\n";
					next CYCLE; }
		if( /^$/ ) { print "$_<P>\n"; next CYCLE; }
		if( /^>/ ) { print "$_<BR>\n"; next CYCLE; }
		if( /^:/ ) { print "$_<BR>\n"; next CYCLE; }
		if( /^-- .*$/ ) { $in_sig=1; print "$_<BR>\n"; next CYCLE; }
		print "$_<BR>\n";
		#if( $in_sig == 0 ) { print "$_"; } else { print "$_<BR>\n"; }
	
	} #1
	else { #11
		if ( /^$/ ) { print "$_<P>\n";  $in_header=0;  }
		if ( /^Date: / ) { print "$_<BR>\n";  }
		if ( /^From: / ) { 
					chop;
					print "<B>$_<\/B>\n<BR>\n";
				  }
		if ( /^Subject: / ) { 
					chop;
					print "<B>$_<\/B>\n<BR>\n";
					}
		if ( /^Message-Id: / ) { 
					print "$_<BR>\n";  }
		if ( /^In-Reply-To: / ) { 
					print "$_<BR>\n"; }
		 } #11
	} #0
&hrule;
&hrule;
print "Prepared by <B>Steve Modena</B> <EM>AB4EL</EM>  modena@SunSITE.unc.edu\n";
&hrule;
print "\n";
print "</HTML>\n"
