Use Perl function prototypes to help avoid definition/usage mismatches
while modifying these files.
Minor style changes to make the use of "my" with arrays more consistent.
diff --git a/Doc/perl/l2hinit.perl b/Doc/perl/l2hinit.perl
index da371bd..ab00b50 100644
--- a/Doc/perl/l2hinit.perl
+++ b/Doc/perl/l2hinit.perl
@@ -99,8 +99,8 @@
 
 $CUSTOM_BUTTONS = '';
 
-sub make_nav_sectref {
-    my($label,$title) = @_;
+sub make_nav_sectref($$) {
+    my($label, $title) = @_;
     if ($title) {
         if ($title =~ /\<[aA] /) {
             $title =~ s/\<[aA] /<a class="sectref" /;
@@ -127,7 +127,7 @@
 $my_icon_names{'previous_page'} = 'previous';
 $my_icon_names{'next_page'} = 'next';
 
-sub get_my_icon {
+sub get_my_icon($) {
     my $name = @_[0];
     my $text = $my_icon_tags{$name};
     if ($my_icon_names{$name}) {
@@ -141,7 +141,7 @@
            . " height=\"32\"\n  alt=\"$text\" width=\"32\">";
 }
 
-sub use_my_icon {
+sub use_my_icon($) {
     my $s = @_[0];
     if ($s =~ /\<tex2html_([a-z_]+)_visible_mark\>/) {
         my $r = get_my_icon($1);
@@ -150,7 +150,7 @@
     return $s;
 }
 
-sub make_nav_panel {
+sub make_nav_panel() {
     my $s;
     my $BLANK_ICON = get_my_icon('blank');
     $NEXT = $NEXT_TITLE ? use_my_icon("$NEXT") : $BLANK_ICON;
@@ -192,7 +192,7 @@
     return $toc;
 }
 
-sub get_version_text {
+sub get_version_text() {
     if ($PACKAGE_VERSION ne '' && $t_date) {
         return ("<span class=\"release-info\">"
                 . "Release $PACKAGE_VERSION$RELEASE_INFO,"
@@ -210,13 +210,13 @@
 }
 
 
-sub top_navigation_panel {
+sub top_navigation_panel() {
     return "\n"
            . make_nav_panel()
            . "<br><hr>\n";
 }
 
-sub bot_navigation_panel {
+sub bot_navigation_panel() {
     return "\n<p><hr>\n"
            . make_nav_panel()
            . "<hr>\n"
@@ -255,7 +255,7 @@
     return (&inactive_img($icon), "");
 }
 
-sub add_special_link {
+sub add_special_link($$$) {
     my($icon, $file, $current_file) = @_;
     if ($icon =~ /\<tex2html_([_a-z]+)_visible_mark\>/) {
         my $r = get_my_icon($1);
@@ -281,14 +281,14 @@
 }
 
 
-sub gen_index_id {
+sub gen_index_id($$) {
     # this is used to ensure common index key generation and a stable sort
-    my($str,$extra) = @_;
+    my($str, $extra) = @_;
     sprintf('%s###%s%010d', $str, $extra, ++$global{'max_id'});
 }
 
-sub insert_index {
-    my($mark,$datafile,$columns,$letters,$prefix) = @_;
+sub insert_index($$$$$) {
+    my($mark, $datafile, $columns, $letters, $prefix) = @_;
     my $prog = "$myrootdir/tools/buildindex.py";
     my $index;
     if ($letters) {
@@ -302,7 +302,7 @@
     }
 }
 
-sub add_idx {
+sub add_idx() {
     print "\nBuilding HTML for the index ...";
     close(IDXFILE);
     insert_index($idx_mark, 'index.dat', $INDEX_COLUMNS, 1, '');
@@ -312,7 +312,7 @@
 $idx_module_mark = '<tex2html_idx_module_mark>';
 $idx_module_title = 'Module Index';
 
-sub add_module_idx {
+sub add_module_idx() {
     print "\nBuilding HTML for the module index ...";
     my $key;
     my $first = 1;
@@ -391,7 +391,7 @@
     local($_) = @_;
     $TITLE = $toc_title;
     $tocfile = $CURRENT_FILE;
-    my($closures,$reopens) = preserve_open_tags();
+    my($closures, $reopens) = preserve_open_tags();
     anchor_label('contents', $CURRENT_FILE, $_);	# this is added
     join('', "<BR>\n\\tableofchildlinks[off]", $closures
 	 , make_section_heading($toc_title, 'H2'), $toc_mark
@@ -402,7 +402,7 @@
     local($_) = @_;
     $TITLE = $lof_title;
     $loffile = $CURRENT_FILE;
-    my($closures,$reopens) = preserve_open_tags();
+    my($closures, $reopens) = preserve_open_tags();
     anchor_label('lof', $CURRENT_FILE, $_);		# this is added
     join('', "<BR>\n", $closures
 	 , make_section_heading($lof_title, 'H2'), $lof_mark
@@ -413,7 +413,7 @@
     local($_) = @_;
     $TITLE = $lot_title;
     $lotfile = $CURRENT_FILE;
-    my($closures,$reopens) = preserve_open_tags();
+    my($closures, $reopens) = preserve_open_tags();
     anchor_label('lot', $CURRENT_FILE, $_);		# this is added
     join('', "<BR>\n", $closures
 	 , make_section_heading($lot_title, 'H2'), $lot_mark
@@ -455,7 +455,7 @@
     if (($SHORT_INDEX) && (%index_segment)) { make_preindex(); }
     else { $preindex = ''; }
     my $heading = make_section_heading($idx_title, 'h2') . $idx_mark;
-    my($pre,$post) = minimize_open_tags($heading);
+    my($pre, $post) = minimize_open_tags($heading);
     anchor_label('genindex',$CURRENT_FILE,$_);		# this is added
     return "<br>\n" . $pre . $_;
 }
@@ -585,7 +585,7 @@
 # doctype declaration; MSIE5 on NT4 SP4 barfs on it and drops the
 # content of the page.
 $MY_PARTIAL_HEADER = '';
-sub make_head_and_body {
+sub make_head_and_body($$) {
     my($title, $body) = @_;
     $body = " $body" unless ($body eq '');
     my $DTDcomment = '';