Re: patch preventing creation of empty top file (was Re: doc patch
Derek Robert Price <[email protected]> Tue, 18 Sep 2001 14:24:48 -0400
| Newsgroups | gmane.comp.tex.texi2html.devel |
|---|---|
| Message-ID | <[email protected]> |
> Attached is a short context diff as per subject line. (See also
> <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=101265&repeatmerged=yes>.)
At face value, this looks good to me, but what cases created an empty top file
previously? Even with your patch, running texi2html on an empty file (touch
test.texinfo; ./texi2html test.texinfo) creates a top file (test.html) containing
the HTML header, footer, and the "This document was generated by ... on ... using
texi2html" text.
Derek
> Index: texi2html.pl
> ===================================================================
> RCS file: /usr/local/tigris/data/helm/cvs/repository/texi2html/texi2html.pl,v
> retrieving revision 1.3
> diff -d -c -r1.3 texi2html.pl
> *** texi2html.pl 2001/05/01 21:33:44 1.3
> --- texi2html.pl 2001/09/14 17:17:15
> ***************
> *** 3677,3696 ****
> #############################################################################
> # print Top
> #
> ! open(FILE, "> $docu_top_file")
> ! || die "$ERROR: Can't open $docu_top_file for writing: $!\n";
> ! &$T2H_print_page_head(\*FILE) unless ($T2H_SPLIT);
> !
> ! if ($has_top)
> {
> ! print "# Creating Top in $docu_top_file ...\n" if $T2H_VERBOSE;
> ! $T2H_THIS_SECTION = $T2H_TOP;
> ! $T2H_HREF{This} = $T2H_HREF{Top};
> ! $T2H_NAME{This} = $T2H_NAME{Top};
> ! &$T2H_print_Top(\*FILE);
> ! }
>
> ! close(FILE) if $T2H_SPLIT;
>
> #############################################################################
> # Print sections
> --- 3677,3699 ----
> #############################################################################
> # print Top
> #
> ! if ($has_top || !$T2H_SPLIT)
> {
> ! open(FILE, "> $docu_top_file")
> ! || die "$ERROR: Can't open $docu_top_file for writing: $!\n";
> ! &$T2H_print_page_head(\*FILE) unless ($T2H_SPLIT);
>
> ! if ($has_top)
> ! {
> ! print "# Creating Top in $docu_top_file ...\n" if $T2H_VERBOSE;
> ! $T2H_THIS_SECTION = $T2H_TOP;
> ! $T2H_HREF{This} = $T2H_HREF{Top};
> ! $T2H_NAME{This} = $T2H_NAME{Top};
> ! &$T2H_print_Top(\*FILE);
> ! }
> !
> ! close(FILE) if $T2H_SPLIT;
> ! }
>
> #############################################################################
> # Print sections
>
>