[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[7411] remove merged_indices hash from return value of indices_informati
From: |
gavinsmith0123 |
Subject: |
[7411] remove merged_indices hash from return value of indices_information |
Date: |
Fri, 23 Sep 2016 14:42:30 +0000 (UTC) |
Revision: 7411
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7411
Author: gavin
Date: 2016-09-23 14:42:29 +0000 (Fri, 23 Sep 2016)
Log Message:
-----------
remove merged_indices hash from return value of indices_information
Modified Paths:
--------------
trunk/tp/Texinfo/Convert/HTML.pm
trunk/tp/Texinfo/Convert/IXIN.pm
trunk/tp/Texinfo/Convert/Plaintext.pm
trunk/tp/Texinfo/Convert/TexinfoXML.pm
trunk/tp/Texinfo/Parser.pm
trunk/tp/Texinfo/Structuring.pm
trunk/tp/parsetexi/Parsetexi.pm
trunk/tp/t/results/converters_tests/printindex_merged_indices_code_style.pl
trunk/tp/t/results/indices/complex_recursive_synindex.pl
trunk/tp/t/results/indices/def_syn_indices.pl
trunk/tp/t/results/indices/default_cp_index_and_one_letter_syncodeindex.pl
trunk/tp/t/results/indices/double_syncodeindex.pl
trunk/tp/t/results/indices/print_merged_index.pl
trunk/tp/t/results/indices/recursive_synindex.pl
trunk/tp/t/results/indices/same_index_entry_merged_indices.pl
trunk/tp/t/results/indices/syncode_index_print_both.pl
trunk/tp/t/results/indices/syncodeindex_to_plain.pl
trunk/tp/t/results/info_tests/colon_in_index_entry.pl
trunk/tp/t/results/macro/macro_in_index_commands.pl
trunk/tp/t/results/value/value_in_index_commands.pl
trunk/tp/t/test_utils.pl
Modified: trunk/tp/Texinfo/Convert/HTML.pm
===================================================================
--- trunk/tp/Texinfo/Convert/HTML.pm 2016-09-23 14:40:17 UTC (rev 7410)
+++ trunk/tp/Texinfo/Convert/HTML.pm 2016-09-23 14:42:29 UTC (rev 7411)
@@ -5721,10 +5721,8 @@
$no_unidecode = 1 if (defined($self->get_conf('USE_UNIDECODE'))
and !$self->get_conf('USE_UNIDECODE'));
- my ($index_names, $merged_indices)
- = $self->{'parser'}->indices_information();
+ my $index_names = $self->{'parser'}->indices_information();
$self->{'index_names'} = $index_names;
- #print STDERR "IIII ($index_names, $merged_indices, $index_entries)\n";
my $merged_index_entries
= Texinfo::Structuring::merge_indices($index_names);
$self->{'index_entries_by_letter'}
Modified: trunk/tp/Texinfo/Convert/IXIN.pm
===================================================================
--- trunk/tp/Texinfo/Convert/IXIN.pm 2016-09-23 14:40:17 UTC (rev 7410)
+++ trunk/tp/Texinfo/Convert/IXIN.pm 2016-09-23 14:42:29 UTC (rev 7411)
@@ -619,8 +619,7 @@
my %dts_information;
if ($self->{'parser'}) {
- my ($index_names, $merged_indices)
- = $self->{'parser'}->indices_information();
+ my $index_names = $self->{'parser'}->indices_information();
my $merged_index_entries
= Texinfo::Structuring::merge_indices($index_names);
my $entries
Modified: trunk/tp/Texinfo/Convert/Plaintext.pm
===================================================================
--- trunk/tp/Texinfo/Convert/Plaintext.pm 2016-09-23 14:40:17 UTC (rev
7410)
+++ trunk/tp/Texinfo/Convert/Plaintext.pm 2016-09-23 14:42:29 UTC (rev
7411)
@@ -1246,8 +1246,7 @@
# this is not redone for each index, only once
if (!defined($self->{'index_entries'}) and $self->{'parser'}) {
- my ($index_names, $merged_indices)
- = $self->{'parser'}->indices_information();
+ my $index_names = $self->{'parser'}->indices_information();
my $merged_index_entries
= Texinfo::Structuring::merge_indices($index_names);
$self->{'index_entries'}
Modified: trunk/tp/Texinfo/Convert/TexinfoXML.pm
===================================================================
--- trunk/tp/Texinfo/Convert/TexinfoXML.pm 2016-09-23 14:40:17 UTC (rev
7410)
+++ trunk/tp/Texinfo/Convert/TexinfoXML.pm 2016-09-23 14:42:29 UTC (rev
7411)
@@ -436,9 +436,7 @@
if $self->{'expanded_formats_hash'}->{$raw};
}
if ($self->{'parser'}) {
- my ($index_names, $merged_indices)
- = $self->{'parser'}->indices_information();
- $self->{'index_names'} = $index_names;
+ $self->{'index_names'} = $self->{'parser'}->indices_information();
}
}
Modified: trunk/tp/Texinfo/Parser.pm
===================================================================
--- trunk/tp/Texinfo/Parser.pm 2016-09-23 14:40:17 UTC (rev 7410)
+++ trunk/tp/Texinfo/Parser.pm 2016-09-23 14:42:29 UTC (rev 7411)
@@ -959,8 +959,7 @@
sub indices_information($)
{
my $self = shift;
- return ($self->{'index_names'}, $self->{'merged_indices'});
- #return ($self->{'index_names'}, $self->{'merged_indices'},
$self->{'index_entries'});
+ return $self->{'index_names'};
}
sub floats_information($)
@@ -5930,8 +5929,7 @@
warn $error_message->{'error_line'};
}
- my ($index_names, $merged_indices_hash)
- = $parser->indices_information();
+ my $index_names = $parser->indices_information();
my $float_types_arrays = $parser->floats_information();
my $internal_references_array
= $parser->internal_references_information();
@@ -6224,8 +6222,7 @@
=item indices_information
- ($index_names, $merged_indices_hash)
- = indices_information($parser);
+ $index_names = indices_information($parser);
The index names is a hash reference. The keys are
@@ -6324,9 +6321,6 @@
If C<name> is not set, it is set to the index name.
-I<$merged_indices_hash> is a hash reference, the key is an index
-name merged in the value.
-
=back
=head2 Texinfo Parser options
Modified: trunk/tp/Texinfo/Structuring.pm
===================================================================
--- trunk/tp/Texinfo/Structuring.pm 2016-09-23 14:40:17 UTC (rev 7410)
+++ trunk/tp/Texinfo/Structuring.pm 2016-09-23 14:42:29 UTC (rev 7411)
@@ -2249,8 +2249,7 @@
elements_directions($parser, $elements);
elements_file_directions($parser, $elements);
- my ($index_names, $merged_indices)
- = $parser->indices_information();
+ my $index_names = $parser->indices_information();
my $merged_index_entries
= merge_indices($index_names);
my $index_entries_sorted;
Modified: trunk/tp/parsetexi/Parsetexi.pm
===================================================================
--- trunk/tp/parsetexi/Parsetexi.pm 2016-09-23 14:40:17 UTC (rev 7410)
+++ trunk/tp/parsetexi/Parsetexi.pm 2016-09-23 14:42:29 UTC (rev 7411)
@@ -202,32 +202,6 @@
use Data::Dumper;
-sub _add_parents ($);
-
-sub _add_parents ($) {
- my $elt = shift;
-
- if (exists $elt->{'contents'}) {
- foreach my $child (@{$elt->{'contents'}}) {
- #$child->{'parent'} = $elt;
- _add_parents ($child);
- }
- }
-
- if (exists $elt->{'args'}) {
- foreach my $child (@{$elt->{'args'}}) {
- #$child->{'parent'} = $elt;
- _add_parents ($child);
- }
- }
-
- # 'level' is set in Parser.pm, but not under 'extra'.
- # currently this isn't needed as level is set in api.c instead.
- if (defined ($elt->{'extra'}) and defined $elt->{'extra'}{'level'}) {
- $elt->{'level'} = $elt->{'extra'}{'level'};
- }
-}
-
# Look for a menu in the node, saving in the 'menus' array reference
# of the node element
# This array was built on line 4800 of Parser.pm.
@@ -303,7 +277,6 @@
$GLOBAL_INFO2 = build_global_info2 ();
- _add_parents ($TREE);
_complete_node_list ($self, $TREE);
# line 899
@@ -427,7 +400,6 @@
$self->{'extra'} = $GLOBAL_INFO2;
_get_errors ($self);
- _add_parents ($tree);
_complete_node_list ($self, $tree);
return $tree;
}
@@ -447,7 +419,6 @@
$self = parser() if (!defined($self));
parse_string($text);
my $tree = build_texinfo_tree ();
- _add_parents ($tree);
return $tree;
}
Modified:
trunk/tp/t/results/converters_tests/printindex_merged_indices_code_style.pl
===================================================================
--- trunk/tp/t/results/converters_tests/printindex_merged_indices_code_style.pl
2016-09-23 14:40:17 UTC (rev 7410)
+++ trunk/tp/t/results/converters_tests/printindex_merged_indices_code_style.pl
2016-09-23 14:42:29 UTC (rev 7411)
@@ -957,12 +957,6 @@
'merged_in' => 'fn',
'name' => 'vr'
}
- },
- 'merged_indices' => {
- 'cdi' => 'fn',
- 'cp' => 'fn',
- 'ddi' => 'fn',
- 'vr' => 'fn'
}
};
Modified: trunk/tp/t/results/indices/complex_recursive_synindex.pl
===================================================================
--- trunk/tp/t/results/indices/complex_recursive_synindex.pl 2016-09-23
14:40:17 UTC (rev 7410)
+++ trunk/tp/t/results/indices/complex_recursive_synindex.pl 2016-09-23
14:42:29 UTC (rev 7411)
@@ -1592,12 +1592,6 @@
'in_code' => 1,
'name' => 'vr'
}
- },
- 'merged_indices' => {
- 'aaa' => 'bbb',
- 'ccc' => 'bbb',
- 'ddd' => 'bbb',
- 'eee' => 'bbb'
}
};
Modified: trunk/tp/t/results/indices/def_syn_indices.pl
===================================================================
--- trunk/tp/t/results/indices/def_syn_indices.pl 2016-09-23 14:40:17 UTC
(rev 7410)
+++ trunk/tp/t/results/indices/def_syn_indices.pl 2016-09-23 14:42:29 UTC
(rev 7411)
@@ -2069,13 +2069,6 @@
'in_code' => 1,
'name' => 'vr'
}
- },
- 'merged_indices' => {
- 'abc' => 'pg',
- 'cp' => 'fn',
- 'defg' => 'pg',
- 'ky' => 'pg',
- 'truc' => 'fn'
}
};
Modified:
trunk/tp/t/results/indices/default_cp_index_and_one_letter_syncodeindex.pl
===================================================================
--- trunk/tp/t/results/indices/default_cp_index_and_one_letter_syncodeindex.pl
2016-09-23 14:40:17 UTC (rev 7410)
+++ trunk/tp/t/results/indices/default_cp_index_and_one_letter_syncodeindex.pl
2016-09-23 14:42:29 UTC (rev 7411)
@@ -416,9 +416,6 @@
'in_code' => 1,
'name' => 'vr'
}
- },
- 'merged_indices' => {
- 'cp' => 'fn'
}
};
Modified: trunk/tp/t/results/indices/double_syncodeindex.pl
===================================================================
--- trunk/tp/t/results/indices/double_syncodeindex.pl 2016-09-23 14:40:17 UTC
(rev 7410)
+++ trunk/tp/t/results/indices/double_syncodeindex.pl 2016-09-23 14:42:29 UTC
(rev 7411)
@@ -526,9 +526,6 @@
'in_code' => 1,
'name' => 'vr'
}
- },
- 'merged_indices' => {
- 'cp' => 'fn'
}
};
Modified: trunk/tp/t/results/indices/print_merged_index.pl
===================================================================
--- trunk/tp/t/results/indices/print_merged_index.pl 2016-09-23 14:40:17 UTC
(rev 7410)
+++ trunk/tp/t/results/indices/print_merged_index.pl 2016-09-23 14:42:29 UTC
(rev 7411)
@@ -258,9 +258,6 @@
'in_code' => 1,
'name' => 'vr'
}
- },
- 'merged_indices' => {
- 'fn' => 'cp'
}
};
Modified: trunk/tp/t/results/indices/recursive_synindex.pl
===================================================================
--- trunk/tp/t/results/indices/recursive_synindex.pl 2016-09-23 14:40:17 UTC
(rev 7410)
+++ trunk/tp/t/results/indices/recursive_synindex.pl 2016-09-23 14:42:29 UTC
(rev 7411)
@@ -272,9 +272,6 @@
'in_code' => 1,
'name' => 'vr'
}
- },
- 'merged_indices' => {
- 'aaa' => 'bbb'
}
};
Modified: trunk/tp/t/results/indices/same_index_entry_merged_indices.pl
===================================================================
--- trunk/tp/t/results/indices/same_index_entry_merged_indices.pl
2016-09-23 14:40:17 UTC (rev 7410)
+++ trunk/tp/t/results/indices/same_index_entry_merged_indices.pl
2016-09-23 14:42:29 UTC (rev 7411)
@@ -766,9 +766,6 @@
'merged_in' => 'fn',
'name' => 'vr'
}
- },
- 'merged_indices' => {
- 'vr' => 'fn'
}
};
Modified: trunk/tp/t/results/indices/syncode_index_print_both.pl
===================================================================
--- trunk/tp/t/results/indices/syncode_index_print_both.pl 2016-09-23
14:40:17 UTC (rev 7410)
+++ trunk/tp/t/results/indices/syncode_index_print_both.pl 2016-09-23
14:42:29 UTC (rev 7411)
@@ -551,9 +551,6 @@
'in_code' => 1,
'name' => 'vr'
}
- },
- 'merged_indices' => {
- 'fn' => 'cp'
}
};
Modified: trunk/tp/t/results/indices/syncodeindex_to_plain.pl
===================================================================
--- trunk/tp/t/results/indices/syncodeindex_to_plain.pl 2016-09-23 14:40:17 UTC
(rev 7410)
+++ trunk/tp/t/results/indices/syncodeindex_to_plain.pl 2016-09-23 14:42:29 UTC
(rev 7411)
@@ -572,9 +572,6 @@
'in_code' => 1,
'name' => 'vr'
}
- },
- 'merged_indices' => {
- 'ky' => 'cp'
}
};
Modified: trunk/tp/t/results/info_tests/colon_in_index_entry.pl
===================================================================
--- trunk/tp/t/results/info_tests/colon_in_index_entry.pl 2016-09-23
14:40:17 UTC (rev 7410)
+++ trunk/tp/t/results/info_tests/colon_in_index_entry.pl 2016-09-23
14:42:29 UTC (rev 7411)
@@ -943,9 +943,6 @@
'merged_in' => 'cp',
'name' => 'vr'
}
- },
- 'merged_indices' => {
- 'vr' => 'cp'
}
};
Modified: trunk/tp/t/results/macro/macro_in_index_commands.pl
===================================================================
--- trunk/tp/t/results/macro/macro_in_index_commands.pl 2016-09-23 14:40:17 UTC
(rev 7410)
+++ trunk/tp/t/results/macro/macro_in_index_commands.pl 2016-09-23 14:42:29 UTC
(rev 7411)
@@ -1387,9 +1387,6 @@
'in_code' => 1,
'name' => 'vr'
}
- },
- 'merged_indices' => {
- 'cp' => 'fn'
}
};
Modified: trunk/tp/t/results/value/value_in_index_commands.pl
===================================================================
--- trunk/tp/t/results/value/value_in_index_commands.pl 2016-09-23 14:40:17 UTC
(rev 7410)
+++ trunk/tp/t/results/value/value_in_index_commands.pl 2016-09-23 14:42:29 UTC
(rev 7411)
@@ -1214,9 +1214,6 @@
'in_code' => 1,
'name' => 'vr'
}
- },
- 'merged_indices' => {
- 'cp' => 'fn'
}
};
Modified: trunk/tp/t/test_utils.pl
===================================================================
--- trunk/tp/t/test_utils.pl 2016-09-23 14:40:17 UTC (rev 7410)
+++ trunk/tp/t/test_utils.pl 2016-09-23 14:42:29 UTC (rev 7411)
@@ -738,11 +738,9 @@
'DEBUG' => $self->{'DEBUG'},
%$parser_options});
# take the initial values to record only if there is something new
- my ($initial_index_names, $initial_merged_indices)
- = $parser->indices_information();
+ my $initial_index_names = $parser->indices_information();
# do a copy to compare the values and not the references
$initial_index_names = dclone($initial_index_names);
- $initial_merged_indices = { %{$initial_merged_indices} };
print STDERR " TEST $test_name\n" if ($self->{'DEBUG'});
my $result;
if (!$test_file) {
@@ -766,8 +764,7 @@
my $top_node = Texinfo::Structuring::nodes_tree($parser);
my ($errors, $error_nrs) = $parser->errors();
- my ($index_names, $merged_indices)
- = $parser->indices_information();
+ my $index_names = $parser->indices_information();
# FIXME maybe it would be good to compare $merged_index_entries?
my $merged_index_entries
= Texinfo::Structuring::merge_indices($index_names);
@@ -778,8 +775,6 @@
my $trimmed_index_names = remove_keys($index_names, ['index_entries']);
$indices->{'index_names'} = $trimmed_index_names
unless (Data::Compare::Compare($trimmed_index_names,
$initial_index_names));
- $indices->{'merged_indices'} = $merged_indices
- unless (Data::Compare::Compare($merged_indices, $initial_merged_indices));
my $sorted_index_entries;
if ($merged_index_entries) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [7411] remove merged_indices hash from return value of indices_information,
gavinsmith0123 <=