diff options
author | Fred Drake <fdrake@acm.org> | 2002-05-23 17:59:16 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2002-05-23 17:59:16 (GMT) |
commit | f547863c63020fdc886d8c601fd712ccce7e90f3 (patch) | |
tree | 5ac430069fd8218f4bad9acfcf14e1106b2c8b32 /Doc/perl/l2hinit.perl | |
parent | ffb294bd349a1481ad1ee73cba12374e9351c35f (diff) | |
download | cpython-f547863c63020fdc886d8c601fd712ccce7e90f3.zip cpython-f547863c63020fdc886d8c601fd712ccce7e90f3.tar.gz cpython-f547863c63020fdc886d8c601fd712ccce7e90f3.tar.bz2 |
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.
Diffstat (limited to 'Doc/perl/l2hinit.perl')
-rw-r--r-- | Doc/perl/l2hinit.perl | 40 |
1 files changed, 20 insertions, 20 deletions
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 @@ sub custom_driver_hook { $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_tags{'modules'} = 'Module Index'; $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 @@ sub get_my_icon { . " 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 @@ sub use_my_icon { 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 @@ sub add_child_links { 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 get_version_text { } -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 @@ sub add_link { 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 do_cmd_arabic { } -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 insert_index { } } -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 @@ sub add_idx { $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 @@ sub do_cmd_tableofcontents { 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 @@ sub do_cmd_listoffigures { 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 @@ sub do_cmd_listoftables { 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 @@ sub do_cmd_textohtmlindex { 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 @@ sub set_depth_levels { # 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 = ''; |