#!/usr/bin/perl
#
# sgml_ld_1html .sgml
#
# create single html file from linuxdoc instance of HTML files;
# portions courtesy of : sgml21html - convert SGML into one HTML (using sgml2html)
#
# Copyright (C) 1999 Sadaaki Kato
# Taketoshi Sano
#
# All rights reserved.
# This is free software with ABSOLUTELY NO WARRANTY.
#
# You can redistribute it and/or modify it under the terms of
# the GNU General Public License version 2.
#
if($ARGV[0] eq '') {
die "\nusage: sgml_ld_1html .sgml\n";
}
my($cmd, $fname, $fname_wo_ext) = '';
$fname = $ARGV[0];
$fname_wo_ext = $fname;
if( $fname =~ /\.sgml$/ ) {
$fname_wo_ext =~ s/\.[\w]+$//;
} else {
$fname .= "\.sgml";
}
if( !(-e "$fname") ) {
die "sgml_ld_1html: Error - cannot find/read $fname\nusage: mk_print .sgml\n";
}
use IO::File;
use File::Copy;
my $content = '';
my $index = '';
# $HED defines the header form.
# 'SGML_TITLE' will be replaced by the title strings.
my $DEFAULT_HEAD = <
CONTENT_LINE
SGML_TITLE
INDEX_LINE
END_OF_HEADER
# $FOT defines the footer form.
my $DEFAULT_FOOT = <