[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrice Dumas |
Date: |
Tue, 24 Oct 2023 18:42:12 -0400 (EDT) |
branch: master
commit 47ec711771a9501cf43f6b202d748d066079150a
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Wed Oct 25 00:34:50 2023 +0200
* tp/Texinfo/Structuring.pm (import, split_pages): remove overriding
of split_pages, as it is not needed in HTML. It is still in
structuring_transfo/StructuringTransfo.xs and could be easily
overriden again if there is an actual case in which overriding the
function is interesting.
* tp/Texinfo/Common.pm, tp/Texinfo/Structuring.pm,
tp/Texinfo/Transformations.pm: remove now unused $XS_only.
---
ChangeLog | 12 +++++++++++-
tp/Texinfo/Common.pm | 8 --------
tp/Texinfo/Structuring.pm | 43 ++++++++++---------------------------------
tp/Texinfo/Transformations.pm | 8 --------
4 files changed, 21 insertions(+), 50 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a197bdda06..f6a9129458 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2023-10-24 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/Structuring.pm (import, split_pages): remove overriding
+ of split_pages, as it is not needed in HTML. It is still in
+ structuring_transfo/StructuringTransfo.xs and could be easily
+ overriden again if there is an actual case in which overriding the
+ function is interesting.
+
+ * tp/Texinfo/Common.pm, tp/Texinfo/Structuring.pm,
+ tp/Texinfo/Transformations.pm: remove now unused $XS_only.
+
2023-10-24 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/parsetexi/labels.c (internal_xref_list)
@@ -14,7 +25,6 @@
associated menu entry nodes from internal references, add the new
master menu to global commands information.
-
* tp/Texinfo/Common.pm (import)
(relate_index_entries_to_table_items_in_tree)
(move_index_entries_after_items_in_tree, protect_colon_in_tree)
diff --git a/tp/Texinfo/Common.pm b/tp/Texinfo/Common.pm
index aa5b8b5ece..12f3d0277c 100644
--- a/tp/Texinfo/Common.pm
+++ b/tp/Texinfo/Common.pm
@@ -114,14 +114,6 @@ sub import {
goto &Exporter::import;
}
-# set to 1 if perl code is to be run only if XS is not set
-my $XS_only = 0;
-$XS_only = 1 if (defined($ENV{'TEXINFO_XS'})
- and $ENV{'TEXINFO_XS'} eq 'require'
- and defined($ENV{'TEXINFO_XS_CONVERT'})
- and $ENV{'TEXINFO_XS_CONVERT'});
-
-
# i18n
# For the messages translations.
my $messages_textdomain = 'texinfo';
diff --git a/tp/Texinfo/Structuring.pm b/tp/Texinfo/Structuring.pm
index 4126c5c132..28feae11e3 100644
--- a/tp/Texinfo/Structuring.pm
+++ b/tp/Texinfo/Structuring.pm
@@ -149,10 +149,13 @@ sub import {
"Texinfo::Structuring::rebuild_output_units",
"Texinfo::StructTransf::rebuild_output_units"
);
- Texinfo::XSLoader::override(
- "Texinfo::Structuring::_XS_split_pages",
- "Texinfo::StructTransf::split_pages"
- );
+ # Not useful for HTML as a function, as the calling function is
+ # already overriden
+ # Could be readded when other converters than HTML are done in C
+ #Texinfo::XSLoader::override(
+ # "Texinfo::Structuring::split_pages",
+ # "Texinfo::StructTransf::split_pages"
+ #);
}
$module_loaded = 1;
}
@@ -160,14 +163,6 @@ sub import {
goto &Exporter::import;
}
-# set to 1 if perl code is to be run only if XS is not set
-my $XS_only = 0;
-$XS_only = 1 if (defined($ENV{'TEXINFO_XS'})
- and $ENV{'TEXINFO_XS'} eq 'require'
- and defined($ENV{'TEXINFO_XS_CONVERT'})
- and $ENV{'TEXINFO_XS_CONVERT'});
-
-
my %types_to_enter;
foreach my $type_to_enter ('brace_command_arg', 'line_arg',
'paragraph') {
@@ -1689,7 +1684,6 @@ sub split_by_node($;$)
# If the XS code returns something, we use it as it will have the
references
# needed for XS code called later on.
- # FIXME use XS $output_units only if $XS_only?
if (defined($output_units)) {
return $output_units;
}
@@ -1763,7 +1757,6 @@ sub split_by_section($;$)
if (!$no_XS) {
$output_units = _XS_split_by_section($root);
- # FIXME use XS $output_units only if $XS_only?
if (defined($output_units)) {
return $output_units;
}
@@ -1845,36 +1838,20 @@ sub rebuild_output_units($)
return $output_units;
}
-sub _XS_split_pages($$)
-{
- my $output_units = shift;
- my $split = shift;
-
- return 1;
-}
-
# Associate top-level units with pages according to the splitting
# specification. Set 'first_in_page' on each unit to the unit
# that is the first in the output page.
-# The $NO_XS argument signals that splitting should not be done
-# separately in XS, but is already done in other XS code (for HTML).
-sub split_pages($$;$)
+sub split_pages($$)
{
my $output_units = shift;
my $split = shift;
- my $no_XS = shift;
return undef if (!$output_units or !@$output_units);
- # normalize and set to string for XS
+ # TODO remove after all the cases of setting a number have been fixed
+ # normalize and set to string
$split = "" if (!$split);
- if (not $no_XS
- and not _XS_split_pages($output_units, $split)
- and $XS_only) {
- return undef;
- }
-
my $split_level;
if (!$split) {
foreach my $output_unit (@$output_units) {
diff --git a/tp/Texinfo/Transformations.pm b/tp/Texinfo/Transformations.pm
index d7b9de4b93..d147741ce9 100644
--- a/tp/Texinfo/Transformations.pm
+++ b/tp/Texinfo/Transformations.pm
@@ -95,14 +95,6 @@ sub import {
goto &Exporter::import;
}
-# set to 1 if perl code is to be run only if XS is not set
-my $XS_only = 0;
-$XS_only = 1 if (defined($ENV{'TEXINFO_XS'})
- and $ENV{'TEXINFO_XS'} eq 'require'
- and defined($ENV{'TEXINFO_XS_CONVERT'})
- and $ENV{'TEXINFO_XS_CONVERT'});
-
-
# Add raise/lowersections to be back at the normal level from
# the $SECTION level. The raise/lowersections are added at the
# end of $PARENT.