[Python-checkins] python/dist/src/Doc/perl python.perl,1.131,1.132
fdrake@users.sourceforge.net
fdrake@users.sourceforge.net
Fri, 15 Nov 2002 11:04:14 -0800
Update of /cvsroot/python/python/dist/src/Doc/perl
In directory usw-pr-cvs1:/tmp/cvs-serv23404
Modified Files:
python.perl
Log Message:
Squash an enormous number of warnings reported when adding "use
warnings;" to this, and keep the "use" statement this time.
Fix an obscure bug that caused weird index entries to be generated in
a few cases, and a minor problem with horizontal alignmetn of the last
column of 5-column tables.
[I'd report a SF bug #, but I can't get to that right now.]
Index: python.perl
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/perl/python.perl,v
retrieving revision 1.131
retrieving revision 1.132
diff -C2 -d -r1.131 -r1.132
*** python.perl 13 Nov 2002 19:16:37 -0000 1.131
--- python.perl 15 Nov 2002 19:04:10 -0000 1.132
***************
*** 9,12 ****
--- 9,13 ----
package main;
+ use warnings;
use File::Basename;
***************
*** 27,31 ****
sub make_icon_filename($){
! my($myname, $mydir, $myext) = fileparse(@_[0], '\..*');
chop $mydir;
if ($mydir eq '.') {
--- 28,32 ----
sub make_icon_filename($){
! my($myname, $mydir, $myext) = fileparse($_[0], '\..*');
chop $mydir;
if ($mydir eq '.') {
***************
*** 38,42 ****
sub get_link_icon($){
! my $url = @_[0];
if ($OFF_SITE_LINK_ICON && ($url =~ /^[-a-zA-Z0-9.]+:/)) {
# absolute URL; assume it points off-site
--- 39,43 ----
sub get_link_icon($){
! my $url = $_[0];
if ($OFF_SITE_LINK_ICON && ($url =~ /^[-a-zA-Z0-9.]+:/)) {
# absolute URL; assume it points off-site
***************
*** 73,77 ****
if ($matched) {
my($new, $char) = ($1, $3);
! eval "sub do_cmd_$new { \"\\$char\" . \@_[0]; }";
print "\ndefining handler for \\$new to insert '$char'\n";
}
--- 74,78 ----
if ($matched) {
my($new, $char) = ($1, $3);
! eval "sub do_cmd_$new { \"\\$char\" . \$_[0]; }";
print "\ndefining handler for \\$new to insert '$char'\n";
}
***************
*** 86,112 ****
# the older version of LaTeX2HTML we use doesn't support this, but we use it:
! sub do_cmd_textasciitilde{ '~' . @_[0]; }
! sub do_cmd_textasciicircum{ '^' . @_[0]; }
! sub do_cmd_textbar{ '|' . @_[0]; }
! sub do_cmd_textgreater{ '>' . @_[0]; }
! sub do_cmd_textless{ '<' . @_[0]; }
! sub do_cmd_infinity{ '∞' . @_[0]; }
! sub do_cmd_plusminus{ '±' . @_[0]; }
! sub do_cmd_menuselection{ @_[0]; }
! sub do_cmd_sub{ ' > ' . @_[0]; }
# words typeset in a special way (not in HTML though)
! sub do_cmd_ABC{ 'ABC' . @_[0]; }
! sub do_cmd_UNIX{ 'Unix'. @_[0]; }
! sub do_cmd_ASCII{ 'ASCII' . @_[0]; }
! sub do_cmd_POSIX{ 'POSIX' . @_[0]; }
! sub do_cmd_C{ 'C' . @_[0]; }
! sub do_cmd_Cpp{ 'C++' . @_[0]; }
! sub do_cmd_EOF{ 'EOF' . @_[0]; }
! sub do_cmd_NULL{ '<tt class="constant">NULL</tt>' . @_[0]; }
! sub do_cmd_e{ '\' . @_[0]; }
$DEVELOPER_ADDRESS = '';
--- 87,114 ----
# the older version of LaTeX2HTML we use doesn't support this, but we use it:
! sub do_cmd_textasciitilde{ '~' . $_[0]; }
! sub do_cmd_textasciicircum{ '^' . $_[0]; }
! sub do_cmd_textbar{ '|' . $_[0]; }
! sub do_cmd_textgreater{ '>' . $_[0]; }
! sub do_cmd_textless{ '<' . $_[0]; }
! sub do_cmd_textunderscore{ '_' . $_[0]; }
! sub do_cmd_infinity{ '∞' . $_[0]; }
! sub do_cmd_plusminus{ '±' . $_[0]; }
! sub do_cmd_menuselection{ $_[0]; }
! sub do_cmd_sub{ ' > ' . $_[0]; }
# words typeset in a special way (not in HTML though)
! sub do_cmd_ABC{ 'ABC' . $_[0]; }
! sub do_cmd_UNIX{ 'Unix'. $_[0]; }
! sub do_cmd_ASCII{ 'ASCII' . $_[0]; }
! sub do_cmd_POSIX{ 'POSIX' . $_[0]; }
! sub do_cmd_C{ 'C' . $_[0]; }
! sub do_cmd_Cpp{ 'C++' . $_[0]; }
! sub do_cmd_EOF{ 'EOF' . $_[0]; }
! sub do_cmd_NULL{ '<tt class="constant">NULL</tt>' . $_[0]; }
! sub do_cmd_e{ '\' . $_[0]; }
$DEVELOPER_ADDRESS = '';
***************
*** 115,120 ****
$PACKAGE_VERSION = '';
! sub do_cmd_version{ $PACKAGE_VERSION . @_[0]; }
! sub do_cmd_shortversion{ $SHORT_VERSION . @_[0]; }
sub do_cmd_release{
local($_) = @_;
--- 117,122 ----
$PACKAGE_VERSION = '';
! sub do_cmd_version{ $PACKAGE_VERSION . $_[0]; }
! sub do_cmd_shortversion{ $SHORT_VERSION . $_[0]; }
sub do_cmd_release{
local($_) = @_;
***************
*** 141,147 ****
}
! #sub do_cmd_developer{ do_cmd_author(@_[0]); }
! #sub do_cmd_developers{ do_cmd_author(@_[0]); }
! #sub do_cmd_developersaddress{ do_cmd_authoraddress(@_[0]); }
sub do_cmd_hackscore{
--- 143,149 ----
}
! #sub do_cmd_developer{ do_cmd_author($_[0]); }
! #sub do_cmd_developers{ do_cmd_author($_[0]); }
! #sub do_cmd_developersaddress{ do_cmd_authoraddress($_[0]); }
sub do_cmd_hackscore{
***************
*** 160,168 ****
sub do_cmd_optional{
if ($IN_DESC_HANDLER) {
! return use_wrappers(@_[0], "</var><big>\[</big><var>",
"</var><big>\]</big><var>");
}
else {
! return use_wrappers(@_[0], "<big>\[</big>", "<big>\]</big>");
}
}
--- 162,170 ----
sub do_cmd_optional{
if ($IN_DESC_HANDLER) {
! return use_wrappers($_[0], "</var><big>\[</big><var>",
"</var><big>\]</big><var>");
}
else {
! return use_wrappers($_[0], "<big>\[</big>", "<big>\]</big>");
}
}
***************
*** 173,240 ****
# from local repositories.
! sub do_cmd_pytype{ return @_[0]; }
sub do_cmd_makevar{
! return use_wrappers(@_[0], '<span class="makevar">', '</span>'); }
sub do_cmd_code{
! return use_wrappers(@_[0], '<code>', '</code>'); }
sub do_cmd_module{
! return use_wrappers(@_[0], '<tt class="module">', '</tt>'); }
sub do_cmd_keyword{
! return use_wrappers(@_[0], '<tt class="keyword">', '</tt>'); }
sub do_cmd_exception{
! return use_wrappers(@_[0], '<tt class="exception">', '</tt>'); }
sub do_cmd_class{
! return use_wrappers(@_[0], '<tt class="class">', '</tt>'); }
sub do_cmd_function{
! return use_wrappers(@_[0], '<tt class="function">', '</tt>'); }
sub do_cmd_constant{
! return use_wrappers(@_[0], '<tt class="constant">', '</tt>'); }
sub do_cmd_member{
! return use_wrappers(@_[0], '<tt class="member">', '</tt>'); }
sub do_cmd_method{
! return use_wrappers(@_[0], '<tt class="method">', '</tt>'); }
sub do_cmd_cfunction{
! return use_wrappers(@_[0], '<tt class="cfunction">', '</tt>'); }
sub do_cmd_cdata{
! return use_wrappers(@_[0], '<tt class="cdata">', '</tt>'); }
sub do_cmd_ctype{
! return use_wrappers(@_[0], '<tt class="ctype">', '</tt>'); }
sub do_cmd_regexp{
! return use_wrappers(@_[0], '<tt class="regexp">', '</tt>'); }
sub do_cmd_character{
! return use_wrappers(@_[0], '"<tt class="character">', '</tt>"'); }
sub do_cmd_program{
! return use_wrappers(@_[0], '<b class="program">', '</b>'); }
sub do_cmd_programopt{
! return use_wrappers(@_[0], '<b class="programopt">', '</b>'); }
sub do_cmd_longprogramopt{
# note that the --- will be later converted to -- by LaTeX2HTML
! return use_wrappers(@_[0], '<b class="programopt">---', '</b>'); }
sub do_cmd_email{
! return use_wrappers(@_[0], '<span class="email">', '</span>'); }
sub do_cmd_mailheader{
! return use_wrappers(@_[0], '<span class="mailheader">', ':</span>'); }
sub do_cmd_mimetype{
! return use_wrappers(@_[0], '<span class="mimetype">', '</span>'); }
sub do_cmd_var{
! return use_wrappers(@_[0], "<var>", "</var>"); }
sub do_cmd_dfn{
! return use_wrappers(@_[0], '<i class="dfn">', '</i>'); }
sub do_cmd_emph{
! return use_wrappers(@_[0], '<i>', '</i>'); }
sub do_cmd_file{
! return use_wrappers(@_[0], '<span class="file">', '</span>'); }
sub do_cmd_filenq{
! return do_cmd_file(@_[0]); }
sub do_cmd_samp{
! return use_wrappers(@_[0], '"<tt class="samp">', '</tt>"'); }
sub do_cmd_kbd{
! return use_wrappers(@_[0], '<kbd>', '</kbd>'); }
sub do_cmd_strong{
! return use_wrappers(@_[0], '<b>', '</b>'); }
sub do_cmd_textbf{
! return use_wrappers(@_[0], '<b>', '</b>'); }
sub do_cmd_textit{
! return use_wrappers(@_[0], '<i>', '</i>'); }
# This can be changed/overridden for translations:
%NoticeNames = ('note' => 'Note:',
--- 175,242 ----
# from local repositories.
! sub do_cmd_pytype{ return $_[0]; }
sub do_cmd_makevar{
! return use_wrappers($_[0], '<span class="makevar">', '</span>'); }
sub do_cmd_code{
! return use_wrappers($_[0], '<code>', '</code>'); }
sub do_cmd_module{
! return use_wrappers($_[0], '<tt class="module">', '</tt>'); }
sub do_cmd_keyword{
! return use_wrappers($_[0], '<tt class="keyword">', '</tt>'); }
sub do_cmd_exception{
! return use_wrappers($_[0], '<tt class="exception">', '</tt>'); }
sub do_cmd_class{
! return use_wrappers($_[0], '<tt class="class">', '</tt>'); }
sub do_cmd_function{
! return use_wrappers($_[0], '<tt class="function">', '</tt>'); }
sub do_cmd_constant{
! return use_wrappers($_[0], '<tt class="constant">', '</tt>'); }
sub do_cmd_member{
! return use_wrappers($_[0], '<tt class="member">', '</tt>'); }
sub do_cmd_method{
! return use_wrappers($_[0], '<tt class="method">', '</tt>'); }
sub do_cmd_cfunction{
! return use_wrappers($_[0], '<tt class="cfunction">', '</tt>'); }
sub do_cmd_cdata{
! return use_wrappers($_[0], '<tt class="cdata">', '</tt>'); }
sub do_cmd_ctype{
! return use_wrappers($_[0], '<tt class="ctype">', '</tt>'); }
sub do_cmd_regexp{
! return use_wrappers($_[0], '<tt class="regexp">', '</tt>'); }
sub do_cmd_character{
! return use_wrappers($_[0], '"<tt class="character">', '</tt>"'); }
sub do_cmd_program{
! return use_wrappers($_[0], '<b class="program">', '</b>'); }
sub do_cmd_programopt{
! return use_wrappers($_[0], '<b class="programopt">', '</b>'); }
sub do_cmd_longprogramopt{
# note that the --- will be later converted to -- by LaTeX2HTML
! return use_wrappers($_[0], '<b class="programopt">---', '</b>'); }
sub do_cmd_email{
! return use_wrappers($_[0], '<span class="email">', '</span>'); }
sub do_cmd_mailheader{
! return use_wrappers($_[0], '<span class="mailheader">', ':</span>'); }
sub do_cmd_mimetype{
! return use_wrappers($_[0], '<span class="mimetype">', '</span>'); }
sub do_cmd_var{
! return use_wrappers($_[0], "<var>", "</var>"); }
sub do_cmd_dfn{
! return use_wrappers($_[0], '<i class="dfn">', '</i>'); }
sub do_cmd_emph{
! return use_wrappers($_[0], '<i>', '</i>'); }
sub do_cmd_file{
! return use_wrappers($_[0], '<span class="file">', '</span>'); }
sub do_cmd_filenq{
! return do_cmd_file($_[0]); }
sub do_cmd_samp{
! return use_wrappers($_[0], '"<tt class="samp">', '</tt>"'); }
sub do_cmd_kbd{
! return use_wrappers($_[0], '<kbd>', '</kbd>'); }
sub do_cmd_strong{
! return use_wrappers($_[0], '<b>', '</b>'); }
sub do_cmd_textbf{
! return use_wrappers($_[0], '<b>', '</b>'); }
sub do_cmd_textit{
! return use_wrappers($_[0], '<i>', '</i>'); }
# This can be changed/overridden for translations:
%NoticeNames = ('note' => 'Note:',
***************
*** 245,249 ****
my $label = $NoticeNames{'note'};
return use_wrappers(
! @_[0],
"<span class=\"note\"><b class=\"label\">$label</b>\n",
'</span>'); }
--- 247,251 ----
my $label = $NoticeNames{'note'};
return use_wrappers(
! $_[0],
"<span class=\"note\"><b class=\"label\">$label</b>\n",
'</span>'); }
***************
*** 251,255 ****
my $label = $NoticeNames{'warning'};
return use_wrappers(
! @_[0],
"<span class=\"warning\"><b class=\"label\">$label</b>\n",
'</span>'); }
--- 253,257 ----
my $label = $NoticeNames{'warning'};
return use_wrappers(
! $_[0],
"<span class=\"warning\"><b class=\"label\">$label</b>\n",
'</span>'); }
***************
*** 268,274 ****
sub do_cmd_moreargs{
! return '...' . @_[0]; }
sub do_cmd_unspecified{
! return '...' . @_[0]; }
--- 270,276 ----
sub do_cmd_moreargs{
! return '...' . $_[0]; }
sub do_cmd_unspecified{
! return '...' . $_[0]; }
***************
*** 396,401 ****
sub versionnote($$){
# one or two parameters: \versionnote[explanation]{version}
! my $type = @_[0];
! local $_ = @_[1];
my $explanation = next_optional_argument();
my $release = next_argument();
--- 398,403 ----
sub versionnote($$){
# one or two parameters: \versionnote[explanation]{version}
! my $type = $_[0];
! local $_ = $_[1];
my $explanation = next_optional_argument();
my $release = next_argument();
***************
*** 408,416 ****
sub do_cmd_versionadded{
! return versionnote('New', @_[0]);
}
sub do_cmd_versionchanged{
! return versionnote('Changed', @_[0]);
}
--- 410,418 ----
sub do_cmd_versionadded{
! return versionnote('New', $_[0]);
}
sub do_cmd_versionchanged{
! return versionnote('Changed', $_[0]);
}
***************
*** 472,476 ****
# a warning that \makemodindex is unknown.)
#
! sub do_cmd_makemodindex{ return @_[0]; }
# We're in the document subdirectory when this happens!
--- 474,478 ----
# a warning that \makemodindex is unknown.)
#
! sub do_cmd_makemodindex{ return $_[0]; }
# We're in the document subdirectory when this happens!
***************
*** 494,498 ****
sub gen_link($$){
my($node, $target) = @_;
! print INTLABELS "\$internal_labels{\"$target\"} = \"$URL/$node\";\n";
return "<a href=\"$node#$target\">";
}
--- 496,500 ----
sub gen_link($$){
my($node, $target) = @_;
! print INTLABELS "\$internal_labels{\"$target\"} = \"/$node\";\n";
return "<a href=\"$node#$target\">";
}
***************
*** 518,527 ****
my $i = 0;
for (; $i < $count; ++$i) {
! my $name = @_[$i];
my $cmd = "idx_cmd_$name";
die "\nNo function $cmd() defined!\n"
if (!defined &$cmd);
eval ("sub do_cmd_$name { return process_index_macros("
! . "\@_[0], '$name'); }");
if (length($IndexMacroPattern) == 0) {
$IndexMacroPattern = "$name";
--- 520,529 ----
my $i = 0;
for (; $i < $count; ++$i) {
! my $name = $_[$i];
my $cmd = "idx_cmd_$name";
die "\nNo function $cmd() defined!\n"
if (!defined &$cmd);
eval ("sub do_cmd_$name { return process_index_macros("
! . "\$_[0], '$name'); }");
if (length($IndexMacroPattern) == 0) {
$IndexMacroPattern = "$name";
***************
*** 536,540 ****
sub process_index_macros($$){
local($_) = @_;
! my $cmdname = @_[1]; # This is what triggered us in the first place;
# we know it's real, so just process it.
my($name, $aname, $ahref) = new_link_info();
--- 538,542 ----
sub process_index_macros($$){
local($_) = @_;
! my $cmdname = $_[1]; # This is what triggered us in the first place;
# we know it's real, so just process it.
my($name, $aname, $ahref) = new_link_info();
***************
*** 565,569 ****
sub idx_cmd_index($){
my $str = next_argument();
! add_index_entry("$str", @_[0]);
}
--- 567,571 ----
sub idx_cmd_index($){
my $str = next_argument();
! add_index_entry("$str", $_[0]);
}
***************
*** 571,576 ****
sub idx_cmd_kwindex($){
my $str = next_argument();
! add_index_entry("<tt>$str</tt>!keyword", @_[0]);
! add_index_entry("keyword!<tt>$str</tt>", @_[0]);
}
--- 573,578 ----
sub idx_cmd_kwindex($){
my $str = next_argument();
! add_index_entry("<tt>$str</tt>!keyword", $_[0]);
! add_index_entry("keyword!<tt>$str</tt>", $_[0]);
}
***************
*** 579,584 ****
my $str1 = next_argument();
my $str2 = next_argument();
! add_index_entry("$str1!$str2", @_[0]);
! add_index_entry("$str2!$str1", @_[0]);
}
--- 581,586 ----
my $str1 = next_argument();
my $str2 = next_argument();
! add_index_entry("$str1!$str2", $_[0]);
! add_index_entry("$str2!$str1", $_[0]);
}
***************
*** 588,594 ****
my $str2 = next_argument();
my $str3 = next_argument();
! add_index_entry("$str1!$str2 $str3", @_[0]);
! add_index_entry("$str2!$str3, $str1", @_[0]);
! add_index_entry("$str3!$str1 $str2", @_[0]);
}
--- 590,596 ----
my $str2 = next_argument();
my $str3 = next_argument();
! add_index_entry("$str1!$str2 $str3", $_[0]);
! add_index_entry("$str2!$str3, $str1", $_[0]);
! add_index_entry("$str3!$str1 $str2", $_[0]);
}
***************
*** 599,606 ****
my $str3 = next_argument();
my $str4 = next_argument();
! add_index_entry("$str1!$str2 $str3 $str4", @_[0]);
! add_index_entry("$str2!$str3 $str4, $str1", @_[0]);
! add_index_entry("$str3!$str4, $str1 $str2", @_[0]);
! add_index_entry("$str4!$$str1 $str2 $str3", @_[0]);
}
--- 601,608 ----
my $str3 = next_argument();
my $str4 = next_argument();
! add_index_entry("$str1!$str2 $str3 $str4", $_[0]);
! add_index_entry("$str2!$str3 $str4, $str1", $_[0]);
! add_index_entry("$str3!$str4, $str1 $str2", $_[0]);
! add_index_entry("$str4!$str1 $str2 $str3", $_[0]);
}
***************
*** 609,613 ****
my $str = next_argument();
my $entry = $str . get_indexsubitem();
! add_index_entry($entry, @_[0]);
}
--- 611,615 ----
my $str = next_argument();
my $entry = $str . get_indexsubitem();
! add_index_entry($entry, $_[0]);
}
***************
*** 620,627 ****
define_indexing_macro('stindex', 'opindex', 'exindex', 'obindex');
! sub idx_cmd_stindex($){ my_typed_index_helper('statement', @_[0]); }
! sub idx_cmd_opindex($){ my_typed_index_helper('operator', @_[0]); }
! sub idx_cmd_exindex($){ my_typed_index_helper('exception', @_[0]); }
! sub idx_cmd_obindex($){ my_typed_index_helper('object', @_[0]); }
define_indexing_macro('bifuncindex');
--- 622,629 ----
define_indexing_macro('stindex', 'opindex', 'exindex', 'obindex');
! sub idx_cmd_stindex($){ my_typed_index_helper('statement', $_[0]); }
! sub idx_cmd_opindex($){ my_typed_index_helper('operator', $_[0]); }
! sub idx_cmd_exindex($){ my_typed_index_helper('exception', $_[0]); }
! sub idx_cmd_obindex($){ my_typed_index_helper('object', $_[0]); }
define_indexing_macro('bifuncindex');
***************
*** 629,633 ****
my $str = next_argument();
add_index_entry("<tt class=\"function\">$str()</tt> (built-in function)",
! @_[0]);
}
--- 631,635 ----
my $str = next_argument();
add_index_entry("<tt class=\"function\">$str()</tt> (built-in function)",
! $_[0]);
}
***************
*** 679,686 ****
}
! sub do_cmd_modindex{ return my_module_index_helper('', @_); }
! sub do_cmd_bimodindex{ return my_module_index_helper('built-in', @_); }
! sub do_cmd_exmodindex{ return my_module_index_helper('extension', @_); }
! sub do_cmd_stmodindex{ return my_module_index_helper('standard', @_); }
sub ref_module_index_helper($$){
--- 681,692 ----
}
! sub do_cmd_modindex{ return my_module_index_helper('', $_[0]); }
! sub do_cmd_bimodindex{ return my_module_index_helper('built-in', $_[0]); }
! sub do_cmd_exmodindex{ return my_module_index_helper('extension', $_[0]); }
! sub do_cmd_stmodindex{ return my_module_index_helper('standard', $_[0]); }
! # local($_) = @_;
! # my $name = next_argument();
! # return define_module('standard', $name) . $_;
! # }
sub ref_module_index_helper($$){
***************
*** 699,708 ****
define_indexing_macro('refmodindex', 'refbimodindex',
'refexmodindex', 'refstmodindex');
! sub idx_cmd_refmodindex($){ return ref_module_index_helper('', @_); }
! sub idx_cmd_refbimodindex($){ return ref_module_index_helper('built-in', @_); }
! sub idx_cmd_refexmodindex($){ return ref_module_index_helper('extension', @_);}
! sub idx_cmd_refstmodindex($){ return ref_module_index_helper('standard', @_); }
! sub do_cmd_nodename{ return do_cmd_label(@_); }
sub init_myformat(){
--- 705,718 ----
define_indexing_macro('refmodindex', 'refbimodindex',
'refexmodindex', 'refstmodindex');
! sub idx_cmd_refmodindex($){
! return ref_module_index_helper('', $_[0]); }
! sub idx_cmd_refbimodindex($){
! return ref_module_index_helper('built-in', $_[0]); }
! sub idx_cmd_refexmodindex($){
! return ref_module_index_helper('extension', $_[0]);}
! sub idx_cmd_refstmodindex($){
! return ref_module_index_helper('standard', $_[0]); }
! sub do_cmd_nodename{ return do_cmd_label($_[0]); }
sub init_myformat(){
***************
*** 718,722 ****
#
sub make_str_index_entry($){
! my $str = @_[0];
my($name, $aname, $ahref) = new_link_info();
add_index_entry($str, $ahref);
--- 728,732 ----
#
sub make_str_index_entry($){
! my $str = $_[0];
my($name, $aname, $ahref) = new_link_info();
add_index_entry($str, $ahref);
***************
*** 860,866 ****
local($_) = @_;
s/\\productioncont/ /g;
! s/\\production(<<\d+>>)(.+)\1/\n\2 ::= /g;
! s/\\token(<<\d+>>)(.+)\1/\2/g;
! s/\\e([^a-zA-Z])/\\\1/g;
s/<<\d+>>//g;
s/;SPMgt;/>/g;
--- 870,876 ----
local($_) = @_;
s/\\productioncont/ /g;
! s/\\production(<<\d+>>)(.+)\1/\n$2 ::= /g;
! s/\\token(<<\d+>>)(.+)\1/$2/g;
! s/\\e([^a-zA-Z])/\\$1/g;
s/<<\d+>>//g;
s/;SPMgt;/>/g;
***************
*** 876,881 ****
$REFCOUNTS_LOADED = 1;
! my $myname, $mydir, $myext;
! ($myname, $mydir, $myext) = fileparse(__FILE__, '\..*');
chop $mydir; # remove trailing '/'
($myname, $mydir, $myext) = fileparse($mydir, '\..*');
--- 886,890 ----
$REFCOUNTS_LOADED = 1;
! my($myname, $mydir, $myext) = fileparse(__FILE__, '\..*');
chop $mydir; # remove trailing '/'
($myname, $mydir, $myext) = fileparse($mydir, '\..*');
***************
*** 913,918 ****
$idx =~ s/ \(.*\)//;
$idx =~ s/\(\)//; # ???? - why both of these?
! $args =~ s/(\s|\*)([a-z_][a-z_0-9]*),/\1<var>\2<\/var>,/g;
! $args =~ s/(\s|\*)([a-z_][a-z_0-9]*)$/\1<var>\2<\/var>/s;
return ('<table cellpadding="0" cellspacing="0"><tr valign="baseline">'
. "<td><nobr>$type\ <b>$idx</b>(</nobr></td>"
--- 922,927 ----
$idx =~ s/ \(.*\)//;
$idx =~ s/\(\)//; # ???? - why both of these?
! $args =~ s/(\s|\*)([a-z_][a-z_0-9]*),/$1<var>$2<\/var>,/g;
! $args =~ s/(\s|\*)([a-z_][a-z_0-9]*)$/$1<var>$2<\/var>/s;
return ('<table cellpadding="0" cellspacing="0"><tr valign="baseline">'
. "<td><nobr>$type\ <b>$idx</b>(</nobr></td>"
***************
*** 1154,1158 ****
sub do_env_classdesc{
! return handle_classlike_descriptor(@_[0], "class");
}
--- 1163,1167 ----
sub do_env_classdesc{
! return handle_classlike_descriptor($_[0], "class");
}
***************
*** 1169,1173 ****
sub do_env_excclassdesc{
! return handle_classlike_descriptor(@_[0], "exception");
}
--- 1178,1182 ----
sub do_env_excclassdesc{
! return handle_classlike_descriptor($_[0], "exception");
}
***************
*** 1297,1301 ****
# do a little magic on a font name to get the right behavior in the first
# column of the output table
! my $font = @_[0];
if (defined $FontConversions{$font}) {
$font = $FontConversions{$font};
--- 1306,1310 ----
# do a little magic on a font name to get the right behavior in the first
# column of the output table
! my $font = $_[0];
if (defined $FontConversions{$font}) {
$font = $FontConversions{$font};
***************
*** 1305,1309 ****
sub figure_column_alignment($){
! my $a = @_[0];
my $mark = substr($a, 0, 1);
my $r = '';
--- 1314,1321 ----
sub figure_column_alignment($){
! my $a = $_[0];
! if (!defined $a) {
! return '';
! }
my $mark = substr($a, 0, 1);
my $r = '';
***************
*** 1321,1325 ****
sub setup_column_alignments($){
local($_) = @_;
! my($s1, $s2, $s3, $s4, $a5) = split(/[|]/,$_);
my $a1 = figure_column_alignment($s1);
my $a2 = figure_column_alignment($s2);
--- 1333,1337 ----
sub setup_column_alignments($){
local($_) = @_;
! my($s1, $s2, $s3, $s4, $s5) = split(/[|]/,$_);
my $a1 = figure_column_alignment($s1);
my $a2 = figure_column_alignment($s2);
***************
*** 1702,1706 ****
sub get_chapter_id(){
my $id = do_cmd_thechapter('');
! $id =~ s/<SPAN CLASS="arabic">(\d+)<\/SPAN>/\1/;
$id =~ s/\.//;
return $id;
--- 1714,1718 ----
sub get_chapter_id(){
my $id = do_cmd_thechapter('');
! $id =~ s/<SPAN CLASS="arabic">(\d+)<\/SPAN>/$1/;
$id =~ s/\.//;
return $id;
***************
*** 1711,1715 ****
sub get_synopsis_table($){
! my $chap = @_[0];
my $key;
foreach $key (keys %ModuleSynopses) {
--- 1723,1727 ----
sub get_synopsis_table($){
! my $chap = $_[0];
my $key;
foreach $key (keys %ModuleSynopses) {
***************
*** 1768,1775 ****
sub process_all_localmoduletables(){
my $key;
- my $st, $file;
foreach $key (keys %ModuleSynopses) {
! $st = $ModuleSynopses{$key};
! $file = $st->get_file();
if ($file) {
process_localmoduletables_in_file($file);
--- 1780,1786 ----
sub process_all_localmoduletables(){
my $key;
foreach $key (keys %ModuleSynopses) {
! my $st = $ModuleSynopses{$key};
! my $file = $st->get_file();
if ($file) {
process_localmoduletables_in_file($file);
***************
*** 1782,1786 ****
sub process_localmoduletables_in_file($){
! my $file = @_[0];
open(MYFILE, "<$file");
local($_);
--- 1793,1797 ----
sub process_localmoduletables_in_file($){
! my $file = $_[0];
open(MYFILE, "<$file");
local($_);
***************
*** 1812,1816 ****
return ("<div class=\"seealso\">\n "
. "<p class=\"heading\"><b>See Also:</b></p>\n"
! . @_[0]
. '</div>');
}
--- 1823,1827 ----
return ("<div class=\"seealso\">\n "
. "<p class=\"heading\"><b>See Also:</b></p>\n"
! . $_[0]
. '</div>');
}
***************
*** 1818,1822 ****
sub do_env_seealsostar{
return ("<div class=\"seealso-simple\">\n "
! . @_[0]
. '</div>');
}
--- 1829,1833 ----
sub do_env_seealsostar{
return ("<div class=\"seealso-simple\">\n "
! . $_[0]
. '</div>');
}
***************
*** 1843,1847 ****
sub strip_html_markup($){
! my $str = @_[0];
my $s = "$str";
$s =~ s/<[a-zA-Z0-9]+(\s+[a-zA-Z0-9]+(\s*=\s*(\'[^\']*\'|\"[^\"]*\"|[a-zA-Z0-9]+))?)*\s*>//g;
--- 1854,1858 ----
sub strip_html_markup($){
! my $str = $_[0];
my $s = "$str";
$s =~ s/<[a-zA-Z0-9]+(\s+[a-zA-Z0-9]+(\s*=\s*(\'[^\']*\'|\"[^\"]*\"|[a-zA-Z0-9]+))?)*\s*>//g;
***************
*** 1867,1876 ****
sub do_cmd_seepep{
! return handle_rfclike_reference(@_[0], "PEP", $PEP_FORMAT);
}
sub do_cmd_seerfc{
# XXX Would be nice to add links to the text/plain and PDF versions.
! return handle_rfclike_reference(@_[0], "RFC", $RFC_FORMAT);
}
--- 1878,1887 ----
sub do_cmd_seepep{
! return handle_rfclike_reference($_[0], "PEP", $PEP_FORMAT);
}
sub do_cmd_seerfc{
# XXX Would be nice to add links to the text/plain and PDF versions.
! return handle_rfclike_reference($_[0], "RFC", $RFC_FORMAT);
}
***************
*** 1919,1923 ****
sub do_env_definitions{
! return "<dl class=\"definitions\">" . @_[0] . "</dl>\n";
}
--- 1930,1934 ----
sub do_env_definitions{
! return "<dl class=\"definitions\">" . $_[0] . "</dl>\n";
}
***************
*** 2001,2005 ****
sub get_verbatim_output_name($){
! my $file = @_[0];
#
# Re-write the source filename to always use a .txt extension
--- 2012,2016 ----
sub get_verbatim_output_name($){
! my $file = $_[0];
#
# Re-write the source filename to always use a .txt extension
***************
*** 2013,2018 ****
return $VerbatimFiles{$file};
}
! my $srcname, $srcdir, $srcext;
! ($srcname, $srcdir, $srcext) = fileparse($file, '\..*');
$filename = "$srcname.txt";
#
--- 2024,2028 ----
return $VerbatimFiles{$file};
}
! my($srcname, $srcdir, $srcext) = fileparse($file, '\..*');
$filename = "$srcname.txt";
#