[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrice Dumas |
Date: |
Mon, 27 May 2024 11:40:48 -0400 (EDT) |
branch: master
commit 69b479e7b50bf7f7928e8eee8bd36562b63de0d0
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Mon May 27 11:17:22 2024 +0200
Changes in comments and in spacing.
---
tp/TODO | 2 +-
tp/Texinfo/Config.pm | 8 ++++----
tp/Texinfo/Convert/ConvertXS.pm | 4 ++--
tp/Texinfo/Convert/DocBook.pm | 26 +++++++++++++-------------
tp/Texinfo/Convert/IXIN.pm | 8 ++++----
tp/Texinfo/Convert/Info.pm | 10 +++++-----
tp/Texinfo/Convert/LaTeX.pm | 6 +++---
tp/Texinfo/Convert/NodeNameNormalization.pm | 8 ++++----
tp/Texinfo/Convert/Paragraph.pm | 22 +++++++++++-----------
tp/Texinfo/Convert/ParagraphNonXS.pm | 20 ++++++++++----------
tp/Texinfo/Convert/PlainTexinfo.pm | 8 ++++----
tp/Texinfo/Convert/TexinfoSXML.pm | 8 ++++----
tp/Texinfo/Convert/TexinfoXML.pm | 8 ++++----
tp/Texinfo/Convert/Text.pm | 2 +-
tp/Texinfo/Convert/TextContent.pm | 10 +++++-----
tp/Texinfo/Convert/Unicode.pm | 12 ++++++------
tp/Texinfo/DocumentXS.pm | 2 +-
tp/Texinfo/IndicesXS.pm | 4 ++--
tp/Texinfo/ManipulateTree.pm | 4 ++--
tp/Texinfo/MiscXS.pm | 4 ++--
tp/Texinfo/ModulePath.pm.in | 8 ++++----
tp/Texinfo/Parser.pm | 4 ++--
tp/Texinfo/ParserNonXS.pm | 15 ++++++++++-----
tp/Texinfo/StructTransfXS.pm | 4 ++--
tp/Texinfo/Tests.pm | 18 +++++++++---------
tp/Texinfo/Translations.pm | 2 +-
tp/Texinfo/XS/TestXS.pm | 4 ++--
tp/Texinfo/XS/parsetexi/multitable.c | 9 ++++++---
28 files changed, 124 insertions(+), 116 deletions(-)
diff --git a/tp/TODO b/tp/TODO
index 1ca490449c..b94f7d4f12 100644
--- a/tp/TODO
+++ b/tp/TODO
@@ -749,7 +749,7 @@ pkgutil -y -i CSWhelp2man CSWpm-data-compare CSWpm-test-deep
The system perl may not be suitable to build XS modules, and the
system gawk may be too old, openCSW may be needed. For example:
-./configure PERL=/opt/csw/bin/perl GAWK=/opt/csw/bin/gawk
+./configure PERL=/opt/csw/bin/perl GAWK=/opt/csw/bin/gawk CFLAGS='-g'
Misc notes
diff --git a/tp/Texinfo/Config.pm b/tp/Texinfo/Config.pm
index 3b3f43b1e5..4778ef5fdc 100644
--- a/tp/Texinfo/Config.pm
+++ b/tp/Texinfo/Config.pm
@@ -1,20 +1,20 @@
# Config.pm: namespace used for user configuration (init files) evaluation
#
# Copyright 2010-2024 Free Software Foundation, Inc.
-#
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License,
# or (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
+#
# Original author: Patrice Dumas <pertusus@free.fr>
#
# functions that should not be called by user init files codes, but
diff --git a/tp/Texinfo/Convert/ConvertXS.pm b/tp/Texinfo/Convert/ConvertXS.pm
index f6d5d3b16b..8185dfc9e0 100644
--- a/tp/Texinfo/Convert/ConvertXS.pm
+++ b/tp/Texinfo/Convert/ConvertXS.pm
@@ -4,12 +4,12 @@
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License,
# or (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/tp/Texinfo/Convert/DocBook.pm b/tp/Texinfo/Convert/DocBook.pm
index ff37bf8b8c..5c060ce3b3 100644
--- a/tp/Texinfo/Convert/DocBook.pm
+++ b/tp/Texinfo/Convert/DocBook.pm
@@ -1,20 +1,20 @@
# DocBook.pm: output tree as DocBook.
#
# Copyright 2011-2024 Free Software Foundation, Inc.
-#
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License,
# or (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
+#
# Original author: Patrice Dumas <pertusus@free.fr>
package Texinfo::Convert::DocBook;
@@ -107,7 +107,7 @@ my %upper_case_style_commands = (
'sc' => 1,
);
-my @inline_elements = ('emphasis', 'abbrev', 'acronym', 'link',
+my @inline_elements = ('emphasis', 'abbrev', 'acronym', 'link',
'inlinemediaobject', 'firstterm', 'footnote', 'replaceable',
'subscript', 'superscript', 'wordasword');
my %inline_elements;
@@ -1062,7 +1062,7 @@ sub _convert($$;$)
if ($element->{'cmdname'} eq 'w') {
push @{$self->{'document_context'}->[-1]->{'no_break'}}, 1;
}
- push @{$self->{'document_context'}->[-1]->{'monospace'}},
+ push @{$self->{'document_context'}->[-1]->{'monospace'}},
$in_monospace_not_normal
if (defined($in_monospace_not_normal));
@@ -1344,7 +1344,7 @@ sub _convert($$;$)
}
if (!defined($image_text) and !$image_file_found) {
$self->converter_line_warn(sprintf(
- __("\@image file `%s' not found, using `%s'"),
+ __("\@image file `%s' not found, using `%s'"),
$basefile, "$basefile.jpg"), $element->{'source_info'});
}
@@ -1419,7 +1419,7 @@ sub _convert($$;$)
$url_text = '';
}
my $replacement;
- if (scalar(@{$element->{'args'}}) >= 2
+ if (scalar(@{$element->{'args'}}) >= 2
and defined($element->{'args'}->[1])
and $element->{'args'}->[1]->{'contents'}
and @{$element->{'args'}->[1]->{'contents'}}) {
@@ -1553,10 +1553,10 @@ sub _convert($$;$)
my $appended = '';
my @format_elements;
if (exists($docbook_preformatted_formats{$element->{'cmdname'}})) {
- push @{$self->{'document_context'}->[-1]->{'preformatted_stack'}},
+ push @{$self->{'document_context'}->[-1]->{'preformatted_stack'}},
$docbook_preformatted_formats{$element->{'cmdname'}};
} elsif ($element->{'cmdname'} eq 'enumerate') {
- push @format_elements, 'orderedlist';
+ push @format_elements, 'orderedlist';
my $numeration;
if ($element->{'extra'}
and $element->{'extra'}->{'enumerate_specification'}) {
@@ -1694,7 +1694,7 @@ sub _convert($$;$)
if ($element->{'type'}) {
#warn " have type $element->{'type'}\n";
if (exists($docbook_preformatted_formats{$element->{'type'}})) {
- push @{$self->{'document_context'}->[-1]->{'preformatted_stack'}},
+ push @{$self->{'document_context'}->[-1]->{'preformatted_stack'}},
$docbook_preformatted_formats{$element->{'type'}};
}
if (defined($type_elements{$element->{'type'}})) {
@@ -1796,7 +1796,7 @@ sub _convert($$;$)
foreach my $format_element (@close_format_elements) {
$result .= "</$format_element>";
}
-
+
if ($element->{'cmdname'}
and exists($Texinfo::Commands::block_commands{$element->{'cmdname'}})) {
# a pending_prepend still there may happen if a quotation is empty.
@@ -1867,7 +1867,7 @@ sub _convert($$;$)
return $result;
}
-# figure: mandatory title->use it with shortcaption?. Has a caption.
+# figure: mandatory title->use it with shortcaption?. Has a caption.
1;
diff --git a/tp/Texinfo/Convert/IXIN.pm b/tp/Texinfo/Convert/IXIN.pm
index 3f7654708f..53fc016ac2 100644
--- a/tp/Texinfo/Convert/IXIN.pm
+++ b/tp/Texinfo/Convert/IXIN.pm
@@ -1,20 +1,20 @@
# IXIN.pm: output IXIN format.
#
# Copyright 2013-2024 Free Software Foundation, Inc.
-#
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License,
# or (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
+#
# Original author: Patrice Dumas <pertusus@free.fr>
#
#
diff --git a/tp/Texinfo/Convert/Info.pm b/tp/Texinfo/Convert/Info.pm
index a116c385ac..2f3dfdbe80 100644
--- a/tp/Texinfo/Convert/Info.pm
+++ b/tp/Texinfo/Convert/Info.pm
@@ -1,20 +1,20 @@
# Info.pm: output tree as Info.
#
# Copyright 2010-2024 Free Software Foundation, Inc.
-#
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License,
# or (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
+#
# Original author: Patrice Dumas <pertusus@free.fr>
#
# Names of methods from Texinfo::Convert::Plaintext overriden begin with
format_.
@@ -313,7 +313,7 @@ sub output($$)
and $label->{'root'}->{'extra'}->{'is_target'});
my $label_element = Texinfo::Common::get_label_element($label->{'root'});
my $prefix;
-
+
if ($label->{'root'}->{'cmdname'} eq 'node') {
$prefix = 'Node';
} else {
diff --git a/tp/Texinfo/Convert/LaTeX.pm b/tp/Texinfo/Convert/LaTeX.pm
index 0008ebd2e2..dd1399b35b 100644
--- a/tp/Texinfo/Convert/LaTeX.pm
+++ b/tp/Texinfo/Convert/LaTeX.pm
@@ -1,17 +1,17 @@
# LaTeX.pm: output tree as LaTeX
#
# Copyright 2010-2024 Free Software Foundation, Inc.
-#
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License,
# or (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
diff --git a/tp/Texinfo/Convert/NodeNameNormalization.pm
b/tp/Texinfo/Convert/NodeNameNormalization.pm
index f509c7adf2..517db84ffe 100644
--- a/tp/Texinfo/Convert/NodeNameNormalization.pm
+++ b/tp/Texinfo/Convert/NodeNameNormalization.pm
@@ -1,20 +1,20 @@
# NodeNameNormalization.pm: output tree as normalized node name.
#
# Copyright 2010-2024 Free Software Foundation, Inc.
-#
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License,
# or (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
+#
# Original author: Patrice Dumas <pertusus@free.fr>
# the rules for conversion are decribed in the Texinfo manual, for
diff --git a/tp/Texinfo/Convert/Paragraph.pm b/tp/Texinfo/Convert/Paragraph.pm
index e4f0e167b9..a8cccdd950 100644
--- a/tp/Texinfo/Convert/Paragraph.pm
+++ b/tp/Texinfo/Convert/Paragraph.pm
@@ -4,12 +4,12 @@
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License,
# or (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
@@ -29,15 +29,15 @@ use Texinfo::XSLoader;
# this module with Texinfo::XSLoader::init.
sub import {
my @EXPORT = qw(
- add_text
- add_next
- set_space_protection
- remove_end_sentence
- allow_end_sentence
- add_end_sentence
- end_line
- add_pending_word
- get_pending
+ add_text
+ add_next
+ set_space_protection
+ remove_end_sentence
+ allow_end_sentence
+ add_end_sentence
+ end_line
+ add_pending_word
+ get_pending
);
my ($callpkg, $filename, $line) = caller(0);
diff --git a/tp/Texinfo/Convert/ParagraphNonXS.pm
b/tp/Texinfo/Convert/ParagraphNonXS.pm
index a588d58153..c5e807127c 100644
--- a/tp/Texinfo/Convert/ParagraphNonXS.pm
+++ b/tp/Texinfo/Convert/ParagraphNonXS.pm
@@ -1,20 +1,20 @@
# ParagraphNonXS.pm: handle paragraph text.
#
# Copyright 2010-2024 Free Software Foundation, Inc.
-#
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License,
# or (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
+#
# Original author: Patrice Dumas <pertusus@free.fr>
# this module has nothing Texinfo specific. In contrast with existing
@@ -40,7 +40,7 @@ sub new($;$)
{
my $class = shift;
my $conf = shift;
- my $self = {'max' => 72, 'indent_length' => 0, 'counter' => 0,
+ my $self = {'max' => 72, 'indent_length' => 0, 'counter' => 0,
'word_counter' => 0, 'space' => '', 'frenchspacing' => 0,
'lines_counter' => 0, 'end_line_count' => 0,
'unfilled' => 0, 'last_letter' => '' };
@@ -97,7 +97,7 @@ sub _end_line($)
$paragraph->{'space'} = '';
if (defined($paragraph->{'indent_length_next'})) {
$paragraph->{'indent_length'} = $paragraph->{'indent_length_next'};
- delete $paragraph->{'indent_length_next'};
+ delete $paragraph->{'indent_length_next'};
}
$paragraph->{'lines_counter'}++;
$paragraph->{'end_line_count'}++;
@@ -175,7 +175,7 @@ sub end($)
# probably not really useful, but cleaner
$paragraph->{'last_letter'} = '';
if (!$paragraph->{'no_final_newline'} and $paragraph->{'counter'} != 0) {
- $result .= "\n";
+ $result .= "\n";
$paragraph->{'lines_counter'}++;
$paragraph->{'end_line_count'}++;
}
@@ -348,8 +348,8 @@ sub add_text($$)
# The $paragraph->{'counter'} != 0 is here to avoid having an
# additional line output when the text is longer than the max.
- if ($paragraph->{'counter'} != 0 and
- $paragraph->{'counter'} + $paragraph->{'word_counter'} +
+ if ($paragraph->{'counter'} != 0 and
+ $paragraph->{'counter'} + $paragraph->{'word_counter'} +
length($paragraph->{'space'}) > $paragraph->{'max'}) {
$result .= _cut_line($paragraph);
}
@@ -370,7 +370,7 @@ sub add_text($$)
}
}
}
- if ($paragraph->{'counter'} + length($paragraph->{'space'})
+ if ($paragraph->{'counter'} + length($paragraph->{'space'})
> $paragraph->{'max'}) {
$result .= _cut_line($paragraph);
}
diff --git a/tp/Texinfo/Convert/PlainTexinfo.pm
b/tp/Texinfo/Convert/PlainTexinfo.pm
index d4148b1dc7..e3cb897c0d 100644
--- a/tp/Texinfo/Convert/PlainTexinfo.pm
+++ b/tp/Texinfo/Convert/PlainTexinfo.pm
@@ -1,20 +1,20 @@
# PlainTexinfo.pm: convert the Texinfo tree as Texinfo
#
# Copyright 2012-2024 Free Software Foundation, Inc.
-#
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License,
# or (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
+#
# Original author: Patrice Dumas <pertusus@free.fr>
# This calls Texinfo::Convert::Texinfo::convert_to_texinfo while
diff --git a/tp/Texinfo/Convert/TexinfoSXML.pm
b/tp/Texinfo/Convert/TexinfoSXML.pm
index 4d388b2f80..172ffb378e 100644
--- a/tp/Texinfo/Convert/TexinfoSXML.pm
+++ b/tp/Texinfo/Convert/TexinfoSXML.pm
@@ -1,20 +1,20 @@
# TexinfoSXML.pm: output tree as Texinfo SXML.
#
# Copyright 2013-2024 Free Software Foundation, Inc.
-#
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License,
# or (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
+#
# Original author: Patrice Dumas <pertusus@free.fr>
#
# A simple subclass of the Texinfo::Convert::TexinfoMarkup abstract
diff --git a/tp/Texinfo/Convert/TexinfoXML.pm b/tp/Texinfo/Convert/TexinfoXML.pm
index 371d77bb00..51a7ddcc41 100644
--- a/tp/Texinfo/Convert/TexinfoXML.pm
+++ b/tp/Texinfo/Convert/TexinfoXML.pm
@@ -1,20 +1,20 @@
# TexinfoXML.pm: output tree as Texinfo XML.
#
# Copyright 2011-2024 Free Software Foundation, Inc.
-#
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License,
# or (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
+#
# Original author: Patrice Dumas <pertusus@free.fr>
#
# A simple subclass of the Texinfo::Convert::TexinfoMarkup abstract
diff --git a/tp/Texinfo/Convert/Text.pm b/tp/Texinfo/Convert/Text.pm
index 71ca74bbc8..a85e735c05 100644
--- a/tp/Texinfo/Convert/Text.pm
+++ b/tp/Texinfo/Convert/Text.pm
@@ -680,7 +680,7 @@ sub _convert($$)
= Texinfo::Convert::Utils::definition_category_tree(
$options->{'converter'}, $element);
if (defined($parsed_definition_category)) {
- my $converted_element = {'contents' =>
+ my $converted_element = {'contents' =>
[$parsed_definition_category, {'text' => ': '}]};
my $contents = $converted_element->{'contents'};
if ($type_element) {
diff --git a/tp/Texinfo/Convert/TextContent.pm
b/tp/Texinfo/Convert/TextContent.pm
index 497b6a40a5..7ec189b9bc 100644
--- a/tp/Texinfo/Convert/TextContent.pm
+++ b/tp/Texinfo/Convert/TextContent.pm
@@ -1,20 +1,20 @@
# TextContent.pm: return the text contents stripped of commands
#
# Copyright 2012-2024 Free Software Foundation, Inc.
-#
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License,
# or (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
+#
# Original author: Patrice Dumas <pertusus@free.fr>
package Texinfo::Convert::TextContent;
@@ -72,7 +72,7 @@ sub converter_defaults($$)
sub converter_initialize($)
{
my $self = shift;
-
+
%{$self->{'formatted_line_commands'}}
= %Texinfo::Commands::formatted_line_commands;
if ($self->get_conf('TEXTCONTENT_COMMENT')) {
diff --git a/tp/Texinfo/Convert/Unicode.pm b/tp/Texinfo/Convert/Unicode.pm
index a92efac13d..fe0bfb0fc9 100644
--- a/tp/Texinfo/Convert/Unicode.pm
+++ b/tp/Texinfo/Convert/Unicode.pm
@@ -1,20 +1,20 @@
# Unicode.pm: handle conversion to unicode.
#
# Copyright 2010-2024 Free Software Foundation, Inc.
-#
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License,
# or (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
+#
# Original author: Patrice Dumas <pertusus@free.fr>
package Texinfo::Convert::Unicode;
@@ -1599,7 +1599,7 @@ sub unicode_point_decoded_in_encoding($$) {
sub brace_no_arg_command($$) {
my $command = shift;
my $encoding = shift;
-
+
if ($unicode_character_brace_no_arg_commands{$command}
and unicode_point_decoded_in_encoding($encoding,
$unicode_map{$command})) {
return $unicode_character_brace_no_arg_commands{$command};
@@ -1739,7 +1739,7 @@ Texinfo::Convert::Unicode - Representation as Unicode
characters
my ($contents_element, $stack)
= Texinfo::Convert::Utils::find_innermost_accent_contents($accent);
-
+
my $formatted_accents = encoded_accents ($converter,
convert_to_text($contents_element), $stack, $encoding,
\&Texinfo::Text::ascii_accent_fallback);
diff --git a/tp/Texinfo/DocumentXS.pm b/tp/Texinfo/DocumentXS.pm
index 283fc008da..16ef4c907f 100644
--- a/tp/Texinfo/DocumentXS.pm
+++ b/tp/Texinfo/DocumentXS.pm
@@ -1,7 +1,7 @@
# DocumentXS.pm: load parsed Texinfo tree document XS functions.
#
# Copyright 2010-2024 Free Software Foundation, Inc.
-#
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License,
diff --git a/tp/Texinfo/IndicesXS.pm b/tp/Texinfo/IndicesXS.pm
index 12f21b8149..3880cc5191 100644
--- a/tp/Texinfo/IndicesXS.pm
+++ b/tp/Texinfo/IndicesXS.pm
@@ -5,12 +5,12 @@
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License,
# or (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/tp/Texinfo/ManipulateTree.pm b/tp/Texinfo/ManipulateTree.pm
index 084dd98257..a82d54b827 100644
--- a/tp/Texinfo/ManipulateTree.pm
+++ b/tp/Texinfo/ManipulateTree.pm
@@ -38,7 +38,7 @@ use strict;
# To check if there is no erroneous autovivification
#no autovivification qw(fetch delete exists store strict);
-
+
# debugging
use Carp qw(cluck confess);
@@ -916,7 +916,7 @@ The Texinfo tree and Texinfo tree elements used in argument
of some functions
are documented in L<Texinfo::Parser/TEXINFO TREE>. When customization
information is needed, an object that defines C<get_conf> is
expected, normally a L<Texinfo::Document/Getting customization
-options values registered in document> object.
+options values registered in document> object.
=over
diff --git a/tp/Texinfo/MiscXS.pm b/tp/Texinfo/MiscXS.pm
index ed97b385ca..0f20b68fd2 100644
--- a/tp/Texinfo/MiscXS.pm
+++ b/tp/Texinfo/MiscXS.pm
@@ -4,12 +4,12 @@
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License,
# or (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/tp/Texinfo/ModulePath.pm.in b/tp/Texinfo/ModulePath.pm.in
index 9386631aba..2488fee437 100644
--- a/tp/Texinfo/ModulePath.pm.in
+++ b/tp/Texinfo/ModulePath.pm.in
@@ -18,7 +18,7 @@ $VERSION = '7.1dev';
use File::Basename;
use File::Spec;
-# Used as a flag to say whether to look for data files in uninstalled
+# Used as a flag to say whether to look for data files in uninstalled
# locations.
our $texinfo_uninstalled = 0;
@@ -59,7 +59,7 @@ sub init {
if ($ENV{'top_srcdir'}) {
$top_srcdir = $ENV{'top_srcdir'};
} elsif (defined $named_args{'updirs'}) {
- my ($real_command_name, $command_directory, $command_suffix)
+ my ($real_command_name, $command_directory, $command_suffix)
= fileparse($0, '.pl');
my $updir = File::Spec->updir();
@@ -70,7 +70,7 @@ sub init {
$top_srcdir = File::Spec->catdir($top_srcdir, $updir);
}
}
-
+
if (defined($top_srcdir)) {
# For Texinfo::Parser and the rest.
unshift @INC, File::Spec->catdir($top_srcdir, 'tp');
@@ -119,7 +119,7 @@ sub init {
}
-sub import {
+sub import {
my $class = shift;
goto &init;
}
diff --git a/tp/Texinfo/Parser.pm b/tp/Texinfo/Parser.pm
index 347a09fe13..1d46b65b0f 100644
--- a/tp/Texinfo/Parser.pm
+++ b/tp/Texinfo/Parser.pm
@@ -4,12 +4,12 @@
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License,
# or (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index 6180c48838..2506816ea0 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -1712,7 +1712,6 @@ sub _check_no_text($)
# $CURRENT is the @table element.
# $NEXT_COMMAND is the command that follows the entry, usually @item.
# If it is @itemx, gather an 'inter_item' element instead.
-#
sub _gather_previous_item($$;$$)
{
my ($self, $current, $next_command, $source_info) = @_;
@@ -1735,7 +1734,8 @@ sub _gather_previous_item($$;$$)
$type = 'table_definition';
}
- # Working from the end, find the beginning of the definition content
+ # Starting from the end, collect everything that is not an item or
+ # itemx and put it into the $type.
my $contents_count = scalar(@{$current->{'contents'}});
my $begin;
for (my $i = $contents_count - 1; $i >= 0; $i--) {
@@ -1748,14 +1748,14 @@ sub _gather_previous_item($$;$$)
}
$begin = 0 if !defined($begin);
- # Find the end of the definition content
+ # Find the end
my $end;
if (defined($next_command)) {
# Don't absorb trailing index entries as they are included with a
# following @item.
for (my $i = $contents_count - 1; $i >= $begin; $i--) {
if (!$current->{'contents'}->[$i]->{'type'}
- or $current->{'contents'}->[$i]->{'type'} ne 'index_entry_command') {
+ or $current->{'contents'}->[$i]->{'type'} ne 'index_entry_command') {
$end = $i + 1;
last;
}
@@ -1763,7 +1763,8 @@ sub _gather_previous_item($$;$$)
}
$end = $contents_count if !defined($end);
- # Extract the table definition
+ # Move everything from 'begin' to 'end' to be children of
+ # table_after_terms.
my $table_after_terms;
if ($end - $begin > 0) {
my $new_contents = [];
@@ -1798,6 +1799,8 @@ sub _gather_previous_item($$;$$)
# reached the previous table entry
or $current->{'contents'}->[$i]->{'type'} eq 'table_entry')) {
if ($current->{'contents'}->[$i]->{'type'} eq 'before_item') {
+ # register the before_item if we reached it in order to
+ # reparent some before_item content to the first item
$before_item = $current->{'contents'}->[$i];
}
$term_begin = $i + 1;
@@ -1844,6 +1847,8 @@ sub _gather_previous_item($$;$$)
# Gathering 'inter_item' between @item and @itemx
if ($table_after_terms) {
my $after_paragraph = _check_no_text($table_after_terms);
+ # Text between @item and @itemx is only allowed in a few cases:
+ # comments, empty lines, or index entries.
if ($after_paragraph) {
$self->_line_error(__("\@itemx must follow \@item"), $source_info);
}
diff --git a/tp/Texinfo/StructTransfXS.pm b/tp/Texinfo/StructTransfXS.pm
index ae81433e90..96bca74171 100644
--- a/tp/Texinfo/StructTransfXS.pm
+++ b/tp/Texinfo/StructTransfXS.pm
@@ -5,12 +5,12 @@
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License,
# or (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/tp/Texinfo/Tests.pm b/tp/Texinfo/Tests.pm
index 3da3583eff..a3bef8579f 100644
--- a/tp/Texinfo/Tests.pm
+++ b/tp/Texinfo/Tests.pm
@@ -1,20 +1,20 @@
# common code for code test in t/*
#
# Copyright 2010-2024 Free Software Foundation, Inc.
-#
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License,
# or (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
+#
# Original author: Patrice Dumas <pertusus@free.fr>
package Texinfo::Tests;
@@ -104,25 +104,25 @@ sub compare_dirs_files($$;$)
#}
sub unlink_dir_files($;$)
-{
+{
my $dir = shift;
my $ignore_files = shift;
my %ignored_files_hash;
foreach my $ignored_file (@$ignore_files) {
$ignored_files_hash{$ignored_file} = 1;
- }
+ }
if (opendir(DIR, $dir)) {
my @files = readdir (DIR);
foreach my $file (@files) {
next if (! -f "$dir/$file"
or $ignored_files_hash{$file});
unlink "$dir/$file" or warn "Could not unlink $dir/$file: $!\n";
- }
+ }
closedir (DIR);
} else {
warn "readdir $dir: $!";
- }
-}
+ }
+}
my $default_result_base = 't/results/';
diff --git a/tp/Texinfo/Translations.pm b/tp/Texinfo/Translations.pm
index fd34d45b8f..3120b0bd78 100644
--- a/tp/Texinfo/Translations.pm
+++ b/tp/Texinfo/Translations.pm
@@ -1,7 +1,7 @@
# Translations.pm: translate strings in output.
#
# Copyright 2010-2024 Free Software Foundation, Inc.
-#
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License,
diff --git a/tp/Texinfo/XS/TestXS.pm b/tp/Texinfo/XS/TestXS.pm
index 38e00f84f5..0860c90921 100644
--- a/tp/Texinfo/XS/TestXS.pm
+++ b/tp/Texinfo/XS/TestXS.pm
@@ -4,12 +4,12 @@
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License,
# or (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/tp/Texinfo/XS/parsetexi/multitable.c
b/tp/Texinfo/XS/parsetexi/multitable.c
index 1bb28ab8e6..bda5d2cb7d 100644
--- a/tp/Texinfo/XS/parsetexi/multitable.c
+++ b/tp/Texinfo/XS/parsetexi/multitable.c
@@ -87,6 +87,7 @@ gather_previous_item (ELEMENT *current, enum command_id
next_command)
if (begin == -1)
begin = 0;
+ /* Find the 'end' */
if (next_command)
{
/* Don't absorb trailing index entries as they are included with a
@@ -106,7 +107,7 @@ gather_previous_item (ELEMENT *current, enum command_id
next_command)
table_after_terms = new_element (type);
- /* Move everything from 'begin' onwards to be children of
+ /* Move everything from 'begin' to 'end' to be children of
table_after_terms. */
insert_slice_into_contents (table_after_terms, 0, current, begin, end);
for (i = 0; i < table_after_terms->contents.number; i++)
@@ -121,7 +122,9 @@ gather_previous_item (ELEMENT *current, enum command_id
next_command)
add_to_element_contents (table_entry, table_term);
/* We previously collected elements into a ET_table_definition. Now
- do the same for ET_table_term. */
+ do the same for ET_table_term, starting from the beginning of the
+ table_definition going back to the previous table entry or beginning
+ of the table. */
for (i = begin - 1; i >= 0; i--)
{
e = contents_child_by_index (current, i);
@@ -129,7 +132,7 @@ gather_previous_item (ELEMENT *current, enum command_id
next_command)
|| e->type == ET_table_entry)
{
/* register the before_item if we reached it in order to
- to reparent some before_item content to the first item */
+ reparent some before_item content to the first item */
if (e->type == ET_before_item)
before_item = e;
term_begin = i + 1;