mirror of https://github.com/python/cpython
Fixed indexing of {datadesc} environments.
Removed " (byte code instruction)" from the output of the {opcodedesc} environment; this should only appear in the index (which it now does). Removed some really old cruft related to otherwise removed debugging code. (I *think* assignments to $* set & clear auto-flush of <STDOUT>, but don't really remember. Removing them seems to not change anything!)
This commit is contained in:
parent
0f02628dce
commit
301ad2ee63
|
@ -253,7 +253,6 @@ sub do_env_cfuncdesc{
|
||||||
local($return_type,$function_name,$arg_list,$idx) = ('', '', '', '');
|
local($return_type,$function_name,$arg_list,$idx) = ('', '', '', '');
|
||||||
local($cfuncdesc_rx) =
|
local($cfuncdesc_rx) =
|
||||||
"$next_pair_rx$any_next_pair_rx3$any_next_pair_rx5";
|
"$next_pair_rx$any_next_pair_rx3$any_next_pair_rx5";
|
||||||
$* = 1;
|
|
||||||
if (/$cfuncdesc_rx/o) {
|
if (/$cfuncdesc_rx/o) {
|
||||||
$return_type = "$2";
|
$return_type = "$2";
|
||||||
$function_name = "$4";
|
$function_name = "$4";
|
||||||
|
@ -261,7 +260,6 @@ sub do_env_cfuncdesc{
|
||||||
$idx = &make_str_index_entry($3,
|
$idx = &make_str_index_entry($3,
|
||||||
"<tt>$function_name</tt>" . &get_indexsubitem);
|
"<tt>$function_name</tt>" . &get_indexsubitem);
|
||||||
}
|
}
|
||||||
$* = 0;
|
|
||||||
"<dl><dt>$return_type <b>$idx</b>" .
|
"<dl><dt>$return_type <b>$idx</b>" .
|
||||||
"(<var>$arg_list</var>)\n<dd>$'\n</dl>"
|
"(<var>$arg_list</var>)\n<dd>$'\n</dl>"
|
||||||
}
|
}
|
||||||
|
@ -271,13 +269,11 @@ sub do_env_ctypedesc{
|
||||||
local($type_name) = ('');
|
local($type_name) = ('');
|
||||||
local($cfuncdesc_rx) =
|
local($cfuncdesc_rx) =
|
||||||
"$next_pair_rx";
|
"$next_pair_rx";
|
||||||
$* = 1;
|
|
||||||
if (/$cfuncdesc_rx/o) {
|
if (/$cfuncdesc_rx/o) {
|
||||||
$type_name = "$2";
|
$type_name = "$2";
|
||||||
$idx = &make_str_index_entry($1,
|
$idx = &make_str_index_entry($1,
|
||||||
"<tt>$type_name</tt>" . &get_indexsubitem);
|
"<tt>$type_name</tt>" . &get_indexsubitem);
|
||||||
}
|
}
|
||||||
$* = 0;
|
|
||||||
"<dl><dt><b>$idx</b>\n<dd>$'\n</dl>"
|
"<dl><dt><b>$idx</b>\n<dd>$'\n</dl>"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,13 +281,11 @@ sub do_env_cvardesc{
|
||||||
local($_) = @_;
|
local($_) = @_;
|
||||||
local($var_type,$var_name,$idx) = ('', '', '');
|
local($var_type,$var_name,$idx) = ('', '', '');
|
||||||
local($cfuncdesc_rx) = "$next_pair_rx$any_next_pair_rx3";
|
local($cfuncdesc_rx) = "$next_pair_rx$any_next_pair_rx3";
|
||||||
$* = 1;
|
|
||||||
if (/$cfuncdesc_rx/o) {
|
if (/$cfuncdesc_rx/o) {
|
||||||
$var_type = "$2";
|
$var_type = "$2";
|
||||||
$var_name = "$4";
|
$var_name = "$4";
|
||||||
$idx = &make_str_index_entry($3,"<tt>$var_name</tt>" . &get_indexsubitem);
|
$idx = &make_str_index_entry($3,"<tt>$var_name</tt>" . &get_indexsubitem);
|
||||||
}
|
}
|
||||||
$* = 0;
|
|
||||||
"<dl><dt>$var_type <b>$idx</b>\n" .
|
"<dl><dt>$var_type <b>$idx</b>\n" .
|
||||||
"<dd>$'\n</dl>";
|
"<dd>$'\n</dl>";
|
||||||
}
|
}
|
||||||
|
@ -300,14 +294,12 @@ sub do_env_funcdesc{
|
||||||
local($_) = @_;
|
local($_) = @_;
|
||||||
local($function_name,$arg_list,$idx) = ('', '', '');
|
local($function_name,$arg_list,$idx) = ('', '', '');
|
||||||
local($funcdesc_rx) = "$next_pair_rx$any_next_pair_rx3";
|
local($funcdesc_rx) = "$next_pair_rx$any_next_pair_rx3";
|
||||||
$* = 1;
|
|
||||||
if (/$funcdesc_rx/o) {
|
if (/$funcdesc_rx/o) {
|
||||||
$function_name = "$2";
|
$function_name = "$2";
|
||||||
$arg_list = "$4";
|
$arg_list = "$4";
|
||||||
$idx = &make_str_index_entry($3,
|
$idx = &make_str_index_entry($3,
|
||||||
"<tt>$function_name</tt>" . &get_indexsubitem);
|
"<tt>$function_name</tt>" . &get_indexsubitem);
|
||||||
}
|
}
|
||||||
$* = 0;
|
|
||||||
"<dl><dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>$'\n</dl>";
|
"<dl><dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>$'\n</dl>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -326,32 +318,26 @@ sub do_env_opcodedesc{
|
||||||
local($_) = @_;
|
local($_) = @_;
|
||||||
local($opcode_name,$arg_list,$stuff,$idx) = ('', '', '', '');
|
local($opcode_name,$arg_list,$stuff,$idx) = ('', '', '', '');
|
||||||
local($opcodedesc_rx) = "$next_pair_rx$any_next_pair_rx3";
|
local($opcodedesc_rx) = "$next_pair_rx$any_next_pair_rx3";
|
||||||
$* = 1;
|
|
||||||
if (/$opcodedesc_rx/o) {
|
if (/$opcodedesc_rx/o) {
|
||||||
$opcode_name = "$2";
|
$opcode_name = "$2";
|
||||||
$arg_list = "$4";
|
$arg_list = "$4";
|
||||||
$idx = &make_str_index_entry($3,
|
$idx = &make_str_index_entry($3,
|
||||||
"<tt>$opcode_name</tt> (byte code instruction)");
|
"<tt>$opcode_name</tt> (byte code instruction)");
|
||||||
|
$idx =~ s/ \(byte code instruction\)//;
|
||||||
}
|
}
|
||||||
$* = 0;
|
|
||||||
$stuff = "<dl><dt><b>$idx</b>";
|
$stuff = "<dl><dt><b>$idx</b>";
|
||||||
if ($arg_list) {
|
if ($arg_list) {
|
||||||
$stuff = "$stuff <var>$arg_list</var>";
|
$stuff .= " <var>$arg_list</var>";
|
||||||
}
|
}
|
||||||
$stuff . "\n<dd>$'\n</dl>";
|
$stuff . "\n<dd>$'\n</dl>";
|
||||||
}
|
}
|
||||||
|
|
||||||
sub do_env_datadesc{
|
sub do_env_datadesc{
|
||||||
local($_) = @_;
|
local($_) = @_;
|
||||||
local($data_name,$idx) = ('', '');
|
local($idx) = '';
|
||||||
local($datadesc_rx) = "$next_pair_rx";
|
if (/$next_pair_rx/o) {
|
||||||
$* = 1;
|
$idx = &make_str_index_entry($1, "<tt>$2</tt>" . &get_indexsubitem);
|
||||||
if (/$datadesc_rx/o) {
|
|
||||||
$data_name = "$2";
|
|
||||||
$idx = &make_str_index_entry($3,
|
|
||||||
"<tt>$data_name</tt>" . &get_indexsubitem);
|
|
||||||
}
|
}
|
||||||
$* = 0;
|
|
||||||
"<dl><dt><b>$idx</b>\n<dd>$'\n</dl>"
|
"<dl><dt><b>$idx</b>\n<dd>$'\n</dl>"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -391,7 +377,6 @@ sub do_env_tableii{
|
||||||
local($font,$h1,$h2) = ('', '', '');
|
local($font,$h1,$h2) = ('', '', '');
|
||||||
local($tableiii_rx) =
|
local($tableiii_rx) =
|
||||||
"$next_pair_rx$any_next_pair_rx3$any_next_pair_rx5$any_next_pair_rx7";
|
"$next_pair_rx$any_next_pair_rx3$any_next_pair_rx5$any_next_pair_rx7";
|
||||||
$* = 1;
|
|
||||||
if (/$tableiii_rx/o) {
|
if (/$tableiii_rx/o) {
|
||||||
$font = $4;
|
$font = $4;
|
||||||
$h1 = $6;
|
$h1 = $6;
|
||||||
|
@ -422,7 +407,6 @@ sub do_env_tableiii{
|
||||||
local($tableiii_rx) =
|
local($tableiii_rx) =
|
||||||
"$next_pair_rx$any_next_pair_rx3$any_next_pair_rx5$any_next_pair_rx7"
|
"$next_pair_rx$any_next_pair_rx3$any_next_pair_rx5$any_next_pair_rx7"
|
||||||
. "$any_next_pair_rx9";
|
. "$any_next_pair_rx9";
|
||||||
$* = 1;
|
|
||||||
if (/$tableiii_rx/o) {
|
if (/$tableiii_rx/o) {
|
||||||
$font = $4;
|
$font = $4;
|
||||||
$h1 = $6;
|
$h1 = $6;
|
||||||
|
|
Loading…
Reference in New Issue