mirror of
https://github.com/python/cpython.git
synced 2025-09-09 18:32:22 +00:00
write_idxfile(): New function. Isolate format of the external index
data file used by buildindex.py. next_argument_id(): Removed; no longer used. next_argument(): Doesn't use next_argument_id(), just does the work. gen_target(), gen_target_name(): Removed, no longer used. The only place that used them now does the (trivial) work directly. Lots of little changes so we never have to pass around $br_id values all over the place. The only places they're used now new IDs are generated as needed.
This commit is contained in:
parent
02e18b4b84
commit
ccc627200a
1 changed files with 82 additions and 95 deletions
|
@ -9,16 +9,11 @@
|
||||||
package main;
|
package main;
|
||||||
|
|
||||||
|
|
||||||
sub next_argument_id{
|
|
||||||
my ($param,$br_id);
|
|
||||||
$param = missing_braces()
|
|
||||||
unless ((s/$next_pair_pr_rx/$br_id=$1;$param=$2;''/eo)
|
|
||||||
||(s/$next_pair_rx/$br_id=$1;$param=$2;''/eo));
|
|
||||||
return ($param, $br_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
sub next_argument{
|
sub next_argument{
|
||||||
my ($param,$br_id) = next_argument_id();
|
my $param;
|
||||||
|
$param = missing_braces()
|
||||||
|
unless ((s/$next_pair_pr_rx/$param=$2;''/eo)
|
||||||
|
||(s/$next_pair_rx/$param=$2;''/eo));
|
||||||
return $param;
|
return $param;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,7 +105,7 @@ sub use_current{
|
||||||
return use_wrappers(@_[0], '', '');
|
return use_wrappers(@_[0], '', '');
|
||||||
}
|
}
|
||||||
sub use_sans_serif{
|
sub use_sans_serif{
|
||||||
return use_wrappers(@_[0], '<font face=sans-serif>', '</font>');
|
return use_wrappers(@_[0], '<font face="sans-serif">', '</font>');
|
||||||
}
|
}
|
||||||
sub use_italics{
|
sub use_italics{
|
||||||
return use_wrappers(@_[0], '<i>', '</i>');
|
return use_wrappers(@_[0], '<i>', '</i>');
|
||||||
|
@ -163,8 +158,8 @@ sub do_cmd_newsgroup{
|
||||||
|
|
||||||
sub do_cmd_envvar{
|
sub do_cmd_envvar{
|
||||||
local($_) = @_;
|
local($_) = @_;
|
||||||
my($envvar,$br_id) = next_argument_id();
|
my $envvar = next_argument();
|
||||||
my($name,$aname,$ahref) = link_info($br_id);
|
my($name,$aname,$ahref) = new_link_info();
|
||||||
# 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>",
|
||||||
|
@ -192,13 +187,14 @@ sub do_cmd_manpage{
|
||||||
|
|
||||||
sub do_cmd_rfc{
|
sub do_cmd_rfc{
|
||||||
local($_) = @_;
|
local($_) = @_;
|
||||||
my($rfcnumber,$br_id) = next_argument_id();
|
my $rfcnumber = next_argument();
|
||||||
|
my $id = "rfcref-" . ++$global{'max_id'};
|
||||||
my $href =
|
my $href =
|
||||||
"http://info.internet.isi.edu/in-notes/rfc/files/rfc$rfcnumber.txt";
|
"http://info.internet.isi.edu/in-notes/rfc/files/rfc$rfcnumber.txt";
|
||||||
# Save the reference
|
# Save the reference
|
||||||
my $nstr = gen_index_id("RFC!RFC $rfcnumber", '');
|
my $nstr = gen_index_id("RFC!RFC $rfcnumber", '');
|
||||||
$index{$nstr} .= make_half_href("$CURRENT_FILE#$br_id");
|
$index{$nstr} .= make_half_href("$CURRENT_FILE#$id");
|
||||||
return "<a name=\"$br_id\"\nhref=\"$href\">RFC $rfcnumber</a>" .$_;
|
return "<a name=\"$id\"\nhref=\"$href\">RFC $rfcnumber</a>" .$_;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub do_cmd_deprecated{
|
sub do_cmd_deprecated{
|
||||||
|
@ -249,10 +245,11 @@ sub do_cmd_withsubitem{
|
||||||
my $oldsubitem = $INDEX_SUBITEM;
|
my $oldsubitem = $INDEX_SUBITEM;
|
||||||
$INDEX_SUBITEM = next_argument();
|
$INDEX_SUBITEM = next_argument();
|
||||||
my $stuff = next_argument();
|
my $stuff = next_argument();
|
||||||
my ($open, $close) = ($O, $C);
|
my $br_id = ++$globals{'max_id'};
|
||||||
|
my $marker = "$O$br_id$C";
|
||||||
return
|
return
|
||||||
$stuff
|
$stuff
|
||||||
. "\\setindexsubitem${open}1$close$oldsubitem${open}1$close"
|
. "\\setindexsubitem$marker$oldsubitem$marker"
|
||||||
. $_;
|
. $_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -273,16 +270,11 @@ print INTLABELS "1; # hack in case there are no entries\n\n";
|
||||||
#
|
#
|
||||||
$IDXFILE_FIELD_SEP = "\1";
|
$IDXFILE_FIELD_SEP = "\1";
|
||||||
|
|
||||||
|
sub write_idxfile{
|
||||||
sub gen_target_name{
|
my ($ahref, $str) = @_;
|
||||||
my($stuff) = @_;
|
print IDXFILE $ahref, $IDXFILE_FIELD_SEP, $str, "\n";
|
||||||
return "l2h-" . $stuff;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub gen_target{
|
|
||||||
my($name) = @_;
|
|
||||||
return '<a name="' . $name . '">';
|
|
||||||
}
|
|
||||||
|
|
||||||
sub gen_link{
|
sub gen_link{
|
||||||
my($node,$target) = @_;
|
my($node,$target) = @_;
|
||||||
|
@ -291,8 +283,8 @@ sub gen_link{
|
||||||
}
|
}
|
||||||
|
|
||||||
sub make_index_entry{
|
sub make_index_entry{
|
||||||
my($br_id,$str) = @_;
|
my($str) = @_;
|
||||||
my($name,$aname,$ahref) = link_info($br_id);
|
my($name,$aname,$ahref) = new_link_info();
|
||||||
add_index_entry($str, $ahref);
|
add_index_entry($str, $ahref);
|
||||||
return "$aname$anchor_invisible_mark</a>";
|
return "$aname$anchor_invisible_mark</a>";
|
||||||
}
|
}
|
||||||
|
@ -302,31 +294,31 @@ sub add_index_entry{
|
||||||
my($str,$ahref) = @_;
|
my($str,$ahref) = @_;
|
||||||
$str = gen_index_id($str, '');
|
$str = gen_index_id($str, '');
|
||||||
$index{$str} .= $ahref;
|
$index{$str} .= $ahref;
|
||||||
print IDXFILE $ahref, $IDXFILE_FIELD_SEP, $str, "\n";
|
write_idxfile($ahref, $str);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub link_info{
|
sub new_link_info{
|
||||||
my $name = gen_target_name(@_[0]);
|
my $name = "l2h-" . ++$globals{'max_id'};
|
||||||
my $aname = gen_target($name);
|
my $aname = '<a name="' . $name . '">';
|
||||||
my $ahref = gen_link($CURRENT_FILE, $name);
|
my $ahref = gen_link($CURRENT_FILE, $name);
|
||||||
return ($name, $aname, $ahref);
|
return ($name, $aname, $ahref);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub do_cmd_index{
|
sub do_cmd_index{
|
||||||
local($_) = @_;
|
local($_) = @_;
|
||||||
my($str,$br_id) = next_argument_id();
|
my $str = next_argument();
|
||||||
swallow_newline();
|
swallow_newline();
|
||||||
#
|
#
|
||||||
my($name,$aname,$ahref) = link_info($br_id);
|
my($name,$aname,$ahref) = new_link_info();
|
||||||
add_index_entry("$str", $ahref);
|
add_index_entry("$str", $ahref);
|
||||||
return "$aname$anchor_invisible_mark</a>" . $_;
|
return "$aname$anchor_invisible_mark</a>" . $_;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub do_cmd_kwindex{
|
sub do_cmd_kwindex{
|
||||||
local($_) = @_;
|
local($_) = @_;
|
||||||
my($str,$br_id) = next_argument_id();
|
my $str = next_argument();
|
||||||
#
|
#
|
||||||
my($name,$aname,$ahref) = link_info($br_id);
|
my($name,$aname,$ahref) = new_link_info();
|
||||||
add_index_entry("<tt>$str</tt>!keyword", $ahref);
|
add_index_entry("<tt>$str</tt>!keyword", $ahref);
|
||||||
add_index_entry("keyword!<tt>$str</tt>", $ahref);
|
add_index_entry("keyword!<tt>$str</tt>", $ahref);
|
||||||
return "$aname$anchor_invisible_mark</a>" . $_;
|
return "$aname$anchor_invisible_mark</a>" . $_;
|
||||||
|
@ -334,10 +326,10 @@ sub do_cmd_kwindex{
|
||||||
|
|
||||||
sub do_cmd_indexii{
|
sub do_cmd_indexii{
|
||||||
local($_) = @_;
|
local($_) = @_;
|
||||||
my($str1,$br_id) = next_argument_id();
|
my $str1 = next_argument();
|
||||||
my $str2 = next_argument();
|
my $str2 = next_argument();
|
||||||
#
|
#
|
||||||
my($name,$aname,$ahref) = link_info($br_id);
|
my($name,$aname,$ahref) = new_link_info();
|
||||||
add_index_entry("$str1!$str2", $ahref);
|
add_index_entry("$str1!$str2", $ahref);
|
||||||
add_index_entry("$str2!$str1", $ahref);
|
add_index_entry("$str2!$str1", $ahref);
|
||||||
return "$aname$anchor_invisible_mark</a>" . $_;
|
return "$aname$anchor_invisible_mark</a>" . $_;
|
||||||
|
@ -345,11 +337,11 @@ sub do_cmd_indexii{
|
||||||
|
|
||||||
sub do_cmd_indexiii{
|
sub do_cmd_indexiii{
|
||||||
local($_) = @_;
|
local($_) = @_;
|
||||||
my($str1,$br_id) = next_argument_id();
|
my $str1 = next_argument();
|
||||||
my $str2 = next_argument();
|
my $str2 = next_argument();
|
||||||
my $str3 = next_argument();
|
my $str3 = next_argument();
|
||||||
#
|
#
|
||||||
my($name,$aname,$ahref) = link_info($br_id);
|
my($name,$aname,$ahref) = new_link_info();
|
||||||
add_index_entry("$str1!$str2 $str3", $ahref);
|
add_index_entry("$str1!$str2 $str3", $ahref);
|
||||||
add_index_entry("$str2!$str3, $str1", $ahref);
|
add_index_entry("$str2!$str3, $str1", $ahref);
|
||||||
add_index_entry("$str3!$str1 $str2", $ahref);
|
add_index_entry("$str3!$str1 $str2", $ahref);
|
||||||
|
@ -358,12 +350,12 @@ sub do_cmd_indexiii{
|
||||||
|
|
||||||
sub do_cmd_indexiv{
|
sub do_cmd_indexiv{
|
||||||
local($_) = @_;
|
local($_) = @_;
|
||||||
my($str1,$br_id) = next_argument_id();
|
my $str1 = next_argument();
|
||||||
my $str2 = next_argument();
|
my $str2 = next_argument();
|
||||||
my $str3 = next_argument();
|
my $str3 = next_argument();
|
||||||
my $str4 = next_argument();
|
my $str4 = next_argument();
|
||||||
#
|
#
|
||||||
my($name,$aname,$ahref) = link_info($br_id);
|
my($name,$aname,$ahref) = new_link_info();
|
||||||
add_index_entry("$str1!$str2 $str3 $str4", $ahref);
|
add_index_entry("$str1!$str2 $str3 $str4", $ahref);
|
||||||
add_index_entry("$str2!$str3 $str4, $str1", $ahref);
|
add_index_entry("$str2!$str3 $str4, $str1", $ahref);
|
||||||
add_index_entry("$str3!$str4, $str1 $str2", $ahref);
|
add_index_entry("$str3!$str4, $str1 $str2", $ahref);
|
||||||
|
@ -373,17 +365,18 @@ sub do_cmd_indexiv{
|
||||||
|
|
||||||
sub do_cmd_ttindex{
|
sub do_cmd_ttindex{
|
||||||
local($_) = @_;
|
local($_) = @_;
|
||||||
my($str,$br_id) = next_argument_id();
|
my $str = next_argument();
|
||||||
|
my $entry = $str . get_indexsubitem();
|
||||||
swallow_newline();
|
swallow_newline();
|
||||||
return make_index_entry($br_id, $str . get_indexsubitem()) . $_;
|
return make_index_entry($entry) . $_;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub my_typed_index_helper{
|
sub my_typed_index_helper{
|
||||||
local($word,$_) = @_;
|
local($word,$_) = @_;
|
||||||
my($str,$br_id) = next_argument_id();
|
my $str = next_argument();
|
||||||
swallow_newline();
|
swallow_newline();
|
||||||
#
|
#
|
||||||
my($name,$aname,$ahref) = link_info($br_id1);
|
my($name,$aname,$ahref) = new_link_info();
|
||||||
add_index_entry("$str $word", $ahref);
|
add_index_entry("$str $word", $ahref);
|
||||||
add_index_entry("$word!$str", $ahref);
|
add_index_entry("$word!$str", $ahref);
|
||||||
return "$aname$anchor_invisible_mark</a>" . $_;
|
return "$aname$anchor_invisible_mark</a>" . $_;
|
||||||
|
@ -396,19 +389,19 @@ sub do_cmd_obindex{ return my_typed_index_helper('object', @_); }
|
||||||
|
|
||||||
sub my_parword_index_helper{
|
sub my_parword_index_helper{
|
||||||
local($word,$_) = @_;
|
local($word,$_) = @_;
|
||||||
my($str,$br_id) = next_argument_id();
|
my $str = next_argument();
|
||||||
swallow_newline();
|
swallow_newline();
|
||||||
return make_index_entry($br_id, "$str ($word)") . $_;
|
return make_index_entry("$str ($word)") . $_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub make_mod_index_entry{
|
sub make_mod_index_entry{
|
||||||
my($br_id,$str,$define) = @_;
|
my($str,$define) = @_;
|
||||||
my($name,$aname,$ahref) = link_info($br_id);
|
my($name,$aname,$ahref) = new_link_info();
|
||||||
# equivalent of add_index_entry() using $define instead of ''
|
# equivalent of add_index_entry() using $define instead of ''
|
||||||
$str = gen_index_id($str, $define);
|
$str = gen_index_id($str, $define);
|
||||||
$index{$str} .= $ahref;
|
$index{$str} .= $ahref;
|
||||||
print IDXFILE $ahref, $IDXFILE_FIELD_SEP, $str, "\n";
|
write_idxfile($ahref, $str);
|
||||||
|
|
||||||
if ($define eq 'DEF') {
|
if ($define eq 'DEF') {
|
||||||
# add to the module index
|
# add to the module index
|
||||||
|
@ -426,8 +419,7 @@ sub define_module{
|
||||||
my $section_tag = join('', @curr_sec_id);
|
my $section_tag = join('', @curr_sec_id);
|
||||||
$word = "$word " if $word;
|
$word = "$word " if $word;
|
||||||
$THIS_MODULE = "$name";
|
$THIS_MODULE = "$name";
|
||||||
return make_mod_index_entry("SECTION$section_tag",
|
return make_mod_index_entry("<tt>$name</tt> (${word}module)", 'DEF');
|
||||||
"<tt>$name</tt> (${word}module)", 'DEF');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub my_module_index_helper{
|
sub my_module_index_helper{
|
||||||
|
@ -439,19 +431,18 @@ sub my_module_index_helper{
|
||||||
|
|
||||||
sub ref_module_index_helper{
|
sub ref_module_index_helper{
|
||||||
local($word, $_) = @_;
|
local($word, $_) = @_;
|
||||||
my($str,$br_id) = next_argument_id();
|
my $str = next_argument();
|
||||||
swallow_newline();
|
swallow_newline();
|
||||||
$word = "$word " if $word;
|
$word = "$word " if $word;
|
||||||
return make_mod_index_entry($br_id,
|
return make_mod_index_entry("<tt>$str</tt> (${word}module)", 'REF') . $_;
|
||||||
"<tt>$str</tt> (${word}module)", 'REF') . $_;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub do_cmd_bifuncindex{
|
sub do_cmd_bifuncindex{
|
||||||
local($_) = @_;
|
local($_) = @_;
|
||||||
my($str,$br_id) = next_argument_id();
|
my $str = next_argument();
|
||||||
swallow_newline();
|
|
||||||
my $fname = "<tt>$str()</tt>";
|
my $fname = "<tt>$str()</tt>";
|
||||||
return make_index_entry($br_id, "$fname (built-in function)") . $_;
|
swallow_newline();
|
||||||
|
return make_index_entry("$fname (built-in function)") . $_;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub do_cmd_modindex{ return my_module_index_helper('', @_); }
|
sub do_cmd_modindex{ return my_module_index_helper('', @_); }
|
||||||
|
@ -478,8 +469,8 @@ init_myformat();
|
||||||
# instead of the dummy filler.
|
# instead of the dummy filler.
|
||||||
#
|
#
|
||||||
sub make_str_index_entry{
|
sub make_str_index_entry{
|
||||||
my($br_id,$str) = @_;
|
my($str) = @_;
|
||||||
my($name,$aname,$ahref) = link_info($br_id);
|
my($name,$aname,$ahref) = new_link_info();
|
||||||
add_index_entry($str, $ahref);
|
add_index_entry($str, $ahref);
|
||||||
return "$aname$str</a>";
|
return "$aname$str</a>";
|
||||||
}
|
}
|
||||||
|
@ -487,10 +478,10 @@ sub make_str_index_entry{
|
||||||
sub do_env_cfuncdesc{
|
sub do_env_cfuncdesc{
|
||||||
local($_) = @_;
|
local($_) = @_;
|
||||||
my $return_type = next_argument();
|
my $return_type = next_argument();
|
||||||
my($function_name,$br_id) = next_argument_id();
|
my $function_name = next_argument();
|
||||||
my $arg_list = next_argument();
|
my $arg_list = next_argument();
|
||||||
my $idx = make_str_index_entry($br_id,
|
my $idx = make_str_index_entry("<tt>$function_name()</tt>"
|
||||||
"<tt>$function_name()</tt>" . get_indexsubitem());
|
. get_indexsubitem());
|
||||||
$idx =~ s/ \(.*\)//;
|
$idx =~ s/ \(.*\)//;
|
||||||
$idx =~ s/\(\)//; # ????
|
$idx =~ s/\(\)//; # ????
|
||||||
return "<dl><dt>$return_type <b>$idx</b>"
|
return "<dl><dt>$return_type <b>$idx</b>"
|
||||||
|
@ -501,9 +492,8 @@ sub do_env_cfuncdesc{
|
||||||
|
|
||||||
sub do_env_ctypedesc{
|
sub do_env_ctypedesc{
|
||||||
local($_) = @_;
|
local($_) = @_;
|
||||||
my($type_name,$br_id) = next_argument_id();
|
my $type_name = next_argument();
|
||||||
my $idx = make_str_index_entry($br_id,
|
my $idx = make_str_index_entry("<tt>$type_name</tt>" . get_indexsubitem());
|
||||||
"<tt>$type_name</tt>" . get_indexsubitem());
|
|
||||||
$idx =~ s/ \(.*\)//;
|
$idx =~ s/ \(.*\)//;
|
||||||
return "<dl><dt><b>$idx</b>\n<dd>"
|
return "<dl><dt><b>$idx</b>\n<dd>"
|
||||||
. $_
|
. $_
|
||||||
|
@ -513,9 +503,8 @@ sub do_env_ctypedesc{
|
||||||
sub do_env_cvardesc{
|
sub do_env_cvardesc{
|
||||||
local($_) = @_;
|
local($_) = @_;
|
||||||
my $var_type = next_argument();
|
my $var_type = next_argument();
|
||||||
my($var_name,$br_id) = next_argument_id();
|
my $var_name = next_argument();
|
||||||
my $idx = make_str_index_entry($br_id,
|
my $idx = make_str_index_entry("<tt>$var_name</tt>" . get_indexsubitem());
|
||||||
"<tt>$var_name</tt>" . get_indexsubitem());
|
|
||||||
$idx =~ s/ \(.*\)//;
|
$idx =~ s/ \(.*\)//;
|
||||||
return "<dl><dt>$var_type <b>$idx</b>\n"
|
return "<dl><dt>$var_type <b>$idx</b>\n"
|
||||||
. '<dd>'
|
. '<dd>'
|
||||||
|
@ -526,11 +515,11 @@ sub do_env_cvardesc{
|
||||||
sub do_env_funcdesc{
|
sub do_env_funcdesc{
|
||||||
local($_) = @_;
|
local($_) = @_;
|
||||||
my $function_name = next_argument();
|
my $function_name = next_argument();
|
||||||
my($arg_list,$br_id) = next_argument_id();
|
my $arg_list = next_argument();
|
||||||
my $idx = make_str_index_entry($br_id, "<tt>$function_name()</tt>"
|
my $idx = make_str_index_entry("<tt>$function_name()</tt>"
|
||||||
. get_indexsubitem());
|
. get_indexsubitem());
|
||||||
$idx =~ s/ \(.*\)//;
|
$idx =~ s/ \(.*\)//;
|
||||||
$idx =~ s/\(\)//;
|
$idx =~ s/\(\)<\/tt>/<\/tt>/;
|
||||||
return "<dl><dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>" . $_ . '</dl>';
|
return "<dl><dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>" . $_ . '</dl>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -546,8 +535,8 @@ sub do_env_funcdescni{
|
||||||
sub do_cmd_funcline{
|
sub do_cmd_funcline{
|
||||||
local($_) = @_;
|
local($_) = @_;
|
||||||
my $function_name = next_argument();
|
my $function_name = next_argument();
|
||||||
my($arg_list,$br_id) = next_argument_id();
|
my $arg_list = next_argument();
|
||||||
my $idx = make_str_index_entry($br_id, "<tt>$function_name()</tt>"
|
my $idx = make_str_index_entry("<tt>$function_name()</tt>"
|
||||||
. get_indexsubitem());
|
. get_indexsubitem());
|
||||||
$idx =~ s/\(\)//;
|
$idx =~ s/\(\)//;
|
||||||
return "<dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>" . $_;
|
return "<dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>" . $_;
|
||||||
|
@ -562,10 +551,10 @@ $INDEX_OPCODES = 0;
|
||||||
sub do_env_opcodedesc{
|
sub do_env_opcodedesc{
|
||||||
local($_) = @_;
|
local($_) = @_;
|
||||||
my $opcode_name = next_argument();
|
my $opcode_name = next_argument();
|
||||||
my($arg_list,$br_id) = next_argument_id();
|
my $arg_list = next_argument();
|
||||||
my $idx;
|
my $idx;
|
||||||
if ($INDEX_OPCODES) {
|
if ($INDEX_OPCODES) {
|
||||||
$idx = make_str_index_entry($br_id,
|
$idx = make_str_index_entry(
|
||||||
"<tt>$opcode_name</tt> (byte code instruction)");
|
"<tt>$opcode_name</tt> (byte code instruction)");
|
||||||
$idx =~ s/ \(byte code instruction\)//;
|
$idx =~ s/ \(byte code instruction\)//;
|
||||||
}
|
}
|
||||||
|
@ -581,9 +570,8 @@ sub do_env_opcodedesc{
|
||||||
|
|
||||||
sub do_env_datadesc{
|
sub do_env_datadesc{
|
||||||
local($_) = @_;
|
local($_) = @_;
|
||||||
my($dataname,$br_id) = next_argument_id();
|
my $dataname = next_argument();
|
||||||
my $idx = make_str_index_entry($br_id,
|
my $idx = make_str_index_entry("<tt>$dataname</tt>" . get_indexsubitem());
|
||||||
"<tt>$dataname</tt>" . get_indexsubitem());
|
|
||||||
$idx =~ s/ \(.*\)//;
|
$idx =~ s/ \(.*\)//;
|
||||||
return "<dl><dt><b>$idx</b>\n<dd>"
|
return "<dl><dt><b>$idx</b>\n<dd>"
|
||||||
. $_
|
. $_
|
||||||
|
@ -601,17 +589,16 @@ sub do_env_datadescni{
|
||||||
|
|
||||||
sub do_cmd_dataline{
|
sub do_cmd_dataline{
|
||||||
local($_) = @_;
|
local($_) = @_;
|
||||||
my($data_name,$br_id) = next_argument_id();
|
my $data_name = next_argument();
|
||||||
my $idx = make_str_index_entry($br_id, "<tt>$data_name</tt>"
|
my $idx = make_str_index_entry("<tt>$data_name</tt>" . get_indexsubitem());
|
||||||
. get_indexsubitem());
|
|
||||||
$idx =~ s/ \(.*\)//;
|
$idx =~ s/ \(.*\)//;
|
||||||
return "<dt><b>$idx</b><dd>" . $_;
|
return "<dt><b>$idx</b><dd>" . $_;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub do_env_excdesc{
|
sub do_env_excdesc{
|
||||||
local($_) = @_;
|
local($_) = @_;
|
||||||
my($excname,$br_id) = next_argument_id();
|
my $excname = next_argument();
|
||||||
my $idx = make_str_index_entry($br_id, "<tt>$excname</tt>");
|
my $idx = make_str_index_entry("<tt>$excname</tt>");
|
||||||
return "<dl><dt><b>$idx</b>\n<dd>" . $_ . '</dl>'
|
return "<dl><dt><b>$idx</b>\n<dd>" . $_ . '</dl>'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -621,8 +608,8 @@ sub do_env_fulllineitems{ return do_env_itemize(@_); }
|
||||||
sub do_env_classdesc{
|
sub do_env_classdesc{
|
||||||
local($_) = @_;
|
local($_) = @_;
|
||||||
$THIS_CLASS = next_argument();
|
$THIS_CLASS = next_argument();
|
||||||
my($arg_list,$br_id) = next_argument_id();
|
my $arg_list = next_argument();
|
||||||
$idx = make_str_index_entry($br_id,
|
$idx = make_str_index_entry(
|
||||||
"<tt>$THIS_CLASS</tt> (class in $THIS_MODULE)" );
|
"<tt>$THIS_CLASS</tt> (class in $THIS_MODULE)" );
|
||||||
$idx =~ s/ \(.*\)//;
|
$idx =~ s/ \(.*\)//;
|
||||||
return "<dl><dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>" . $_ . '</dl>';
|
return "<dl><dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>" . $_ . '</dl>';
|
||||||
|
@ -634,13 +621,13 @@ sub do_env_methoddesc{
|
||||||
my $class_name = next_optional_argument();
|
my $class_name = next_optional_argument();
|
||||||
$class_name = $THIS_CLASS
|
$class_name = $THIS_CLASS
|
||||||
unless $class_name;
|
unless $class_name;
|
||||||
my($method_name,$br_id) = next_argument_id();
|
my $method_name = next_argument();
|
||||||
my $arg_list = next_argument();
|
my $arg_list = 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($br_id, "<tt>$method_name()</tt>$extra");
|
my $idx = make_str_index_entry("<tt>$method_name()</tt>$extra");
|
||||||
$idx =~ s/ \(.*\)//;
|
$idx =~ s/ \(.*\)//;
|
||||||
$idx =~ s/\(\)//;
|
$idx =~ s/\(\)//;
|
||||||
return "<dl><dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>" . $_ . '</dl>';
|
return "<dl><dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>" . $_ . '</dl>';
|
||||||
|
@ -658,7 +645,7 @@ sub do_cmd_methodline{
|
||||||
if ($class_name) {
|
if ($class_name) {
|
||||||
$extra = " ($class_name method)";
|
$extra = " ($class_name method)";
|
||||||
}
|
}
|
||||||
my $idx = make_str_index_entry($br_id, "<tt>$method_name()</tt>$extra");
|
my $idx = make_str_index_entry("<tt>$method_name()</tt>$extra");
|
||||||
$idx =~ s/ \(.*\)//;
|
$idx =~ s/ \(.*\)//;
|
||||||
$idx =~ s/\(\)//;
|
$idx =~ s/\(\)//;
|
||||||
return "<dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>"
|
return "<dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>"
|
||||||
|
@ -689,13 +676,13 @@ sub do_env_methoddescni{
|
||||||
sub do_env_memberdesc{
|
sub do_env_memberdesc{
|
||||||
local($_) = @_;
|
local($_) = @_;
|
||||||
my $class = next_optional_argument();
|
my $class = next_optional_argument();
|
||||||
my($member,$br_id) = next_argument_id();
|
my $member = next_argument();
|
||||||
$class = $THIS_CLASS
|
$class = $THIS_CLASS
|
||||||
unless $class;
|
unless $class;
|
||||||
my $extra = '';
|
my $extra = '';
|
||||||
$extra = " ($class_name attribute)"
|
$extra = " ($class_name attribute)"
|
||||||
if (!($class eq ''));
|
if (!($class eq ''));
|
||||||
my $idx = make_str_index_entry($br_id, "<tt>$member</tt>$extra");
|
my $idx = make_str_index_entry("<tt>$member</tt>$extra");
|
||||||
$idx =~ s/ \(.*\)//;
|
$idx =~ s/ \(.*\)//;
|
||||||
$idx =~ s/\(\)//;
|
$idx =~ s/\(\)//;
|
||||||
return "<dl><dt><b>$idx</b>\n<dd>" . $_ . '</dl>';
|
return "<dl><dt><b>$idx</b>\n<dd>" . $_ . '</dl>';
|
||||||
|
@ -705,13 +692,13 @@ sub do_env_memberdesc{
|
||||||
sub do_cmd_memberline{
|
sub do_cmd_memberline{
|
||||||
local($_) = @_;
|
local($_) = @_;
|
||||||
my $class = next_optional_argument();
|
my $class = next_optional_argument();
|
||||||
my($member,$br_id) = next_argument_id();
|
my $member = next_argument();
|
||||||
$class = $THIS_CLASS
|
$class = $THIS_CLASS
|
||||||
unless $class;
|
unless $class;
|
||||||
my $extra = '';
|
my $extra = '';
|
||||||
$extra = " ($class_name attribute)"
|
$extra = " ($class_name attribute)"
|
||||||
if (!($class eq ''));
|
if (!($class eq ''));
|
||||||
my $idx = make_str_index_entry($br_id, "<tt>$member</tt>$extra");
|
my $idx = make_str_index_entry("<tt>$member</tt>$extra");
|
||||||
$idx =~ s/ \(.*\)//;
|
$idx =~ s/ \(.*\)//;
|
||||||
$idx =~ s/\(\)//;
|
$idx =~ s/\(\)//;
|
||||||
return "<dt><b>$idx</b><dd>" . $_;
|
return "<dt><b>$idx</b><dd>" . $_;
|
||||||
|
@ -1019,8 +1006,8 @@ sub do_env_definitions{
|
||||||
|
|
||||||
sub do_cmd_term{
|
sub do_cmd_term{
|
||||||
local($_) = @_;
|
local($_) = @_;
|
||||||
my($term, $id) = next_argument_id();
|
my $term = next_argument();
|
||||||
my($name,$aname,$ahref) = link_info($id);
|
my($name,$aname,$ahref) = new_link_info();
|
||||||
swallow_newline();
|
swallow_newline();
|
||||||
# could easily add an index entry here...
|
# could easily add an index entry here...
|
||||||
return "<dt><b>$aname" . $term . "</a></b>\n<dd>" . $_;
|
return "<dt><b>$aname" . $term . "</a></b>\n<dd>" . $_;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue