mirror of
https://github.com/python/cpython.git
synced 2025-08-02 08:02:56 +00:00
normalize whitespace; detabify
This commit is contained in:
parent
41aa018398
commit
1b1ca0cc2b
1 changed files with 160 additions and 160 deletions
|
@ -1,4 +1,4 @@
|
||||||
# python.perl by Fred L. Drake, Jr. <fdrake@acm.org> -*- perl -*-
|
# python.perl by Fred L. Drake, Jr. <fdrake@acm.org> -*- perl -*-
|
||||||
#
|
#
|
||||||
# Heavily based on Guido van Rossum's myformat.perl (now obsolete).
|
# Heavily based on Guido van Rossum's myformat.perl (now obsolete).
|
||||||
#
|
#
|
||||||
|
@ -16,7 +16,7 @@ sub next_argument{
|
||||||
my $param;
|
my $param;
|
||||||
$param = missing_braces()
|
$param = missing_braces()
|
||||||
unless ((s/$next_pair_pr_rx/$param=$2;''/eo)
|
unless ((s/$next_pair_pr_rx/$param=$2;''/eo)
|
||||||
||(s/$next_pair_rx/$param=$2;''/eo));
|
||(s/$next_pair_rx/$param=$2;''/eo));
|
||||||
return $param;
|
return $param;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,20 +65,20 @@ sub do_cmd_let{
|
||||||
my $matched = 0;
|
my $matched = 0;
|
||||||
s/[\\]([a-zA-Z]+)\s*(=\s*)?[\\]([a-zA-Z]*)/$matched=1; ''/e;
|
s/[\\]([a-zA-Z]+)\s*(=\s*)?[\\]([a-zA-Z]*)/$matched=1; ''/e;
|
||||||
if ($matched) {
|
if ($matched) {
|
||||||
my($new, $old) = ($1, $3);
|
my($new, $old) = ($1, $3);
|
||||||
eval "sub do_cmd_$new { do_cmd_$old" . '(@_); }';
|
eval "sub do_cmd_$new { do_cmd_$old" . '(@_); }';
|
||||||
print "\ndefining handler for \\$new using \\$old\n";
|
print "\ndefining handler for \\$new using \\$old\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
s/[\\]([a-zA-Z]+)\s*(=\s*)?([^\\])/$matched=1; ''/es;
|
s/[\\]([a-zA-Z]+)\s*(=\s*)?([^\\])/$matched=1; ''/es;
|
||||||
if ($matched) {
|
if ($matched) {
|
||||||
my($new, $char) = ($1, $3);
|
my($new, $char) = ($1, $3);
|
||||||
eval "sub do_cmd_$new { \"\\$char\" . \$_[0]; }";
|
eval "sub do_cmd_$new { \"\\$char\" . \$_[0]; }";
|
||||||
print "\ndefining handler for \\$new to insert '$char'\n";
|
print "\ndefining handler for \\$new to insert '$char'\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
write_warnings("Could not interpret \\let construct...");
|
write_warnings("Could not interpret \\let construct...");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $_;
|
return $_;
|
||||||
}
|
}
|
||||||
|
@ -304,7 +304,7 @@ sub do_cmd_envvar{
|
||||||
# The <tt> here is really to keep buildindex.py from making
|
# The <tt> here is really to keep buildindex.py from making
|
||||||
# the variable name case-insensitive.
|
# the variable name case-insensitive.
|
||||||
add_index_entry("environment variables!$envvar@<tt>$envvar</tt>",
|
add_index_entry("environment variables!$envvar@<tt>$envvar</tt>",
|
||||||
$ahref);
|
$ahref);
|
||||||
add_index_entry("$envvar (environment variable)", $ahref);
|
add_index_entry("$envvar (environment variable)", $ahref);
|
||||||
$aname =~ s/<a/<a class="envvar"/;
|
$aname =~ s/<a/<a class="envvar"/;
|
||||||
return "$aname$envvar</a>" . $_;
|
return "$aname$envvar</a>" . $_;
|
||||||
|
@ -483,7 +483,7 @@ sub do_cmd_makemodindex{ return $_[0]; }
|
||||||
open(IDXFILE, '>index.dat') || die "\n$!\n";
|
open(IDXFILE, '>index.dat') || die "\n$!\n";
|
||||||
open(INTLABELS, '>intlabels.pl') || die "\n$!\n";
|
open(INTLABELS, '>intlabels.pl') || die "\n$!\n";
|
||||||
print INTLABELS "%internal_labels = ();\n";
|
print INTLABELS "%internal_labels = ();\n";
|
||||||
print INTLABELS "1; # hack in case there are no entries\n\n";
|
print INTLABELS "1; # hack in case there are no entries\n\n";
|
||||||
|
|
||||||
# Using \0 for this is bad because we can't use common tools to work with the
|
# Using \0 for this is bad because we can't use common tools to work with the
|
||||||
# resulting files. Things like grep can be useful with this stuff!
|
# resulting files. Things like grep can be useful with this stuff!
|
||||||
|
@ -522,43 +522,43 @@ sub define_indexing_macro(@){
|
||||||
my $count = @_;
|
my $count = @_;
|
||||||
my $i = 0;
|
my $i = 0;
|
||||||
for (; $i < $count; ++$i) {
|
for (; $i < $count; ++$i) {
|
||||||
my $name = $_[$i];
|
my $name = $_[$i];
|
||||||
my $cmd = "idx_cmd_$name";
|
my $cmd = "idx_cmd_$name";
|
||||||
die "\nNo function $cmd() defined!\n"
|
die "\nNo function $cmd() defined!\n"
|
||||||
if (!defined &$cmd);
|
if (!defined &$cmd);
|
||||||
eval ("sub do_cmd_$name { return process_index_macros("
|
eval ("sub do_cmd_$name { return process_index_macros("
|
||||||
. "\$_[0], '$name'); }");
|
. "\$_[0], '$name'); }");
|
||||||
if (length($IndexMacroPattern) == 0) {
|
if (length($IndexMacroPattern) == 0) {
|
||||||
$IndexMacroPattern = "$name";
|
$IndexMacroPattern = "$name";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$IndexMacroPattern .= "|$name";
|
$IndexMacroPattern .= "|$name";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$DEBUG_INDEXING = 0;
|
$DEBUG_INDEXING = 0;
|
||||||
sub process_index_macros($$){
|
sub process_index_macros($$){
|
||||||
local($_) = @_;
|
local($_) = @_;
|
||||||
my $cmdname = $_[1]; # This is what triggered us in the first place;
|
my $cmdname = $_[1]; # This is what triggered us in the first place;
|
||||||
# we know it's real, so just process it.
|
# we know it's real, so just process it.
|
||||||
my($name, $aname, $ahref) = new_link_info();
|
my($name, $aname, $ahref) = new_link_info();
|
||||||
my $cmd = "idx_cmd_$cmdname";
|
my $cmd = "idx_cmd_$cmdname";
|
||||||
print "\nIndexing: \\$cmdname"
|
print "\nIndexing: \\$cmdname"
|
||||||
if $DEBUG_INDEXING;
|
if $DEBUG_INDEXING;
|
||||||
&$cmd($ahref); # modifies $_ and adds index entries
|
&$cmd($ahref); # modifies $_ and adds index entries
|
||||||
while (/^[\s\n]*\\($IndexMacroPattern)</) {
|
while (/^[\s\n]*\\($IndexMacroPattern)</) {
|
||||||
$cmdname = "$1";
|
$cmdname = "$1";
|
||||||
print " \\$cmdname"
|
print " \\$cmdname"
|
||||||
if $DEBUG_INDEXING;
|
if $DEBUG_INDEXING;
|
||||||
$cmd = "idx_cmd_$cmdname";
|
$cmd = "idx_cmd_$cmdname";
|
||||||
if (!defined &$cmd) {
|
if (!defined &$cmd) {
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
s/^[\s\n]*\\$cmdname//;
|
s/^[\s\n]*\\$cmdname//;
|
||||||
&$cmd($ahref);
|
&$cmd($ahref);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (/^[ \t\r\n]/) {
|
if (/^[ \t\r\n]/) {
|
||||||
$_ = substr($_, 1);
|
$_ = substr($_, 1);
|
||||||
|
@ -648,10 +648,10 @@ sub make_mod_index_entry($$){
|
||||||
write_idxfile($ahref, $str);
|
write_idxfile($ahref, $str);
|
||||||
|
|
||||||
if ($define eq 'DEF') {
|
if ($define eq 'DEF') {
|
||||||
# add to the module index
|
# add to the module index
|
||||||
$str =~ /(<tt.*<\/tt>)/;
|
$str =~ /(<tt.*<\/tt>)/;
|
||||||
my $nstr = $1;
|
my $nstr = $1;
|
||||||
$Modules{$nstr} .= $ahref;
|
$Modules{$nstr} .= $ahref;
|
||||||
}
|
}
|
||||||
return "$aname$anchor_invisible_mark2</a>";
|
return "$aname$anchor_invisible_mark2</a>";
|
||||||
}
|
}
|
||||||
|
@ -664,10 +664,10 @@ sub define_module($$){
|
||||||
my($word, $name) = @_;
|
my($word, $name) = @_;
|
||||||
my $section_tag = join('', @curr_sec_id);
|
my $section_tag = join('', @curr_sec_id);
|
||||||
if ($word ne "built-in" && $word ne "extension"
|
if ($word ne "built-in" && $word ne "extension"
|
||||||
&& $word ne "standard" && $word ne "") {
|
&& $word ne "standard" && $word ne "") {
|
||||||
write_warnings("Bad module type '$word'"
|
write_warnings("Bad module type '$word'"
|
||||||
. " for \\declaremodule (module $name)");
|
. " for \\declaremodule (module $name)");
|
||||||
$word = "";
|
$word = "";
|
||||||
}
|
}
|
||||||
$word = "$word " if $word;
|
$word = "$word " if $word;
|
||||||
$THIS_MODULE = "$name";
|
$THIS_MODULE = "$name";
|
||||||
|
@ -706,7 +706,7 @@ sub ref_module_index_helper($$){
|
||||||
|
|
||||||
# these should be adjusted a bit....
|
# these should be adjusted a bit....
|
||||||
define_indexing_macro('refmodindex', 'refbimodindex',
|
define_indexing_macro('refmodindex', 'refbimodindex',
|
||||||
'refexmodindex', 'refstmodindex');
|
'refexmodindex', 'refstmodindex');
|
||||||
sub idx_cmd_refmodindex($){
|
sub idx_cmd_refmodindex($){
|
||||||
return ref_module_index_helper('', $_[0]); }
|
return ref_module_index_helper('', $_[0]); }
|
||||||
sub idx_cmd_refbimodindex($){
|
sub idx_cmd_refbimodindex($){
|
||||||
|
@ -897,9 +897,9 @@ sub load_refcounts(){
|
||||||
$REFCOUNTS_LOADED = 1;
|
$REFCOUNTS_LOADED = 1;
|
||||||
|
|
||||||
my($myname, $mydir, $myext) = fileparse(__FILE__, '\..*');
|
my($myname, $mydir, $myext) = fileparse(__FILE__, '\..*');
|
||||||
chop $mydir; # remove trailing '/'
|
chop $mydir; # remove trailing '/'
|
||||||
($myname, $mydir, $myext) = fileparse($mydir, '\..*');
|
($myname, $mydir, $myext) = fileparse($mydir, '\..*');
|
||||||
chop $mydir; # remove trailing '/'
|
chop $mydir; # remove trailing '/'
|
||||||
$mydir = getcwd() . "$dd$mydir"
|
$mydir = getcwd() . "$dd$mydir"
|
||||||
unless $mydir =~ s|^/|/|;
|
unless $mydir =~ s|^/|/|;
|
||||||
local $_;
|
local $_;
|
||||||
|
@ -931,7 +931,7 @@ sub cfuncline_helper($$$){
|
||||||
my $idx = make_str_index_entry(
|
my $idx = make_str_index_entry(
|
||||||
"<tt class=\"cfunction\">$name()</tt>" . get_indexsubitem());
|
"<tt class=\"cfunction\">$name()</tt>" . get_indexsubitem());
|
||||||
$idx =~ s/ \(.*\)//;
|
$idx =~ s/ \(.*\)//;
|
||||||
$idx =~ s/\(\)//; # ???? - why both of these?
|
$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>,/g;
|
||||||
$args =~ s/(\s|\*)([a-z_][a-z_0-9]*)$/$1<var>$2<\/var>/s;
|
$args =~ s/(\s|\*)([a-z_][a-z_0-9]*)$/$1<var>$2<\/var>/s;
|
||||||
return ('<table cellpadding="0" cellspacing="0"><tr valign="baseline">'
|
return ('<table cellpadding="0" cellspacing="0"><tr valign="baseline">'
|
||||||
|
@ -1028,7 +1028,7 @@ sub do_env_cvardesc{
|
||||||
my $var_type = next_argument();
|
my $var_type = next_argument();
|
||||||
my $var_name = next_argument();
|
my $var_name = next_argument();
|
||||||
my $idx = make_str_index_entry("<tt class=\"cdata\">$var_name</tt>"
|
my $idx = make_str_index_entry("<tt class=\"cdata\">$var_name</tt>"
|
||||||
. get_indexsubitem());
|
. get_indexsubitem());
|
||||||
$idx =~ s/ \(.*\)//;
|
$idx =~ s/ \(.*\)//;
|
||||||
return "<dl><dt>$var_type <b>$idx</b></dt>\n"
|
return "<dl><dt>$var_type <b>$idx</b></dt>\n"
|
||||||
. '<dd>'
|
. '<dd>'
|
||||||
|
@ -1056,7 +1056,7 @@ sub do_env_funcdesc{
|
||||||
my $arg_list = convert_args(next_argument());
|
my $arg_list = convert_args(next_argument());
|
||||||
my $idx = make_str_index_entry("<tt class=\"function\">$function_name()"
|
my $idx = make_str_index_entry("<tt class=\"function\">$function_name()"
|
||||||
. '</tt>'
|
. '</tt>'
|
||||||
. get_indexsubitem());
|
. get_indexsubitem());
|
||||||
$idx =~ s/ \(.*\)//;
|
$idx =~ s/ \(.*\)//;
|
||||||
$idx =~ s/\(\)<\/tt>/<\/tt>/;
|
$idx =~ s/\(\)<\/tt>/<\/tt>/;
|
||||||
return funcline_helper(1, $idx, $arg_list) . $_ . '</dl>';
|
return funcline_helper(1, $idx, $arg_list) . $_ . '</dl>';
|
||||||
|
@ -1102,16 +1102,16 @@ sub do_env_opcodedesc{
|
||||||
my $arg_list = next_argument();
|
my $arg_list = next_argument();
|
||||||
my $idx;
|
my $idx;
|
||||||
if ($INDEX_OPCODES) {
|
if ($INDEX_OPCODES) {
|
||||||
$idx = make_str_index_entry("<tt class=\"opcode\">$opcode_name</tt>"
|
$idx = make_str_index_entry("<tt class=\"opcode\">$opcode_name</tt>"
|
||||||
. ' (byte code instruction)');
|
. ' (byte code instruction)');
|
||||||
$idx =~ s/ \(byte code instruction\)//;
|
$idx =~ s/ \(byte code instruction\)//;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$idx = "<tt class=\"opcode\">$opcode_name</tt>";
|
$idx = "<tt class=\"opcode\">$opcode_name</tt>";
|
||||||
}
|
}
|
||||||
my $stuff = "<dl><dt><b>$idx</b>";
|
my $stuff = "<dl><dt><b>$idx</b>";
|
||||||
if ($arg_list) {
|
if ($arg_list) {
|
||||||
$stuff .= " <var>$arg_list</var>";
|
$stuff .= " <var>$arg_list</var>";
|
||||||
}
|
}
|
||||||
return $stuff . "</dt>\n<dd>" . $_ . '</dt></dl>';
|
return $stuff . "</dt>\n<dd>" . $_ . '</dt></dl>';
|
||||||
}
|
}
|
||||||
|
@ -1123,14 +1123,14 @@ sub do_env_datadesc{
|
||||||
$idx =~ s/ \(.*\)//;
|
$idx =~ s/ \(.*\)//;
|
||||||
return "<dl><dt><b>$idx</b></dt>\n<dd>"
|
return "<dl><dt><b>$idx</b></dt>\n<dd>"
|
||||||
. $_
|
. $_
|
||||||
. '</dd></dl>';
|
. '</dd></dl>';
|
||||||
}
|
}
|
||||||
|
|
||||||
sub do_env_datadescni{
|
sub do_env_datadescni{
|
||||||
local($_) = @_;
|
local($_) = @_;
|
||||||
my $idx = next_argument();
|
my $idx = next_argument();
|
||||||
if (! $STRING_INDEX_TT) {
|
if (! $STRING_INDEX_TT) {
|
||||||
$idx = "<tt>$idx</tt>";
|
$idx = "<tt>$idx</tt>";
|
||||||
}
|
}
|
||||||
return "<dl><dt><b>$idx</b></dt>\n<dd>" . $_ . '</dd></dl>';
|
return "<dl><dt><b>$idx</b></dt>\n<dd>" . $_ . '</dd></dl>';
|
||||||
}
|
}
|
||||||
|
@ -1167,7 +1167,7 @@ sub handle_classlike_descriptor($$){
|
||||||
$THIS_CLASS = next_argument();
|
$THIS_CLASS = next_argument();
|
||||||
my $arg_list = convert_args(next_argument());
|
my $arg_list = convert_args(next_argument());
|
||||||
$idx = make_str_index_entry(
|
$idx = make_str_index_entry(
|
||||||
"<tt class=\"$what\">$THIS_CLASS</tt> ($what in $THIS_MODULE)" );
|
"<tt class=\"$what\">$THIS_CLASS</tt> ($what in $THIS_MODULE)" );
|
||||||
$idx =~ s/ \(.*\)//;
|
$idx =~ s/ \(.*\)//;
|
||||||
my $prefix = "$TLSTART$what$TLEND$idx";
|
my $prefix = "$TLSTART$what$TLEND$idx";
|
||||||
return funcline_helper(1, $prefix, $arg_list) . $_ . '</dl>';
|
return funcline_helper(1, $prefix, $arg_list) . $_ . '</dl>';
|
||||||
|
@ -1181,7 +1181,7 @@ sub do_env_classdescstar{
|
||||||
local($_) = @_;
|
local($_) = @_;
|
||||||
$THIS_CLASS = next_argument();
|
$THIS_CLASS = next_argument();
|
||||||
$idx = make_str_index_entry(
|
$idx = make_str_index_entry(
|
||||||
"<tt class=\"class\">$THIS_CLASS</tt> (class in $THIS_MODULE)");
|
"<tt class=\"class\">$THIS_CLASS</tt> (class in $THIS_MODULE)");
|
||||||
$idx =~ s/ \(.*\)//;
|
$idx =~ s/ \(.*\)//;
|
||||||
my $prefix = "${TLSTART}class$TLEND$idx";
|
my $prefix = "${TLSTART}class$TLEND$idx";
|
||||||
# Can't use funcline_helper() since there is no args list.
|
# Can't use funcline_helper() since there is no args list.
|
||||||
|
@ -1202,7 +1202,7 @@ sub do_env_methoddesc{
|
||||||
my $arg_list = convert_args(next_argument());
|
my $arg_list = convert_args(next_argument());
|
||||||
my $extra = '';
|
my $extra = '';
|
||||||
if ($class_name) {
|
if ($class_name) {
|
||||||
$extra = " ($class_name method)";
|
$extra = " ($class_name method)";
|
||||||
}
|
}
|
||||||
my $idx = make_str_index_entry(
|
my $idx = make_str_index_entry(
|
||||||
"<tt class=\"method\">$method()</tt>$extra");
|
"<tt class=\"method\">$method()</tt>$extra");
|
||||||
|
@ -1221,7 +1221,7 @@ sub do_cmd_methodline{
|
||||||
my $arg_list = convert_args(next_argument());
|
my $arg_list = convert_args(next_argument());
|
||||||
my $extra = '';
|
my $extra = '';
|
||||||
if ($class_name) {
|
if ($class_name) {
|
||||||
$extra = " ($class_name method)";
|
$extra = " ($class_name method)";
|
||||||
}
|
}
|
||||||
my $idx = make_str_index_entry(
|
my $idx = make_str_index_entry(
|
||||||
"<tt class=\"method\">$method()</tt>$extra");
|
"<tt class=\"method\">$method()</tt>$extra");
|
||||||
|
@ -1383,16 +1383,16 @@ sub do_env_tableii{
|
||||||
my $a2 = $col_aligns[1];
|
my $a2 = $col_aligns[1];
|
||||||
s/\\lineii</\\lineii[$a1|$a2]</g;
|
s/\\lineii</\\lineii[$a1|$a2]</g;
|
||||||
return '<table border align="center" style="border-collapse: collapse">'
|
return '<table border align="center" style="border-collapse: collapse">'
|
||||||
. "\n <thead>"
|
. "\n <thead>"
|
||||||
. "\n <tr class=\"tableheader\">"
|
. "\n <tr class=\"tableheader\">"
|
||||||
. "\n $th1<b>$h1</b>\ </th>"
|
. "\n $th1<b>$h1</b>\ </th>"
|
||||||
. "\n $th2<b>$h2</b>\ </th>"
|
. "\n $th2<b>$h2</b>\ </th>"
|
||||||
. "\n </tr>"
|
. "\n </tr>"
|
||||||
. "\n </thead>"
|
. "\n </thead>"
|
||||||
. "\n <tbody valign=\"baseline\">"
|
. "\n <tbody valign=\"baseline\">"
|
||||||
. $_
|
. $_
|
||||||
. "\n </tbody>"
|
. "\n </tbody>"
|
||||||
. "\n</table>";
|
. "\n</table>";
|
||||||
}
|
}
|
||||||
|
|
||||||
sub do_env_longtableii{
|
sub do_env_longtableii{
|
||||||
|
@ -1415,7 +1415,7 @@ sub do_cmd_lineii{
|
||||||
}
|
}
|
||||||
return "\n <tr>$c1align$sfont$c1$efont$padding</td>\n"
|
return "\n <tr>$c1align$sfont$c1$efont$padding</td>\n"
|
||||||
. " $c2align$c2</td>"
|
. " $c2align$c2</td>"
|
||||||
. $_;
|
. $_;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub do_env_tableiii{
|
sub do_env_tableiii{
|
||||||
|
@ -1433,17 +1433,17 @@ sub do_env_tableiii{
|
||||||
my $a3 = $col_aligns[2];
|
my $a3 = $col_aligns[2];
|
||||||
s/\\lineiii</\\lineiii[$a1|$a2|$a3]</g;
|
s/\\lineiii</\\lineiii[$a1|$a2|$a3]</g;
|
||||||
return '<table border align="center" style="border-collapse: collapse">'
|
return '<table border align="center" style="border-collapse: collapse">'
|
||||||
. "\n <thead>"
|
. "\n <thead>"
|
||||||
. "\n <tr class=\"tableheader\">"
|
. "\n <tr class=\"tableheader\">"
|
||||||
. "\n $th1<b>$h1</b>\ </th>"
|
. "\n $th1<b>$h1</b>\ </th>"
|
||||||
. "\n $th2<b>$h2</b>\ </th>"
|
. "\n $th2<b>$h2</b>\ </th>"
|
||||||
. "\n $th3<b>$h3</b>\ </th>"
|
. "\n $th3<b>$h3</b>\ </th>"
|
||||||
. "\n </tr>"
|
. "\n </tr>"
|
||||||
. "\n </thead>"
|
. "\n </thead>"
|
||||||
. "\n <tbody valign=\"baseline\">"
|
. "\n <tbody valign=\"baseline\">"
|
||||||
. $_
|
. $_
|
||||||
. "\n </tbody>"
|
. "\n </tbody>"
|
||||||
. "\n</table>";
|
. "\n</table>";
|
||||||
}
|
}
|
||||||
|
|
||||||
sub do_env_longtableiii{
|
sub do_env_longtableiii{
|
||||||
|
@ -1468,8 +1468,8 @@ sub do_cmd_lineiii{
|
||||||
}
|
}
|
||||||
return "\n <tr>$c1align$sfont$c1$efont$padding</td>\n"
|
return "\n <tr>$c1align$sfont$c1$efont$padding</td>\n"
|
||||||
. " $c2align$c2</td>\n"
|
. " $c2align$c2</td>\n"
|
||||||
. " $c3align$c3</td>"
|
. " $c3align$c3</td>"
|
||||||
. $_;
|
. $_;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub do_env_tableiv{
|
sub do_env_tableiv{
|
||||||
|
@ -1489,18 +1489,18 @@ sub do_env_tableiv{
|
||||||
my $a4 = $col_aligns[3];
|
my $a4 = $col_aligns[3];
|
||||||
s/\\lineiv</\\lineiv[$a1|$a2|$a3|$a4]</g;
|
s/\\lineiv</\\lineiv[$a1|$a2|$a3|$a4]</g;
|
||||||
return '<table border align="center" style="border-collapse: collapse">'
|
return '<table border align="center" style="border-collapse: collapse">'
|
||||||
. "\n <thead>"
|
. "\n <thead>"
|
||||||
. "\n <tr class=\"tableheader\">"
|
. "\n <tr class=\"tableheader\">"
|
||||||
. "\n $th1<b>$h1</b>\ </th>"
|
. "\n $th1<b>$h1</b>\ </th>"
|
||||||
. "\n $th2<b>$h2</b>\ </th>"
|
. "\n $th2<b>$h2</b>\ </th>"
|
||||||
. "\n $th3<b>$h3</b>\ </th>"
|
. "\n $th3<b>$h3</b>\ </th>"
|
||||||
. "\n $th4<b>$h4</b>\ </th>"
|
. "\n $th4<b>$h4</b>\ </th>"
|
||||||
. "\n </tr>"
|
. "\n </tr>"
|
||||||
. "\n </thead>"
|
. "\n </thead>"
|
||||||
. "\n <tbody valign=\"baseline\">"
|
. "\n <tbody valign=\"baseline\">"
|
||||||
. $_
|
. $_
|
||||||
. "\n </tbody>"
|
. "\n </tbody>"
|
||||||
. "\n</table>";
|
. "\n</table>";
|
||||||
}
|
}
|
||||||
|
|
||||||
sub do_env_longtableiv{
|
sub do_env_longtableiv{
|
||||||
|
@ -1511,7 +1511,7 @@ sub do_cmd_lineiv{
|
||||||
local($_) = @_;
|
local($_) = @_;
|
||||||
my $aligns = next_optional_argument();
|
my $aligns = next_optional_argument();
|
||||||
my $c1 = next_argument();
|
my $c1 = next_argument();
|
||||||
my $c2 = next_argument();
|
my $c2 = next_argument();
|
||||||
my $c3 = next_argument();
|
my $c3 = next_argument();
|
||||||
my $c4 = next_argument();
|
my $c4 = next_argument();
|
||||||
s/[\s\n]+//;
|
s/[\s\n]+//;
|
||||||
|
@ -1527,9 +1527,9 @@ sub do_cmd_lineiv{
|
||||||
}
|
}
|
||||||
return "\n <tr>$c1align$sfont$c1$efont$padding</td>\n"
|
return "\n <tr>$c1align$sfont$c1$efont$padding</td>\n"
|
||||||
. " $c2align$c2</td>\n"
|
. " $c2align$c2</td>\n"
|
||||||
. " $c3align$c3</td>\n"
|
. " $c3align$c3</td>\n"
|
||||||
. " $c4align$c4</td>"
|
. " $c4align$c4</td>"
|
||||||
. $_;
|
. $_;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub do_env_tablev{
|
sub do_env_tablev{
|
||||||
|
@ -1551,19 +1551,19 @@ sub do_env_tablev{
|
||||||
my $a5 = $col_aligns[4];
|
my $a5 = $col_aligns[4];
|
||||||
s/\\linev</\\linev[$a1|$a2|$a3|$a4|$a5]</g;
|
s/\\linev</\\linev[$a1|$a2|$a3|$a4|$a5]</g;
|
||||||
return '<table border align="center" style="border-collapse: collapse">'
|
return '<table border align="center" style="border-collapse: collapse">'
|
||||||
. "\n <thead>"
|
. "\n <thead>"
|
||||||
. "\n <tr class=\"tableheader\">"
|
. "\n <tr class=\"tableheader\">"
|
||||||
. "\n $th1<b>$h1</b>\ </th>"
|
. "\n $th1<b>$h1</b>\ </th>"
|
||||||
. "\n $th2<b>$h2</b>\ </th>"
|
. "\n $th2<b>$h2</b>\ </th>"
|
||||||
. "\n $th3<b>$h3</b>\ </th>"
|
. "\n $th3<b>$h3</b>\ </th>"
|
||||||
. "\n $th4<b>$h4</b>\ </th>"
|
. "\n $th4<b>$h4</b>\ </th>"
|
||||||
. "\n $th5<b>$h5</b>\ </th>"
|
. "\n $th5<b>$h5</b>\ </th>"
|
||||||
. "\n </tr>"
|
. "\n </tr>"
|
||||||
. "\n </thead>"
|
. "\n </thead>"
|
||||||
. "\n <tbody valign=\"baseline\">"
|
. "\n <tbody valign=\"baseline\">"
|
||||||
. $_
|
. $_
|
||||||
. "\n </tbody>"
|
. "\n </tbody>"
|
||||||
. "\n</table>";
|
. "\n</table>";
|
||||||
}
|
}
|
||||||
|
|
||||||
sub do_env_longtablev{
|
sub do_env_longtablev{
|
||||||
|
@ -1592,10 +1592,10 @@ sub do_cmd_linev{
|
||||||
}
|
}
|
||||||
return "\n <tr>$c1align$sfont$c1$efont$padding</td>\n"
|
return "\n <tr>$c1align$sfont$c1$efont$padding</td>\n"
|
||||||
. " $c2align$c2</td>\n"
|
. " $c2align$c2</td>\n"
|
||||||
. " $c3align$c3</td>\n"
|
. " $c3align$c3</td>\n"
|
||||||
. " $c4align$c4</td>\n"
|
. " $c4align$c4</td>\n"
|
||||||
. " $c5align$c5</td>"
|
. " $c5align$c5</td>"
|
||||||
. $_;
|
. $_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1620,23 +1620,23 @@ sub do_cmd_linev{
|
||||||
sub make_my_titlepage(){
|
sub make_my_titlepage(){
|
||||||
my $the_title = "";
|
my $the_title = "";
|
||||||
if ($t_title) {
|
if ($t_title) {
|
||||||
$the_title .= "\n<h1>$t_title</h1>";
|
$the_title .= "\n<h1>$t_title</h1>";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
write_warnings("\nThis document has no title.");
|
write_warnings("\nThis document has no title.");
|
||||||
}
|
}
|
||||||
if ($t_author) {
|
if ($t_author) {
|
||||||
if ($t_authorURL) {
|
if ($t_authorURL) {
|
||||||
my $href = translate_commands($t_authorURL);
|
my $href = translate_commands($t_authorURL);
|
||||||
$href = make_named_href('author', $href,
|
$href = make_named_href('author', $href,
|
||||||
"<b><font size=\"+2\">$t_author"
|
"<b><font size=\"+2\">$t_author"
|
||||||
. '</font></b>');
|
. '</font></b>');
|
||||||
$the_title .= "\n<p>$href</p>";
|
$the_title .= "\n<p>$href</p>";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$the_title .= ("\n<p><b><font size=\"+2\">$t_author"
|
$the_title .= ("\n<p><b><font size=\"+2\">$t_author"
|
||||||
. '</font></b></p>');
|
. '</font></b></p>');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
write_warnings("\nThere is no author for this document.");
|
write_warnings("\nThere is no author for this document.");
|
||||||
|
@ -1648,24 +1648,24 @@ sub make_my_titlepage(){
|
||||||
$the_title .= "\n<p>$DEVELOPER_ADDRESS</p>";
|
$the_title .= "\n<p>$DEVELOPER_ADDRESS</p>";
|
||||||
}
|
}
|
||||||
if ($t_affil) {
|
if ($t_affil) {
|
||||||
$the_title .= "\n<p><i>$t_affil</i></p>";
|
$the_title .= "\n<p><i>$t_affil</i></p>";
|
||||||
}
|
}
|
||||||
if ($t_date) {
|
if ($t_date) {
|
||||||
$the_title .= "\n<p>";
|
$the_title .= "\n<p>";
|
||||||
if ($PACKAGE_VERSION) {
|
if ($PACKAGE_VERSION) {
|
||||||
$the_title .= ('<strong>Release '
|
$the_title .= ('<strong>Release '
|
||||||
. "$PACKAGE_VERSION$RELEASE_INFO</strong><br />\n");
|
. "$PACKAGE_VERSION$RELEASE_INFO</strong><br />\n");
|
||||||
}
|
}
|
||||||
$the_title .= "<strong>$t_date</strong></p>"
|
$the_title .= "<strong>$t_date</strong></p>"
|
||||||
}
|
}
|
||||||
if ($t_address) {
|
if ($t_address) {
|
||||||
$the_title .= "\n<p>$t_address</p>";
|
$the_title .= "\n<p>$t_address</p>";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$the_title .= "\n<p></p>";
|
$the_title .= "\n<p></p>";
|
||||||
}
|
}
|
||||||
if ($t_email) {
|
if ($t_email) {
|
||||||
$the_title .= "\n<p>$t_email</p>";
|
$the_title .= "\n<p>$t_email</p>";
|
||||||
}
|
}
|
||||||
return $the_title;
|
return $the_title;
|
||||||
}
|
}
|
||||||
|
@ -1747,9 +1747,9 @@ sub get_synopsis_table($){
|
||||||
my $chap = $_[0];
|
my $chap = $_[0];
|
||||||
my $key;
|
my $key;
|
||||||
foreach $key (keys %ModuleSynopses) {
|
foreach $key (keys %ModuleSynopses) {
|
||||||
if ($key eq $chap) {
|
if ($key eq $chap) {
|
||||||
return $ModuleSynopses{$chap};
|
return $ModuleSynopses{$chap};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
my $st = SynopsisTable->new();
|
my $st = SynopsisTable->new();
|
||||||
$ModuleSynopses{$chap} = $st;
|
$ModuleSynopses{$chap} = $st;
|
||||||
|
@ -1821,11 +1821,11 @@ sub process_localmoduletables_in_file($){
|
||||||
close(MYFILE);
|
close(MYFILE);
|
||||||
# need to get contents of file in $_
|
# need to get contents of file in $_
|
||||||
while (/<tex2html-localmoduletable><(\d+)>/) {
|
while (/<tex2html-localmoduletable><(\d+)>/) {
|
||||||
my $match = $&;
|
my $match = $&;
|
||||||
my $chap = $1;
|
my $chap = $1;
|
||||||
my $st = get_synopsis_table($chap);
|
my $st = get_synopsis_table($chap);
|
||||||
my $data = $st->tohtml();
|
my $data = $st->tohtml();
|
||||||
s/$match/$data/;
|
s/$match/$data/;
|
||||||
}
|
}
|
||||||
open(MYFILE,">$file");
|
open(MYFILE,">$file");
|
||||||
print MYFILE $_;
|
print MYFILE $_;
|
||||||
|
@ -1865,7 +1865,7 @@ sub do_cmd_seemodule{
|
||||||
$key = $module
|
$key = $module
|
||||||
unless $key;
|
unless $key;
|
||||||
if ($text =~ /\.$/) {
|
if ($text =~ /\.$/) {
|
||||||
$period = '';
|
$period = '';
|
||||||
}
|
}
|
||||||
return ('<dl compact class="seemodule">'
|
return ('<dl compact class="seemodule">'
|
||||||
. "\n <dt>Module <b><tt class=\"module\">"
|
. "\n <dt>Module <b><tt class=\"module\">"
|
||||||
|
@ -2007,20 +2007,20 @@ sub do_env_alltt{
|
||||||
local($local_closures, $local_reopens);
|
local($local_closures, $local_reopens);
|
||||||
($local_closures, $local_reopens,@open_block_tags)
|
($local_closures, $local_reopens,@open_block_tags)
|
||||||
= &preserve_open_block_tags
|
= &preserve_open_block_tags
|
||||||
if (@$open_tags_R);
|
if (@$open_tags_R);
|
||||||
|
|
||||||
$open_tags_R = [ @open_block_tags ];
|
$open_tags_R = [ @open_block_tags ];
|
||||||
|
|
||||||
do {
|
do {
|
||||||
local($open_tags_R) = [ @open_block_tags ];
|
local($open_tags_R) = [ @open_block_tags ];
|
||||||
local(@save_open_tags) = ();
|
local(@save_open_tags) = ();
|
||||||
|
|
||||||
local($cnt) = ++$global{'max_id'};
|
local($cnt) = ++$global{'max_id'};
|
||||||
$_ = join('',"$O$cnt$C\\tt$O", ++$global{'max_id'}, $C
|
$_ = join('',"$O$cnt$C\\tt$O", ++$global{'max_id'}, $C
|
||||||
, $_ , $O, $global{'max_id'}, "$C$O$cnt$C");
|
, $_ , $O, $global{'max_id'}, "$C$O$cnt$C");
|
||||||
|
|
||||||
$_ = &translate_environments($_);
|
$_ = &translate_environments($_);
|
||||||
$_ = &translate_commands($_) if (/\\/);
|
$_ = &translate_commands($_) if (/\\/);
|
||||||
|
|
||||||
# remove spurious <BR> someone sticks in; not sure where they
|
# remove spurious <BR> someone sticks in; not sure where they
|
||||||
# actually come from
|
# actually come from
|
||||||
|
@ -2029,11 +2029,11 @@ sub do_env_alltt{
|
||||||
# the environment
|
# the environment
|
||||||
s/<BR>/ /gi;
|
s/<BR>/ /gi;
|
||||||
|
|
||||||
$_ = join('', $closures, $alltt_start, $local_reopens
|
$_ = join('', $closures, $alltt_start, $local_reopens
|
||||||
, $_
|
, $_
|
||||||
, &balance_tags() #, $local_closures
|
, &balance_tags() #, $local_closures
|
||||||
, $alltt_end, $reopens);
|
, $alltt_end, $reopens);
|
||||||
undef $open_tags_R; undef @save_open_tags;
|
undef $open_tags_R; undef @save_open_tags;
|
||||||
};
|
};
|
||||||
$open_tags_R = [ @keep_open_tags ];
|
$open_tags_R = [ @keep_open_tags ];
|
||||||
$_;
|
$_;
|
||||||
|
@ -2152,4 +2152,4 @@ sub do_cmd_verbatiminput{
|
||||||
. $_);
|
. $_);
|
||||||
}
|
}
|
||||||
|
|
||||||
1; # This must be the last line
|
1; # This must be the last line
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue