[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Report.pm (line_warn, line_error), P
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/Report.pm (line_warn, line_error), Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm (_protect_hashchar), Pod-Simple-Texinfo/pod2texi.pl (_fix_texinfo_tree), tp/Texinfo/Common.pm (locate_include_file, expand_verbatiminclude) (_convert_text_options, _protect_hashchar_at_line_beginning) (protect_hashchar_at_line_beginning, set_nodes_list_labels) tp/Texinfo/Convert/DocBook.pm(_convert), tp/Texinfo/Convert/HTML.pm(noticed_line_warn) (_convert_verbatiminclude_command, _prepare_index_ent [...] |
Date: |
Mon, 30 Aug 2021 02:01:06 -0400 |
This is an automated email from the git hooks/post-receive script.
pertusus pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 4c58013 * tp/Texinfo/Report.pm (line_warn, line_error),
Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm (_protect_hashchar),
Pod-Simple-Texinfo/pod2texi.pl (_fix_texinfo_tree), tp/Texinfo/Common.pm
(locate_include_file, expand_verbatiminclude) (_convert_text_options,
_protect_hashchar_at_line_beginning) (protect_hashchar_at_line_beginning,
set_nodes_list_labels) tp/Texinfo/Convert/DocBook.pm(_convert),
tp/Texinfo/Convert/HTML.pm(noticed_line_warn)
(_convert_verbatiminclude_command, [...]
4c58013 is described below
commit 4c5801390c50de22df76333ec6f5a911e8dd98a2
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Mon Aug 30 08:00:57 2021 +0200
* tp/Texinfo/Report.pm (line_warn, line_error),
Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm (_protect_hashchar),
Pod-Simple-Texinfo/pod2texi.pl (_fix_texinfo_tree),
tp/Texinfo/Common.pm (locate_include_file, expand_verbatiminclude)
(_convert_text_options, _protect_hashchar_at_line_beginning)
(protect_hashchar_at_line_beginning, set_nodes_list_labels)
tp/Texinfo/Convert/DocBook.pm(_convert),
tp/Texinfo/Convert/HTML.pm(noticed_line_warn)
(_convert_verbatiminclude_command, _prepare_index_entries),
tp/Texinfo/Convert/IXIN.pm (output_ixin),
tp/Texinfo/Convert/Info.pm, tp/Texinfo/Convert/LaTeX.pm(_convert),
tp/Texinfo/Convert/Plaintext.pm(_printindex_formatted, _convert),
tp/Texinfo/Convert/Text.pm (_convert),
tp/Texinfo/ParserNonXS.pm (_line_warn, _line_error),
tp/Texinfo/Structuring.pm (sectioning_structure, warn_non_empty_parts)
(_check_menu_entry, check_nodes_are_referenced)
(set_menus_node_directions, complete_node_tree_with_menus)
(nodes_tree, elements_directions, elements_file_directions)
(associate_internal_references, do_index_keys, sort_indices
(sort_indices_by_letter, new_complete_node_menu)
tp/Texinfo/Transformations.pm (complete_node_menu)
(complete_tree_nodes_menus, complete_tree_nodes_missing_menu)
tp/Texinfo/XS/parsetexi/Parsetexi.pm (get_parser_info, _get_errors)
(parse_texi_line),
tp/init/chm.pm, tp/texi2any.pl: separate registrar that
register errors from from configuration in Texinfo::Report.
pass more options to Text converter.
---
ChangeLog | 30 +++
Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm | 2 +-
Pod-Simple-Texinfo/pod2texi.pl | 5 +-
tp/Texinfo/Common.pm | 91 ++++---
tp/Texinfo/Convert/DocBook.pm | 6 +-
tp/Texinfo/Convert/HTML.pm | 21 +-
tp/Texinfo/Convert/IXIN.pm | 2 +-
tp/Texinfo/Convert/Info.pm | 6 +-
tp/Texinfo/Convert/LaTeX.pm | 2 +-
tp/Texinfo/Convert/Plaintext.pm | 34 +--
tp/Texinfo/Convert/Text.pm | 5 +-
tp/Texinfo/ParserNonXS.pm | 286 +++++++++++----------
tp/Texinfo/Report.pm | 20 +-
tp/Texinfo/Structuring.pm | 176 +++++++------
tp/Texinfo/Transformations.pm | 21 +-
tp/Texinfo/XS/parsetexi/Parsetexi.pm | 12 +-
tp/init/chm.pm | 2 +-
tp/t/automatic_menus.t | 9 +-
tp/t/automatic_nodes.t | 20 +-
tp/t/do_master_menu.t | 16 +-
tp/t/init/redefine_need.init | 7 +-
tp/t/results/indices/empty_string_index_entry.pl | 120 +++++----
tp/t/test_protect_hashchar_at_line_beginning.t | 2 +-
tp/t/test_sort.t | 4 +-
tp/t/test_utils.pl | 19 +-
tp/tests/layout/res_parser/formatting/formatting.2 | 1 +
.../layout/res_parser/formatting_chm/formatting.2 | 1 +
.../res_parser/formatting_exotic/formatting.2 | 1 +
.../res_parser/formatting_fr_icons/formatting.2 | 1 +
.../layout/res_parser/formatting_html/formatting.2 | 1 +
.../res_parser/formatting_html32/formatting.2 | 1 +
.../formatting_html_no_texi2html/formatting.2 | 1 +
.../res_parser/formatting_html_nodes/formatting.2 | 1 +
.../layout/res_parser/formatting_info/formatting.2 | 1 +
.../res_parser/formatting_mathjax/formatting.2 | 1 +
.../res_parser/formatting_nodes/formatting.2 | 1 +
.../res_parser/formatting_plaintext/formatting.2 | 1 +
.../formatting_weird_quotes/formatting.2 | 1 +
.../res_parser/formatting_singular/formatting.2 | 1 +
tp/texi2any.pl | 19 +-
40 files changed, 530 insertions(+), 421 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index fdb727a..7f6ef3a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,33 @@
+2021-08-30 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/Report.pm (line_warn, line_error),
+ Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm (_protect_hashchar),
+ Pod-Simple-Texinfo/pod2texi.pl (_fix_texinfo_tree),
+ tp/Texinfo/Common.pm (locate_include_file, expand_verbatiminclude)
+ (_convert_text_options, _protect_hashchar_at_line_beginning)
+ (protect_hashchar_at_line_beginning, set_nodes_list_labels)
+ tp/Texinfo/Convert/DocBook.pm(_convert),
+ tp/Texinfo/Convert/HTML.pm(noticed_line_warn)
+ (_convert_verbatiminclude_command, _prepare_index_entries),
+ tp/Texinfo/Convert/IXIN.pm (output_ixin),
+ tp/Texinfo/Convert/Info.pm, tp/Texinfo/Convert/LaTeX.pm(_convert),
+ tp/Texinfo/Convert/Plaintext.pm(_printindex_formatted, _convert),
+ tp/Texinfo/Convert/Text.pm (_convert),
+ tp/Texinfo/ParserNonXS.pm (_line_warn, _line_error),
+ tp/Texinfo/Structuring.pm (sectioning_structure, warn_non_empty_parts)
+ (_check_menu_entry, check_nodes_are_referenced)
+ (set_menus_node_directions, complete_node_tree_with_menus)
+ (nodes_tree, elements_directions, elements_file_directions)
+ (associate_internal_references, do_index_keys, sort_indices
+ (sort_indices_by_letter, new_complete_node_menu)
+ tp/Texinfo/Transformations.pm (complete_node_menu)
+ (complete_tree_nodes_menus, complete_tree_nodes_missing_menu)
+ tp/Texinfo/XS/parsetexi/Parsetexi.pm (get_parser_info, _get_errors)
+ (parse_texi_line),
+ tp/init/chm.pm, tp/texi2any.pl: separate registrar that
+ register errors from from configuration in Texinfo::Report.
+ pass more options to Text converter.
+
2021-08-29 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Report.pm (line_warn, line_error, document_warn)
diff --git a/Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm
b/Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm
index 1c85953..a53f7db 100644
--- a/Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm
+++ b/Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm
@@ -282,7 +282,7 @@ sub _protect_hashchar($)
# protect # first in line
if ($texinfo =~ /#/) {
my $tree = parse_texi_text(undef, $texinfo);
- protect_hashchar_at_line_beginning(undef, $tree);
+ protect_hashchar_at_line_beginning(undef, undef, $tree);
return Texinfo::Convert::Texinfo::convert_to_texinfo($tree);
} else {
return $texinfo;
diff --git a/Pod-Simple-Texinfo/pod2texi.pl b/Pod-Simple-Texinfo/pod2texi.pl
index d5e987a..f912a5e 100755
--- a/Pod-Simple-Texinfo/pod2texi.pl
+++ b/Pod-Simple-Texinfo/pod2texi.pl
@@ -284,8 +284,9 @@ sub _fix_texinfo_tree($$$$;$)
}
}
}
- my $structure = Texinfo::Structuring::sectioning_structure($parser, $tree);
- Texinfo::Transformations::complete_tree_nodes_menus($parser, $tree)
+ my $structure = Texinfo::Structuring::sectioning_structure($parser, $parser,
+ $parser, $tree);
+ Texinfo::Transformations::complete_tree_nodes_menus($tree)
if ($section_nodes);
Texinfo::Transformations::regenerate_master_menu($parser, $labels)
if ($do_master_menu);
diff --git a/tp/Texinfo/Common.pm b/tp/Texinfo/Common.pm
index b532353..793d7a6 100644
--- a/tp/Texinfo/Common.pm
+++ b/tp/Texinfo/Common.pm
@@ -1102,7 +1102,7 @@ sub locate_include_file($$)
$file = $text if (-e $text and -r $text);
} else {
my @dirs;
- if ($self) {
+ if ($self and $self->{'include_directories'}) {
@dirs = @{$self->{'include_directories'}};
} else {
# no object with directory list and not an absolute path, never succeed
@@ -1211,22 +1211,24 @@ sub warn_unknown_split($) {
# This should do the job, or at least don't do wrong if $self
# is not defined, as could be the case if called from
# Texinfo::Convert::Text.
-sub expand_verbatiminclude($$)
+sub expand_verbatiminclude($$$)
{
- my $self = shift;
+ my $registrar = shift;
+ my $configuration_informations = shift;
my $current = shift;
return unless ($current->{'extra'} and
defined($current->{'extra'}->{'text_arg'}));
my $text = $current->{'extra'}->{'text_arg'};
- my $file = locate_include_file($self, $text);
+ my $file = locate_include_file($configuration_informations, $text);
my $verbatiminclude;
if (defined($file)) {
if (!open(VERBINCLUDE, $file)) {
- if ($self) {
- $self->line_error(sprintf(__("could not read %s: %s"), $file, $!),
- $current->{'line_nr'});
+ if ($registrar) {
+ $registrar->line_error($configuration_informations,
+ sprintf(__("could not read %s: %s"), $file, $!),
+ $current->{'line_nr'});
}
} else {
if (defined $current->{'extra'}->{'input_perl_encoding'}) {
@@ -1243,16 +1245,18 @@ sub expand_verbatiminclude($$)
{'type' => 'raw', 'text' => $_ };
}
if (!close (VERBINCLUDE)) {
- if ($self) {
- $self->document_warn(sprintf(__(
+ if ($registrar) {
+ $registrar->document_warn(sprintf(__(
"error on closing \@verbatiminclude file %s: %s"),
$file, $!));
}
}
}
- } elsif ($self) {
- $self->line_error(sprintf(__("\@%s: could not find %s"),
- $current->{'cmdname'}, $text), $current->{'line_nr'});
+ } elsif ($registrar) {
+ $registrar->line_error($configuration_informations,
+ sprintf(__("\@%s: could not find %s"),
+ $current->{'cmdname'}, $text),
+ $current->{'line_nr'});
}
return $verbatiminclude;
}
@@ -1731,6 +1735,11 @@ sub _convert_text_options($)
$options{'NUMBER_SECTIONS'} = $self->get_conf('NUMBER_SECTIONS');
$options{'converter'} = $self;
$options{'expanded_formats_hash'} = $self->{'expanded_formats_hash'};
+ # for locate_include_file
+ $options{'include_directories'} = $self->{'include_directories'};
+ # for error registering
+ $options{'DEBUG'} = $self->get_conf('DEBUG');
+ $options{'PROGRAM'} = $self->get_conf('PROGRAM');
return %options;
}
@@ -2223,6 +2232,8 @@ sub _protect_hashchar_at_line_beginning($$$)
my $type = shift;
my $current = shift;
+ my ($registrar, $configuration_informations) = @$self;
+
#print STDERR "$type $current "._print_current($current)."\n";
# if the next is a hash character at line beginning, mark it
if (defined($current->{'text'}) and $current->{'text'} =~ /\n$/
@@ -2265,9 +2276,11 @@ sub _protect_hashchar_at_line_beginning($$$)
my $parent = $current->{'parent'};
while ($parent) {
if ($parent->{'cmdname'} and $parent->{'line_nr'}) {
- $self->line_warn(sprintf(__(
+ if ($registrar) {
+ $registrar->line_warn($configuration_informations, sprintf(__(
"could not protect hash character in \@%s"),
$parent->{'cmdname'}), $parent->{'line_nr'});
+ }
last;
}
$parent = $parent->{'parent'};
@@ -2288,10 +2301,13 @@ sub _protect_hashchar_at_line_beginning($$$)
}
}
-sub protect_hashchar_at_line_beginning($$)
+sub protect_hashchar_at_line_beginning($$$)
{
- my $self = shift;
+ my $registrar = shift;
+ my $configuration_informations = shift;
my $tree = shift;
+
+ my $self = [$registrar, $configuration_informations];
return modify_tree($self, $tree, \&_protect_hashchar_at_line_beginning);
}
@@ -2729,9 +2745,11 @@ sub complete_indices {
# This should be considered an internal function of the parsers for all
# purposes, it is here to avoid code duplication.
# Sets $self->{'nodes'} and $self->{'labels'} based on $self->{'targets'}.
-sub set_nodes_list_labels($)
+sub set_nodes_list_labels($$$)
{
my $self = shift;
+ my $registrar = shift;
+ my $configuration_informations = shift;
$self->{'nodes'} = [];
my %labels = ();
if (defined $self->{'targets'}) {
@@ -2754,20 +2772,21 @@ sub set_nodes_list_labels($)
{'contents' =>
$target->{'extra'}->{'node_content'}});
if ($normalized !~ /[^-]/) {
- $self->line_error (sprintf(__("empty node name after expansion
`%s'"),
- Texinfo::Convert::Texinfo::convert_to_texinfo({'contents'
- => $target->{'extra'}->{'node_content'}})),
- $target->{'line_nr'});
+ $registrar->line_error($configuration_informations,
+ sprintf(__("empty node name after expansion `%s'"),
+ Texinfo::Convert::Texinfo::convert_to_texinfo({'contents'
+ => $target->{'extra'}->{'node_content'}})),
+ $target->{'line_nr'});
delete $target->{'extra'}->{'node_content'};
} else {
if (defined $labels{$normalized}) {
- $self->line_error(
+ $registrar->line_error($configuration_informations,
sprintf(__("\@%s `%s' previously defined"),
$target->{'cmdname'},
- Texinfo::Convert::Texinfo::convert_to_texinfo({'contents'
=>
- $target->{'extra'}->{'node_content'}})),
- $target->{'line_nr'});
- $self->line_error(
+ Texinfo::Convert::Texinfo::convert_to_texinfo({'contents'
+ => $target->{'extra'}->{'node_content'}})),
+ $target->{'line_nr'});
+ $registrar->line_error($configuration_informations,
sprintf(__("here is the previous definition as \@%s"),
$labels{$normalized}->{'cmdname'}),
$labels{$normalized}->{'line_nr'});
@@ -2787,7 +2806,8 @@ sub set_nodes_list_labels($)
}
} else {
if ($target->{'cmdname'} eq 'node') {
- $self->line_error (sprintf(__("empty argument in \@%s"),
+ $registrar->line_error($configuration_informations,
+ sprintf(__("empty argument in \@%s"),
$target->{'cmdname'}), $target->{'line_nr'});
delete $target->{'extra'}->{'node_content'};
}
@@ -2814,7 +2834,7 @@ Texinfo::Common - Classification of commands and
miscellaneous methods
my $today_tree = expand_today($converter);
my $verbatiminclude_tree
- = expand_verbatiminclude(undef, $verbatiminclude);
+ = expand_verbatiminclude(undef, $converter, $verbatiminclude);
=head1 DESCRIPTION
@@ -2993,13 +3013,13 @@ see L<Texinfo::Convert::Converter> and
L<Texinfo::Report>.
Expand today's date, as a texinfo tree with translations.
-=item $tree = expand_verbatiminclude($converter, $verbatiminclude)
+=item $tree = expand_verbatiminclude($registrar, $configuration_informations,
$verbatiminclude)
-The I<$converter> argument may be undef. I<$verbatiminclude> is a
+The I<$registrar> argument may be undef. I<$verbatiminclude> is a
C<@verbatiminclude> tree element. This function returns a
C<@verbatim> tree elements after finding the included file and
-reading it. If I<$converter> is not defined, the document encoding
-is not taken into account when reading the file.
+reading it. If I<$registrar> is not defined, errors messages are
+not registered.
=item $tree = definition_category($converter, $def_line)
@@ -3072,12 +3092,13 @@ in C<@asis{}>.
Return a contents array reference with first parenthesis in the
contents array reference protected.
-=item protect_hashchar_at_line_beginning($parser, $tree)
+=item protect_hashchar_at_line_beginning($registrar,
$configuration_informations, $tree)
Protect hash character at beginning of line if the line is a cpp
-line directive. The I<$parser> argument maybe undef, if it is
-defined it is used for error reporting in case an hash character
-could not be protected because it appeared in a raw environment.
+line directive. The I<$registrar> and I<$configuration_informations>
+arguments maybe undef, if they are defined they are used for
+error reporting in case an hash character could not be protected
+because it appeared in a raw environment.
=item move_index_entries_after_items_in_tree($tree)
diff --git a/tp/Texinfo/Convert/DocBook.pm b/tp/Texinfo/Convert/DocBook.pm
index 3d1e01f..239d4c2 100644
--- a/tp/Texinfo/Convert/DocBook.pm
+++ b/tp/Texinfo/Convert/DocBook.pm
@@ -657,7 +657,7 @@ sub _convert($$;$)
if ($type eq 'text') {
if ($root->{'cmdname'} eq 'verbatiminclude') {
my $verbatim_include_verbatim
- = Texinfo::Common::expand_verbatiminclude($self, $root);
+ = Texinfo::Common::expand_verbatiminclude($self, $self, $root);
if (defined($verbatim_include_verbatim)) {
$result .= $self->_convert($verbatim_include_verbatim);
} else {
@@ -1016,7 +1016,7 @@ sub _convert($$;$)
.'</literallayout></textobject>';
}
if (!defined($image_text) and !$image_file_found) {
- $self->line_warn(sprintf(
+ $self->line_warn($self, sprintf(
__("\@image file `%s' not found, using `%s'"),
$basefile, "$basefile.jpg"), $root->{'line_nr'});
}
@@ -1137,7 +1137,7 @@ sub _convert($$;$)
if ($argument) {
$result = "&#x$argument;";
} else {
- $self->line_warn(__("no argument specified for \@U"),
+ $self->line_warn($self, __("no argument specified for \@U"),
$root->{'line_nr'});
$result = '';
}
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 6adc656..b8d54a4 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -694,18 +694,9 @@ sub noticed_line_warn
{
my $self = shift;
return if ($self->{'ignore_notice'});
- return $self->line_warn(@_);
+ return $self->line_warn($self, @_);
}
-# does not seems to be used
-sub noticed_line_error
-{
- my $self = shift;
- return if ($self->{'ignore_notice'});
- return $self->line_error(@_);
-}
-
-
# This function should be used in formatting functions when some
# Texinfo tree need to be converted.
sub convert_tree_new_formatting_context($$;$$)
@@ -2849,7 +2840,7 @@ sub _convert_verbatiminclude_command($$$$)
my $args = shift;
my $verbatim_include_verbatim
- = $self->Texinfo::Common::expand_verbatiminclude($command);
+ = Texinfo::Common::expand_verbatiminclude($self, $self, $command);
if (defined($verbatim_include_verbatim)) {
return $self->convert_tree($verbatim_include_verbatim);
} else {
@@ -6123,7 +6114,7 @@ sub _prepare_index_entries($)
= Texinfo::Structuring::merge_indices($index_names);
$self->{'index_entries_by_letter'}
= Texinfo::Structuring::sort_indices_by_letter ($self->{'parser'}, $self,
- $merged_index_entries, $index_names);
+ $self, $merged_index_entries, $index_names);
$self->{'index_entries'} = $merged_index_entries;
foreach my $index_name (sort(keys(%$index_names))) {
@@ -6239,7 +6230,7 @@ sub _external_node_href($$$$)
$target_split = $default_target_split;
if ($self->get_conf('CHECK_HTMLXREF')) {
if (defined($link_command) and $link_command->{'line_nr'}) {
- $self->line_warn(sprintf(__(
+ $self->line_warn($self, sprintf(__(
"no htmlxref.cnf entry found for `%s'"), $manual_name),
$link_command->{'line_nr'});
} elsif (!$self->{'check_htmlxref_already_warned'}->{$manual_name}) {
@@ -7416,12 +7407,12 @@ sub output($$)
$self->_prepare_contents_elements();
# do element directions.
- Texinfo::Structuring::elements_directions($self, $self, $elements);
+ Texinfo::Structuring::elements_directions($self, $self->{'labels'},
$elements);
# do element directions related to files.
# FIXME do it here or before? Here it means that
# PrevFile and NextFile can be set.
- Texinfo::Structuring::elements_file_directions($self, $elements);
+ Texinfo::Structuring::elements_file_directions($elements);
# Associate the special elements that have no page with the main page.
# This may only happen if not split.
diff --git a/tp/Texinfo/Convert/IXIN.pm b/tp/Texinfo/Convert/IXIN.pm
index f7f78d9..0cff890 100644
--- a/tp/Texinfo/Convert/IXIN.pm
+++ b/tp/Texinfo/Convert/IXIN.pm
@@ -617,7 +617,7 @@ sub output_ixin($$)
= Texinfo::Structuring::merge_indices($index_names);
my $entries
= $self->Texinfo::Structuring::sort_indices($self->{'parser'}, $self,
- $merged_index_entries, $index_names);
+ $self, $merged_index_entries, $index_names);
# first do the dts_text as the counts are needed for the dts index
foreach my $index_name (sort(keys(%$entries))) {
my $dts_text_result = '';
diff --git a/tp/Texinfo/Convert/Info.pm b/tp/Texinfo/Convert/Info.pm
index 38cb3d8..4e09816 100644
--- a/tp/Texinfo/Convert/Info.pm
+++ b/tp/Texinfo/Convert/Info.pm
@@ -248,7 +248,7 @@ sub output($)
my ($label_text, $byte_count) = $self->_node_line($label->{'root'});
if ($seen_anchors{$label_text}) {
- $self->line_error(sprintf(__("\@%s output more than once: %s"),
+ $self->line_error($self, sprintf(__("\@%s output more than once: %s"),
$label->{'root'}->{'cmdname'},
Texinfo::Convert::Texinfo::convert_to_texinfo({'contents' =>
$label->{'root'}->{'extra'}->{'node_content'}})),
@@ -378,7 +378,7 @@ sub _error_outside_of_any_node($$)
my $self = shift;
my $root = shift;
if (!$self->{'node'}) {
- $self->line_warn(sprintf(__("\@%s outside of any node"),
+ $self->line_warn($self, sprintf(__("\@%s outside of any node"),
$root->{'cmdname'}), $root->{'line_nr'});
}
}
@@ -420,7 +420,7 @@ sub _node($$)
my $post_quote = '';
if ($node_text =~ /,/) {
if ($self->get_conf('INFO_SPECIAL_CHARS_WARNING')) {
- $self->line_warn(sprintf(__(
+ $self->line_warn($self, sprintf(__(
"\@node name should not contain `,': %s"), $node_text),
$node->{'line_nr'});
}
diff --git a/tp/Texinfo/Convert/LaTeX.pm b/tp/Texinfo/Convert/LaTeX.pm
index 04a45d5..d6708f9 100644
--- a/tp/Texinfo/Convert/LaTeX.pm
+++ b/tp/Texinfo/Convert/LaTeX.pm
@@ -2596,7 +2596,7 @@ sub _convert($$)
}
return $result;
} elsif ($command eq 'verbatiminclude') {
- my $expansion = $self->Texinfo::Common::expand_verbatiminclude($root);
+ my $expansion = Texinfo::Common::expand_verbatiminclude($self, $self,
$root);
unshift @{$self->{'current_contents'}->[-1]}, $expansion
if ($expansion);
return $result;
diff --git a/tp/Texinfo/Convert/Plaintext.pm b/tp/Texinfo/Convert/Plaintext.pm
index dda829e..33c3aae 100644
--- a/tp/Texinfo/Convert/Plaintext.pm
+++ b/tp/Texinfo/Convert/Plaintext.pm
@@ -1206,7 +1206,7 @@ sub _printindex_formatted($$;$)
my $merged_index_entries
= Texinfo::Structuring::merge_indices($index_names);
$self->{'index_entries'}
- = Texinfo::Structuring::sort_indices($self->{'parser'}, $self,
+ = Texinfo::Structuring::sort_indices($self->{'parser'}, $self, $self,
$merged_index_entries, $index_names);
$self->{'index_names'} = $index_names;
}
@@ -1303,7 +1303,7 @@ sub _printindex_formatted($$;$)
# FIXME protect instead
if ($entry_text =~ /:/ and $self->get_conf('INDEX_SPECIAL_CHARS_WARNING'))
{
- $self->line_warn (sprintf(__("Index entry in \@%s with : produces
invalid Info: %s"),
+ $self->line_warn ($self, sprintf(__("Index entry in \@%s with : produces
invalid Info: %s"),
$entry->{'index_at_command'},
Texinfo::Convert::Texinfo::convert_to_texinfo($entry_tree)),
$entry->{'command'}->{'line_nr'});
@@ -1350,7 +1350,7 @@ sub _printindex_formatted($$;$)
# done by the Parser.
# Warn, only once.
if (!$self->{'index_entries_no_node'}->{$entry}) {
- $self->line_warn(sprintf(__("entry for index `%s' outside of any
node"),
+ $self->line_warn($self, sprintf(__("entry for index `%s' outside of
any node"),
$index_name),
$entry->{'command'}->{'line_nr'});
$self->{'index_entries_no_node'}->{$entry} = 1;
}
@@ -1468,7 +1468,7 @@ sub _image_text($$$)
}
return ($result, $max_width);
} else {
- $self->line_warn(sprintf(__("\@image file `%s' unreadable: %s"),
+ $self->line_warn($self, sprintf(__("\@image file `%s' unreadable: %s"),
$txt_file, $!), $root->{'line_nr'});
}
}
@@ -1488,7 +1488,7 @@ sub _image_formatted_text($$$$)
{'contents' => $root->{'args'}->[3]->{'contents'}},
$self->{'convert_text_options'}) .']';
} else {
- $self->line_warn(sprintf(__(
+ $self->line_warn($self, sprintf(__(
"could not find \@image file `%s.txt' nor alternate text"),
$basefile), $root->{'line_nr'});
$result = '['.$basefile.']';
@@ -1849,7 +1849,7 @@ sub _convert($$)
and $root->{'args'}->[0]->{'contents'}->[0]->{'text'} =~
/^Note\s/i
and $self->{'output_format'}
and $self->{'output_format'} eq 'info') {
- $self->line_warn(__(
+ $self->line_warn($self, __(
"\@strong{Note...} produces a spurious cross-reference in Info; reword to
avoid that"),
$root->{'line_nr'});
}
@@ -2095,7 +2095,7 @@ sub _convert($$)
my $quoting_required = 0;
if ($name_text_checked =~ /:/m) {
if ($self->get_conf('INFO_SPECIAL_CHARS_WARNING')) {
- $self->line_warn(sprintf(__(
+ $self->line_warn($self, sprintf(__(
"\@%s cross-reference name should not contain `:'"),
$command), $root->{'line_nr'});
}
@@ -2133,7 +2133,7 @@ sub _convert($$)
$quoting_required = 0;
if ($node_text_checked =~ /([,\t\.])/m ) {
if ($self->get_conf('INFO_SPECIAL_CHARS_WARNING')) {
- $self->line_warn(sprintf(__(
+ $self->line_warn($self, sprintf(__(
"\@%s node name should not contain `%s'"), $command, $1),
$root->{'line_nr'});
}
@@ -2166,7 +2166,7 @@ sub _convert($$)
my $quoting_required = 0;
if ($node_text_checked =~ /:/m) {
if ($self->get_conf('INFO_SPECIAL_CHARS_WARNING')) {
- $self->line_warn(sprintf(__(
+ $self->line_warn($self, sprintf(__(
"\@%s node name should not contain `:'"), $command),
$root->{'line_nr'});
}
@@ -2213,11 +2213,11 @@ sub _convert($$)
my $text = $next->{'text'};
$text =~ s/^\s*//;
my $char = substr($text, 0, 1);
- $self->line_warn(sprintf(__(
- "`.' or `,' must follow \@xref, not %s"),
+ $self->line_warn($self, sprintf(__(
+ "`.' or `,' must follow \@xref, not %s"),
$char), $root->{'line_nr'});
} else {
- $self->line_warn(__("`.' or `,' must follow \@xref"),
+ $self->line_warn($self, __("`.' or `,' must follow \@xref"),
$root->{'line_nr'});
}
}
@@ -2606,7 +2606,7 @@ sub _convert($$)
}
return $result;
} elsif ($command eq 'verbatiminclude') {
- my $expansion = $self->Texinfo::Common::expand_verbatiminclude($root);
+ my $expansion = Texinfo::Common::expand_verbatiminclude($self, $self,
$root);
unshift @{$self->{'current_contents'}->[-1]}, $expansion
if ($expansion);
return '';
@@ -2999,7 +2999,7 @@ sub _convert($$)
if ($entry_name_seen) {
if ($node_text =~ /([,\t]|\.\s)/) {
if ($self->get_conf('INFO_SPECIAL_CHARS_WARNING')) {
- $self->line_warn(sprintf(__(
+ $self->line_warn($self, sprintf(__(
"menu entry node name should not contain `%s'"), $1),
$root->{'line_nr'});
}
@@ -3010,7 +3010,7 @@ sub _convert($$)
} else {
if ($node_text =~ /:/) {
if ($self->get_conf('INFO_SPECIAL_CHARS_WARNING')) {
- $self->line_warn(__(
+ $self->line_warn($self, __(
"menu entry node name should not contain `:'"),
$root->{'line_nr'});
}
@@ -3030,7 +3030,7 @@ sub _convert($$)
$pre_quote = $post_quote = '';
if ($entry_name =~ /:/) {
if ($self->get_conf('INFO_SPECIAL_CHARS_WARNING')) {
- $self->line_warn(__(
+ $self->line_warn($self, __(
"menu entry name should not contain `:'"),
$root->{'line_nr'});
}
@@ -3285,7 +3285,7 @@ sub _convert($$)
if ($node and $automatic_directions
and !$self->{'seenmenus'}->{$node}) {
$self->{'seenmenus'}->{$node} = 1;
- my $menu_node = Texinfo::Structuring::new_complete_node_menu(undef,
$node);
+ my $menu_node = Texinfo::Structuring::new_complete_node_menu($node);
if ($menu_node) {
my $menu_text = $self->_convert($menu_node);
if ($menu_text) {
diff --git a/tp/Texinfo/Convert/Text.pm b/tp/Texinfo/Convert/Text.pm
index 3a3a85b..2288a0b 100644
--- a/tp/Texinfo/Convert/Text.pm
+++ b/tp/Texinfo/Convert/Text.pm
@@ -513,7 +513,7 @@ sub _convert($;$)
} elsif ($root->{'cmdname'} eq 'verbatiminclude') {
my $verbatim_include_verbatim
= Texinfo::Common::expand_verbatiminclude($options->{'converter'},
- $root);
+ $options, $root);
if (defined($verbatim_include_verbatim)) {
$result .= _convert($verbatim_include_verbatim, $options);
}
@@ -617,7 +617,10 @@ sub converter($)
}
if ($conf) {
+ # some informations are directy passed, in general duplicated
+ # in parser, in particular 'include_directories'.
%{$converter} = %{$conf};
+ #print STDERR "CTe ".join("|", sort(keys(%{$conf})))."\n";
}
my $expanded_formats = $converter->{'expanded_formats'};;
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index ec3b502..9468fba 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -576,6 +576,21 @@ sub _top_context_command($)
}
+# register warnings and errors
+sub _line_warn
+{
+ my $self = shift;
+ my $registrar = $self;
+ $registrar->line_warn($self, @_);
+}
+
+sub _line_error
+{
+ my $self = shift;
+ my $registrar = $self;
+ $registrar->line_error($self, @_);
+}
+
# Format a bug message
sub _bug_message($$;$$)
{
@@ -1116,7 +1131,7 @@ sub _register_global_command {
if ($command eq 'setfilename'
and scalar(@{$self->{'input'}}) > 1) {
} elsif (exists ($self->{'extra'}->{$current->{'cmdname'}})) {
- $self->line_warn(sprintf(__('multiple @%s'),
+ $self->_line_warn(sprintf(__('multiple @%s'),
$current->{'cmdname'}), $line_nr);
} else {
$self->{'extra'}->{$current->{'cmdname'}} = $current;
@@ -1154,7 +1169,7 @@ sub _parse_macro_command_line($$$$$;$)
{ 'type' => 'macro_arg', 'text' => $formal_arg,
'parent' => $macro};
if ($formal_arg !~ /^[\w\-]+$/) {
- $self->line_error(sprintf(__("bad or empty \@%s formal argument: %s"),
+ $self->_line_error(sprintf(__("bad or empty \@%s formal argument: %s"),
$command, $formal_arg), $line_nr);
$macro->{'extra'}->{'invalid_syntax'} = 1;
}
@@ -1164,17 +1179,17 @@ sub _parse_macro_command_line($$$$$;$)
# accept an @-command after the arguments in case there is a @c or
# @comment
if ($args_def =~ /^\s*[^\@]/) {
- $self->line_error(sprintf(__("bad syntax for \@%s argument: %s"),
+ $self->_line_error(sprintf(__("bad syntax for \@%s argument: %s"),
$command, $args_def),
$line_nr);
$macro->{'extra'}->{'invalid_syntax'} = 1;
}
} elsif ($line !~ /\S/) {
- $self->line_error(sprintf(
+ $self->_line_error(sprintf(
__("%c%s requires a name"), ord('@'), $command), $line_nr);
$macro->{'extra'}->{'invalid_syntax'} = 1;
} else {
- $self->line_error(sprintf(
+ $self->_line_error(sprintf(
__("bad name for \@%s"), $command), $line_nr);
$macro->{'extra'}->{'invalid_syntax'} = 1;
}
@@ -1253,9 +1268,9 @@ sub _command_warn($$$$;@)
$line_nr = $current->{'line_nr'};
}
if (@_) {
- $self->line_warn(sprintf($message, @_), $line_nr);
+ $self->_line_warn(sprintf($message, @_), $line_nr);
} else {
- $self->line_warn($message, $line_nr);
+ $self->_line_warn($message, $line_nr);
}
}
@@ -1273,9 +1288,9 @@ sub _command_error($$$$;@)
$line_nr = $current->{'line_nr'};
}
if (@_) {
- $self->line_error(sprintf($message, @_), $line_nr);
+ $self->_line_error(sprintf($message, @_), $line_nr);
} else {
- $self->line_error($message, $line_nr);
+ $self->_line_error($message, $line_nr);
}
}
@@ -1412,7 +1427,7 @@ sub _gather_previous_item($$;$$)
if ($current->{'contents'}->[-1]->{'type'}
and $current->{'contents'}->[-1]->{'type'} eq 'before_item') {
if ($next_command and $next_command eq 'itemx') {
- $self->line_warn(sprintf(__("\@itemx should not begin \@%s"),
+ $self->_line_warn(sprintf(__("\@itemx should not begin \@%s"),
$current->{'cmdname'}), $line_nr);
}
return;
@@ -1478,7 +1493,7 @@ sub _gather_previous_item($$;$$)
} else {
my $after_paragraph = _check_no_text($table_gathered);
if ($after_paragraph) {
- $self->line_error(__("\@itemx must follow \@item"), $line_nr);
+ $self->_line_error(__("\@itemx must follow \@item"), $line_nr);
}
if (scalar(@{$table_gathered->{'contents'}})) {
push @{$current->{'contents'}}, $table_gathered;
@@ -1643,7 +1658,7 @@ sub _close_command_cleanup($$) {
}
}
if ($empty_format) {
- $self->line_warn(sprintf(__("\@%s has text but no \@item"),
+ $self->_line_warn(sprintf(__("\@%s has text but no \@item"),
$current->{'cmdname'}),
$current->{'line_nr'});
}
}
@@ -1671,14 +1686,14 @@ sub _close_current($$$;$$)
$closed_command, $interrupting_command);
} elsif (exists($block_commands{$current->{'cmdname'}})) {
if (defined($closed_command)) {
- $self->line_error(sprintf(__("`\@end' expected `%s', but saw `%s'"),
+ $self->_line_error(sprintf(__("`\@end' expected `%s', but saw `%s'"),
$current->{'cmdname'}, $closed_command),
$line_nr);
} elsif ($interrupting_command) {
- $self->line_error(sprintf(__("\@%s seen before \@end %s"),
+ $self->_line_error(sprintf(__("\@%s seen before \@end %s"),
$interrupting_command,
$current->{'cmdname'}),
$line_nr);
} else {
- $self->line_error(sprintf(__("no matching `%cend %s'"),
+ $self->_line_error(sprintf(__("no matching `%cend %s'"),
ord('@'), $current->{'cmdname'}), $line_nr);
if ($block_commands{$current->{'cmdname'}} eq 'conditional') {
# in this case we are within an ignored conditional
@@ -1791,7 +1806,7 @@ sub _close_commands($$$;$$)
#$self->_close_command_cleanup($current);
$current = $current->{'parent'};
} elsif ($closed_command) {
- $self->line_error(sprintf(__("unmatched `%c%s'"),
+ $self->_line_error(sprintf(__("unmatched `%c%s'"),
ord('@'), "end $closed_command"), $line_nr);
}
return ($closed_element, $current);
@@ -2021,8 +2036,8 @@ sub _expand_macro_arguments($$$$)
} else {
# implicit quoting when there is one argument.
if ($args_total != 1) {
- $self->line_error(sprintf(__(
- "macro `%s' called with too many args"),
+ $self->_line_error(sprintf(__(
+ "macro `%s' called with too many args"),
$name), $line_nr);
}
$arguments->[-1] .= ',';
@@ -2044,14 +2059,14 @@ sub _expand_macro_arguments($$$$)
($line, $line_nr) = _new_line($self, $line_nr);
if (!defined($line)) {
- $self->line_error(sprintf(__("\@%s missing closing brace"),
+ $self->_line_error(sprintf(__("\@%s missing closing brace"),
$name), $line_nr_orig);
return ($arguments, "\n", $line_nr);
}
}
}
if ($args_total == 0 and $arguments->[0] ne '') {
- $self->line_error(sprintf(__(
+ $self->_line_error(sprintf(__(
"macro `%s' declared without argument called with an
argument"),
$name), $line_nr);
}
@@ -2084,7 +2099,7 @@ sub _expand_macro_body($$$$) {
if (defined($args_index->{$arg})) {
$result .= $args->[$args_index->{$arg}];
} else {
- $self->line_error(sprintf(__(
+ $self->_line_error(sprintf(__(
"\\ in \@%s expansion followed `%s' instead of parameter name or
\\"),
$macro->{'element'}->{'args'}->[0]->{'text'}, $arg), $line_nr);
$result .= '\\' . $arg;
@@ -2533,7 +2548,7 @@ sub _enter_index_entry($$$$$$$)
} elsif ($self->{'current_node'}) {
$index_entry->{'node'} = $self->{'current_node'};
} elsif (!$self->{'current_section'}) {
- $self->line_warn(sprintf(__("entry for index `%s' outside of any node"),
+ $self->_line_warn(sprintf(__("entry for index `%s' outside of any node"),
$index_name), $line_nr);
}
@@ -3283,7 +3298,7 @@ sub _end_line($$$)
$self->{'current_part'}->{'extra'}->{'part_associated_section'}
= $current;
if ($current->{'cmdname'} eq 'top') {
- $self->line_warn("\@part should not be associated with \@top",
+ $self->_line_warn("\@part should not be associated with \@top",
$self->{'current_part'}->{'line_nr'});
}
delete $self->{'current_part'};
@@ -3293,7 +3308,7 @@ sub _end_line($$$)
$self->{'current_part'} = $current;
if ($self->{'current_node'}
and !$self->{'current_node'}->{'extra'}->{'associated_section'}) {
- $self->line_warn (sprintf(__(
+ $self->_line_warn(sprintf(__(
"\@node precedes \@%s, but parts may not be associated with
nodes"),
$command), $line_nr);
}
@@ -3392,7 +3407,7 @@ sub _check_empty_node($$$$)
my ($self, $parsed_node, $command, $line_nr) = @_;
if (!defined($parsed_node) or !$parsed_node->{'node_content'}) {
- $self->line_error (sprintf(__("empty argument in \@%s"),
+ $self->_line_error(sprintf(__("empty argument in \@%s"),
$command), $line_nr);
return 0;
} else {
@@ -3405,7 +3420,7 @@ sub _check_internal_node($$$)
my ($self, $parsed_node, $line_nr) = @_;
if ($parsed_node and $parsed_node->{'manual_content'}) {
- $self->line_error (sprintf(__("syntax for an external node used for `%s'"),
+ $self->_line_error(sprintf(__("syntax for an external node used for `%s'"),
Texinfo::Structuring::node_extra_to_texi($parsed_node)), $line_nr)
}
}
@@ -3428,7 +3443,7 @@ sub _register_extra_menu_entry_information($$;$)
my $normalized_menu_entry_name =
Texinfo::Convert::NodeNameNormalization::normalize_node($arg);
if ($normalized_menu_entry_name !~ /[^-]/) {
- $self->line_warn(sprintf(__("empty menu entry name in `%s'"),
+ $self->_line_warn(sprintf(__("empty menu entry name in `%s'"),
Texinfo::Convert::Texinfo::convert_to_texinfo($current)), $line_nr);
}
} elsif ($arg->{'type'} eq 'menu_entry_node') {
@@ -3436,7 +3451,7 @@ sub _register_extra_menu_entry_information($$;$)
my $parsed_entry_node = _parse_node_manual($arg);
if (! defined($parsed_entry_node)) {
if ($self->{'FORMAT_MENU'} eq 'menu') {
- $self->line_error (__("empty node name in menu entry"), $line_nr);
+ $self->_line_error(__("empty node name in menu entry"), $line_nr);
}
} else {
delete $parsed_entry_node->{'normalized'};
@@ -3577,7 +3592,7 @@ sub _check_valid_nesting {
}
if (defined($invalid_parent)) {
- $self->line_warn(sprintf(__("\@%s should not appear in \@%s"),
+ $self->_line_warn(sprintf(__("\@%s should not appear in \@%s"),
$command, $invalid_parent), $line_nr);
}
}
@@ -3684,12 +3699,12 @@ sub _parse_texi($;$)
} else {
push @{$current->{'contents'}},
{ 'text' => $1, 'type' => 'raw', 'parent' => $current };
- $self->line_warn(sprintf(__("\@end %s should only appear at the
beginning of a line"),
+ $self->_line_warn(sprintf(__("\@end %s should only appear at the
beginning of a line"),
$end_command), $line_nr);
}
# if there is a user defined macro that expandes to spaces, there
# will be a spurious warning.
- $self->line_warn(sprintf(
+ $self->_line_warn(sprintf(
__("superfluous argument to \@%s %s: %s"), 'end', $end_command,
$line), $line_nr)
if ($line =~ /\S/ and $line !~ /^\s*\@c(omment)?\b/);
@@ -3705,16 +3720,16 @@ sub _parse_texi($;$)
if ($current->{'args'} and $current->{'args'}->[0]) {
my $name = $current->{'args'}->[0]->{'text'};
if (exists($self->{'macros'}->{$name})) {
- $self->line_warn(sprintf(__("macro `%s' previously defined"),
+ $self->_line_warn(sprintf(__("macro `%s' previously defined"),
$name), $current->{'line_nr'});
- $self->line_warn(sprintf(__(
+ $self->_line_warn(sprintf(__(
"here is the previous definition of `%s'"),
$name), $self->{'macros'}->{$name}->{'element'}->{'line_nr'});
}
if ($all_commands{$name}
or ($name eq 'txiinternalvalue'
and $self->{'accept_internalvalue'})) {
- $self->line_warn(sprintf(__(
+ $self->_line_warn(sprintf(__(
"redefining Texinfo language command:
\@%s"),
$name), $current->{'line_nr'});
}
@@ -3782,7 +3797,7 @@ sub _parse_texi($;$)
if (!defined($current->{'parent'}->{'extra'}->{'delimiter'})) {
if ($line =~ /^$/) {
$current->{'parent'}->{'extra'}->{'delimiter'} = '';
- $self->line_error(sprintf(
+ $self->_line_error(sprintf(
__("\@%s without associated character"), 'verb'), $line_nr);
} else {
$line =~ s/^(.)//;
@@ -3852,7 +3867,7 @@ sub _parse_texi($;$)
} elsif (($args_number >= 2) or ($args_number <1)) {
# as agreed on the bug-texinfo mailing list, no warn when zero
# arg and not called with {}.
- $self->line_warn(sprintf(__(
+ $self->_line_warn(sprintf(__(
"\@%s defined with zero or more than one argument should be invoked with
{}"),
$command), $line_nr)
if ($args_number >= 2);
@@ -3877,7 +3892,7 @@ sub _parse_texi($;$)
}
if ($self->{'MAX_MACRO_CALL_NESTING'}
and scalar(@{$self->{'macro_stack'}}) >
$self->{'MAX_MACRO_CALL_NESTING'}) {
- $self->line_warn(sprintf(__(
+ $self->_line_warn(sprintf(__(
"macro call nested too deeply (set MAX_NESTED_MACROS to override; current
value %d)"),
$self->{'MAX_MACRO_CALL_NESTING'}), $line_nr);
next;
@@ -3886,7 +3901,7 @@ sub _parse_texi($;$)
my $found = 0;
foreach my $macro (@{$self->{'macro_stack'}}) {
if ($macro->{'args'}->[0]->{'text'} eq $command) {
- $self->line_error(sprintf(__(
+ $self->_line_error(sprintf(__(
"recursive call of macro %s is not allowed; use \@rmacro if
needed"),
$command), $line_nr);
$found = 1;
@@ -3941,13 +3956,13 @@ sub _parse_texi($;$)
if (!defined($current->{'extra'}->{'spaces'}));
$current->{'extra'}->{'spaces'} .= $1;
} else {
- $self->line_warn(sprintf(
+ $self->_line_warn(sprintf(
__("accent command `\@%s' must not be followed by whitespace"),
$current->{'cmdname'}), $line_nr);
$current = $current->{'parent'};
}
} elsif ($line =~ /^\@/) {
- $self->line_error(sprintf(
+ $self->_line_error(sprintf(
__("use braces to give a command as an argument to \@%s"),
$current->{'cmdname'}), $line_nr);
$current = $current->{'parent'};
@@ -3960,7 +3975,7 @@ sub _parse_texi($;$)
'parent' => $following_arg } ];
$current->{'args'} = [ $following_arg ];
if ($current->{'cmdname'} eq 'dotless' and $1 ne 'i' and $1 ne
'j') {
- $self->line_error(sprintf(
+ $self->_line_error(sprintf(
__("%c%s expects `i' or `j' as argument, not `%s'"),
ord('@'), $current->{'cmdname'}, $1), $line_nr);
}
@@ -3971,7 +3986,7 @@ sub _parse_texi($;$)
} else { # The accent is at end of line
# whitespace for commands with letter.
print STDERR "STRANGE ACC \@$current->{'cmdname'}\n" if
($self->{'DEBUG'});
- $self->line_warn(sprintf(
+ $self->_line_warn(sprintf(
__("accent command `\@%s' must not be followed by new line"),
$current->{'cmdname'}), $line_nr);
$current = $current->{'parent'};
@@ -3983,7 +3998,7 @@ sub _parse_texi($;$)
and $line =~ s/^\s+//) {
next;
}
- $self->line_error(sprintf(__("\@%s expected braces"),
+ $self->_line_error(sprintf(__("\@%s expected braces"),
$current->{'cmdname'}), $line_nr);
$current = $current->{'parent'};
}
@@ -4112,7 +4127,7 @@ sub _parse_texi($;$)
# @txiinternalvalue is invalid unless accept_internalvalue is set
and !($command eq 'txiinternalvalue'
and $self->{'accept_internalvalue'})) {
- $self->line_error(sprintf(__("unknown command `%s'"),
+ $self->_line_error(sprintf(__("unknown command `%s'"),
$command), $line_nr);
_abort_empty_line($self, $current);
my $paragraph = _begin_paragraph($self, $current, $line_nr);
@@ -4143,7 +4158,7 @@ sub _parse_texi($;$)
'type' => $value,
'contents' => [],
'parent' => $current };
- $self->line_warn(
+ $self->_line_warn(
sprintf(__("undefined flag: %s"), $value), $line_nr);
}
} else {
@@ -4158,7 +4173,7 @@ sub _parse_texi($;$)
push @{$current->{'contents'}}, $new_element;
}
} else {
- $self->line_error (sprintf(__("bad syntax for %c%s"), ord('@'),
+ $self->_line_error(sprintf(__("bad syntax for %c%s"), ord('@'),
$command), $line_nr);
}
next;
@@ -4166,10 +4181,10 @@ sub _parse_texi($;$)
if (defined($deprecated_commands{$command})) {
if ($deprecated_commands{$command} eq '') {
- $self->line_warn(sprintf(__("%c%s is obsolete."),
+ $self->_line_warn(sprintf(__("%c%s is obsolete."),
ord('@'), $command), $line_nr);
} else {
- $self->line_warn(sprintf(__("%c%s is obsolete; %s"),
+ $self->_line_warn(sprintf(__("%c%s is obsolete; %s"),
ord('@'), $command,
__($deprecated_commands{$command})), $line_nr);
}
@@ -4183,7 +4198,7 @@ sub _parse_texi($;$)
if (not $def_line_continuation
and not _abort_empty_line($self, $current)
and $begin_line_commands{$command}) {
- $self->line_warn(
+ $self->_line_warn(
sprintf(__("\@%s should only appear at the beginning of a
line"),
$command), $line_nr);
}
@@ -4232,7 +4247,7 @@ sub _parse_texi($;$)
# TODO use a more generic system for check of @-command nesting
# in command on context stack
if (not
$headings_specification_commands{$self->_top_context_command}) {
- $self->line_error(
+ $self->_line_error(
sprintf(__("\@%s should only appear in heading or footing"),
$command), $line_nr);
}
@@ -4258,14 +4273,14 @@ sub _parse_texi($;$)
push @{$parent->{'contents'}}, $misc;
$current = $parent->{'contents'}->[-1];
} else {
- $self->line_error(sprintf(__(
+ $self->_line_error(sprintf(__(
"\@%s not meaningful inside `\@%s' block"),
$command, $parent->{'cmdname'}), $line_nr);
}
$current = _begin_preformatted($self, $current);
# @*table
} elsif ($parent = _item_line_parent($current)) {
- $self->line_error(sprintf(__(
+ $self->_line_error(sprintf(__(
"\@%s not meaningful inside `\@%s' block"),
$command, $parent->{'cmdname'}), $line_nr);
$current = _begin_preformatted($self, $current);
@@ -4274,16 +4289,16 @@ sub _parse_texi($;$)
if ($command eq 'item' or $command eq 'headitem'
or $command eq 'tab') {
if (!$parent->{'extra'}->{'max_columns'}) {
- $self->line_warn(
+ $self->_line_warn(
sprintf(__("\@%s in empty multitable"),
$command), $line_nr);
} elsif ($command eq 'tab') {
my $row = $parent->{'contents'}->[-1];
die if (!$row->{'type'});
if ($row->{'type'} eq 'before_item') {
- $self->line_error(__("\@tab before \@item"), $line_nr);
+ $self->_line_error(__("\@tab before \@item"), $line_nr);
} elsif ($row->{'cells_count'} >=
$parent->{'extra'}->{'max_columns'}) {
- $self->line_error(sprintf(__(
+ $self->_line_error(sprintf(__(
"too many columns in multitable item (max %d)"),
$parent->{'extra'}->{'max_columns'}), $line_nr);
} else {
@@ -4314,17 +4329,17 @@ sub _parse_texi($;$)
$current = $row->{'contents'}->[-1];
}
} else {
- $self->line_error(sprintf(__(
+ $self->_line_error(sprintf(__(
"\@%s not meaningful inside `\@%s' block"),
$command, $parent->{'cmdname'}), $line_nr);
}
$current = _begin_preformatted($self, $current);
} elsif ($command eq 'tab') {
- $self->line_error(__(
+ $self->_line_error(__(
"ignoring \@tab outside of multitable"), $line_nr);
$current = _begin_preformatted($self, $current);
} else {
- $self->line_error (sprintf(__(
+ $self->_line_error(sprintf(__(
"\@%s outside of table or list"), $command), $line_nr);
$current = _begin_preformatted($self, $current);
}
@@ -4390,7 +4405,7 @@ sub _parse_texi($;$)
my $parent = $current;
while ($parent) {
if ($parent->{'cmdname'} and $parent->{'cmdname'} eq
'copying') {
- $self->line_error(
+ $self->_line_error(
sprintf(__("\@%s not allowed inside `\@%s' block"),
$command, $parent->{'cmdname'}), $line_nr);
$ignored = 1;
@@ -4489,7 +4504,7 @@ sub _parse_texi($;$)
$current = $parent;
_gather_previous_item($self, $current, $command, $line_nr);
} else {
- $self->line_error (sprintf(__(
+ $self->_line_error(sprintf(__(
"\@%s outside of table or list"), $command), $line_nr);
$current = _begin_preformatted($self, $current);
}
@@ -4501,7 +4516,7 @@ sub _parse_texi($;$)
if ($command eq 'subentry') {
my $parent = $current->{'parent'};
if (!_is_index_element($self, $parent)) {
- $self->line_warn(
+ $self->_line_warn(
sprintf(__("\@%s should only appear in an index entry"),
$command), $line_nr);
}
@@ -4512,7 +4527,7 @@ sub _parse_texi($;$)
}
$misc->{'extra'}->{'level'} = $subentry_level;
if ($subentry_level > 2) {
- $self->line_error(__(
+ $self->_line_error(__(
"no more than two levels of index subentry are allowed"),
$line_nr);
}
@@ -4553,7 +4568,7 @@ sub _parse_texi($;$)
if (!$current->{'cmdname'}
or $current->{'cmdname'} ne $base_command
or $after_paragraph) {
- $self->line_error(sprintf(__(
+ $self->_line_error(sprintf(__(
"must be after `\@%s' to use `\@%s'"),
$base_command, $command), $line_nr);
$current->{'contents'}->[-1]->{'extra'}->{'not_after_command'} = 1;
@@ -4591,12 +4606,12 @@ sub _parse_texi($;$)
}
}
if (!$found) {
- $self->line_warn(sprintf(__(
+ $self->_line_warn(sprintf(__(
"\@%s not meaningful outside `\@titlepage' and `\@quotation'
environments"),
$command), $current->{'line_nr'});
}
} elsif ($command eq 'dircategory' and $self->{'current_node'}) {
- $self->line_warn(__("\@dircategory after first node"),
+ $self->_line_warn(__("\@dircategory after first node"),
$line_nr);
} elsif ($command eq 'printindex') {
# Record that @printindex occurs in this node so we know it
@@ -4637,10 +4652,10 @@ sub _parse_texi($;$)
}
print STDERR "CONDITIONAL \@$command $name: $ifvalue_true\n"
if ($self->{'DEBUG'});
} elsif ($line !~ /\S/) {
- $self->line_error(sprintf(
+ $self->_line_error(sprintf(
__("%c%s requires a name"), ord('@'), $command), $line_nr);
} else {
- $self->line_error(sprintf(
+ $self->_line_error(sprintf(
__("bad name for \@%s"), $command), $line_nr);
}
} elsif ($command eq 'ifcommanddefined'
@@ -4663,10 +4678,10 @@ sub _parse_texi($;$)
}
print STDERR "CONDITIONAL \@$command $name: $ifvalue_true\n"
if ($self->{'DEBUG'});
} elsif ($line !~ /\S/) {
- $self->line_error(sprintf(
+ $self->_line_error(sprintf(
__("%c%s requires a name"), ord('@'), $command), $line_nr);
} else {
- $self->line_error(sprintf(
+ $self->_line_error(sprintf(
__("bad name for \@%s"), $command), $line_nr);
}
} elsif ($command =~ /^ifnot(.*)/) {
@@ -4775,7 +4790,7 @@ sub _parse_texi($;$)
}
if ($region_commands{$command}) {
if (@{$self->{'regions_stack'}}) {
- $self->line_error(
+ $self->_line_error(
sprintf(__("region %s inside region %s is not allowed"),
$command, $self->{'regions_stack'}->[-1]->{'cmdname'}),
$line_nr);
@@ -4793,7 +4808,7 @@ sub _parse_texi($;$)
if ($self->{'current_node'}) {
if ($command eq 'direntry') {
if ($self->{'FORMAT_MENU'} eq 'menu') {
- $self->line_warn(__("\@direntry after first node"),
+ $self->_line_warn(__("\@direntry after first node"),
$line_nr);
}
} elsif ($command eq 'menu') {
@@ -4801,7 +4816,7 @@ sub _parse_texi($;$)
or $root_commands{$current->{'parent'}->{'cmdname'}}) {
push @{$self->{'current_node'}->{'menus'}}, $current;
} else {
- $self->line_warn(__("\@menu in invalid context"),
+ $self->_line_warn(__("\@menu in invalid context"),
$line_nr);
}
}
@@ -4836,7 +4851,7 @@ sub _parse_texi($;$)
and !$self->{'definfoenclose'}->{$command});
if ($in_index_commands{$command}
and !_is_index_element($self, $current->{'parent'})) {
- $self->line_warn(
+ $self->_line_warn(
sprintf(__("\@%s should only appear in an index entry"),
$command), $line_nr);
}
@@ -4866,7 +4881,7 @@ sub _parse_texi($;$)
{ 'cmdname' => $command, 'parent' => $current };
# FIXME generalize?
if ($command eq '\\' and $self->_top_context() ne 'math') {
- $self->line_warn(sprintf(__("\@%s should only appear in math
context"),
+ $self->_line_warn(sprintf(__("\@%s should only appear in math
context"),
$command), $line_nr);
}
if ($command eq "\n") {
@@ -4881,7 +4896,7 @@ sub _parse_texi($;$)
if ($separator eq '@') {
# this may happen with a @ at the very end of a file, therefore
# not followed by anything.
- $self->line_error(__("unexpected \@"), $line_nr);
+ $self->_line_error(__("unexpected \@"), $line_nr);
} elsif ($separator eq '{') {
_abort_empty_line($self, $current);
if ($current->{'cmdname'}
@@ -4909,12 +4924,12 @@ sub _parse_texi($;$)
$float = $float->{'parent'};
}
if (!($float->{'cmdname'} and $float->{'cmdname'} eq
'float')) {
- $self->line_error(sprintf(__(
+ $self->_line_error(sprintf(__(
"\@%s is not meaningful outside `\@float' environment"),
$command), $line_nr);
$float = undef;
} else {
- $self->line_warn(sprintf(__(
+ $self->_line_warn(sprintf(__(
"\@%s should be right below `\@float'"),
$command), $line_nr);
}
@@ -4923,7 +4938,7 @@ sub _parse_texi($;$)
}
if ($float) {
if ($float->{'extra'}->{$command}) {
- $self->line_warn(sprintf(__("ignoring multiple \@%s"),
+ $self->_line_warn(sprintf(__("ignoring multiple \@%s"),
$command), $line_nr);
} else {
$current->{'parent'}->{'extra'}->{'float'} = $float;
@@ -4999,7 +5014,7 @@ sub _parse_texi($;$)
print STDERR "BRACKETED in math/rawpreformatted/inlineraw\n"
if ($self->{'DEBUG'});
} else {
- $self->line_error(sprintf(__("misplaced %c"),
+ $self->_line_error(sprintf(__("misplaced %c"),
ord('{')), $line_nr);
}
@@ -5040,7 +5055,7 @@ sub _parse_texi($;$)
if (defined($brace_commands{$closed_command})
and $brace_commands{$closed_command} eq '0'
and @{$current->{'contents'}}) {
- $self->line_warn(sprintf(__(
+ $self->_line_warn(sprintf(__(
"command \@%s does not accept arguments"),
$closed_command), $line_nr);
}
@@ -5071,7 +5086,7 @@ sub _parse_texi($;$)
or ($closed_command ne 'inforef'
and !defined($args[0]) and !defined($args[3])
and !defined($args[4]))) {
- $self->line_warn(sprintf(__(
+ $self->_line_warn(sprintf(__(
"command \@%s missing a node or external manual
argument"),
$closed_command), $line_nr);
} else {
@@ -5090,7 +5105,7 @@ sub _parse_texi($;$)
Texinfo::Convert::NodeNameNormalization::normalize_node(
{'contents' =>
$args[1]});
if ($normalized_cross_ref_name !~ /[^-]/) {
- $self->line_warn(sprintf(__(
+ $self->_line_warn(sprintf(__(
"in \@%s empty cross reference name after expansion
`%s'"),
$closed_command,
Texinfo::Convert::Texinfo::convert_to_texinfo({'contents' => $args[1]})),
@@ -5102,7 +5117,7 @@ sub _parse_texi($;$)
Texinfo::Convert::NodeNameNormalization::normalize_node(
{'contents' => $args[2]});
if ($normalized_cross_ref_title !~ /[^-]/) {
- $self->line_warn(sprintf(__(
+ $self->_line_warn(sprintf(__(
"in \@%s empty cross reference title after expansion
`%s'"),
$closed_command,
Texinfo::Convert::Texinfo::convert_to_texinfo(
@@ -5116,7 +5131,7 @@ sub _parse_texi($;$)
if (!@{$image->{'args'}}
or !defined($image->{'args'}->[0])
or scalar(@{$image->{'args'}->[0]->{'contents'}}) == 0) {
- $self->line_error(
+ $self->_line_error(
__("\@image missing filename argument"), $line_nr);
}
$image->{'extra'}->{'input_perl_encoding'}
@@ -5128,7 +5143,7 @@ sub _parse_texi($;$)
my $text = $current->{'contents'}->[0]->{'text'};
if (!defined ($text)
or ($text ne 'i' and $text ne 'j')) {
- $self->line_error(sprintf(
+ $self->_line_error(sprintf(
__("%c%s expects `i' or `j' as argument, not `%s'"),
ord('@'), $dotless->{'cmdname'},
Texinfo::Convert::Texinfo::convert_to_texinfo($current)),
$line_nr);
@@ -5148,13 +5163,13 @@ sub _parse_texi($;$)
if (!@{$current_command->{'args'}}
or !defined($current_command->{'args'}->[0])
or scalar(@{$current_command->{'args'}->[0]->{'contents'}})
== 0) {
- $self->line_warn(
+ $self->_line_warn(
sprintf(__("\@%s missing first argument"),
$current_command->{'cmdname'}), $line_nr);
}
} elsif ($current->{'parent'}->{'cmdname'} eq 'errormsg') {
my $error_message_text = $current->{'contents'}->[0]->{'text'};
- $self->line_error($error_message_text, $line_nr)
+ $self->_line_error($error_message_text, $line_nr)
if $error_message_text;
} elsif ($current->{'parent'}->{'cmdname'} eq 'U') {
my $arg;
@@ -5162,17 +5177,17 @@ sub _parse_texi($;$)
$arg = $current->{'contents'}->[0]->{'text'};
}
if (!defined($arg) || !$arg) {
- $self->line_warn(__("no argument specified for \@U"),
+ $self->_line_warn(__("no argument specified for \@U"),
$line_nr);
} elsif ($arg !~ /^[0-9A-Fa-f]+$/) {
- $self->line_error(
+ $self->_line_error(
sprintf(__("non-hex digits in argument for \@U: %s"), $arg),
$line_nr);
} elsif (length ($arg) < 4) {
# Perl doesn't mind, but too much trouble to do in TeX.
- $self->line_warn(sprintf(__(
+ $self->_line_warn(sprintf(__(
"fewer than four hex digits in argument for \@U: %s"), $arg),
$line_nr);
@@ -5189,7 +5204,7 @@ sub _parse_texi($;$)
}
# ok, value can be given to hex(), so try it.
if ($@ or hex($arg) > 0x10FFFF) {
- $self->line_error(sprintf(__(
+ $self->_line_error(sprintf(__(
"argument for \@U exceeds Unicode maximum 0x10FFFF: %s"),
$arg),
$line_nr);
@@ -5258,7 +5273,7 @@ sub _parse_texi($;$)
if ($close_preformatted_commands{$closed_command});
}
} else {
- $self->line_error(sprintf(__("misplaced %c"),
+ $self->_line_error(sprintf(__("misplaced %c"),
ord('}')), $line_nr);
}
} elsif ($separator eq ','
@@ -5382,7 +5397,7 @@ sub _parse_texi($;$)
and $current->{'type'} eq 'line_arg'
and $current->{'parent'}->{'cmdname'}
and $current->{'parent'}->{'cmdname'} eq 'node') {
- $self->line_warn(__("superfluous arguments for node"), $line_nr);
+ $self->_line_warn(__("superfluous arguments for node"), $line_nr);
# end of menu node (. must be followed by a space to stop the node).
} elsif (($separator =~ /[,\t.]/ and $current->{'type'}
and $current->{'type'} eq 'menu_entry_node')
@@ -5431,7 +5446,7 @@ sub _parse_texi($;$)
}
while (@{$self->{'conditionals_stack'}}) {
my $end_conditional = pop @{$self->{'conditionals_stack'}};
- $self->line_error(sprintf(__("expected \@end %s"), $end_conditional),
+ $self->_line_error(sprintf(__("expected \@end %s"), $end_conditional),
$line_nr);
}
$current = _close_commands($self, $current, $line_nr);
@@ -5448,7 +5463,7 @@ sub _parse_texi($;$)
}
# Setup labels info and nodes list based on 'targets'
- Texinfo::Common::set_nodes_list_labels($self);
+ Texinfo::Common::set_nodes_list_labels($self, $self, $self);
Texinfo::Common::complete_indices($self);
return $root;
}
@@ -5476,10 +5491,10 @@ sub _parse_special_misc_command($$$$)
$args = [$name, $arg];
$self->{'values'}->{$name} = $arg;
} elsif ($line !~ /\S/) {
- $self->line_error(sprintf(
+ $self->_line_error(sprintf(
__("%c%s requires a name"), ord('@'), $command), $line_nr);
} else {
- $self->line_error(sprintf(
+ $self->_line_error(sprintf(
__("bad name for \@%s"), $command), $line_nr);
}
} elsif ($command eq 'clear') {
@@ -5489,10 +5504,10 @@ sub _parse_special_misc_command($$$$)
delete $self->{'values'}->{$1};
$has_comment = 1 if (defined($3));
} elsif ($line !~ /\S/) {
- $self->line_error(sprintf(
+ $self->_line_error(sprintf(
__("%c%s requires a name"), ord('@'), $command), $line_nr);
} else {
- $self->line_error(sprintf(
+ $self->_line_error(sprintf(
__("bad name for \@%s"), $command), $line_nr);
}
} elsif ($command eq 'unmacro') {
@@ -5503,10 +5518,10 @@ sub _parse_special_misc_command($$$$)
$has_comment = 1 if (defined($3));
print STDERR "UNMACRO $1\n" if ($self->{'DEBUG'});
} elsif ($line !~ /\S/) {
- $self->line_error(sprintf(
+ $self->_line_error(sprintf(
__("%c%s requires a name"), ord('@'), $command), $line_nr);
} else {
- $self->line_error(sprintf(
+ $self->_line_error(sprintf(
__("bad name for \@%s"), $command), $line_nr);
}
} elsif ($command eq 'clickstyle') {
@@ -5518,7 +5533,7 @@ sub _parse_special_misc_command($$$$)
$remaining =~
s/^\s+@([[:alnum:]][[:alnum:]\-]*)(\{\})?\s*(\@(c|comment)((\@|\s+).*)?)?//;
$has_comment = 1 if (defined($4));
} else {
- $self->line_error (sprintf(__(
+ $self->_line_error(sprintf(__(
"\@%s should only accept an \@-command as argument, not `%s'"),
$command, $line), $line_nr);
}
@@ -5528,7 +5543,7 @@ sub _parse_special_misc_command($$$$)
if (defined($remaining)) {
chomp($remaining);
if ($remaining ne '') {
- $self->line_warn(sprintf(__(
+ $self->_line_warn(sprintf(__(
"remaining argument on \@%s line: %s"),
$command, $remaining), $line_nr);
}
@@ -5574,7 +5589,7 @@ sub _parse_line_command_args($$$)
if (@{$arg->{'contents'}} > 1
or (!defined($arg->{'contents'}->[0]->{'text'}))) {
- $self->line_error (sprintf(__("superfluous argument to \@%s"),
+ $self->_line_error(sprintf(__("superfluous argument to \@%s"),
$command), $line_nr);
}
return undef if (!defined($arg->{'contents'}->[0]->{'text'}));
@@ -5589,12 +5604,12 @@ sub _parse_line_command_args($$$)
$args = [$1, $3];
$self->{'aliases'}->{$new_command} = $existing_command;
if (exists($block_commands{$existing_command})) {
- $self->line_warn(sprintf(
+ $self->_line_warn(sprintf(
__("environment command %s as argument to \@%s"),
$existing_command, $command), $line_nr);
}
} else {
- $self->line_error(sprintf(
+ $self->_line_error(sprintf(
__("bad argument to \@%s"), $command), $line_nr);
}
@@ -5611,20 +5626,20 @@ sub _parse_line_command_args($$$)
# command and a user command defined with @definfoenclose.
# %keep_line_nr_brace_commands is one example of this.
} else {
- $self->line_error(sprintf(
+ $self->_line_error(sprintf(
__("bad argument to \@%s"), $command), $line_nr);
}
} elsif ($command eq 'columnfractions') {
my @possible_fractions = split (/\s+/, $line);
if (!@possible_fractions) {
- $self->line_error (sprintf(__("empty \@%s"), $command),
+ $self->_line_error(sprintf(__("empty \@%s"), $command),
$line_nr);
} else {
foreach my $fraction (@possible_fractions) {
if ($fraction =~ /^\d*\.\d+$|^\d+\.?$/) {
push @$args, $fraction;
} else {
- $self->line_error (sprintf(
+ $self->_line_error(sprintf(
__("column fraction not a number: %s"),
$fraction), $line_nr);
}
@@ -5634,7 +5649,7 @@ sub _parse_line_command_args($$$)
if ($line =~ /^([0-9]+)$/) {
$args = [$1];
} else {
- $self->line_error(sprintf(__("\@sp arg must be numeric, not `%s'"),
+ $self->_line_error(sprintf(__("\@sp arg must be numeric, not `%s'"),
$line), $line_nr);
}
} elsif ($command eq 'defindex' || $command eq 'defcodeindex') {
@@ -5642,7 +5657,7 @@ sub _parse_line_command_args($$$)
if ($line =~ /^([[:alnum:]][[:alnum:]\-]*)$/) {
my $name = $1;
if ($forbidden_index_name{$name}) {
- $self->line_error(sprintf(
+ $self->_line_error(sprintf(
__("reserved index name %s"),$name), $line_nr);
} else {
my $in_code = 0;
@@ -5661,7 +5676,7 @@ sub _parse_line_command_args($$$)
$self->{'command_index'}->{$name.'index'} = $name;
}
} else {
- $self->line_error(sprintf(
+ $self->_line_error(sprintf(
__("bad argument to \@%s: %s"), $command, $line), $line_nr);
}
} elsif ($command eq 'synindex' || $command eq 'syncodeindex') {
@@ -5669,10 +5684,10 @@ sub _parse_line_command_args($$$)
if ($line =~
/^([[:alnum:]][[:alnum:]\-]*)\s+([[:alnum:]][[:alnum:]\-]*)$/) {
my $index_from = $1;
my $index_to = $2;
- $self->line_error(sprintf(__("unknown source index in \@%s: %s"),
+ $self->_line_error(sprintf(__("unknown source index in \@%s: %s"),
$command, $index_from), $line_nr)
unless $self->{'index_names'}->{$index_from};
- $self->line_error(sprintf(__("unknown destination index in \@%s: %s"),
+ $self->_line_error(sprintf(__("unknown destination index in \@%s: %s"),
$command, $index_to), $line_nr)
unless $self->{'index_names'}->{$index_to};
if ($self->{'index_names'}->{$index_from}
@@ -5701,13 +5716,13 @@ sub _parse_line_command_args($$$)
$index_to_info->{'contained_indices'}->{$index_from} = 1;
$args = [$index_from, $index_to];
} else {
- $self->line_warn(sprintf(__(
+ $self->_line_warn(sprintf(__(
"\@%s leads to a merging of %s in itself, ignoring"),
$command, $index_from), $line_nr);
}
}
} else {
- $self->line_error(sprintf(__("bad argument to \@%s: %s"),
+ $self->_line_error(sprintf(__("bad argument to \@%s: %s"),
$command, $line), $line_nr);
}
} elsif ($command eq 'printindex') {
@@ -5715,12 +5730,12 @@ sub _parse_line_command_args($$$)
if ($line =~ /^([[:alnum:]][[:alnum:]\-]*)$/) {
my $name = $1;
if (!exists($self->{'index_names'}->{$name})) {
- $self->line_error(sprintf(__("unknown index `%s' in \@printindex"),
+ $self->_line_error(sprintf(__("unknown index `%s' in \@printindex"),
$name), $line_nr);
} else {
if ($self->{'merged_indices'}->{$name}) {
- $self->line_warn(sprintf(__(
+ $self->_line_warn(sprintf(__(
"printing an index `%s' merged in another one, `%s'"),
$name, $self->{'merged_indices'}->{$name}),
$line_nr);
@@ -5728,14 +5743,14 @@ sub _parse_line_command_args($$$)
if (!defined($self->{'current_node'})
and !defined($self->{'current_section'})
and !scalar(@{$self->{'regions_stack'}})) {
- $self->line_warn(sprintf(__(
+ $self->_line_warn(sprintf(__(
"printindex before document beginning: \@printindex %s"),
$name), $line_nr);
}
$args = [$name];
}
} else {
- $self->line_error(sprintf(
+ $self->_line_error(sprintf(
__("bad argument to \@%s: %s"), $command, $line), $line_nr);
}
} elsif (grep {$_ eq $command} ('everyheadingmarks', 'everyfootingmarks',
@@ -5744,7 +5759,7 @@ sub _parse_line_command_args($$$)
if ($line eq 'top' or $line eq 'bottom') {
$args = [$line];
} else {
- $self->line_error(sprintf(__(
+ $self->_line_error(sprintf(__(
"\@%s arg must be `top' or `bottom', not `%s'"),
$command, $line), $line_nr);
}
@@ -5752,7 +5767,7 @@ sub _parse_line_command_args($$$)
if ($line eq '10' or $line eq '11') {
$args = [$line];
} else {
- $self->line_error(sprintf(__(
+ $self->_line_error(sprintf(__(
"Only \@%s 10 or 11 is supported, not `%s'"),
$command, $line), $line_nr);
}
@@ -5760,7 +5775,7 @@ sub _parse_line_command_args($$$)
if ($line eq 'separate' or $line eq 'end') {
$args = [$line];
} else {
- $self->line_error(sprintf(__(
+ $self->_line_error(sprintf(__(
"\@%s arg must be `separate' or `end', not `%s'"),
$command, $line), $line_nr);
}
@@ -5768,7 +5783,7 @@ sub _parse_line_command_args($$$)
if ($line eq 'on' or $line eq 'off' or $line eq 'odd') {
$args = [$line];
} else {
- $self->line_error(sprintf(__(
+ $self->_line_error(sprintf(__(
"\@%s arg must be `on', `off' or `odd', not `%s'"),
$command, $line), $line_nr);
}
@@ -5777,7 +5792,7 @@ sub _parse_line_command_args($$$)
($line =~ /^(\.[0-9]+)$/)) {
$args = [$1];
} else {
- $self->line_error(sprintf(__("bad argument to \@%s: %s"),
+ $self->_line_error(sprintf(__("bad argument to \@%s: %s"),
$command, $line), $line_nr);
}
} elsif ($command eq 'paragraphindent') {
@@ -5786,12 +5801,12 @@ sub _parse_line_command_args($$$)
if ($value =~ /^([0-9]+)$/ or $value eq 'none' or $value eq 'asis') {
$args = [$1];
} else {
- $self->line_error(sprintf(__(
+ $self->_line_error(sprintf(__(
"\@paragraphindent arg must be numeric/`none'/`asis', not `%s'"),
$value), $line_nr);
}
} else {
- $self->line_error(sprintf(__(
+ $self->_line_error(sprintf(__(
"\@paragraphindent arg must be numeric/`none'/`asis', not `%s'"),
$line), $line_nr);
}
@@ -5799,7 +5814,7 @@ sub _parse_line_command_args($$$)
if ($line eq 'none' or $line eq 'insert') {
$args = [$line];
} else {
- $self->line_error(sprintf(__(
+ $self->_line_error(sprintf(__(
"\@firstparagraphindent arg must be `none' or `insert', not `%s'"),
$line), $line_nr);
}
@@ -5809,7 +5824,7 @@ sub _parse_line_command_args($$$)
} elsif ($line =~ /^(asis)$/) {
$args = [$1];
} else {
- $self->line_error(sprintf(__(
+ $self->_line_error(sprintf(__(
"\@exampleindent arg must be numeric/`asis', not `%s'"),
$line), $line_nr);
}
@@ -5821,7 +5836,7 @@ sub _parse_line_command_args($$$)
if ($line eq 'on' or $line eq 'off') {
$args = [$line];
} else {
- $self->line_error(sprintf(__("expected \@%s on or off, not `%s'"),
+ $self->_line_error(sprintf(__("expected \@%s on or off, not `%s'"),
$command, $line), $line_nr);
}
} elsif ($command eq 'kbdinputstyle') {
@@ -5829,7 +5844,7 @@ sub _parse_line_command_args($$$)
$self->{'kbdinputstyle'} = $line;
$args = [$line];
} else {
- $self->line_error(sprintf(__(
+ $self->_line_error(sprintf(__(
"\@kbdinputstyle arg must be `code'/`example'/`distinct', not `%s'"),
$line), $line_nr);
}
@@ -5837,7 +5852,7 @@ sub _parse_line_command_args($$$)
if ($line eq 'true' or $line eq 'false') {
$args = [$line];
} else {
- $self->line_error(sprintf(__(
+ $self->_line_error(sprintf(__(
"\@allowcodebreaks arg must be `true' or `false', not `%s'"),
$line), $line_nr);
}
@@ -5845,7 +5860,7 @@ sub _parse_line_command_args($$$)
if ($line eq 'after' or $line eq 'before' or $line eq 'none') {
$args = [$line];
} else {
- $self->line_error(sprintf(__(
+ $self->_line_error(sprintf(__(
"\@urefbreakstyle arg must be `after'/`before'/`none', not `%s'"),
$line), $line_nr);
}
@@ -5854,7 +5869,7 @@ sub _parse_line_command_args($$$)
or $line eq 'double' or $line eq 'singleafter' or $line eq
'doubleafter') {
$args = [$line];
} else {
- $self->line_error(sprintf(__("bad argument to \@%s: %s"),
+ $self->_line_error(sprintf(__("bad argument to \@%s: %s"),
$command, $line), $line_nr);
}
}
@@ -6075,7 +6090,8 @@ in the document.
=item novalidate
-If set, it is as if C<@novalidate> was set in the document.
+If set, it means that C<@novalidate> was set in the document or as option
+for the parser, in general from the command-line.
=back
diff --git a/tp/Texinfo/Report.pm b/tp/Texinfo/Report.pm
index a092399..d24e004 100644
--- a/tp/Texinfo/Report.pm
+++ b/tp/Texinfo/Report.pm
@@ -61,9 +61,10 @@ sub new($)
}
# format a line warning
-sub line_warn($$$)
+sub line_warn($$$$)
{
my $self = shift;
+ my $configuration_informations = shift;
my $text = shift;
chomp ($text);
my $line_number = shift;
@@ -72,7 +73,7 @@ sub line_warn($$$)
# otherwise out of source build fail since the file names are different
my ($directories, $suffix);
($file, $directories, $suffix) = fileparse($file)
- if ($self->get_conf('TEST'));
+ if ($configuration_informations->get_conf('TEST'));
my $warn_line;
if ($line_number->{'macro'} ne '') {
$warn_line = sprintf(__p("Texinfo source file warning",
@@ -83,16 +84,17 @@ sub line_warn($$$)
"%s:%d: warning: %s\n"),
$file, $line_number->{'line_nr'}, $text);
}
- warn $warn_line if ($self->get_conf('DEBUG'));
+ warn $warn_line if ($configuration_informations->get_conf('DEBUG'));
push @{$self->{'errors_warnings'}},
{ 'type' => 'warning', 'text' => $text, 'error_line' => $warn_line,
%{$line_number} };
}
# format a line error
-sub line_error($$$)
+sub line_error($$$$)
{
my $self = shift;
+ my $configuration_informations = shift;
my $text = shift;
chomp ($text);
my $line_number = shift;
@@ -100,12 +102,12 @@ sub line_error($$$)
my $file = $line_number->{'file_name'};
my ($directories, $suffix);
($file, $directories, $suffix) = fileparse($file)
- if ($self->get_conf('TEST'));
+ if ($configuration_informations->get_conf('TEST'));
my $macro_text = '';
$macro_text = " (possibly involving \@$line_number->{'macro'})"
if ($line_number->{'macro'} ne '');
my $error_text = "$file:$line_number->{'line_nr'}: $text$macro_text\n";
- warn "$error_text" if ($self->get_conf('DEBUG'));
+ warn "$error_text" if ($configuration_informations->get_conf('DEBUG'));
push @{$self->{'errors_warnings'}},
{ 'type' => 'error', 'text' => $text, 'error_line' => $error_text,
%{$line_number} };
@@ -453,7 +455,7 @@ Texinfo::Report - Error storing and string translations for
Texinfo modules
$converter->Texinfo::Report::new();
if ($warning_happened) {
- $converter->line_warn(sprintf($converter->__("\@%s is wrongly used"),
+ $converter->line_warn($converter, sprintf($converter->__("\@%s is wrongly
used"),
$current->{'cmdname'}), $current->{'line_nr'});
}
@@ -585,9 +587,9 @@ the error or warning.
=back
-=item $converter->line_warn($text, $line_nr)
+=item $converter->line_warn($text, $configuration_informations, $line_nr)
-=item $converter->line_error($text, $line_nr)
+=item $converter->line_error($text, $configuration_informations, $line_nr)
Register a warning or an error. The I<$text> is the text of the
error or warning. The optional I<$line_nr> holds the information
diff --git a/tp/Texinfo/Structuring.pm b/tp/Texinfo/Structuring.pm
index 63e56c1..2079b5d 100644
--- a/tp/Texinfo/Structuring.pm
+++ b/tp/Texinfo/Structuring.pm
@@ -127,9 +127,11 @@ sub section_level($)
# 'toplevel_next'
# 'toplevel_prev'
# 'toplevel_up'
-sub sectioning_structure($$)
+sub sectioning_structure($$$$)
{
my $self = shift;
+ my $registrar = shift;
+ my $configuration_informations = shift;
my $root = shift;
if (!$root->{'type'} or $root->{'type'} ne 'document_root'
or !$root->{'contents'}) {
@@ -174,7 +176,7 @@ sub sectioning_structure($$)
# new command is below
if ($previous_section->{'level'} < $level) {
if ($level - $previous_section->{'level'} > 1) {
- $self->line_error(sprintf(
+ $registrar->line_error($configuration_informations, sprintf(
__("raising the section level of \@%s which is too low"),
$content->{'cmdname'}), $content->{'line_nr'});
$content->{'level'} = $previous_section->{'level'} + 1;
@@ -206,12 +208,12 @@ sub sectioning_structure($$)
if ($content->{'cmdname'} eq 'part') {
$new_upper_part_element = 1;
if ($level < $up->{'level'}) {
- $self->line_warn(sprintf(__(
+ $registrar->line_warn($configuration_informations, sprintf(__(
"no chapter-level command before \@%s"),
$content->{'cmdname'}), $content->{'line_nr'});
}
} else {
- $self->line_warn(sprintf(__(
+ $registrar->line_warn($configuration_informations, sprintf(__(
"lowering the section level of \@%s appearing after a
lower element"),
$content->{'cmdname'}), $content->{'line_nr'});
$content->{'level'} = $up->{'level'} + 1;
@@ -300,7 +302,7 @@ sub sectioning_structure($$)
}
} elsif ($content->{'cmdname'} eq 'part'
and !$content->{'extra'}->{'part_associated_section'}) {
- $self->line_warn(sprintf(__(
+ $registrar->line_warn($configuration_informations, sprintf(__(
"no sectioning command associated with \@%s"),
$content->{'cmdname'}), $content->{'line_nr'});
}
@@ -323,15 +325,16 @@ sub _print_sectioning_tree($)
}
-sub warn_non_empty_parts($$)
+sub warn_non_empty_parts($$$)
{
- my $self = shift;
+ my $registrar = shift;
+ my $configuration_informations = shift;
my $global_commands = shift;
if ($global_commands->{'part'}) {
foreach my $part (@{$global_commands->{'part'}}) {
if (!Texinfo::Common::is_content_empty($part)) {
- $self->line_warn(sprintf(__("\@%s not empty"),
+ $registrar->line_warn($configuration_informations, sprintf(__("\@%s
not empty"),
$part->{'cmdname'}), $part->{'line_nr'});
}
}
@@ -375,9 +378,10 @@ my %direction_texts = (
'up' => 'Up'
);
-sub _check_menu_entry($$$$)
+sub _check_menu_entry($$$$$)
{
- my $self = shift;
+ my $registrar = shift;
+ my $configuration_informations = shift;
my $labels = shift;
my $command = shift;
my $menu_content = shift;
@@ -388,14 +392,14 @@ sub _check_menu_entry($$$$)
my $menu_node = $labels->{$normalized_menu_node};
if (!$menu_node) {
- $self->line_error(sprintf(
+ $registrar->line_error($configuration_informations, sprintf(
__("\@%s reference to nonexistent node `%s'"), $command,
node_extra_to_texi($menu_content->{'extra'}->{'menu_entry_node'})),
$menu_content->{'line_nr'});
} else {
if (!_check_node_same_texinfo_code($menu_node,
$menu_content->{'extra'}->{'menu_entry_node'})) {
- $self->line_warn(sprintf(
+ $registrar->line_warn($configuration_informations, sprintf(
__("\@%s entry node name `%s' different from %s name `%s'"),
$command,
node_extra_to_texi($menu_content->{'extra'}->{'menu_entry_node'}),
@@ -410,7 +414,7 @@ sub _check_menu_entry($$$$)
# to try to generate menus automatically before checking.
sub check_nodes_are_referenced
{
- my ($self, $nodes_list, $top_node, $labels, $refs) = @_;
+ my ($registrar, $configuration_informations, $nodes_list, $top_node,
$labels, $refs) = @_;
return undef unless ($nodes_list and scalar(@{$nodes_list}));
@@ -446,9 +450,10 @@ sub check_nodes_are_referenced
foreach my $node (@{$nodes_list}) {
if (not exists($referenced_nodes{$node})) {
- $self->line_warn(sprintf(__("node `%s' unreferenced"),
- node_extra_to_texi($node->{'extra'})),
- $node->{'line_nr'});
+ $registrar->line_warn($configuration_informations,
+ sprintf(__("node `%s' unreferenced"),
+ node_extra_to_texi($node->{'extra'})),
+ $node->{'line_nr'});
}
}
}
@@ -456,7 +461,7 @@ sub check_nodes_are_referenced
# set menu directions
sub set_menus_node_directions($$$$$$)
{
- my $self = shift;
+ my $registrar = shift;
my $configuration_informations = shift;
my $parser_informations = shift;
my $global_commands = shift;
@@ -479,7 +484,7 @@ sub set_menus_node_directions($$$$$$)
if ($node->{'menus'}) {
if (@{$node->{'menus'}} > 1) {
foreach my $menu (@{$node->{'menus'}}[1 .. $#{$node->{'menus'}}]) {
- $self->line_warn(sprintf(__("multiple \@%s"),
+ $registrar->line_warn($configuration_informations,
sprintf(__("multiple \@%s"),
$menu->{'cmdname'}), $menu->{'line_nr'});
}
}
@@ -496,7 +501,8 @@ sub set_menus_node_directions($$$$$$)
->{'menu_entry_node'}->{'normalized'}};
if ($check_menu_entries) {
- _check_menu_entry($self, $labels, 'menu', $menu_content);
+ _check_menu_entry($registrar, $configuration_informations,
+ $labels, 'menu', $menu_content);
}
# this may happen more than once for a given node if the node
# is in more than one menu. Therefore all the menu up node
@@ -535,7 +541,8 @@ sub set_menus_node_directions($$$$$$)
if ($menu_content->{'extra'}
and $menu_content->{'extra'}->{'menu_entry_node'}) {
if
(!$menu_content->{'extra'}->{'menu_entry_node'}->{'manual_content'}) {
- _check_menu_entry($self, $labels, 'detailmenu', $menu_content);
+ _check_menu_entry($registrar, $configuration_informations,
+ $labels, 'detailmenu', $menu_content);
}
}
}
@@ -571,7 +578,7 @@ sub _section_direction_associated_node($$)
# Checks on structure related to menus.
sub complete_node_tree_with_menus($$$$)
{
- my $self = shift;
+ my $registrar = shift;
my $configuration_informations = shift;
my $nodes_list = shift;
my $top_node = shift;
@@ -609,7 +616,7 @@ sub complete_node_tree_with_menus($$$$)
and $section->{'section_up'}{'extra'}{'associated_node'}{'menus'}
and @{$section->{'section_up'}{'extra'}{'associated_node'}{'menus'}}
and !$node->{'menu_'.$direction}) {
- $self->line_warn(sprintf(
+ $registrar->line_warn($configuration_informations, sprintf(
__("node %s for `%s' is `%s' in sectioning but not in menu"),
$direction,
node_extra_to_texi($node->{'extra'}),
@@ -627,7 +634,7 @@ sub complete_node_tree_with_menus($$$$)
and !$node->{'menu_'.$direction}->{'extra'}->{'manual_content'})
{
if
($configuration_informations->get_conf('CHECK_NORMAL_MENU_STRUCTURE')
and $node->{'extra'}->{'associated_section'}) {
- $self->line_warn(sprintf(
+ $registrar->line_warn($configuration_informations, sprintf(
__("node `%s' is %s for `%s' in menu but not in sectioning"),
node_extra_to_texi($node->{'menu_'.$direction}->{'extra'}),
$direction,
@@ -669,7 +676,7 @@ sub complete_node_tree_with_menus($$$$)
and $node->{'menu_'.$direction}
ne $node->{'node_'.$direction}
and not
$node->{'menu_'.$direction}->{'extra'}->{'manual_content'}) {
- $self->line_warn(sprintf(
+ $registrar->line_warn($configuration_informations, sprintf(
__("node %s pointer for `%s' is `%s' but %s is `%s' in menu"),
$direction,
node_extra_to_texi($node->{'extra'}),
@@ -690,7 +697,7 @@ sub complete_node_tree_with_menus($$$$)
or
!$node->{'menu_up_hash'}->{$node->{'node_up'}->{'extra'}->{'normalized'}})) {
# check if up node has a menu
if ($node->{'node_up'}->{'menus'} and @{$node->{'node_up'}->{'menus'}}) {
- $self->line_warn(sprintf(
+ $registrar->line_warn($configuration_informations, sprintf(
__("node `%s' lacks menu item for `%s' despite being its Up
target"),
node_extra_to_texi($node->{'node_up'}->{'extra'}),
node_extra_to_texi($node->{'extra'})),
@@ -704,9 +711,11 @@ sub complete_node_tree_with_menus($$$$)
# set node directions based on sectioning and @node explicit directions
-sub nodes_tree($$$$)
+sub nodes_tree($$$$$$)
{
my $self = shift;
+ my $registrar = shift;
+ my $configuration_informations = shift;
my $parser_informations = shift;
my $nodes_list = shift;
my $labels = shift;
@@ -778,7 +787,7 @@ sub nodes_tree($$$$)
if (!$parser_informations->{'novalidate'}
and !_check_node_same_texinfo_code($node_target,
$node_direction)) {
- $self->line_warn(sprintf(
+ $registrar->line_warn($configuration_informations, sprintf(
__("%s pointer `%s' (for node `%s') different from %s name
`%s'"),
$direction_texts{$direction},
node_extra_to_texi($node_direction),
@@ -791,7 +800,7 @@ sub nodes_tree($$$$)
if ($parser_informations->{'novalidate'}) {
$node->{'node_'.$direction} = { 'extra' => $node_direction };
} else {
- $self->line_error(sprintf(
+ $registrar->line_error($configuration_informations, sprintf(
__("%s reference to nonexistent `%s'"),
$direction_texts{$direction},
node_extra_to_texi($node_direction)), $node->{'line_nr'});
@@ -818,7 +827,7 @@ sub split_by_node($)
}
my $elements;
my $current = { 'type' => 'element', 'extra' => {'no_node' => 1}};
- push @$elements, $current;
+ push @$elements, $current;
my @pending_parts = ();
foreach my $content (@{$root->{'contents'}}) {
if ($content->{'cmdname'} and $content->{'cmdname'} eq 'part'
@@ -867,7 +876,7 @@ sub split_by_section($)
}
my $elements;
my $current = { 'type' => 'element', 'extra' => {'no_section' => 1}};
- push @$elements, $current;
+ push @$elements, $current;
foreach my $content (@{$root->{'contents'}}) {
if ($content->{'cmdname'}
and (($content->{'cmdname'} eq 'node'
@@ -977,7 +986,7 @@ sub _node_element($)
= $node->{'extra'}->{'node_content'};
$external_node->{'extra'}->{'normalized'} =
Texinfo::Convert::NodeNameNormalization::normalize_node(
- {'contents' => $node->{'extra'}->{'node_content'}});
+ {'contents' => $node->{'extra'}->{'node_content'}});
}
return $external_node;
} elsif ($node->{'cmdname'} and $node->{'cmdname'} eq 'node') {
@@ -992,12 +1001,12 @@ sub _node_element($)
# in 'extra'->'directions'.
sub elements_directions($$$)
{
- my $self = shift;
my $configuration_informations = shift;
+ my $labels = shift;
my $elements = shift;
return if (!$elements or !@$elements);
- my $node_top = $self->{'labels'}->{'Top'};
+ my $node_top = $labels->{'Top'};
foreach my $element (@$elements) {
my $directions;
$directions->{'This'} = $element;
@@ -1139,7 +1148,7 @@ sub elements_directions($$$)
$element->{'extra'}->{'directions'} = $directions;
}
}
- if ($self->get_conf('DEBUG')) {
+ if ($configuration_informations->get_conf('DEBUG')) {
foreach my $element (@$elements) {
print STDERR "Directions($element): "
.Texinfo::Structuring::_print_directions($element)."\n";
@@ -1147,9 +1156,8 @@ sub elements_directions($$$)
}
}
-sub elements_file_directions($$)
+sub elements_file_directions($)
{
- my $self = shift;
my $elements = shift;
return if (!$elements or !@$elements);
@@ -1292,9 +1300,10 @@ sub _unsplit($)
# For each internal reference command, set the 'label' key in the 'extra'
# hash of the reference tree element to the associated labeled tree element.
-sub associate_internal_references($$$$)
+sub associate_internal_references($$$$$)
{
- my $self = shift;
+ my $registrar = shift;
+ my $configuration_informations = shift;
my $parser_informations = shift;
my $labels = shift;
my $refs = shift;
@@ -1324,7 +1333,8 @@ sub associate_internal_references($$$$)
}
if (!defined($labels->{$node_arg->{'normalized'}})) {
if (!$parser_informations->{'novalidate'}) {
- $self->line_error(sprintf(__("\@%s reference to nonexistent node
`%s'"),
+ $registrar->line_error($configuration_informations,
+ sprintf(__("\@%s reference to nonexistent node `%s'"),
$ref->{'cmdname'}, node_extra_to_texi($node_arg)),
$ref->{'line_nr'});
}
@@ -1333,7 +1343,7 @@ sub associate_internal_references($$$$)
$ref->{'extra'}->{'label'} = $node_target;
if (!$parser_informations->{'novalidate'}
and !_check_node_same_texinfo_code($node_target, $node_arg)) {
- $self->line_warn(sprintf(
+ $registrar->line_warn($configuration_informations, sprintf(
__("\@%s to `%s', different from %s name `%s'"),
$ref->{'cmdname'},
node_extra_to_texi($node_arg),
@@ -1424,7 +1434,7 @@ sub get_node_node_childs
sub new_node_menu_entry
{
- my ($self, $node, $use_sections) = @_;
+ my ($node, $use_sections) = @_;
my $node_contents = $node->{'extra'}->{'node_content'};
@@ -1526,7 +1536,7 @@ sub new_block_command($$$)
sub new_complete_node_menu
{
- my ($self, $node, $use_sections) = @_;
+ my ($node, $use_sections) = @_;
my @node_childs = get_node_node_childs($node);
@@ -1536,7 +1546,7 @@ sub new_complete_node_menu
my @pending;
for my $child (@node_childs) {
- my $entry = new_node_menu_entry($self, $child, $use_sections);
+ my $entry = new_node_menu_entry($child, $use_sections);
push @pending, $entry;
}
@@ -1647,9 +1657,10 @@ sub index_key($$$$;$)
# Go through all the index entries and set 'key', the sort key, on
# each one.
-sub do_index_keys($$$)
+sub do_index_keys($$$$)
{
my $self = shift;
+ my $registrar = shift;
my $configuration_informations = shift;
my $index_names = shift;
@@ -1661,7 +1672,8 @@ sub do_index_keys($$$)
$entry->{'key'} = index_key($entry, {'contents' => $entry->{'content'}},
$entry->{'sortas'}, $options, $ignore_chars);
if ($entry->{'key'} !~ /\S/) {
- $self->line_warn(sprintf(__("empty index key in \@%s"),
+ $registrar->line_warn($configuration_informations,
+ sprintf(__("empty index key in \@%s"),
$entry->{'index_at_command'}),
$entry->{'command'}->{'line_nr'});
}
@@ -1669,15 +1681,16 @@ sub do_index_keys($$$)
}
}
-sub sort_indices($$$$)
+sub sort_indices($$$$$)
{
my $self = shift;
+ my $registrar = shift;
my $configuration_informations = shift;
my $index_entries = shift;
my $index_names = shift;
my $sorted_index_entries;
- do_index_keys($self, $configuration_informations, $index_names);
+ do_index_keys($self, $registrar, $configuration_informations, $index_names);
foreach my $index_name (keys(%$index_entries)) {
@{$sorted_index_entries->{$index_name}} =
sort _sort_index_entries
@@ -1686,15 +1699,16 @@ sub sort_indices($$$$)
return $sorted_index_entries;
}
-sub sort_indices_by_letter($$$$)
+sub sort_indices_by_letter($$$$$)
{
my $self = shift;
+ my $registrar = shift;
my $configuration_informations = shift;
my $index_entries = shift;
my $index_names = shift;
my $indices_sorted_by_letters;
- do_index_keys($self, $configuration_informations, $index_names);
+ do_index_keys($self, $registrar, $configuration_informations, $index_names);
foreach my $index_name (keys(%$index_entries)) {
my $index_letter_hash;
foreach my $index_entry (@{$index_entries->{$index_name}}) {
@@ -1706,7 +1720,7 @@ sub sort_indices_by_letter($$$$)
my @sorted_letter_entries
= sort _sort_index_entries_in_letter @{$index_letter_hash->{$letter}};
push @{$indices_sorted_by_letters->{$index_name}},
- { 'letter' => $letter, 'entries' => \@sorted_letter_entries };
+ { 'letter' => $letter, 'entries' => \@sorted_letter_entries };
}
}
return $indices_sorted_by_letters;
@@ -1750,18 +1764,18 @@ Texinfo::Structuring - information on Texinfo::Parser
tree
merge_indices sort_indices_by_letter sort_indices elements_directions
elements_file_directions);
# $tree is a Texinfo document tree. $parser is a Texinfo::Parser object.
- my $sections_root = sectioning_structure ($parser, $tree);
+ my $sections_root = sectioning_structure ($parser, $parser, $parser, $tree);
my ($labels, $targets_list, $nodes_list) = $parser->labels_information();
my $parser_informations = $parser->global_informations();
my $global_commands = $parser->global_commands_information();
set_menus_node_directions($parser, $parser, $parser_informations,
$global_commands, $nodes_list, $labels);
- my $top_node = nodes_tree($parser, $nodes_list, $labels);
+ my $top_node = nodes_tree($parser, $parser, $parser, $parser_informations,
$nodes_list, $labels);
complete_node_tree_with_menus($parser, $parser, $nodes_list, $top_node);
my $refs = $parser->internal_references_information();
- check_nodes_are_referenced($parser, $nodes_list, $top_node, $labels, $refs);
+ check_nodes_are_referenced($parser, $parser, $nodes_list, $top_node,
$labels, $refs);
number_floats($parser->floats_information());
- associate_internal_references($parser, $labels, $refs);
+ associate_internal_references($parser, $parser, $parser_informations,
$labels, $refs);
my $elements;
if ($split_at_nodes) {
$elements = split_by_node($tree);
@@ -1770,17 +1784,17 @@ Texinfo::Structuring - information on Texinfo::Parser
tree
}
split_pages($elements, $split);
elements_directions($parser, $parser, $elements);
- elements_file_directions($parser, $elements);
+ elements_file_directions($elements);
my $index_names = $parser->indices_information();
my $merged_index_entries
= merge_indices($index_names);
my $index_entries_sorted;
if ($sort_by_letter) {
- $index_entries_sorted = sort_indices_by_letter($parser, $parser,
+ $index_entries_sorted = sort_indices_by_letter($parser, $parser, $parser,
$merged_index_entries, $index_names);
} else {
- $index_entries_sorted = sort_indices($parser, $parser,
+ $index_entries_sorted = sort_indices($parser, $parser, $parser,
$merged_index_entries, $index_names);
}
@@ -1814,13 +1828,6 @@ elements by the user.
C<merge_indices> may be used to merge indices, which may be sorted
with C<sort_indices> or C<sort_indices_by_letter> to sort by letters.
-Other miscellaneous methods include C<set_menus_to_simple_menu> and
-C<menu_to_simple_menu> to change the menu texinfo tree, as well
-as C<insert_nodes_for_sectioning_commands> that adds nodes for
-sectioning commands without nodes and C<complete_tree_nodes_menus>
-that completes the node menus based on the sectioning tree.
-
-
=head1 METHODS
@@ -1831,11 +1838,12 @@ as argument, see L<Texinfo::Parser>.
=over
-=item $sections_root = sectioning_structure ($parser, $tree)
+=item $sections_root = sectioning_structure ($parser, $registrar,
$configuration_informations, $tree)
This function goes through the tree and gather information on
the document structure for sectioning commands. It returns the
-root of the sectioning commands tree.
+root of the sectioning commands tree. Errors are registered
+in I<$registrar>.
For section elements, it sets:
@@ -1875,9 +1883,9 @@ account C<@part> elements.
=back
-=item set_menus_node_directions($parser, $configuration_informations,
$parser_informations, $global_commands, $nodes_list, $labels);
+=item set_menus_node_directions($registrar, $configuration_informations,
$parser_informations, $global_commands, $nodes_list, $labels);
-Goes through menu and set directions.
+Goes through menu and set directions. Register errors in C<$registrar>.
=over
@@ -1897,10 +1905,10 @@ Up, next and previous directions as set in menus.
=back
-=item my $top_node = nodes_tree($parser, $nodes_list, $labels)
+=item my $top_node = nodes_tree($parser, $registrar,
$configuration_informations, $parser_informations, $nodes_list, $labels)
Goes through nodes and set directions. Returns the top
-node.
+node. Register errors in C<$registrar>.
This functions sets:
@@ -1916,14 +1924,17 @@ Up, next and previous directions for the node.
=back
-=item complete_node_tree_with_menus($parser, $configuration_informations,
$nodes_list, $top_node)
+=item complete_node_tree_with_menus($registrar, $configuration_informations,
$nodes_list, $top_node)
Complete nodes directions with menu directions. Check consistency
of menus, sectionning and nodes direction structures.
+Register errors in C<$registrar>.
-=item check_nodes_are_referenced($parser, $nodes_list, $top_node, $labels,
$refs)
+=item check_nodes_are_referenced($registrar, $configuration_informations,
$nodes_list, $top_node, $labels, $refs)
Check that all the nodes are referenced (in menu, @*ref or node direction).
+Register errors in C<$registrar>.
+
Should be called after C<complete_node_tree_with_menus> in order to
have the autogenerated menus available.
@@ -1932,17 +1943,18 @@ have the autogenerated menus available.
Number the floats as described in the Texinfo manual. Sets
the I<number> key of the float tree elements.
-=item associate_internal_references($parser, $labels, $refs)
+=item associate_internal_references($registrar, $configuration_informations,
$parser_informations, $labels, $refs)
Verify that internal references (C<@ref> and similar without
fourth of fifth argument) have an associated node, anchor or float.
Set the I<label> key in the I<extra> hash of the reference tree
-element to the associated labeled tree element.
+element to the associated labeled tree element. Register errors
+in C<$registrar>.
-=item warn_non_empty_parts($parser, $global_commands)
+=item warn_non_empty_parts($registrar, $configuration_informations,
$global_commands)
-Register a warning in C<$parser> for each C<@part> that is not empty
-in C<$global_commands> information (obtained by calling
+Register a warning in C<$registrar> for each C<@part> that is not empty
+in C<$global_commands> information (typically obtained by calling
C<global_commands_information()> on a parser).
=item $elements = split_by_node($tree)
@@ -2078,7 +2090,7 @@ The next top level element.
=back
-=item elements_file_directions($parser, $elements)
+=item elements_file_directions($elements)
In the directions reference described above for C<elements_directions>, sets
the I<PrevFile> and C<NextFile> directions to the elements in previous and
@@ -2102,9 +2114,9 @@ The I<$merged_entries> returned is a hash reference whose
keys are the index names and values arrays of index entry structures
described in details in L<Texinfo::Parser/index_entries>.
-=item $index_entries_sorted = sort_indices_by_letter($parser,
$configuration_informations, $merged_index_entries, $index_names)
+=item $index_entries_sorted = sort_indices_by_letter($parser, $registrar,
$configuration_informations, $merged_index_entries, $index_names)
-=item $index_entries_sorted = sort_indices($parser,
$configuration_informations, $merged_index_entries, $index_names)
+=item $index_entries_sorted = sort_indices($parser, $registrar,
$configuration_informations, $merged_index_entries, $index_names)
These functions first sets a plain text key for each index entry, used for
sorting. In both cases, a hash reference with index names as keys is returned.
@@ -2114,9 +2126,11 @@ associated with each index name. Each letter hash
reference has two
keys, a I<letter> key with the letter, and an I<entries> key with an array
reference of sorted index entries beginning with the letter.
-When simply sorting, the array of the sorted indes entries is associated
+When simply sorting, the array of the sorted index entries is associated
with the index name.
+Register errors in C<$registrar>.
+
=back
=head1 SEE ALSO
diff --git a/tp/Texinfo/Transformations.pm b/tp/Texinfo/Transformations.pm
index b805eed..eaf375b 100644
--- a/tp/Texinfo/Transformations.pm
+++ b/tp/Texinfo/Transformations.pm
@@ -375,9 +375,8 @@ sub _prepend_new_menu_in_node_section($$$)
push @{$node->{'menus'}}, $current_menu;
}
-sub complete_node_menu($$;$)
+sub complete_node_menu($;$)
{
- my $self = shift;
my $node = shift;
my $use_sections = shift;
@@ -420,8 +419,8 @@ sub complete_node_menu($$;$)
@pending = ();
}
} else {
- my $entry = Texinfo::Structuring::new_node_menu_entry($self,
- $node_entry, $use_sections);
+ my $entry = Texinfo::Structuring::new_node_menu_entry($node_entry,
+ $use_sections);
push @pending, $entry;
}
}
@@ -468,9 +467,8 @@ sub _get_non_automatic_nodes_with_sections($)
}
# This should be called after Texinfo::Structuring::sectioning_structure.
-sub complete_tree_nodes_menus($$;$)
+sub complete_tree_nodes_menus($;$)
{
- my $self = shift;
my $root = shift;
my $use_sections = shift;
@@ -479,14 +477,13 @@ sub complete_tree_nodes_menus($$;$)
return undef;
}
foreach my $node (@{$non_automatic_nodes}) {
- complete_node_menu($self, $node, $use_sections);
+ complete_node_menu($node, $use_sections);
}
}
# this only complete menus if there was no menu
-sub complete_tree_nodes_missing_menu($$;$)
+sub complete_tree_nodes_missing_menu($;$)
{
- my $self = shift;
my $root = shift;
my $use_sections = shift;
@@ -497,7 +494,7 @@ sub complete_tree_nodes_missing_menu($$;$)
foreach my $node (@{$non_automatic_nodes}) {
if (not $node->{'menus'} or not scalar(@{$node->{'menus'}})) {
my $section = $node->{'extra'}->{'associated_section'};
- my $current_menu = Texinfo::Structuring::new_complete_node_menu($self,
$node, $use_sections);
+ my $current_menu = Texinfo::Structuring::new_complete_node_menu($node,
$use_sections);
if (defined($current_menu)) {
_prepend_new_menu_in_node_section($node, $section, $current_menu);
}
@@ -820,7 +817,7 @@ An array reference is returned, containing the root contents
with added nodes, as well as an array reference containing the
added nodes.
-=item complete_tree_nodes_menus ($parser, $tree, $add_section_names_in_entries)
+=item complete_tree_nodes_menus ($tree, $add_section_names_in_entries)
Add menu entries or whole menus for nodes associated with sections,
based on the sectioning tree. If the optional
@@ -828,7 +825,7 @@ C<$add_section_names_in_entries> argument is set, a menu
entry
name is added using the section name. This function should be
called after L<sectioning_structure>.
-=item complete_tree_nodes_missing_menu ($parser, $tree,
$use_section_names_in_entries)
+=item complete_tree_nodes_missing_menu ($tree, $use_section_names_in_entries)
Add whole menus for nodes associated with sections and without menu,
based on the sectioning tree. If the optional
diff --git a/tp/Texinfo/XS/parsetexi/Parsetexi.pm
b/tp/Texinfo/XS/parsetexi/Parsetexi.pm
index 890347e..8220d59 100644
--- a/tp/Texinfo/XS/parsetexi/Parsetexi.pm
+++ b/tp/Texinfo/XS/parsetexi/Parsetexi.pm
@@ -205,7 +205,7 @@ sub get_parser_info {
_get_errors ($self);
# Setup labels info and nodes list based on 'targets'
- Texinfo::Common::set_nodes_list_labels($self);
+ Texinfo::Common::set_nodes_list_labels($self, $self, $self);
Texinfo::Common::complete_indices ($self);
}
@@ -285,14 +285,18 @@ sub parse_texi_file ($$)
sub _get_errors($)
{
my $self = shift;
+ my $registrar = $self;
+ my $configuration_informations = $self;
my $ERRORS;
my $tree_stream = dump_errors();
eval $tree_stream;
for my $error (@{$ERRORS}) {
if ($error->{'type'} eq 'error') {
- $self->line_error ($error->{'message'}, $error->{'line_nr'});
+ $registrar->line_error ($configuration_informations,
+ $error->{'message'}, $error->{'line_nr'});
} else {
- $self->line_warn ($error->{'message'}, $error->{'line_nr'});
+ $registrar->line_warn ($configuration_informations,
+ $error->{'message'}, $error->{'line_nr'});
}
}
}
@@ -360,7 +364,7 @@ sub parse_texi_line($$;$$$$)
$self->{'targets'} = $TARGETS;
# Setup labels info and nodes list based on 'targets'
- Texinfo::Common::set_nodes_list_labels($self);
+ Texinfo::Common::set_nodes_list_labels($self, $self, $self);
return $tree;
}
diff --git a/tp/init/chm.pm b/tp/init/chm.pm
index b981410..42fe7f5 100644
--- a/tp/init/chm.pm
+++ b/tp/init/chm.pm
@@ -235,7 +235,7 @@ sub chm_init($)
}
print $hhk_fh "</OBJECT>\n";
- my $index_entries = Texinfo::Structuring::sort_indices($self, $self,
+ my $index_entries = Texinfo::Structuring::sort_indices($self->{'parser'},
$self, $self,
$self->{'index_entries'},
$self->{'index_names'});
if ($index_entries) {
diff --git a/tp/t/automatic_menus.t b/tp/t/automatic_menus.t
index 89e1914..4de819e 100644
--- a/tp/t/automatic_menus.t
+++ b/tp/t/automatic_menus.t
@@ -27,14 +27,15 @@ sub test($$$;$)
my ($labels, $targets_list, $nodes_list) = $parser->labels_information();
my $parser_informations = $parser->global_informations();
my $refs = $parser->internal_references_information();
- Texinfo::Structuring::associate_internal_references($parser,
+ Texinfo::Structuring::associate_internal_references($parser, $parser,
$parser_informations, $labels, $refs);
- my $sectioning = Texinfo::Structuring::sectioning_structure($parser, $tree);
+ my $sectioning = Texinfo::Structuring::sectioning_structure($parser, $parser,
+ $parser, $tree);
if ($complete_missing_menus) {
- Texinfo::Transformations::complete_tree_nodes_missing_menu($parser, $tree);
+ Texinfo::Transformations::complete_tree_nodes_missing_menu($tree);
#print STDERR "".Texinfo::Common::print_tree($tree)."\n";
} else {
- Texinfo::Transformations::complete_tree_nodes_menus($parser, $tree);
+ Texinfo::Transformations::complete_tree_nodes_menus($tree);
}
my $texi_result = Texinfo::Convert::Texinfo::convert_to_texinfo($tree);
diff --git a/tp/t/automatic_nodes.t b/tp/t/automatic_nodes.t
index d368cfd..40c24a6 100644
--- a/tp/t/automatic_nodes.t
+++ b/tp/t/automatic_nodes.t
@@ -27,8 +27,8 @@ sub test_new_node($$$$)
my ($labels, $targets_list, $nodes_list) = $parser->labels_information();
my $parser_informations = $parser->global_informations();
my $refs = $parser->internal_references_information();
- Texinfo::Structuring::associate_internal_references($parser,
$parser_informations,
- $labels, $refs);
+ Texinfo::Structuring::associate_internal_references($parser, $parser,
+ $parser_informations, $labels, $refs);
# $labels, $nodes_list, $targets_list are modified
my $node = Texinfo::Transformations::_new_node($parser, $line,
$nodes_list, $targets_list, $labels);
@@ -37,8 +37,8 @@ sub test_new_node($$$$)
if (defined($node)) {
$texi_result = Texinfo::Convert::Texinfo::convert_to_texinfo($node);
my $refs = $parser->internal_references_information();
- Texinfo::Structuring::associate_internal_references($parser,
$parser_informations,
- $labels, $refs);
+ Texinfo::Structuring::associate_internal_references($parser, $parser,
+ $parser_informations, $labels, $refs);
$normalized = $node->{'extra'}->{'normalized'};
my @labels = sort(keys(%$labels));
if (scalar(@labels) != 1) {
@@ -80,8 +80,8 @@ my $line_tree = Texinfo::Parser::parse_texi_line (undef, 'a
node');
my ($labels, $targets_list, $nodes_list) = $parser->labels_information();
my $parser_informations = $parser->global_informations();
my $refs = $parser->internal_references_information();
-Texinfo::Structuring::associate_internal_references($parser,
$parser_informations,
- $labels, $refs);
+Texinfo::Structuring::associate_internal_references($parser, $parser,
+ $parser_informations, $labels, $refs);
my $node = Texinfo::Transformations::_new_node($parser, $line_tree,
$nodes_list, $targets_list, $labels);
is ('@node a node 1
@@ -156,8 +156,8 @@ Text.
($labels, $targets_list, $nodes_list) = $parser->labels_information();
$parser_informations = $parser->global_informations();
$refs = $parser->internal_references_information();
- Texinfo::Structuring::associate_internal_references($parser,
$parser_informations,
- $labels, $refs);
+ Texinfo::Structuring::associate_internal_references($parser, $parser,
+ $parser_informations, $labels, $refs);
my ($new_content, $added_nodes)
= Texinfo::Transformations::insert_nodes_for_sectioning_commands($parser,
$tree, $nodes_list, $targets_list, $labels);
@@ -181,8 +181,8 @@ $tree = $parser->parse_texi_text ('@node Top
($labels, $targets_list, $nodes_list) = $parser->labels_information();
$parser_informations = $parser->global_informations();
$refs = $parser->internal_references_information();
-Texinfo::Structuring::associate_internal_references($parser,
$parser_informations,
- $labels, $refs);
+Texinfo::Structuring::associate_internal_references($parser, $parser,
+ $parser_informations, $labels, $refs);
($new_content, $added_nodes)
= Texinfo::Transformations::insert_nodes_for_sectioning_commands($parser,
$tree, $nodes_list, $targets_list, $labels);
diff --git a/tp/t/do_master_menu.t b/tp/t/do_master_menu.t
index 3b3e576..ba3bcd7 100644
--- a/tp/t/do_master_menu.t
+++ b/tp/t/do_master_menu.t
@@ -126,8 +126,8 @@ my $tree = $parser->parse_texi_text($in_detailmenu);
my ($labels, $targets_list, $nodes_list) = $parser->labels_information();
my $parser_informations = $parser->global_informations();
my $refs = $parser->internal_references_information();
-Texinfo::Structuring::associate_internal_references($parser,
$parser_informations,
- $labels, $refs);
+Texinfo::Structuring::associate_internal_references($parser, $parser,
+ $parser_informations, $labels, $refs);
my $master_menu = Texinfo::Transformations::new_master_menu($parser, $labels);
my $out = Texinfo::Convert::Texinfo::convert_to_texinfo($master_menu);
@@ -170,8 +170,8 @@ $tree = $parser->parse_texi_text($no_detailmenu);
($labels, $targets_list, $nodes_list) = $parser->labels_information();
$parser_informations = $parser->global_informations();
$refs = $parser->internal_references_information();
-Texinfo::Structuring::associate_internal_references($parser,
$parser_informations,
- $labels, $refs);
+Texinfo::Structuring::associate_internal_references($parser, $parser,
+ $parser_informations, $labels, $refs);
$master_menu = Texinfo::Transformations::new_master_menu($parser, $labels);
$out = Texinfo::Convert::Texinfo::convert_to_texinfo($master_menu);
is ($out, $reference, 'master menu no detailmenu');
@@ -181,8 +181,8 @@ $tree = $parser->parse_texi_text($in_detailmenu);
($labels, $targets_list, $nodes_list) = $parser->labels_information();
$parser_informations = $parser->global_informations();
$refs = $parser->internal_references_information();
-Texinfo::Structuring::associate_internal_references($parser,
$parser_informations,
- $labels, $refs);
+Texinfo::Structuring::associate_internal_references($parser, $parser,
+ $parser_informations, $labels, $refs);
Texinfo::Transformations::regenerate_master_menu($parser, $labels);
$out = Texinfo::Convert::Texinfo::convert_to_texinfo($tree);
@@ -195,8 +195,8 @@ $tree = $parser->parse_texi_text($no_detailmenu);
($labels, $targets_list, $nodes_list) = $parser->labels_information();
$parser_informations = $parser->global_informations();
$refs = $parser->internal_references_information();
-Texinfo::Structuring::associate_internal_references($parser,
$parser_informations,
- $labels, $refs);
+Texinfo::Structuring::associate_internal_references($parser, $parser,
+ $parser_informations, $labels, $refs);
Texinfo::Transformations::regenerate_master_menu($parser, $labels);
$out = Texinfo::Convert::Texinfo::convert_to_texinfo($tree);
diff --git a/tp/t/init/redefine_need.init b/tp/t/init/redefine_need.init
index 12e351f..b90abdf 100644
--- a/tp/t/init/redefine_need.init
+++ b/tp/t/init/redefine_need.init
@@ -10,11 +10,12 @@ sub my_need_formatting($$$)
if ($command->{'extra'} and $command->{'extra'}->{'misc_args'}
and @{$command->{'extra'}->{'misc_args'}}) {
- $converter->line_warn ("need has the right arg:
$command->{'extra'}->{'misc_args'}->[0]",
+ $converter->line_warn($converter,
+ "need has the right arg: $command->{'extra'}->{'misc_args'}->[0]",
$command->{'line_nr'});
} else {
- $converter->line_warn ("Bad arg for $cmdname",
- $command->{'line_nr'});
+ $converter->line_warn($converter, "Bad arg for $cmdname",
+ $command->{'line_nr'});
}
my $arg_text;
if ($command->{'args'} and $command->{'args'}->[0]) {
diff --git a/tp/t/results/indices/empty_string_index_entry.pl
b/tp/t/results/indices/empty_string_index_entry.pl
index ee5c342..77c8a9c 100644
--- a/tp/t/results/indices/empty_string_index_entry.pl
+++ b/tp/t/results/indices/empty_string_index_entry.pl
@@ -800,7 +800,38 @@ $result_errors{'empty_string_index_entry'} = [
'macro' => '',
'text' => 'empty index key in @defunx',
'type' => 'warning'
- },
+ }
+];
+
+
+$result_floats{'empty_string_index_entry'} = {};
+
+
+
+$result_converted{'info'}->{'empty_string_index_entry'} = 'This is , produced
from .
+
+
+File: , Node: Top, Up: (dir)
+
+\'\'
+
+ -- Function:
+ -- Function:
+
+
+
+Tag Table:
+Node: Top27
+
+End Tag Table
+
+
+Local Variables:
+coding: utf-8
+End:
+';
+
+$result_converted_errors{'info'}->{'empty_string_index_entry'} = [
{
'error_line' => ':3: warning: empty index key in @findex
',
@@ -836,7 +867,19 @@ $result_errors{'empty_string_index_entry'} = [
'macro' => '',
'text' => 'empty index key in @defunx',
'type' => 'warning'
- },
+ }
+];
+
+
+
+$result_converted{'plaintext'}->{'empty_string_index_entry'} = '\'\'
+
+ -- Function:
+ -- Function:
+
+';
+
+$result_converted_errors{'plaintext'}->{'empty_string_index_entry'} = [
{
'error_line' => ':3: warning: empty index key in @findex
',
@@ -872,7 +915,27 @@ $result_errors{'empty_string_index_entry'} = [
'macro' => '',
'text' => 'empty index key in @defunx',
'type' => 'warning'
- },
+ }
+];
+
+
+
+$result_converted{'html_text'}->{'empty_string_index_entry'} = '<span
id="Top"></span><h1 class="node-heading">Top</h1>
+
+<span id="index-"></span>
+
+<dl compact="compact">
+<dt id=\'index--1\'><span><code><!-- /@w --></code><a href=\'#index--1\'
class=\'copiable-anchor\'> ¶</a></span></dt>
+</dl>
+
+<dl class="def">
+<dt id="index--2"><span class="category">Function: </span><span><strong><!--
/@w --></strong> <em> </em><a href=\'#index--2\' class=\'copiable-anchor\'>
¶</a></span></dt>
+<dt id="index--3"><span class="category">Function: </span><span><strong><!--
/@w --></strong> <em> </em><a href=\'#index--3\' class=\'copiable-anchor\'>
¶</a></span></dt>
+</dl>
+
+<hr>';
+
+$result_converted_errors{'html_text'}->{'empty_string_index_entry'} = [
{
'error_line' => ':3: warning: empty index key in @findex
',
@@ -912,55 +975,4 @@ $result_errors{'empty_string_index_entry'} = [
];
-$result_floats{'empty_string_index_entry'} = {};
-
-
-
-$result_converted{'info'}->{'empty_string_index_entry'} = 'This is , produced
from .
-
-
-File: , Node: Top, Up: (dir)
-
-\'\'
-
- -- Function:
- -- Function:
-
-
-
-Tag Table:
-Node: Top27
-
-End Tag Table
-
-
-Local Variables:
-coding: utf-8
-End:
-';
-
-
-$result_converted{'plaintext'}->{'empty_string_index_entry'} = '\'\'
-
- -- Function:
- -- Function:
-
-';
-
-
-$result_converted{'html_text'}->{'empty_string_index_entry'} = '<span
id="Top"></span><h1 class="node-heading">Top</h1>
-
-<span id="index-"></span>
-
-<dl compact="compact">
-<dt id=\'index--1\'><span><code><!-- /@w --></code><a href=\'#index--1\'
class=\'copiable-anchor\'> ¶</a></span></dt>
-</dl>
-
-<dl class="def">
-<dt id="index--2"><span class="category">Function: </span><span><strong><!--
/@w --></strong> <em> </em><a href=\'#index--2\' class=\'copiable-anchor\'>
¶</a></span></dt>
-<dt id="index--3"><span class="category">Function: </span><span><strong><!--
/@w --></strong> <em> </em><a href=\'#index--3\' class=\'copiable-anchor\'>
¶</a></span></dt>
-</dl>
-
-<hr>';
-
1;
diff --git a/tp/t/test_protect_hashchar_at_line_beginning.t
b/tp/t/test_protect_hashchar_at_line_beginning.t
index 2131a86..6219946 100644
--- a/tp/t/test_protect_hashchar_at_line_beginning.t
+++ b/tp/t/test_protect_hashchar_at_line_beginning.t
@@ -26,7 +26,7 @@ sub run_test($$$;$)
my $tree = $parser->parse_texi_text($in, 1);
my $corrected_tree =
- $parser->Texinfo::Common::protect_hashchar_at_line_beginning($tree);
+ Texinfo::Common::protect_hashchar_at_line_beginning($parser, $parser,
$tree);
if (defined($error_message)) {
my ($errors, $errors_count) = $parser->errors();
diff --git a/tp/t/test_sort.t b/tp/t/test_sort.t
index 2612edc..38b9008 100644
--- a/tp/t/test_sort.t
+++ b/tp/t/test_sort.t
@@ -48,7 +48,7 @@ my $parser_informations = $parser->global_informations();
# holding only configuration instead
$parser->{'OUTPUT_ENCODING_NAME'} =
$parser_informations->{'input_encoding_name'};
my $sorted_index_entries
- = Texinfo::Structuring::sort_indices($parser, $parser,
+ = Texinfo::Structuring::sort_indices($parser, $parser, $parser,
$index_entries, $index_names);
my @entries = ();
@@ -64,7 +64,7 @@ my @entries_ref = ('!', '"', 'aaaaaaaaaaaa', 'e', 'E', 'ł',
'ẽ');
cmp_deeply (\@entries, \@entries_ref, 'sorted index entries');
my $sorted_index_entries_by_letter
- = Texinfo::Structuring::sort_indices_by_letter($parser, $parser,
+ = Texinfo::Structuring::sort_indices_by_letter($parser, $parser, $parser,
$index_entries, $index_names);
my @letter_entries_ref = (
diff --git a/tp/t/test_utils.pl b/tp/t/test_utils.pl
index 8923922..0fcbdd2 100644
--- a/tp/t/test_utils.pl
+++ b/tp/t/test_utils.pl
@@ -861,27 +861,28 @@ sub test($$)
my $parser_informations = $parser->global_informations();
my ($labels, $targets_list, $nodes_list) = $parser->labels_information();
my $refs = $parser->internal_references_information();
- Texinfo::Structuring::associate_internal_references($parser,
$parser_informations,
- $labels, $refs);
+ Texinfo::Structuring::associate_internal_references($parser, $parser,
+ $parser_informations, $labels, $refs);
my $floats = $parser->floats_information();
my $global_commands = $parser->global_commands_information();
- my $structure = Texinfo::Structuring::sectioning_structure($parser, $result);
+ my $structure = Texinfo::Structuring::sectioning_structure($parser, $parser,
+ $parser, $result);
if ($structure) {
- Texinfo::Structuring::warn_non_empty_parts($parser, $global_commands);
+ Texinfo::Structuring::warn_non_empty_parts($parser, $parser,
$global_commands);
}
Texinfo::Structuring::number_floats($floats);
Texinfo::Structuring::set_menus_node_directions($parser, $parser,
$parser_informations, $global_commands, $nodes_list,
$labels);
- my $top_node = Texinfo::Structuring::nodes_tree($parser,
$parser_informations,
- $nodes_list,
$labels);
+ my $top_node = Texinfo::Structuring::nodes_tree($parser, $parser, $parser,
+ $parser_informations, $nodes_list,
$labels);
if (defined($nodes_list)) {
Texinfo::Structuring::complete_node_tree_with_menus($parser, $parser,
$nodes_list,
$top_node);
- Texinfo::Structuring::check_nodes_are_referenced($parser,
+ Texinfo::Structuring::check_nodes_are_referenced($parser, $parser,
$nodes_list, $top_node,
$labels, $refs);
}
@@ -902,7 +903,7 @@ sub test($$)
my $sorted_index_entries;
if ($merged_index_entries) {
$sorted_index_entries
- = Texinfo::Structuring::sort_indices_by_letter($parser, $parser,
+ = Texinfo::Structuring::sort_indices_by_letter($parser, $parser, $parser,
$merged_index_entries, $index_names);
}
if ($simple_menus) {
@@ -1017,7 +1018,7 @@ sub test($$)
$elements = Texinfo::Structuring::split_by_section($result);
}
if ($split) {
- Texinfo::Structuring::elements_directions($parser, $parser, $elements);
+ Texinfo::Structuring::elements_directions($parser, $labels, $elements);
$directions_text = '';
foreach my $element (@$elements) {
$directions_text .= Texinfo::Structuring::_print_directions($element);
diff --git a/tp/tests/layout/res_parser/formatting/formatting.2
b/tp/tests/layout/res_parser/formatting/formatting.2
index 1439c2e..dfd1ac3 100644
--- a/tp/tests/layout/res_parser/formatting/formatting.2
+++ b/tp/tests/layout/res_parser/formatting/formatting.2
@@ -271,6 +271,7 @@ formatting.texi:68: @ref reference to nonexistent node
`node' (possibly involvin
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
+formatting.texi:103: warning: empty index key in @findex
formatting.texi:28: warning: @image file `f-ile' (for HTML) not found, using
`f-ile.jpg' (possibly involving @mymacro)
formatting.texi:28: warning: @image file `f--ile@.' (for HTML) not found,
using `f--ile@..file ext e--xt}' (possibly involving @mymacro)
formatting.texi:28: warning: @image file `f-ile' (for HTML) not found, using
`f-ile.jpg' (possibly involving @mymacro)
diff --git a/tp/tests/layout/res_parser/formatting_chm/formatting.2
b/tp/tests/layout/res_parser/formatting_chm/formatting.2
index dfd1ac3..063cc9c 100644
--- a/tp/tests/layout/res_parser/formatting_chm/formatting.2
+++ b/tp/tests/layout/res_parser/formatting_chm/formatting.2
@@ -272,6 +272,7 @@ formatting.texi:68: @ref reference to nonexistent node
`node' (possibly involvin
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
formatting.texi:103: warning: empty index key in @findex
+formatting.texi:103: warning: empty index key in @findex
formatting.texi:28: warning: @image file `f-ile' (for HTML) not found, using
`f-ile.jpg' (possibly involving @mymacro)
formatting.texi:28: warning: @image file `f--ile@.' (for HTML) not found,
using `f--ile@..file ext e--xt}' (possibly involving @mymacro)
formatting.texi:28: warning: @image file `f-ile' (for HTML) not found, using
`f-ile.jpg' (possibly involving @mymacro)
diff --git a/tp/tests/layout/res_parser/formatting_exotic/formatting.2
b/tp/tests/layout/res_parser/formatting_exotic/formatting.2
index ae893cd..c22022f 100644
--- a/tp/tests/layout/res_parser/formatting_exotic/formatting.2
+++ b/tp/tests/layout/res_parser/formatting_exotic/formatting.2
@@ -271,6 +271,7 @@ formatting.texi:68: @ref reference to nonexistent node
`node' (possibly involvin
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
+formatting.texi:103: warning: empty index key in @findex
formatting.texi:18: warning: @image file `f-ile' (for HTML) not found, using
`f-ile.jpg' (possibly involving @mymacro)
formatting.texi:18: warning: @image file `f--ile@.' (for HTML) not found,
using `f--ile@..file ext e--xt}' (possibly involving @mymacro)
formatting.texi:18: warning: @image file `f-ile' (for HTML) not found, using
`f-ile.jpg' (possibly involving @mymacro)
diff --git a/tp/tests/layout/res_parser/formatting_fr_icons/formatting.2
b/tp/tests/layout/res_parser/formatting_fr_icons/formatting.2
index 1439c2e..dfd1ac3 100644
--- a/tp/tests/layout/res_parser/formatting_fr_icons/formatting.2
+++ b/tp/tests/layout/res_parser/formatting_fr_icons/formatting.2
@@ -271,6 +271,7 @@ formatting.texi:68: @ref reference to nonexistent node
`node' (possibly involvin
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
+formatting.texi:103: warning: empty index key in @findex
formatting.texi:28: warning: @image file `f-ile' (for HTML) not found, using
`f-ile.jpg' (possibly involving @mymacro)
formatting.texi:28: warning: @image file `f--ile@.' (for HTML) not found,
using `f--ile@..file ext e--xt}' (possibly involving @mymacro)
formatting.texi:28: warning: @image file `f-ile' (for HTML) not found, using
`f-ile.jpg' (possibly involving @mymacro)
diff --git a/tp/tests/layout/res_parser/formatting_html/formatting.2
b/tp/tests/layout/res_parser/formatting_html/formatting.2
index 1439c2e..dfd1ac3 100644
--- a/tp/tests/layout/res_parser/formatting_html/formatting.2
+++ b/tp/tests/layout/res_parser/formatting_html/formatting.2
@@ -271,6 +271,7 @@ formatting.texi:68: @ref reference to nonexistent node
`node' (possibly involvin
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
+formatting.texi:103: warning: empty index key in @findex
formatting.texi:28: warning: @image file `f-ile' (for HTML) not found, using
`f-ile.jpg' (possibly involving @mymacro)
formatting.texi:28: warning: @image file `f--ile@.' (for HTML) not found,
using `f--ile@..file ext e--xt}' (possibly involving @mymacro)
formatting.texi:28: warning: @image file `f-ile' (for HTML) not found, using
`f-ile.jpg' (possibly involving @mymacro)
diff --git a/tp/tests/layout/res_parser/formatting_html32/formatting.2
b/tp/tests/layout/res_parser/formatting_html32/formatting.2
index 1439c2e..dfd1ac3 100644
--- a/tp/tests/layout/res_parser/formatting_html32/formatting.2
+++ b/tp/tests/layout/res_parser/formatting_html32/formatting.2
@@ -271,6 +271,7 @@ formatting.texi:68: @ref reference to nonexistent node
`node' (possibly involvin
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
+formatting.texi:103: warning: empty index key in @findex
formatting.texi:28: warning: @image file `f-ile' (for HTML) not found, using
`f-ile.jpg' (possibly involving @mymacro)
formatting.texi:28: warning: @image file `f--ile@.' (for HTML) not found,
using `f--ile@..file ext e--xt}' (possibly involving @mymacro)
formatting.texi:28: warning: @image file `f-ile' (for HTML) not found, using
`f-ile.jpg' (possibly involving @mymacro)
diff --git
a/tp/tests/layout/res_parser/formatting_html_no_texi2html/formatting.2
b/tp/tests/layout/res_parser/formatting_html_no_texi2html/formatting.2
index ae893cd..c22022f 100644
--- a/tp/tests/layout/res_parser/formatting_html_no_texi2html/formatting.2
+++ b/tp/tests/layout/res_parser/formatting_html_no_texi2html/formatting.2
@@ -271,6 +271,7 @@ formatting.texi:68: @ref reference to nonexistent node
`node' (possibly involvin
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
+formatting.texi:103: warning: empty index key in @findex
formatting.texi:18: warning: @image file `f-ile' (for HTML) not found, using
`f-ile.jpg' (possibly involving @mymacro)
formatting.texi:18: warning: @image file `f--ile@.' (for HTML) not found,
using `f--ile@..file ext e--xt}' (possibly involving @mymacro)
formatting.texi:18: warning: @image file `f-ile' (for HTML) not found, using
`f-ile.jpg' (possibly involving @mymacro)
diff --git a/tp/tests/layout/res_parser/formatting_html_nodes/formatting.2
b/tp/tests/layout/res_parser/formatting_html_nodes/formatting.2
index 1439c2e..dfd1ac3 100644
--- a/tp/tests/layout/res_parser/formatting_html_nodes/formatting.2
+++ b/tp/tests/layout/res_parser/formatting_html_nodes/formatting.2
@@ -271,6 +271,7 @@ formatting.texi:68: @ref reference to nonexistent node
`node' (possibly involvin
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
+formatting.texi:103: warning: empty index key in @findex
formatting.texi:28: warning: @image file `f-ile' (for HTML) not found, using
`f-ile.jpg' (possibly involving @mymacro)
formatting.texi:28: warning: @image file `f--ile@.' (for HTML) not found,
using `f--ile@..file ext e--xt}' (possibly involving @mymacro)
formatting.texi:28: warning: @image file `f-ile' (for HTML) not found, using
`f-ile.jpg' (possibly involving @mymacro)
diff --git a/tp/tests/layout/res_parser/formatting_info/formatting.2
b/tp/tests/layout/res_parser/formatting_info/formatting.2
index e26b96a..c2bba25 100644
--- a/tp/tests/layout/res_parser/formatting_info/formatting.2
+++ b/tp/tests/layout/res_parser/formatting_info/formatting.2
@@ -287,4 +287,5 @@ formatting.texi:68: warning: @ref node name should not
contain `,' (possibly inv
formatting.texi:68: warning: @inforef node name should not contain `,'
(possibly involving @mymacro)
formatting.texi:68: warning: @ref cross-reference name should not contain `:'
(possibly involving @mymacro)
formatting.texi:68: warning: @ref cross-reference name should not contain `:'
(possibly involving @mymacro)
+formatting.texi:103: warning: empty index key in @findex
formatting.texi:161: warning: @node name should not contain `,': s--ect,ion
diff --git a/tp/tests/layout/res_parser/formatting_mathjax/formatting.2
b/tp/tests/layout/res_parser/formatting_mathjax/formatting.2
index 1439c2e..dfd1ac3 100644
--- a/tp/tests/layout/res_parser/formatting_mathjax/formatting.2
+++ b/tp/tests/layout/res_parser/formatting_mathjax/formatting.2
@@ -271,6 +271,7 @@ formatting.texi:68: @ref reference to nonexistent node
`node' (possibly involvin
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
+formatting.texi:103: warning: empty index key in @findex
formatting.texi:28: warning: @image file `f-ile' (for HTML) not found, using
`f-ile.jpg' (possibly involving @mymacro)
formatting.texi:28: warning: @image file `f--ile@.' (for HTML) not found,
using `f--ile@..file ext e--xt}' (possibly involving @mymacro)
formatting.texi:28: warning: @image file `f-ile' (for HTML) not found, using
`f-ile.jpg' (possibly involving @mymacro)
diff --git a/tp/tests/layout/res_parser/formatting_nodes/formatting.2
b/tp/tests/layout/res_parser/formatting_nodes/formatting.2
index 1439c2e..dfd1ac3 100644
--- a/tp/tests/layout/res_parser/formatting_nodes/formatting.2
+++ b/tp/tests/layout/res_parser/formatting_nodes/formatting.2
@@ -271,6 +271,7 @@ formatting.texi:68: @ref reference to nonexistent node
`node' (possibly involvin
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
+formatting.texi:103: warning: empty index key in @findex
formatting.texi:28: warning: @image file `f-ile' (for HTML) not found, using
`f-ile.jpg' (possibly involving @mymacro)
formatting.texi:28: warning: @image file `f--ile@.' (for HTML) not found,
using `f--ile@..file ext e--xt}' (possibly involving @mymacro)
formatting.texi:28: warning: @image file `f-ile' (for HTML) not found, using
`f-ile.jpg' (possibly involving @mymacro)
diff --git a/tp/tests/layout/res_parser/formatting_plaintext/formatting.2
b/tp/tests/layout/res_parser/formatting_plaintext/formatting.2
index 2f9d6b3..5c5d455 100644
--- a/tp/tests/layout/res_parser/formatting_plaintext/formatting.2
+++ b/tp/tests/layout/res_parser/formatting_plaintext/formatting.2
@@ -283,3 +283,4 @@ formatting.texi:68: warning: @ref node name should not
contain `,' (possibly inv
formatting.texi:68: warning: @inforef node name should not contain `,'
(possibly involving @mymacro)
formatting.texi:68: warning: @ref cross-reference name should not contain `:'
(possibly involving @mymacro)
formatting.texi:68: warning: @ref cross-reference name should not contain `:'
(possibly involving @mymacro)
+formatting.texi:103: warning: empty index key in @findex
diff --git a/tp/tests/layout/res_parser/formatting_weird_quotes/formatting.2
b/tp/tests/layout/res_parser/formatting_weird_quotes/formatting.2
index 1439c2e..dfd1ac3 100644
--- a/tp/tests/layout/res_parser/formatting_weird_quotes/formatting.2
+++ b/tp/tests/layout/res_parser/formatting_weird_quotes/formatting.2
@@ -271,6 +271,7 @@ formatting.texi:68: @ref reference to nonexistent node
`node' (possibly involvin
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
+formatting.texi:103: warning: empty index key in @findex
formatting.texi:28: warning: @image file `f-ile' (for HTML) not found, using
`f-ile.jpg' (possibly involving @mymacro)
formatting.texi:28: warning: @image file `f--ile@.' (for HTML) not found,
using `f--ile@..file ext e--xt}' (possibly involving @mymacro)
formatting.texi:28: warning: @image file `f-ile' (for HTML) not found, using
`f-ile.jpg' (possibly involving @mymacro)
diff --git a/tp/tests/tex_html/res_parser/formatting_singular/formatting.2
b/tp/tests/tex_html/res_parser/formatting_singular/formatting.2
index cc75cf4..8058771 100644
--- a/tp/tests/tex_html/res_parser/formatting_singular/formatting.2
+++ b/tp/tests/tex_html/res_parser/formatting_singular/formatting.2
@@ -272,6 +272,7 @@ formatting.texi:68: @ref reference to nonexistent node
`node' (possibly involvin
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
formatting.texi:68: @ref reference to nonexistent node `node' (possibly
involving @mymacro)
texexpand
+formatting.texi:103: warning: empty index key in @findex
formatting.texi:18: warning: @image file `f-ile' (for HTML) not found, using
`f-ile.jpg' (possibly involving @mymacro)
formatting.texi:18: warning: @image file `f--ile@.' (for HTML) not found,
using `f--ile@..file ext e--xt}' (possibly involving @mymacro)
formatting.texi:18: warning: @image file `f-ile' (for HTML) not found, using
`f-ile.jpg' (possibly involving @mymacro)
diff --git a/tp/texi2any.pl b/tp/texi2any.pl
index aab794a..2a4a5cb 100755
--- a/tp/texi2any.pl
+++ b/tp/texi2any.pl
@@ -1303,22 +1303,23 @@ while(@input_files) {
my $refs = $parser->internal_references_information();
my $parser_informations = $parser->global_informations();
- Texinfo::Structuring::associate_internal_references($parser,
- $parser_informations, $labels, $refs);
+ Texinfo::Structuring::associate_internal_references($parser, $parser,
+ $parser_informations, $labels, $refs);
# every format needs the sectioning structure
- my $structure = Texinfo::Structuring::sectioning_structure($parser, $tree);
+ my $structure = Texinfo::Structuring::sectioning_structure($parser, $parser,
+ $parser, $tree);
my $global_commands = $parser->global_commands_information();
if ($structure
and !$formats_table{$format}->{'no_warn_non_empty_parts'}) {
- Texinfo::Structuring::warn_non_empty_parts($parser, $global_commands);
+ Texinfo::Structuring::warn_non_empty_parts($parser, $parser,
$global_commands);
}
if ($tree_transformations{'complete_tree_nodes_menus'}) {
- Texinfo::Transformations::complete_tree_nodes_menus($parser, $tree);
+ Texinfo::Transformations::complete_tree_nodes_menus($tree);
} elsif ($tree_transformations{'complete_tree_nodes_missing_menu'}) {
- Texinfo::Transformations::complete_tree_nodes_missing_menu($parser, $tree);
+ Texinfo::Transformations::complete_tree_nodes_missing_menu($tree);
}
if ($tree_transformations{'regenerate_master_menu'}) {
@@ -1341,14 +1342,14 @@ while(@input_files) {
Texinfo::Structuring::set_menus_node_directions($parser, $parser,
$parser_informations, $global_commands, $nodes_list, $labels);
}
- $top_node = Texinfo::Structuring::nodes_tree($parser, $parser_informations,
- $nodes_list,
$labels);
+ $top_node = Texinfo::Structuring::nodes_tree($parser, $parser, $parser,
+ $parser_informations, $nodes_list, $labels);
if (not defined($parser_options->{'FORMAT_MENU'})
or $parser_options->{'FORMAT_MENU'} eq 'menu') {
if (defined($nodes_list)) {
Texinfo::Structuring::complete_node_tree_with_menus($parser, $parser,
$nodes_list, $top_node);
- Texinfo::Structuring::check_nodes_are_referenced($parser,
+ Texinfo::Structuring::check_nodes_are_referenced($parser, $parser,
$nodes_list, $top_node,
$labels, $refs);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Report.pm (line_warn, line_error), Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm (_protect_hashchar), Pod-Simple-Texinfo/pod2texi.pl (_fix_texinfo_tree), tp/Texinfo/Common.pm (locate_include_file, expand_verbatiminclude) (_convert_text_options, _protect_hashchar_at_line_beginning) (protect_hashchar_at_line_beginning, set_nodes_list_labels) tp/Texinfo/Convert/DocBook.pm(_convert), tp/Texinfo/Convert/HTML.pm(noticed_line_warn) (_convert_verbatiminclude_command, _prepare_index_ent [...],
Patrice Dumas <=
- Prev by Date:
branch master updated: * tp/Texinfo/Report.pm (line_warn, line_error, document_warn) (document_error, file_line_warn, file_line_error), tp/Texinfo/Convert/HTML.pm (noticed_line_warn) (noticed_line_error): do not handle 'ignore_notice' in Texinfo::Report, this is internal converter information. Instead use the new function noticed_line_warn() in converter in in relevant places to intercept messages and ignore them if 'ignore_notice' is set.
- Next by Date:
branch master updated: Explain how to call perl to check the validity of one source file
- Previous by thread:
branch master updated: * tp/Texinfo/Report.pm (line_warn, line_error, document_warn) (document_error, file_line_warn, file_line_error), tp/Texinfo/Convert/HTML.pm (noticed_line_warn) (noticed_line_error): do not handle 'ignore_notice' in Texinfo::Report, this is internal converter information. Instead use the new function noticed_line_warn() in converter in in relevant places to intercept messages and ignore them if 'ignore_notice' is set.
- Next by thread:
branch master updated: Explain how to call perl to check the validity of one source file
- Index(es):