[Python-checkins] CVS: python/dist/src/Doc/perl SynopsisTable.pm,1.4,1.5 l2hinit.perl,1.41,1.42 ltxmarkup.perl,1.3,1.4 python.perl,1.68,1.69
Fred Drake
python-dev@python.org
Mon, 3 Apr 2000 00:41:20 -0400
- Previous message: [Python-checkins] CVS: python/dist/src/Doc/tut tut.tex,1.103,1.104
- Next message: [Python-checkins] CVS: python/dist/src/Doc/ref ref2.tex,1.17,1.18 ref3.tex,1.39,1.40 ref4.tex,1.21,1.22 ref5.tex,1.27,1.28 ref7.tex,1.18,1.19
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /projects/cvsroot/python/dist/src/Doc/perl
In directory seahag.cnri.reston.va.us:/home/fdrake/projects/python/Doc/perl
Modified Files:
SynopsisTable.pm l2hinit.perl ltxmarkup.perl python.perl
Log Message:
Merged changes from the 1.5.2p2 release.
Index: SynopsisTable.pm
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Doc/perl/SynopsisTable.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** SynopsisTable.pm 1999年07月12日 16:28:50 1.4
--- SynopsisTable.pm 2000年04月03日 04:41:17 1.5
***************
*** 39,50 ****
sub tohtml{
my $self = shift;
! my $data = "<table class=\"synopsistable\">\n";
my $name;
foreach $name (split /,/, $self->{names}) {
my($key,$type,$synopsis) = $self->get($name);
! my $link = "<a href=\"module-$key.html\">";
! $data .= (" <tr>"
! . "<td><b><tt class=module>$link$name</a></tt></b></td>\n"
! . " <td class=synopsis>$synopsis</td></tr>\n");
}
$data .= "</table>\n";
--- 39,50 ----
sub tohtml{
my $self = shift;
! my $data = "<table class='synopsistable'>\n";
my $name;
foreach $name (split /,/, $self->{names}) {
my($key,$type,$synopsis) = $self->get($name);
! my $link = "<a href='module-$key.html'>";
! $data .= (' <tr>'
! . "<td><b><tt class='module'>$link$name</a></tt></b></td>\n"
! . " <td class='synopsis'>$synopsis</td></tr>\n");
}
$data .= "</table>\n";
Index: l2hinit.perl
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Doc/perl/l2hinit.perl,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -r1.41 -r1.42
*** l2hinit.perl 1999年09月23日 16:53:09 1.41
--- l2hinit.perl 2000年04月03日 04:41:18 1.42
***************
*** 17,20 ****
--- 17,21 ----
$MAX_LINK_DEPTH = 2;
+ $MAX_SPLIT_DEPTH = 5; # split at subsections but not sub-subsections
$ADDRESS = '';
***************
*** 144,147 ****
--- 145,149 ----
$NAV_BGCOLOR = " bgcolor=\"#99CCFF\"";
}
+
adjust_icon_information();
***************
*** 150,156 ****
my($label,$title) = @_;
if ($title) {
! $title =~ s/<A/<A class=sectref/;
! return ("<b class=navlabel>$label:</b> "
! . "$title\n");
}
return '';
--- 152,157 ----
my($label,$title) = @_;
if ($title) {
! return ("<b class='navlabel'>$label:</b> "
! . "<span class='sectref'>$title</span>\n");
}
return '';
***************
*** 159,163 ****
sub make_nav_panel{
my $s;
! $s = "<table align=center width=\"100%\" cellpadding=0 cellspacing=2>"
. "\n<tr>"
. "\n<td>$NEXT</td>"
--- 160,164 ----
sub make_nav_panel{
my $s;
! $s = "<table align='center' width='100%' cellpadding='0' cellspacing='2'>"
. "\n<tr>"
. "\n<td>$NEXT</td>"
***************
*** 185,189 ****
sub top_navigation_panel {
! "<div class=navigation>\n"
. make_nav_panel()
. '<br><hr></div>';
--- 186,190 ----
sub top_navigation_panel {
! "<div class='navigation'>\n"
. make_nav_panel()
. '<br><hr></div>';
***************
*** 191,195 ****
sub bot_navigation_panel {
! "<p>\n<div class=navigation><hr>"
. make_nav_panel()
. '</div>';
--- 192,196 ----
sub bot_navigation_panel {
! "<p>\n<div class='navigation'><hr>"
. make_nav_panel()
. '</div>';
***************
*** 335,345 ****
$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";
}
close(MODIDXFILE);
--- 336,344 ----
$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";
}
close(MODIDXFILE);
***************
*** 557,564 ****
# Note that this *must* be done in the init file, not the python.perl
# style support file. The %declarations must be set before initialize()
! # is called in the main script.
#
! %declarations = ('preform' => '<dl><dd><pre class=verbatim></pre></dl>',
%declarations);
1; # This must be the last line
--- 556,609 ----
# Note that this *must* be done in the init file, not the python.perl
# style support file. The %declarations must be set before initialize()
! # is called in the main LaTeX2HTML script (which happens before style files
! # are loaded).
#
! %declarations = ('preform' => '<dl><dd><pre class="verbatim"></pre></dl>',
%declarations);
+
+
+ # This is added to get rid of the long comment that follows the doctype
+ # declaration; MSIE5 on NT4 SP4 barfs on it and drops the content of the
+ # page.
+ sub make_head_and_body {
+ local($title,$body) = @_;
+ local($DTDcomment) = '';
+ local($version,$isolanguage) = ($HTML_VERSION, 'EN');
+ local(%isolanguages) = ( 'english', 'EN' , 'USenglish', 'EN.US'
+ , 'original', 'EN' , 'german' , 'DE'
+ , 'austrian', 'DE.AT', 'french' , 'FR'
+ , 'spanish', 'ES'
+ , %isolanguages );
+ $isolanguage = $isolanguages{$default_language};
+ $isolanguage = 'EN' unless $isolanguage;
+ $title = &purify($title,1);
+ eval("\$title = ". $default_title ) unless ($title);
+
+ # 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";
+ }
+
+ $STYLESHEET = $FILE.".css" unless $STYLESHEET;
+ if (!$charset && $CHARSET) { $charset = $CHARSET; $charset =~ s/_/\-/go; }
+
+ join('', ($DOCTYPE ? $DTDcomment : '' )
+ ,"<html>\n<head>\n<title>", $title, "</title>\n"
+ , &meta_information($title)
+ , ($CHARSET && $HTML_VERSION ge "2.1" ?
+ "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=$charset\">\n"
+ : "" )
+ , ($BASE ? "<base href=\"$BASE\">\n" : "" )
+ , "<link rel=\"STYLESHEET\" href=\"$STYLESHEET\">"
+ , $more_links_mark
+ , "\n</head>\n<body $body>\n");
+ }
1; # This must be the last line
Index: ltxmarkup.perl
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Doc/perl/ltxmarkup.perl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** ltxmarkup.perl 1999年04月28日 16:42:29 1.3
--- ltxmarkup.perl 2000年04月03日 04:41:18 1.4
***************
*** 16,20 ****
local($_) = @_;
my $macro = ltx_next_argument();
! return "<tt class=macro>\$macro</tt>" . $_;
}
--- 16,20 ----
local($_) = @_;
my $macro = ltx_next_argument();
! return "<tt class='macro'>\$macro</tt>" . $_;
}
***************
*** 22,26 ****
local($_) = @_;
my $env = ltx_next_argument();
! return "<tt class=environment>\$env</tt>" . $_;
}
--- 22,26 ----
local($_) = @_;
my $env = ltx_next_argument();
! return "<tt class='environment'>\$env</tt>" . $_;
}
***************
*** 44,49 ****
my $macro = ltx_next_argument();
my $params = ltx_process_params(ltx_next_argument());
! return "\n<dl class=macrodesc>"
! . "\n<dt><b><tt class=macro>\$macro</tt></b>"
. "\n $params"
. "\n<dd>"
--- 44,49 ----
my $macro = ltx_next_argument();
my $params = ltx_process_params(ltx_next_argument());
! return "\n<dl class='macrodesc'>"
! . "\n<dt><b><tt class='macro'>\$macro</tt></b>"
. "\n $params"
. "\n<dd>"
***************
*** 56,62 ****
my $env = ltx_next_argument();
my $params = ltx_process_params(ltx_next_argument());
! return "\n<dl class=envdesc>"
! . "\n<dt><tt>\begin{<b class=environment>$env</b>}</tt>"
. "\n $params"
. "\n<dd>"
. $_
--- 56,63 ----
my $env = ltx_next_argument();
my $params = ltx_process_params(ltx_next_argument());
! return "\n<dl class='envdesc'>"
! . "\n<dt><tt>\begin{<b class='environment'>$env</b>}</tt>"
. "\n $params"
+ . "\n<br /><tt>\end{<b class='environment'>$env</b>}</tt>"
. "\n<dd>"
. $_
Index: python.perl
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Doc/perl/python.perl,v
retrieving revision 1.68
retrieving revision 1.69
diff -C2 -r1.68 -r1.69
*** python.perl 1999年11月09日 16:59:42 1.68
--- python.perl 2000年04月03日 04:41:18 1.69
***************
*** 62,66 ****
sub do_cmd_Cpp{ 'C++' . @_[0]; }
sub do_cmd_EOF{ 'EOF' . @_[0]; }
! sub do_cmd_NULL{ '<tt>NULL</tt>' . @_[0]; }
sub do_cmd_e{ '\' . @_[0]; }
--- 62,66 ----
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]; }
***************
*** 120,170 ****
sub do_cmd_makevar{ return @_[0]; }
sub do_cmd_code{
! return use_wrappers(@_[0], '<tt>', '</tt>'); }
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_email{
! return use_wrappers(@_[0], '<span class=email>', '</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_italics(@_); }
sub do_cmd_file{
! return use_wrappers(@_[0], '<tt class=file>', '</tt>'); }
sub do_cmd_filenq{
! return use_wrappers(@_[0], '<tt class=file>', '</tt>'); }
sub do_cmd_samp{
! return use_wrappers(@_[0], '"<tt class=samp>', '</tt>"'); }
sub do_cmd_kbd{
return use_wrappers(@_[0], '<kbd>', '</kbd>'); }
--- 120,172 ----
sub do_cmd_makevar{ return @_[0]; }
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_email{
! return use_wrappers(@_[0], '<span class="email">', '</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_italics(@_); }
sub do_cmd_file{
! return use_wrappers(@_[0],
! '<font class="file" face="sans-serif">',
! '</font>'); }
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>'); }
***************
*** 184,188 ****
$key = $module
unless $key;
! return "<tt class=module><a href=\"module-$key.html\">$module</a></tt>" . $_;
}
--- 186,191 ----
$key = $module
unless $key;
! return "<tt class='module'><a href='module-$key.html'>$module</a></tt>"
! . $_;
}
***************
*** 190,194 ****
local($_) = @_;
my $newsgroup = next_argument();
! my $stuff = "<a class=newsgroup href=\"news:$newsgroup\">$newsgroup</a>";
return $stuff . $_;
}
--- 193,198 ----
local($_) = @_;
my $newsgroup = next_argument();
! my $stuff = "<span class='newsgroup'><a href='news:$newsgroup'>"
! . "$newsgroup</a></span>";
return $stuff . $_;
}
***************
*** 203,207 ****
$ahref);
add_index_entry("$envvar@\$$envvar", $ahref);
! $aname =~ s/<a/<a class=envvar/;
return "$aname\$$envvar</a>" . $_;
}
--- 207,211 ----
$ahref);
add_index_entry("$envvar@\$$envvar", $ahref);
! $aname =~ s/<a/<a class="envvar"/;
return "$aname\$$envvar</a>" . $_;
}
***************
*** 212,216 ****
my $url = next_argument();
$url =~ s/~/~/g;
! return "<a class=url href=\"$url\">$url</a>" . $_;
}
--- 216,220 ----
my $url = next_argument();
$url =~ s/~/~/g;
! return "<a class=\"url\" href=\"$url\">$url</a>" . $_;
}
***************
*** 220,224 ****
my $page = next_argument();
my $section = next_argument();
! return "<span class=manpage><i>$page</i>($section)</span>" . $_;
}
--- 224,228 ----
my $page = next_argument();
my $section = next_argument();
! return "<span class='manpage'><i>$page</i>($section)</span>" . $_;
}
***************
*** 232,236 ****
my $nstr = gen_index_id("RFC!RFC $rfcnumber", '');
$index{$nstr} .= make_half_href("$CURRENT_FILE#$id");
! return ("<a class=rfc name=\"$id\"\nhref=\"$href\">RFC $rfcnumber</a>"
. $_);
}
--- 236,240 ----
my $nstr = gen_index_id("RFC!RFC $rfcnumber", '');
$index{$nstr} .= make_half_href("$CURRENT_FILE#$id");
! return ("<a class=\"rfc\" name=\"$id\"\nhref=\"$href\">RFC $rfcnumber</a>"
. $_);
}
***************
*** 281,289 ****
local($_) = @_;
my $platform = next_argument();
! $ModulePlatforms{$THIS_MODULE} = $platform;
$platform = "Macintosh"
if $platform eq 'Mac';
! return "\n<p class=availability>Availability: <span"
! . "\n class=platform>$platform</span>.</p>\n" . $_;
}
--- 285,293 ----
local($_) = @_;
my $platform = next_argument();
! $ModulePlatforms{"<tt class='module'>$THIS_MODULE</tt>"} = $platform;
$platform = "Macintosh"
if $platform eq 'Mac';
! return "\n<p class='availability'>Availability: <span"
! . "\n class='platform'>$platform</span>.</p>\n" . $_;
}
***************
*** 354,358 ****
my($node,$target) = @_;
print INTLABELS "\$internal_labels{\"$target\"} = \"$URL/$node\";\n";
! return "<a href=\"$node#$target\">";
}
--- 358,362 ----
my($node,$target) = @_;
print INTLABELS "\$internal_labels{\"$target\"} = \"$URL/$node\";\n";
! return "<a href='$node#$target'>";
}
***************
*** 367,371 ****
sub new_link_info{
my $name = "l2h-" . ++$globals{'max_id'};
! my $aname = '<a name="' . $name . '">';
my $ahref = gen_link($CURRENT_FILE, $name);
return ($name, $aname, $ahref);
--- 371,375 ----
sub new_link_info{
my $name = "l2h-" . ++$globals{'max_id'};
! my $aname = "<a name='$name'>";
my $ahref = gen_link($CURRENT_FILE, $name);
return ($name, $aname, $ahref);
***************
*** 484,488 ****
sub idx_cmd_bifuncindex{
my $str = next_argument();
! add_index_entry("<tt>$str()</tt> (built-in function)", @_[0]);
}
--- 488,493 ----
sub idx_cmd_bifuncindex{
my $str = next_argument();
! add_index_entry("<tt class='function'>$str()</tt> (built-in function)",
! @_[0]);
}
***************
*** 500,504 ****
if ($define eq 'DEF') {
# add to the module index
! my($nstr,$garbage) = split / /, $str, 2;
$Modules{$nstr} .= $ahref;
}
--- 505,510 ----
if ($define eq 'DEF') {
# add to the module index
! $str =~ /(<tt.*<\/tt>)/;
! my $nstr = 1ドル;
$Modules{$nstr} .= $ahref;
}
***************
*** 523,527 ****
$INDEX_SUBITEM = "(in $name)";
print "[$name]";
! return make_mod_index_entry("<tt>$name</tt> (${word}module)", 'DEF');
}
--- 529,534 ----
$INDEX_SUBITEM = "(in $name)";
print "[$name]";
! return make_mod_index_entry(
! "<tt class='module'>$name</tt> (${word}module)", 'DEF');
}
***************
*** 541,545 ****
my $str = next_argument();
$word = "$word " if $word;
! $str = "<tt>$str</tt> (${word}module)";
# can't use add_index_entry() since the 2nd arg to gen_index_id() is used;
# just inline it all here
--- 548,552 ----
my $str = next_argument();
$word = "$word " if $word;
! $str = "<tt class='module'>$str</tt> (${word}module)";
# can't use add_index_entry() since the 2nd arg to gen_index_id() is used;
# just inline it all here
***************
*** 576,579 ****
--- 583,619 ----
}
+ $REFCOUNTS_LOADED = 0;
+
+ sub load_refcounts{
+ $REFCOUNTS_LOADED = 1;
+
+ use File::Basename;
+ my $myname, $mydir, $myext;
+ ($myname, $mydir, $myext) = fileparse(__FILE__, '\..*');
+ chop $mydir; # remove trailing '/'
+ ($myname, $mydir, $myext) = fileparse($mydir, '\..*');
+ chop $mydir; # remove trailing '/'
+ $mydir = getcwd() . "$dd$mydir"
+ unless $mydir =~ s|^/|/|;
+ local $_;
+ my $filename = "$mydir${dd}api${dd}refcounts.dat";
+ open(REFCOUNT_FILE, "<$filename") || die "\n$!\n";
+ print "[loading API refcount data]";
+ while (<REFCOUNT_FILE>) {
+ if (/([a-zA-Z0-9_]+):PyObject\*:([a-zA-Z0-9_]*):(0|[-+]1):(.*)$/) {
+ my($func, $param, $count, $comment) = (1,ドル 2,ドル 3,ドル 4ドル);
+ #print "\n$func($param) --> $count";
+ $REFCOUNTS{"$func:$param"} = $count;
+ }
+ }
+ }
+
+ sub get_refcount{
+ my ($func, $param) = @_;
+ load_refcounts()
+ unless $REFCOUNTS_LOADED;
+ return $REFCOUNTS{"$func:$param"};
+ }
+
sub do_env_cfuncdesc{
local($_) = @_;
***************
*** 581,600 ****
my $function_name = next_argument();
my $arg_list = next_argument();
! my $idx = make_str_index_entry("<tt class=cfunction>$function_name()</tt>"
! . get_indexsubitem());
$idx =~ s/ \(.*\)//;
$idx =~ s/\(\)//; # ????
return "<dl><dt>$return_type <b>$idx</b> (<var>$arg_list</var>)\n<dd>"
. $_
. '</dl>';
}
sub do_env_ctypedesc{
local($_) = @_;
my $type_name = next_argument();
! my $idx = make_str_index_entry("<tt class=ctype>$type_name</tt>"
! . get_indexsubitem());
! $idx =~ s/ \(.*\)//;
! return "<dl><dt><b>$idx</b>\n<dd>"
. $_
. '</dl>'
--- 621,665 ----
my $function_name = next_argument();
my $arg_list = next_argument();
! my $idx = make_str_index_entry(
! "<tt class='cfunction'>$function_name()</tt>" . get_indexsubitem());
$idx =~ s/ \(.*\)//;
$idx =~ s/\(\)//; # ????
+ my $result_rc = get_refcount($function_name, '');
+ my $rcinfo = '';
+ if ($result_rc eq '+1') {
+ $rcinfo = '<span class="label">Return value:</span>'
+ . "\n <span class=\"value\">New reference.</span>";
+ }
+ elsif ($result_rc eq '0') {
+ $rcinfo = '<span class="label">Return value:</span>'
+ . "\n <span class=\"value\">Borrowed reference.</span>";
+ }
+ if ($rcinfo ne '') {
+ $rcinfo = "\n<div class=\"refcount-info\">\n $rcinfo\n</div>";
+ }
return "<dl><dt>$return_type <b>$idx</b> (<var>$arg_list</var>)\n<dd>"
+ . $rcinfo
. $_
. '</dl>';
}
+ sub do_env_csimplemacrodesc{
+ local($_) = @_;
+ my $name = next_argument();
+ my $idx = make_str_index_entry("<tt class='macro'>$name</tt>");
+ return "<dl><dt><b>$idx</b>\n<dd>"
+ . $_
+ . '</dl>'
+ }
+
sub do_env_ctypedesc{
local($_) = @_;
+ my $index_name = next_optional_argument();
my $type_name = next_argument();
! $index_name = $type_name
! unless $index_name;
! my($name,$aname,$ahref) = new_link_info();
! add_index_entry("<tt class='ctype'>$index_name</tt> (C type)", $ahref);
! return "<dl><dt><b><tt class='ctype'>$aname$type_name</a></tt></b>\n<dd>"
. $_
. '</dl>'
***************
*** 605,609 ****
my $var_type = next_argument();
my $var_name = next_argument();
! my $idx = make_str_index_entry("<tt class=cdata>$var_name</tt>"
. get_indexsubitem());
$idx =~ s/ \(.*\)//;
--- 670,674 ----
my $var_type = next_argument();
my $var_name = next_argument();
! my $idx = make_str_index_entry("<tt class='cdata'>$var_name</tt>"
. get_indexsubitem());
$idx =~ s/ \(.*\)//;
***************
*** 618,622 ****
my $function_name = next_argument();
my $arg_list = next_argument();
! my $idx = make_str_index_entry("<tt class=function>$function_name()</tt>"
. get_indexsubitem());
$idx =~ s/ \(.*\)//;
--- 683,687 ----
my $function_name = next_argument();
my $arg_list = next_argument();
! my $idx = make_str_index_entry("<tt class='function'>$function_name()</tt>"
. get_indexsubitem());
$idx =~ s/ \(.*\)//;
***************
*** 629,633 ****
my $function_name = next_argument();
my $arg_list = next_argument();
! return "<dl><dt><b><tt class=function>$function_name</tt></b>"
. " (<var>$arg_list</var>)\n"
. '<dd>'
--- 694,698 ----
my $function_name = next_argument();
my $arg_list = next_argument();
! return "<dl><dt><b><tt class='function'>$function_name</tt></b>"
. " (<var>$arg_list</var>)\n"
. '<dd>'
***************
*** 640,644 ****
my $function_name = next_argument();
my $arg_list = next_argument();
! my $prefix = "<tt class=function>$function_name()</tt>";
my $idx = make_str_index_entry($prefix . get_indexsubitem());
$prefix =~ s/\(\)//;
--- 705,709 ----
my $function_name = next_argument();
my $arg_list = next_argument();
! my $prefix = "<tt class='function'>$function_name()</tt>";
my $idx = make_str_index_entry($prefix . get_indexsubitem());
$prefix =~ s/\(\)//;
***************
*** 651,655 ****
my $function_name = next_argument();
my $arg_list = next_argument();
! my $prefix = "<tt class=function>$function_name</tt>";
return "<dt><b>$prefix</b> (<var>$arg_list</var>)\n<dd>" . $_;
--- 716,720 ----
my $function_name = next_argument();
my $arg_list = next_argument();
! my $prefix = "<tt class='function'>$function_name</tt>";
return "<dt><b>$prefix</b> (<var>$arg_list</var>)\n<dd>" . $_;
***************
*** 668,677 ****
my $idx;
if ($INDEX_OPCODES) {
! $idx = make_str_index_entry(
! "<tt class=opcode>$opcode_name</tt> (byte code instruction)");
$idx =~ s/ \(byte code instruction\)//;
}
else {
! $idx = "<tt class=opcode>$opcode_name</tt>";
}
my $stuff = "<dl><dt><b>$idx</b>";
--- 733,742 ----
my $idx;
if ($INDEX_OPCODES) {
! $idx = make_str_index_entry("<tt class='opcode'>$opcode_name</tt>"
! . " (byte code instruction)");
$idx =~ s/ \(byte code instruction\)//;
}
else {
! $idx = "<tt class='opcode'>$opcode_name</tt>";
}
my $stuff = "<dl><dt><b>$idx</b>";
***************
*** 712,716 ****
local($_) = @_;
my $excname = next_argument();
! my $idx = make_str_index_entry("<tt class=exception>$excname</tt>");
return "<dl><dt><b>$idx</b>\n<dd>" . $_ . '</dl>'
}
--- 777,781 ----
local($_) = @_;
my $excname = next_argument();
! my $idx = make_str_index_entry("<tt class='exception'>$excname</tt>");
return "<dl><dt><b>$idx</b>\n<dd>" . $_ . '</dl>'
}
***************
*** 724,728 ****
my $arg_list = next_argument();
$idx = make_str_index_entry(
! "<tt class=class>$THIS_CLASS</tt> (class in $THIS_MODULE)" );
$idx =~ s/ \(.*\)//;
return "<dl><dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>" . $_ . '</dl>';
--- 789,793 ----
my $arg_list = next_argument();
$idx = make_str_index_entry(
! "<tt class='class'>$THIS_CLASS</tt> (class in $THIS_MODULE)" );
$idx =~ s/ \(.*\)//;
return "<dl><dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>" . $_ . '</dl>';
***************
*** 741,745 ****
$extra = " ($class_name method)";
}
! my $idx = make_str_index_entry("<tt class=method>$method()</tt>$extra");
$idx =~ s/ \(.*\)//;
$idx =~ s/\(\)//;
--- 806,810 ----
$extra = " ($class_name method)";
}
! my $idx = make_str_index_entry("<tt class='method'>$method()</tt>$extra");
$idx =~ s/ \(.*\)//;
$idx =~ s/\(\)//;
***************
*** 759,763 ****
$extra = " ($class_name method)";
}
! my $idx = make_str_index_entry("<tt class=method>$method()</tt>$extra");
$idx =~ s/ \(.*\)//;
$idx =~ s/\(\)//;
--- 824,828 ----
$extra = " ($class_name method)";
}
! my $idx = make_str_index_entry("<tt class='method'>$method()</tt>$extra");
$idx =~ s/ \(.*\)//;
$idx =~ s/\(\)//;
***************
*** 796,800 ****
$extra = " ($class attribute)"
if ($class ne '');
! my $idx = make_str_index_entry("<tt class=member>$member</tt>$extra");
$idx =~ s/ \(.*\)//;
$idx =~ s/\(\)//;
--- 861,865 ----
$extra = " ($class attribute)"
if ($class ne '');
! my $idx = make_str_index_entry("<tt class='member'>$member</tt>$extra");
$idx =~ s/ \(.*\)//;
$idx =~ s/\(\)//;
***************
*** 812,816 ****
$extra = " ($class attribute)"
if ($class ne '');
! my $idx = make_str_index_entry("<tt class=member>$member</tt>$extra");
$idx =~ s/ \(.*\)//;
$idx =~ s/\(\)//;
--- 877,881 ----
$extra = " ($class attribute)"
if ($class ne '');
! my $idx = make_str_index_entry("<tt class='member'>$member</tt>$extra");
$idx =~ s/ \(.*\)//;
$idx =~ s/\(\)//;
***************
*** 822,826 ****
next_optional_argument();
my $member = next_argument();
! return "<dl><dt><b><tt class=member>$member</tt></b>\n<dd>" . $_ . '</dl>';
}
--- 887,893 ----
next_optional_argument();
my $member = next_argument();
! return "<dl><dt><b><tt class='member'>$member</tt></b>\n<dd>"
! . $_
! . '</dl>';
}
***************
*** 830,852 ****
next_optional_argument();
my $member = next_argument();
! return "<dt><b><tt class=member>$member</tt></b><dd>" . $_;
}
! @col_aligns = ("<td>", "<td>", "<td>", "<td>");
$TABLE_HEADER_BGCOLOR = $NAV_BGCOLOR;
- sub get_th{
- my $a = @_[0];
- my $r = '<th>';
- if ($a eq 'l')
- { $r = '<th align=left>'; }
- elsif (substr($a, 0, 1) eq 'p')
- { $r = '<th align=left>'; }
- elsif ($a eq 'r')
- { $r = '<th align=right>'; }
- return $r;
- }
-
sub fix_font{
# do a little magic on a font name to get the right behavior in the first
--- 897,907 ----
next_optional_argument();
my $member = next_argument();
! return "<dt><b><tt class='member'>$member</tt></b><dd>" . $_;
}
! @col_aligns = ('<td>', '<td>', '<td>', '<td>');
$TABLE_HEADER_BGCOLOR = $NAV_BGCOLOR;
sub fix_font{
# do a little magic on a font name to get the right behavior in the first
***************
*** 857,878 ****
}
elsif ($font eq 'file' || $font eq 'filenq') {
! $font = 'tt class=file';
}
return $font;
}
sub setup_column_alignments{
local($_) = @_;
! my($a1,$a2,$a3,$a4) = split(/[|]/,$_);
! my($th1,$th2,$th3,$th4) = ('<th>', '<th>', '<th>', '<th>');
! $col_aligns[0] = (($a1 eq 'c') ? '<td align=center valign=baseline>'
! : '<td valign=baseline>');
! $col_aligns[1] = (($a2 eq 'c') ? '<td align=center>' : '<td>');
! $col_aligns[2] = (($a3 eq 'c') ? '<td align=center>' : '<td>');
! $col_aligns[3] = (($a4 eq 'c') ? '<td align=center>' : '<td>');
# return the aligned header start tags
! return (get_th($a1), get_th($a2), get_th($a3), get_th($a4));
}
sub do_env_tableii{
local($_) = @_;
--- 912,964 ----
}
elsif ($font eq 'file' || $font eq 'filenq') {
! $font = 'tt class="file"';
}
+ elsif ($font eq 'member') {
+ $font = 'tt class="member"';
+ }
return $font;
}
+ sub figure_column_alignment{
+ my $a = @_[0];
+ my $mark = substr($a, 0, 1);
+ my $r = '';
+ if ($mark eq 'c')
+ { $r = ' align="center"'; }
+ elsif ($mark eq 'r')
+ { $r = ' align="right"'; }
+ elsif ($mark eq 'l')
+ { $r = ' align="left"'; }
+ elsif ($mark eq 'p')
+ { $r = ' align="left"'; }
+ return $r;
+ }
+
sub setup_column_alignments{
local($_) = @_;
! my($s1,$s2,$s3,$s4) = split(/[|]/,$_);
! my $a1 = figure_column_alignment($s1);
! my $a2 = figure_column_alignment($s2);
! my $a3 = figure_column_alignment($s3);
! my $a4 = figure_column_alignment($s4);
! $col_aligns[0] = "<td$a1 valign=\"baseline\">";
! $col_aligns[1] = "<td$a2>";
! $col_aligns[2] = "<td$a3>";
! $col_aligns[3] = "<td$a4>";
# return the aligned header start tags
! return ("<th$a1>", "<th$a2>", "<th$a3>", "<th$a4>");
}
+ sub get_table_col1_fonts{
+ my $font = $globals{'lineifont'};
+ my ($sfont,$efont) = ('', '');
+ if ($font) {
+ $sfont = "<$font>";
+ $efont = "</$font>";
+ $efont =~ s/ .*>/>/;
+ }
+ return ($font, $sfont, $efont);
+ }
+
sub do_env_tableii{
local($_) = @_;
***************
*** 883,894 ****
s/[\s\n]+//;
$globals{'lineifont'} = $font;
! return '<table border align=center style="border-collapse: collapse">'
. "\n <thead>"
. "\n <tr$TABLE_HEADER_BGCOLOR>"
! . "\n $th1<b>$h1</b>\ \ </th>"
! . "\n $th2<b>$h2</b>\ \ </th>"
. "\n </thead>"
! . "\n <tbody valign=baseline>"
! . $_
. "\n </tbody>"
. "\n</table>";
--- 969,983 ----
s/[\s\n]+//;
$globals{'lineifont'} = $font;
! my $a1 = $col_aligns[0];
! my $a2 = $col_aligns[1];
! s/\\lineii</\\lineii[$a1|$a2]</g;
! return '<table border align="center" style="border-collapse: collapse">'
. "\n <thead>"
. "\n <tr$TABLE_HEADER_BGCOLOR>"
! . "\n $th1<b>$h1</b>\ </th>"
! . "\n $th2<b>$h2</b>\ </th>"
. "\n </thead>"
! . "\n <tbody valign='baseline'>"
! . $_
. "\n </tbody>"
. "\n</table>";
***************
*** 897,912 ****
sub do_cmd_lineii{
local($_) = @_;
my $c1 = next_argument();
my $c2 = next_argument();
s/[\s\n]+//;
! my($font,$sfont,$efont) = ($globals{'lineifont'}, '', '');
! if ($font) {
! $sfont = "<$font>";
! $efont = "</$font>";
! $efont =~ s/ .*>/>/;
! }
! my($c1align,$c2align) = @col_aligns[0,1];
! return "\n <tr>$c1align$sfont$c1$efont</td>\n"
! . " $c2align$c2\ </td>"
. $_;
}
--- 986,1002 ----
sub do_cmd_lineii{
local($_) = @_;
+ my $aligns = next_optional_argument();
my $c1 = next_argument();
my $c2 = next_argument();
s/[\s\n]+//;
! my($font,$sfont,$efont) = get_table_col1_fonts();
! $c2 = ' ' if ($c2 eq '');
! my($c1align,$c2align) = split('\|', $aligns);
! my $padding = '';
! if ($c1align =~ /align="right"/) {
! $padding = ' ';
! }
! return "\n <tr>$c1align$sfont$c1$efont$padding</td>\n"
! . " $c2align$c2</td>"
. $_;
}
***************
*** 921,932 ****
s/[\s\n]+//;
$globals{'lineifont'} = $font;
! return '<table border align=center style="border-collapse: collapse">'
. "\n <thead>"
. "\n <tr$TABLE_HEADER_BGCOLOR>"
! . "\n $th1<b>$h1</b>\ \ </th>"
! . "\n $th2<b>$h2</b>\ \ </th>"
! . "\n $th3<b>$h3</b>\ \ </th>"
. "\n </thead>"
! . "\n <tbody valign=baseline>"
. $_
. "\n </tbody>"
--- 1011,1026 ----
s/[\s\n]+//;
$globals{'lineifont'} = $font;
! my $a1 = $col_aligns[0];
! my $a2 = $col_aligns[1];
! my $a3 = $col_aligns[2];
! s/\\lineiii</\\lineiii[$a1|$a2|$a3]</g;
! return '<table border align="center" style="border-collapse: collapse">'
. "\n <thead>"
. "\n <tr$TABLE_HEADER_BGCOLOR>"
! . "\n $th1<b>$h1</b>\ </th>"
! . "\n $th2<b>$h2</b>\ </th>"
! . "\n $th3<b>$h3</b>\ </th>"
. "\n </thead>"
! . "\n <tbody valign='baseline'>"
. $_
. "\n </tbody>"
***************
*** 936,953 ****
sub do_cmd_lineiii{
local($_) = @_;
my $c1 = next_argument();
my $c2 = next_argument();
my $c3 = next_argument();
s/[\s\n]+//;
! my($font,$sfont,$efont) = ($globals{'lineifont'}, '', '');
! if ($font) {
! $sfont = "<$font>";
! $efont = "</$font>";
! $efont =~ s/ .*>/>/;
}
! my($c1align,$c2align,$c3align) = @col_aligns[0,1,2];
! return "\n <tr>$c1align$sfont$c1$efont</td>\n"
. " $c2align$c2</td>\n"
! . " $c3align$c3\ </td>"
. $_;
}
--- 1030,1048 ----
sub do_cmd_lineiii{
local($_) = @_;
+ my $aligns = next_optional_argument();
my $c1 = next_argument();
my $c2 = next_argument();
my $c3 = next_argument();
s/[\s\n]+//;
! my($font,$sfont,$efont) = get_table_col1_fonts();
! $c3 = ' ' if ($c3 eq '');
! my($c1align,$c2align,$c3align) = split('\|', $aligns);
! my $padding = '';
! if ($c1align =~ /align="right"/) {
! $padding = ' ';
}
! return "\n <tr>$c1align$sfont$c1$efont$padding</td>\n"
. " $c2align$c2</td>\n"
! . " $c3align$c3</td>"
. $_;
}
***************
*** 963,975 ****
s/[\s\n]+//;
$globals{'lineifont'} = $font;
! return '<table border align=center style="border-collapse: collapse">'
. "\n <thead>"
. "\n <tr$TABLE_HEADER_BGCOLOR>"
! . "\n $th1<b>$h1</b>\ \ </th>"
! . "\n $th2<b>$h2</b>\ \ </th>"
! . "\n $th3<b>$h3</b>\ \ </th>"
! . "\n $th4<b>$h4</b>\ \ </th>"
. "\n </thead>"
! . "\n <tbody valign=baseline>"
. $_
. "\n </tbody>"
--- 1058,1075 ----
s/[\s\n]+//;
$globals{'lineifont'} = $font;
! my $a1 = $col_aligns[0];
! my $a2 = $col_aligns[1];
! my $a3 = $col_aligns[2];
! my $a4 = $col_aligns[3];
! s/\\lineiv</\\lineiv[$a1|$a2|$a3|$a4]</g;
! return '<table border align="center" style="border-collapse: collapse">'
. "\n <thead>"
. "\n <tr$TABLE_HEADER_BGCOLOR>"
! . "\n $th1<b>$h1</b>\ </th>"
! . "\n $th2<b>$h2</b>\ </th>"
! . "\n $th3<b>$h3</b>\ </th>"
! . "\n $th4<b>$h4</b>\ </th>"
. "\n </thead>"
! . "\n <tbody valign='baseline'>"
. $_
. "\n </tbody>"
***************
*** 979,982 ****
--- 1079,1083 ----
sub do_cmd_lineiv{
local($_) = @_;
+ my $aligns = next_optional_argument();
my $c1 = next_argument();
my $c2 = next_argument();
***************
*** 984,998 ****
my $c4 = next_argument();
s/[\s\n]+//;
! my($font,$sfont,$efont) = ($globals{'lineifont'}, '', '');
! if ($font) {
! $sfont = "<$font>";
! $efont = "</$font>";
! $efont =~ s/ .*>/>/;
}
! my($c1align,$c2align,$c3align,$c4align) = @col_aligns;
! return "\n <tr>$c1align$sfont$c1$efont</td>\n"
. " $c2align$c2</td>\n"
. " $c3align$c3</td>\n"
! . " $c4align$c4\ </td>"
. $_;
}
--- 1085,1099 ----
my $c4 = next_argument();
s/[\s\n]+//;
! my($font,$sfont,$efont) = get_table_col1_fonts();
! $c4 = ' ' if ($c4 eq '');
! my($c1align,$c2align,$c3align,$c4align) = split('\|', $aligns);
! my $padding = '';
! if ($c1align =~ /align="right"/) {
! $padding = ' ';
}
! return "\n <tr>$c1align$sfont$c1$efont$padding</td>\n"
. " $c2align$c2</td>\n"
. " $c3align$c3</td>\n"
! . " $c4align$c4</td>"
. $_;
}
***************
*** 1000,1004 ****
sub do_cmd_maketitle {
local($_) = @_;
! my $the_title = "\n<div class=titlepage><center>";
if ($t_title) {
$the_title .= "\n<h1>$t_title</h1>";
--- 1101,1105 ----
sub do_cmd_maketitle {
local($_) = @_;
! my $the_title = "\n<div class='titlepage'><center>";
if ($t_title) {
$the_title .= "\n<h1>$t_title</h1>";
***************
*** 1126,1131 ****
sub do_env_seealso{
! return "<div class=seealso>\n "
! . "<p class=heading><b>See Also:</b></p>\n"
. @_[0]
. '</div>';
--- 1227,1232 ----
sub do_env_seealso{
! return "<div class='seealso'>\n "
! . "<p class='heading'><b>See Also:</b></p>\n"
. @_[0]
. '</div>';
***************
*** 1145,1150 ****
$period = '';
}
! return '<dl compact class=seemodule>'
! . "\n <dt>Module <b><tt class=module><a href=\"module-$key.html\">"
. "$module</a></tt>:</b>"
. "\n <dd>$text$period\n </dl>"
--- 1246,1251 ----
$period = '';
}
! return '<dl compact class="seemodule">'
! . "\n <dt>Module <b><tt class='module'><a href='module-$key.html'>"
. "$module</a></tt>:</b>"
. "\n <dd>$text$period\n </dl>"
***************
*** 1155,1159 ****
local($_) = @_;
my $content = next_argument();
! return '<div class=seetext><p>' . $content . '</div>' . $_;
}
--- 1256,1260 ----
local($_) = @_;
my $content = next_argument();
! return '<div class="seetext"><p>' . $content . '</div>' . $_;
}
***************
*** 1165,1169 ****
sub do_env_definitions{
local($_) = @_;
! return "<dl class=definitions>$_</dl>\n";
}
--- 1266,1270 ----
sub do_env_definitions{
local($_) = @_;
! return "<dl class='definitions'>$_</dl>\n";
}
- Previous message: [Python-checkins] CVS: python/dist/src/Doc/tut tut.tex,1.103,1.104
- Next message: [Python-checkins] CVS: python/dist/src/Doc/ref ref2.tex,1.17,1.18 ref3.tex,1.39,1.40 ref4.tex,1.21,1.22 ref5.tex,1.27,1.28 ref7.tex,1.18,1.19
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]