#!/bin/perl5
# -*- Perl -*-
# Copyright 1999 Greg Spencer (greg_spencer@acm.org)

require SourceToHtml;

#usage: file2html <filename>
$filename = shift @ARGV;

if (!-f $filename) {
    print STDERR "Unable to open $filename: $@\n";
    exit(-1);
}

$time = SourceToHtml::Timestamp((stat($filename))[8]);

open (INPUT, "<$filename") || die "Unable to open $filename: $@\n";
@input = <INPUT>;
close (INPUT);

for ($i=0;$i<10;$i++){
    $sample .= $input[$i];
}

# printed in the center of title area, top and bottom
$confidential = "Company Confidential";

# Should we print line numbers?
$use_lineno = 1;

# This is a label that goes in front of the timestamp
$stamp_label = " ";

# This says that we need the full HTML headers (because it's
# generating a complete page).
$standalone = 1;

$converter = new SourceToHtml($filename,$sample,
			      $use_lineno,$confidential,1,
			      $time,$filename,$stamp_label);

print $converter->Convert(@input);