Update of /cvsroot/python/python/dist/src/Doc/perl
In directory sc8-pr-cvs1:/tmp/cvs-serv17125
Modified Files:
l2hinit.perl
Log Message:
normalize whitespace
Index: l2hinit.perl
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/perl/l2hinit.perl,v
retrieving revision 1.77
retrieving revision 1.78
diff -C2 -d -r1.77 -r1.78
*** l2hinit.perl 4 Sep 2003 22:16:45 -0000 1.77
--- l2hinit.perl 4 Sep 2003 22:21:17 -0000 1.78
***************
*** 52,56 ****
use File::Basename;
($myname, $mydir, $myext) = fileparse(__FILE__, '\..*');
! chop $mydir; # remove trailing '/'
$mydir = getcwd() . "$dd$mydir"
unless $mydir =~ s|^/|/|;
--- 52,56 ----
use File::Basename;
($myname, $mydir, $myext) = fileparse(__FILE__, '\..*');
! chop $mydir; # remove trailing '/'
$mydir = getcwd() . "$dd$mydir"
unless $mydir =~ s|^/|/|;
***************
*** 253,257 ****
my($icon, $current_file, @link) = @_;
my($dummy, $file, $title) = split($delim,
! $section_info{join(' ',@link)});
if ($icon =~ /\<tex2html_([_a-z]+)_visible_mark\>/) {
my $r = get_my_icon($1);
--- 253,257 ----
my($icon, $current_file, @link) = @_;
my($dummy, $file, $title) = split($delim,
! $section_info{join(' ',@link)});
if ($icon =~ /\<tex2html_([_a-z]+)_visible_mark\>/) {
my $r = get_my_icon($1);
***************
*** 260,280 ****
if ($title && ($file ne $current_file)) {
$title = purify($title);
! $title = get_first_words($title, $WORDS_IN_NAVIGATION_PANEL_TITLES);
! return (make_href($file, $icon), make_href($file, "$title"))
! }
elsif ($icon eq get_my_icon('up') && $EXTERNAL_UP_LINK) {
! return (make_href($EXTERNAL_UP_LINK, $icon),
! make_href($EXTERNAL_UP_LINK, "$EXTERNAL_UP_TITLE"))
! }
elsif ($icon eq get_my_icon('previous')
! && $EXTERNAL_PREV_LINK && $EXTERNAL_PREV_TITLE) {
! return (make_href($EXTERNAL_PREV_LINK, $icon),
! make_href($EXTERNAL_PREV_LINK, "$EXTERNAL_PREV_TITLE"))
! }
elsif ($icon eq get_my_icon('next')
! && $EXTERNAL_DOWN_LINK && $EXTERNAL_DOWN_TITLE) {
! return (make_href($EXTERNAL_DOWN_LINK, $icon),
! make_href($EXTERNAL_DOWN_LINK, "$EXTERNAL_DOWN_TITLE"))
! }
return (&inactive_img($icon), "");
}
--- 260,280 ----
if ($title && ($file ne $current_file)) {
$title = purify($title);
! $title = get_first_words($title, $WORDS_IN_NAVIGATION_PANEL_TITLES);
! return (make_href($file, $icon), make_href($file, "$title"))
! }
elsif ($icon eq get_my_icon('up') && $EXTERNAL_UP_LINK) {
! return (make_href($EXTERNAL_UP_LINK, $icon),
! make_href($EXTERNAL_UP_LINK, "$EXTERNAL_UP_TITLE"))
! }
elsif ($icon eq get_my_icon('previous')
! && $EXTERNAL_PREV_LINK && $EXTERNAL_PREV_TITLE) {
! return (make_href($EXTERNAL_PREV_LINK, $icon),
! make_href($EXTERNAL_PREV_LINK, "$EXTERNAL_PREV_TITLE"))
! }
elsif ($icon eq get_my_icon('next')
! && $EXTERNAL_DOWN_LINK && $EXTERNAL_DOWN_TITLE) {
! return (make_href($EXTERNAL_DOWN_LINK, $icon),
! make_href($EXTERNAL_DOWN_LINK, "$EXTERNAL_DOWN_TITLE"))
! }
return (&inactive_img($icon), "");
}
***************
*** 317,324 ****
my $index;
if ($letters) {
! $index = `$prog --columns $columns --letters $datafile`;
}
else {
! $index = `$prog --columns $columns $datafile`;
}
if (!s/$mark/$prefix$index/) {
--- 317,324 ----
my $index;
if ($letters) {
! $index = `$prog --columns $columns --letters $datafile`;
}
else {
! $index = `$prog --columns $columns $datafile`;
}
if (!s/$mark/$prefix$index/) {
***************
*** 345,371 ****
my $prefix = '';
foreach $key (keys %Modules) {
! $key =~ s/<tt>([a-zA-Z0-9._]*)<\/tt>/$1/;
! my $plat = "$ModulePlatforms{$key}";
! $plat = ''
! if ($plat eq $IGNORE_PLATFORM_ANNOTATION);
! if (!$first) {
! $allthesame = 0
! if ($prevplat ne $plat);
! }
! else { $first = 0; }
! $prevplat = $plat;
}
open(MODIDXFILE, '>modindex.dat') || die "\n$!\n";
foreach $key (keys %Modules) {
! # dump the line in the data file; just use a dummy seqno field
! my $nkey = $1;
! my $moditem = "$Modules{$key}";
! my $plat = '';
! $key =~ s/<tt>([a-zA-Z0-9._]*)<\/tt>/$1/;
! if ($ModulePlatforms{$key} && !$allthesame) {
! $plat = (" <em>(<span class=\"platform\">$ModulePlatforms{$key}"
! . '</span>)</em>');
! }
! print MODIDXFILE $moditem . $IDXFILE_FIELD_SEP
. "<tt class=\"module\">$key</tt>$plat###\n";
}
--- 345,371 ----
my $prefix = '';
foreach $key (keys %Modules) {
! $key =~ s/<tt>([a-zA-Z0-9._]*)<\/tt>/$1/;
! my $plat = "$ModulePlatforms{$key}";
! $plat = ''
! if ($plat eq $IGNORE_PLATFORM_ANNOTATION);
! if (!$first) {
! $allthesame = 0
! if ($prevplat ne $plat);
! }
! else { $first = 0; }
! $prevplat = $plat;
}
open(MODIDXFILE, '>modindex.dat') || die "\n$!\n";
foreach $key (keys %Modules) {
! # dump the line in the data file; just use a dummy seqno field
! my $nkey = $1;
! my $moditem = "$Modules{$key}";
! my $plat = '';
! $key =~ s/<tt>([a-zA-Z0-9._]*)<\/tt>/$1/;
! if ($ModulePlatforms{$key} && !$allthesame) {
! $plat = (" <em>(<span class=\"platform\">$ModulePlatforms{$key}"
! . '</span>)</em>');
! }
! print MODIDXFILE $moditem . $IDXFILE_FIELD_SEP
. "<tt class=\"module\">$key</tt>$plat###\n";
}
***************
*** 382,386 ****
}
if (!$allthesame) {
! $prefix .= <<PLAT_DISCUSS;
<p> Some module names are followed by an annotation indicating what
--- 382,386 ----
}
if (!$allthesame) {
! $prefix .= <<PLAT_DISCUSS;
<p> Some module names are followed by an annotation indicating what
***************
*** 390,394 ****
}
insert_index($idx_module_mark, 'modindex.dat', $MODULE_INDEX_COLUMNS, 0,
! $prefix);
}
--- 390,394 ----
}
insert_index($idx_module_mark, 'modindex.dat', $MODULE_INDEX_COLUMNS, 0,
! $prefix);
}
***************
*** 418,426 ****
$tocfile = $CURRENT_FILE;
my($closures, $reopens) = preserve_open_tags();
! anchor_label('contents', $CURRENT_FILE, $_); # this is added
$MY_CONTENTS_PAGE = "$CURRENT_FILE";
join('', "<br />\n\\tableofchildlinks[off]", $closures
! , make_section_heading($toc_title, 'h2'), $toc_mark
! , $reopens, $_);
}
# In addition to the standard stuff, add label to allow named node files.
--- 418,426 ----
$tocfile = $CURRENT_FILE;
my($closures, $reopens) = preserve_open_tags();
! anchor_label('contents', $CURRENT_FILE, $_); # this is added
$MY_CONTENTS_PAGE = "$CURRENT_FILE";
join('', "<br />\n\\tableofchildlinks[off]", $closures
! , make_section_heading($toc_title, 'h2'), $toc_mark
! , $reopens, $_);
}
# In addition to the standard stuff, add label to allow named node files.
***************
*** 430,437 ****
$loffile = $CURRENT_FILE;
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
! , $reopens, $_);
}
# In addition to the standard stuff, add label to allow named node files.
--- 430,437 ----
$loffile = $CURRENT_FILE;
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
! , $reopens, $_);
}
# In addition to the standard stuff, add label to allow named node files.
***************
*** 441,461 ****
$lotfile = $CURRENT_FILE;
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
! , $reopens, $_);
}
# In addition to the standard stuff, add label to allow named node files.
sub do_cmd_textohtmlinfopage {
local($_) = @_;
! if ($INFO) { #
! anchor_label("about",$CURRENT_FILE,$_); # this is added
! } #
! my $the_version = ''; # and the rest is
! if ($t_date) { # mostly ours
! $the_version = ",\n$t_date";
! if ($PACKAGE_VERSION) {
! $the_version .= ", Release $PACKAGE_VERSION$RELEASE_INFO";
! }
}
my $about;
--- 441,461 ----
$lotfile = $CURRENT_FILE;
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
! , $reopens, $_);
}
# In addition to the standard stuff, add label to allow named node files.
sub do_cmd_textohtmlinfopage {
local($_) = @_;
! if ($INFO) { #
! anchor_label("about",$CURRENT_FILE,$_); # this is added
! } #
! my $the_version = ''; # and the rest is
! if ($t_date) { # mostly ours
! $the_version = ",\n$t_date";
! if ($PACKAGE_VERSION) {
! $the_version .= ", Release $PACKAGE_VERSION$RELEASE_INFO";
! }
}
my $about;
***************
*** 483,487 ****
my $heading = make_section_heading($idx_title, 'h2') . $idx_mark;
my($pre, $post) = minimize_open_tags($heading);
! anchor_label('genindex',$CURRENT_FILE,$_); # this is added
return "<br />\n" . $pre . $_;
}
--- 483,487 ----
my $heading = make_section_heading($idx_title, 'h2') . $idx_mark;
my($pre, $post) = minimize_open_tags($heading);
! anchor_label('genindex',$CURRENT_FILE,$_); # this is added
return "<br />\n" . $pre . $_;
}
***************
*** 509,516 ****
# before the appropriate environments to force sectioning.
! # XXX This *assumes* that if there are two {theindex} environments,
! # the first is the module index and the second is the standard
! # index. This is sufficient for the current Python documentation,
! # but that's about it.
sub add_bbl_and_idx_dummy_commands {
--- 509,516 ----
# before the appropriate environments to force sectioning.
! # XXX This *assumes* that if there are two {theindex} environments,
! # the first is the module index and the second is the standard
! # index. This is sufficient for the current Python documentation,
! # but that's about it.
sub add_bbl_and_idx_dummy_commands {
***************
*** 549,553 ****
$global{'max_id'} = $id; # not sure why....
s/([\\]begin\s*$O\d+$C\s*theindex)/\\textohtmlindex $1/o;
! s/[\\]printindex/\\textohtmlindex /o;
}
else {
--- 549,553 ----
$global{'max_id'} = $id; # not sure why....
s/([\\]begin\s*$O\d+$C\s*theindex)/\\textohtmlindex $1/o;
! s/[\\]printindex/\\textohtmlindex /o;
}
else {
***************
*** 569,593 ****
#RRM: do not alter user-set value for $MAX_SPLIT_DEPTH
foreach $level ("part", "chapter", "section", "subsection",
! "subsubsection", "paragraph") {
! last if (($outermost_level) = /\\($level)$delimiter_rx/);
}
$level = ($outermost_level ? $section_commands{$outermost_level} :
! do {$outermost_level = 'section'; 3;});
#RRM: but calculate value for $MAX_SPLIT_DEPTH when a $REL_DEPTH was given
! if ($REL_DEPTH && $MAX_SPLIT_DEPTH) {
! $MAX_SPLIT_DEPTH = $level + $MAX_SPLIT_DEPTH;
} elsif (!($MAX_SPLIT_DEPTH)) { $MAX_SPLIT_DEPTH = 1 };
%unnumbered_section_commands = ('tableofcontents' => $level,
! 'listoffigures' => $level,
! 'listoftables' => $level,
! 'bibliography' => $level,
! 'textohtmlindex' => $level,
! 'textohtmlmoduleindex' => $level);
$section_headings{'textohtmlmoduleindex'} = 'h1';
%section_commands = (%unnumbered_section_commands,
! %section_commands);
make_sections_rx();
--- 569,593 ----
#RRM: do not alter user-set value for $MAX_SPLIT_DEPTH
foreach $level ("part", "chapter", "section", "subsection",
! "subsubsection", "paragraph") {
! last if (($outermost_level) = /\\($level)$delimiter_rx/);
}
$level = ($outermost_level ? $section_commands{$outermost_level} :
! do {$outermost_level = 'section'; 3;});
#RRM: but calculate value for $MAX_SPLIT_DEPTH when a $REL_DEPTH was given
! if ($REL_DEPTH && $MAX_SPLIT_DEPTH) {
! $MAX_SPLIT_DEPTH = $level + $MAX_SPLIT_DEPTH;
} elsif (!($MAX_SPLIT_DEPTH)) { $MAX_SPLIT_DEPTH = 1 };
%unnumbered_section_commands = ('tableofcontents' => $level,
! 'listoffigures' => $level,
! 'listoftables' => $level,
! 'bibliography' => $level,
! 'textohtmlindex' => $level,
! 'textohtmlmoduleindex' => $level);
$section_headings{'textohtmlmoduleindex'} = 'h1';
%section_commands = (%unnumbered_section_commands,
! %section_commands);
make_sections_rx();
***************
*** 605,609 ****
#
%declarations = ('preform' => '<div class="verbatim"><pre></pre></div>',
! %declarations);
--- 605,609 ----
#
%declarations = ('preform' => '<div class="verbatim"><pre></pre></div>',
! %declarations);
***************
*** 637,648 ****
# allow user-modification of the <title> tag; thanks Dan Young
if (defined &custom_TITLE_hook) {
! $title = &custom_TITLE_hook($title, $toc_sec_title);
}
if ($DOCTYPE =~ /\/\/[\w\.]+\s*$/) { # language spec included
! $DTDcomment = "<!DOCTYPE html PUBLIC \"$DOCTYPE\">\n";
} else {
! $DTDcomment = "<!DOCTYPE html PUBLIC \"$DOCTYPE//"
! . ($ISO_LANGUAGE ? $ISO_LANGUAGE : $isolanguage) . "\">\n";
}
if ($MY_PARTIAL_HEADER eq '') {
--- 637,648 ----
# allow user-modification of the <title> tag; thanks Dan Young
if (defined &custom_TITLE_hook) {
! $title = &custom_TITLE_hook($title, $toc_sec_title);
}
if ($DOCTYPE =~ /\/\/[\w\.]+\s*$/) { # language spec included
! $DTDcomment = "<!DOCTYPE html PUBLIC \"$DOCTYPE\">\n";
} else {
! $DTDcomment = "<!DOCTYPE html PUBLIC \"$DOCTYPE//"
! . ($ISO_LANGUAGE ? $ISO_LANGUAGE : $isolanguage) . "\">\n";
}
if ($MY_PARTIAL_HEADER eq '') {
***************
*** 720,722 ****
}
! 1; # This must be the last line
--- 720,722 ----
}
! 1; # This must be the last line