[l2h] Old bug not fixed

Robert Williams bob@bob.usuhs.mil
Fri, 10 Aug 2001 12:26:47 -0400


Who is maintaining the code now?
There is a bug still in latex2html that was discussed
years ago, in version 99.2:
_______________________start of note from Julius:

This problem just bit me, apparently while processing the bibliography
environment in a short document.  It was possibly caused by upgrading
from
RedHat Linux 6.0 to 6.1,  but I had also made some cosmetic changes to
my
.latex2html-init file (not involving title length), so I can't be sure.

The error-triggering line in latex2html was

     $global{$key}-- if $making_name;

(line 10583 of latex2html, version 99.2 beta 6 (1.42)).
I inserted the following 5 lines as a start on debugging:

     # jos 3/14/00:
     if (!$key) {
         print STDERR "*** KEY LOST ***'\n";
         $key = "LOST_KEY";
     }

     $global{$key}-- if $making_name;
     ...

I was hoping to fight past the crash and take a look at the output for
clues to the problem.  To my surprise, the problem seemed to just go
away!  So far, I can't see anything wrong with my HTML output.  A
recursive
grep for "LOST_KEY" produces no occurrences in either the l2h temp
directories or the generated HTML.  It's as if a null $key is an
ordinary
occurrence in l2h, but Perl (ndbm) is now crashing on it.

Perhaps the Perl distributed with RH Linux 6.1 crashes on null hash
keys,
while earlier releases did not?  In any case, the above insert seems to
functionar as a workaround.  Perhaps the fix should really be

    $global{$key}-- if ($key && $making_name);

___________________________end of note from Julius

the
$global{$key}-- if ($key && $making_name);
change solves a serious problem I have.
I'd prefer not to have to patch every new version
of latex2html that I get, and I'm publishing some
open source (CWebLog) that uses latex2html
and that invokes this problem.  Everyone who
uses my code runs into it.

Could someone with access to the distribution
code make this change?




Also, I would like to suggest
changing the following lines:

        #ensure no more than 32 characters, including .html extension
        $title =~ s/^(.{1,27}).*$/$1/;
to

        #ensure no more than 55 characters, including .html extension
        $title =~ s/^(.{1,50}).*$/$1/;

I think the 32 character limit is probably arbitrary and
too small.   This patch to change it to 55 solves some
problems and doesn't appear to cause any new ones.
Does anyone know why it's  32?

Bob Williams