[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/OutputUnits.pm (units_directions), t
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/OutputUnits.pm (units_directions), tp/Texinfo/XS/main/output_unit.c (units_directions): replace the customization options argument by print_debug. Update callers and set the print_debug argument from customization options. |
Date: |
Mon, 15 Apr 2024 04:40:03 -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 9192e0d9a8 * tp/Texinfo/OutputUnits.pm (units_directions),
tp/Texinfo/XS/main/output_unit.c (units_directions): replace the customization
options argument by print_debug. Update callers and set the print_debug
argument from customization options.
9192e0d9a8 is described below
commit 9192e0d9a8c229bfe45df112032aafb3555c3ace
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Mon Apr 15 10:39:51 2024 +0200
* tp/Texinfo/OutputUnits.pm (units_directions),
tp/Texinfo/XS/main/output_unit.c (units_directions): replace the
customization options argument by print_debug. Update callers and set
the print_debug argument from customization options.
---
ChangeLog | 7 +++++++
tp/Texinfo/Convert/HTML.pm | 4 ++--
tp/Texinfo/OutputUnits.pm | 17 +++++++++--------
tp/Texinfo/XS/convert/convert_html.c | 4 ++--
tp/Texinfo/XS/main/output_unit.c | 7 +++----
tp/Texinfo/XS/main/output_unit.h | 5 ++---
tp/t/test_utils.pl | 5 ++---
7 files changed, 27 insertions(+), 22 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 1277a3c6b9..2a7192ccf3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-04-15 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/OutputUnits.pm (units_directions),
+ tp/Texinfo/XS/main/output_unit.c (units_directions): replace the
+ customization options argument by print_debug. Update callers and set
+ the print_debug argument from customization options.
+
2024-04-14 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/main/document_types.h, tp/Texinfo/XS/main/document.c
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 2e7028db03..90cb2e053e 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -10073,8 +10073,8 @@ sub _prepare_units_directions_files($$$$$$$$)
}
# do output units directions.
- Texinfo::OutputUnits::units_directions($self, $identifiers_target,
- $output_units);
+ Texinfo::OutputUnits::units_directions($identifiers_target, $output_units,
+ $self->get_conf('DEBUG'));
_prepare_special_units_directions($self, $special_units);
diff --git a/tp/Texinfo/OutputUnits.pm b/tp/Texinfo/OutputUnits.pm
index 3d588a3d78..9d441a4579 100644
--- a/tp/Texinfo/OutputUnits.pm
+++ b/tp/Texinfo/OutputUnits.pm
@@ -345,15 +345,15 @@ sub _output_unit_node($)
}
}
-# Do output units directions (like in texi2html) and store them
-# in 'directions'.
+# Do output units directions and store them in 'directions'.
# The directions are only created if pointing to other output units.
-sub units_directions($$$)
+sub units_directions($$;$)
{
- my $customization_information = shift;
my $identifier_target = shift;
my $output_units = shift;
- return if (!$output_units or !@$output_units);
+ my $print_debug = shift;
+
+ return if (!$output_units or !scalar(@$output_units));
my $node_top = $identifier_target->{'Top'};
foreach my $output_unit (@$output_units) {
@@ -540,7 +540,7 @@ sub units_directions($$$)
$output_unit->{'directions'} = $directions;
}
}
- if ($customization_information->get_conf('DEBUG')) {
+ if ($print_debug) {
foreach my $output_unit (@$output_units) {
print STDERR 'Directions'
# uncomment to show the perl object name
@@ -703,7 +703,8 @@ Texinfo::OutputUnits - setup and manage Texinfo document
output units
$output_units = split_by_section($document);
}
split_pages($output_units, $split);
- units_directions($document, $identifier_target, $output_units);
+ units_directions($identifier_target, $output_units,
+ $document->get_conf('DEBUG'));
units_file_directions($output_units);
=head1 NOTES
@@ -849,7 +850,7 @@ You can call the following methods to set output units
directions:
=over
-=item units_directions($customization_information, $identifier_target,
$output_units)
+=item units_directions($identifier_target, $output_units, $print_debug)
X<C<units_directions>>
Directions are set up for the output units in the array reference
diff --git a/tp/Texinfo/XS/convert/convert_html.c
b/tp/Texinfo/XS/convert/convert_html.c
index dab8a44f9b..92195ac5df 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -5818,8 +5818,8 @@ html_prepare_units_directions_files (CONVERTER *self,
setup_output_simple_page (self, output_filename);
- units_directions (self->conf, self->document->identifiers_target,
- output_units);
+ units_directions (self->document->identifiers_target, output_units,
+ self->conf->DEBUG.integer);
prepare_special_units_directions (self, special_units);
diff --git a/tp/Texinfo/XS/main/output_unit.c b/tp/Texinfo/XS/main/output_unit.c
index 2d119937de..2018169bab 100644
--- a/tp/Texinfo/XS/main/output_unit.c
+++ b/tp/Texinfo/XS/main/output_unit.c
@@ -510,9 +510,8 @@ static enum relative_unit_direction_type
section_unit_directions[]
The directions are only created if pointing to other output units.
*/
void
-units_directions (OPTIONS *customization_information,
- LABEL_LIST *identifiers_target,
- OUTPUT_UNIT_LIST *output_units)
+units_directions (LABEL_LIST *identifiers_target,
+ OUTPUT_UNIT_LIST *output_units, int print_debug)
{
ELEMENT *node_top;
int i;
@@ -762,7 +761,7 @@ units_directions (OPTIONS *customization_information,
}
}
}
- if (customization_information->DEBUG.integer > 0)
+ if (print_debug > 0)
{
int i;
for (i = 0; i < output_units->number; i++)
diff --git a/tp/Texinfo/XS/main/output_unit.h b/tp/Texinfo/XS/main/output_unit.h
index 355adda6b6..cc5743bb92 100644
--- a/tp/Texinfo/XS/main/output_unit.h
+++ b/tp/Texinfo/XS/main/output_unit.h
@@ -22,9 +22,8 @@ void add_to_output_unit_list (OUTPUT_UNIT_LIST *list,
char *output_unit_texi (const OUTPUT_UNIT *output_unit);
-void units_directions (OPTIONS *customization_information,
- LABEL_LIST *identifiers_target,
- OUTPUT_UNIT_LIST *output_units);
+void units_directions (LABEL_LIST *identifiers_target,
+ OUTPUT_UNIT_LIST *output_units, int print_debug);
void units_file_directions (OUTPUT_UNIT_LIST *output_units);
#endif
diff --git a/tp/t/test_utils.pl b/tp/t/test_utils.pl
index 3d7c3295e4..a09b4dc5fa 100644
--- a/tp/t/test_utils.pl
+++ b/tp/t/test_utils.pl
@@ -1406,9 +1406,8 @@ sub test($$)
}
if ($test_split) {
my $identifier_target = $document->labels_information();
- Texinfo::OutputUnits::units_directions($document,
- $identifier_target,
- $output_units);
+ Texinfo::OutputUnits::units_directions($identifier_target,
+ $output_units, $self->{'DEBUG'});
$directions_text = '';
foreach my $output_unit (@$output_units) {
$directions_text .=
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/OutputUnits.pm (units_directions), tp/Texinfo/XS/main/output_unit.c (units_directions): replace the customization options argument by print_debug. Update callers and set the print_debug argument from customization options.,
Patrice Dumas <=