[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrice Dumas |
Date: |
Fri, 15 Nov 2024 14:49:49 -0500 (EST) |
branch: master
commit 90acb050aee895e1c159ca22d70cabf1aba07c1c
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Fri Nov 15 20:49:41 2024 +0100
* tp/Texinfo/XS/Makefile.am (StructuringTransfoXS_la_CPPFLAGS)
(IndicesXS_la_CPPFLAGS, ConvertXS_la_CPPFLAGS): remove
$(GNULIB_CPPFLAGS) as there is no Gnulib code used in XS interfaces
code.
* tp/Texinfo/XS/convert/ConvertXS.xs,
tp/Texinfo/XS/convert/get_html_perl_info.c,
tp/Texinfo/XS/main/DocumentXS.xs, tp/Texinfo/XS/main/IndicesXS.xs,
tp/Texinfo/XS/parsetexi/Parsetexi.xs,
tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs: do not
include config.h as no Gnulib code is used and there is no need for
autoconf defines.
* tp/Texinfo/XS/main/manipulate_indices.h: add missing options_data.h
include.
Minor improvements in included headers.
---
ChangeLog | 28 ++++++++++++++++++----
tp/Texinfo/XS/Makefile.am | 8 +++----
tp/Texinfo/XS/convert/ConvertXS.xs | 6 -----
tp/Texinfo/XS/convert/build_html_perl_state.c | 2 +-
tp/Texinfo/XS/convert/call_html_perl_function.c | 2 +-
tp/Texinfo/XS/convert/get_html_perl_info.c | 15 ++++++------
tp/Texinfo/XS/main/DocumentXS.xs | 6 -----
tp/Texinfo/XS/main/IndicesXS.xs | 7 +-----
tp/Texinfo/XS/main/build_perl_info.c | 3 +--
tp/Texinfo/XS/main/builtin_commands.c | 1 -
tp/Texinfo/XS/main/debug.c | 3 ++-
tp/Texinfo/XS/main/manipulate_indices.h | 1 +
tp/Texinfo/XS/parsetexi/Parsetexi.xs | 8 ++++---
.../XS/structuring_transfo/StructuringTransfoXS.xs | 18 +++++---------
14 files changed, 53 insertions(+), 55 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e49ea3dde1..d385e26e1e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,27 @@
+2024-11-15 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/Makefile.am (StructuringTransfoXS_la_CPPFLAGS)
+ (IndicesXS_la_CPPFLAGS, ConvertXS_la_CPPFLAGS): remove
+ $(GNULIB_CPPFLAGS) as there is no Gnulib code used in XS interfaces
+ code.
+
+ * tp/Texinfo/XS/convert/ConvertXS.xs,
+ tp/Texinfo/XS/convert/get_html_perl_info.c,
+ tp/Texinfo/XS/main/DocumentXS.xs, tp/Texinfo/XS/main/IndicesXS.xs,
+ tp/Texinfo/XS/parsetexi/Parsetexi.xs,
+ tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs: do not
+ include config.h as no Gnulib code is used and there is no need for
+ autoconf defines.
+
+ * tp/Texinfo/XS/main/manipulate_indices.h: add missing options_data.h
+ include.
+
+ Minor improvements in included headers.
+
+2024-11-15 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/main/api_to_perl.c (get_refcount): call dTHX.
+
2024-11-15 Gavin Smith <gavinsmith0123@gmail.com>
Escape non-ASCII file names in many_input_files tests
@@ -16,10 +40,6 @@
* tp/tests/many_input_files/Makefile.am: update rules to
copy output directories in their escaped form.
-2024-11-15 Patrice Dumas <pertusus@free.fr>
-
- * tp/Texinfo/XS/main/api_to_perl.c (get_refcount): call dTHX.
-
2024-11-15 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/Makefile.am (libxsutils_la_CPPFLAGS)
diff --git a/tp/Texinfo/XS/Makefile.am b/tp/Texinfo/XS/Makefile.am
index 154bca5853..8c3042a968 100644
--- a/tp/Texinfo/XS/Makefile.am
+++ b/tp/Texinfo/XS/Makefile.am
@@ -256,7 +256,7 @@ libtexinfo_la_SOURCES = \
noinst_LTLIBRARIES += libxs_in_libtexinfo.la
# api_to_perl.c and call_perl_function.c functions are called in other
-# parts of the code and need to be linked against Perl
+# parts of the libtexinfo code and need to be linked against Perl
libxs_in_libtexinfo_la_SOURCES = \
main/api_to_perl.c \
main/api_to_perl.h \
@@ -523,7 +523,7 @@ CLEANFILES += \
EXTRA_DIST += structuring_transfo/StructuringTransfoXS.xs
# locate include files under out-of-source builds.
-StructuringTransfoXS_la_CPPFLAGS = -I$(srcdir)/main
-I$(srcdir)/structuring_transfo $(AM_CPPFLAGS) $(GNULIB_CPPFLAGS)
$(XSLIBS_CPPFLAGS)
+StructuringTransfoXS_la_CPPFLAGS = -I$(srcdir)/main
-I$(srcdir)/structuring_transfo $(AM_CPPFLAGS) $(XSLIBS_CPPFLAGS)
StructuringTransfoXS_la_CFLAGS = $(XSLIBS_CFLAGS)
StructuringTransfoXS_la_LIBADD = libtexinfoxs.la libtexinfo.la
$(top_builddir)/gnulib/lib/libgnu.la $(platform_PERL_LIBADD)
StructuringTransfoXS_la_LDFLAGS = $(XSLIBS_LDFLAGS) $(LTLIBICONV)
$(LTLIBUNISTRING)
@@ -543,7 +543,7 @@ CLEANFILES += \
EXTRA_DIST += main/IndicesXS.xs
# locate include files under out-of-source builds.
-IndicesXS_la_CPPFLAGS = -I$(srcdir)/main -I$(srcdir)/convert $(AM_CPPFLAGS)
$(GNULIB_CPPFLAGS) $(XSLIBS_CPPFLAGS)
+IndicesXS_la_CPPFLAGS = -I$(srcdir)/main -I$(srcdir)/convert $(AM_CPPFLAGS)
$(XSLIBS_CPPFLAGS)
IndicesXS_la_CFLAGS = $(XSLIBS_CFLAGS)
IndicesXS_la_LIBADD = libtexinfoxs.la libtexinfo-convert.la libtexinfo.la
$(top_builddir)/gnulib/lib/libgnu.la $(platform_PERL_LIBADD)
IndicesXS_la_LDFLAGS = $(XSLIBS_LDFLAGS) $(LTLIBICONV) $(LTLIBUNISTRING)
@@ -565,7 +565,7 @@ ConvertXS_la_SOURCES = \
EXTRA_DIST += convert/ConvertXS.xs
# To locate include files under out-of-source builds.
-ConvertXS_la_CPPFLAGS = -I$(srcdir)/main -I$(srcdir)/structuring_transfo
-I$(srcdir)/convert $(AM_CPPFLAGS) $(GNULIB_CPPFLAGS) $(XSLIBS_CPPFLAGS)
+ConvertXS_la_CPPFLAGS = -I$(srcdir)/main -I$(srcdir)/structuring_transfo
-I$(srcdir)/convert $(AM_CPPFLAGS) $(XSLIBS_CPPFLAGS)
ConvertXS_la_CFLAGS = $(XSLIBS_CFLAGS)
ConvertXS_la_LIBADD = libtexinfoxs.la libtexinfo-convert.la libtexinfo.la
$(top_builddir)/gnulib/lib/libgnu.la $(platform_PERL_LIBADD)
ConvertXS_la_LDFLAGS = $(XSLIBS_LDFLAGS) $(LTLIBICONV) $(LTLIBUNISTRING)
diff --git a/tp/Texinfo/XS/convert/ConvertXS.xs
b/tp/Texinfo/XS/convert/ConvertXS.xs
index 8a8ebe7375..85703acd8c 100644
--- a/tp/Texinfo/XS/convert/ConvertXS.xs
+++ b/tp/Texinfo/XS/convert/ConvertXS.xs
@@ -13,8 +13,6 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include <config.h>
-
#include <stdlib.h>
/* Avoid namespace conflicts. */
@@ -25,10 +23,6 @@
#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
#include "perl.h"
-#if defined _WIN32 && !defined __CYGWIN__
-/* See comment in Parsetexi.xs for why we #undef free. */
-# undef free
-#endif
#include "XSUB.h"
#include "ppport.h"
diff --git a/tp/Texinfo/XS/convert/build_html_perl_state.c
b/tp/Texinfo/XS/convert/build_html_perl_state.c
index 3c9b1e275b..93a4b7a957 100644
--- a/tp/Texinfo/XS/convert/build_html_perl_state.c
+++ b/tp/Texinfo/XS/convert/build_html_perl_state.c
@@ -53,7 +53,7 @@
html_argument_formatting_type_names translated_special_unit_info */
#include "html_converter_types.h"
/* for special_unit_info_type_names html_global_unit_direction_names
- html_setup_global_units_direction_names */
+ htmlxref_split_type_names html_setup_global_units_direction_names */
#include "html_prepare_converter.h"
#include "build_html_perl_state.h"
diff --git a/tp/Texinfo/XS/convert/call_html_perl_function.c
b/tp/Texinfo/XS/convert/call_html_perl_function.c
index 0fe193c5cb..7c610f030e 100644
--- a/tp/Texinfo/XS/convert/call_html_perl_function.c
+++ b/tp/Texinfo/XS/convert/call_html_perl_function.c
@@ -46,7 +46,7 @@
*/
#include "utils.h"
#include "debug.h"
-/* for newSVpv_utf8 build_texinfo_tree */
+/* for newSVpv_utf8 build_tree_to_build */
#include "build_perl_info.h"
/* build_html_formatting_state build_html_command_formatted_args */
#include "build_html_perl_state.h"
diff --git a/tp/Texinfo/XS/convert/get_html_perl_info.c
b/tp/Texinfo/XS/convert/get_html_perl_info.c
index 99b792c4b1..6a1b0de7f5 100644
--- a/tp/Texinfo/XS/convert/get_html_perl_info.c
+++ b/tp/Texinfo/XS/convert/get_html_perl_info.c
@@ -13,7 +13,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include <config.h>
+#include <string.h>
+#include <stdio.h>
/* Avoid namespace conflicts. */
#define context perl_context
@@ -21,10 +22,6 @@
#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
#include "perl.h"
-#if defined _WIN32 && !defined __CYGWIN__
-/* See comment in Parsetexi.xs for why we #undef free. */
- #undef free
-#endif
#include "XSUB.h"
#include "ppport.h"
@@ -41,12 +38,15 @@
html_conversion_context_type_names html_stage_handler_stage_type_names
*/
#include "html_converter_types.h"
-/* also for non_perl_* */
+/* clear_strings_list html_button_direction_names index_number_index_by_name
+ ... */
#include "utils.h"
#include "builtin_commands.h"
+/* could be used for debugging
#include "debug.h"
#include "convert_to_texinfo.h"
-#include "output_unit.h"
+ */
+/* default_special_unit_varieties */
#include "converter.h"
#include "html_conversion_state.h"
/* new_directions_strings_type initialize_js_categories_list
@@ -59,7 +59,6 @@
*/
#include "format_html.h"
#include "get_perl_info.h"
-#include "get_converter_perl_info.h"
/* for newSVpv_utf8 */
#include "build_perl_info.h"
#include "get_converter_perl_info.h"
diff --git a/tp/Texinfo/XS/main/DocumentXS.xs b/tp/Texinfo/XS/main/DocumentXS.xs
index 71a7773167..8846cc2486 100644
--- a/tp/Texinfo/XS/main/DocumentXS.xs
+++ b/tp/Texinfo/XS/main/DocumentXS.xs
@@ -13,8 +13,6 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include <config.h>
-
#include <stddef.h>
/* Avoid namespace conflicts. */
@@ -32,10 +30,6 @@
#include "document_types.h"
/* non_perl_* */
#include "xs_utils.h"
-#include "extra.h"
-/* needed?
-#include "utils.h"
- */
#include "customization_options.h"
/* for clear_error_message_list */
#include "errors.h"
diff --git a/tp/Texinfo/XS/main/IndicesXS.xs b/tp/Texinfo/XS/main/IndicesXS.xs
index 26a295890a..1f1a19a8c0 100644
--- a/tp/Texinfo/XS/main/IndicesXS.xs
+++ b/tp/Texinfo/XS/main/IndicesXS.xs
@@ -13,8 +13,6 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include <config.h>
-
/* Avoid namespace conflicts. */
#define context perl_context
@@ -29,10 +27,7 @@
#include "document_types.h"
/* non_perl_* */
#include "xs_utils.h"
-/*
-#include "utils.h"
-#include "tree.h"
- */
+/* register_document_convert_index_text_options */
#include "document.h"
#include "manipulate_indices.h"
#include "get_perl_info.h"
diff --git a/tp/Texinfo/XS/main/build_perl_info.c
b/tp/Texinfo/XS/main/build_perl_info.c
index 24b108246e..40a3049f3c 100644
--- a/tp/Texinfo/XS/main/build_perl_info.c
+++ b/tp/Texinfo/XS/main/build_perl_info.c
@@ -61,9 +61,8 @@
#include "converter_types.h"
/* non_perl_* */
#include "xs_utils.h"
-/* for new_element */
+/* for ai_key_names elt_info_names */
#include "tree.h"
-#include "extra.h"
/* for element_command_name */
#include "builtin_commands.h"
/* for xasprintf get_encoding_conversion output_conversions fatal
diff --git a/tp/Texinfo/XS/main/builtin_commands.c
b/tp/Texinfo/XS/main/builtin_commands.c
index ed3b344601..d212af2b55 100644
--- a/tp/Texinfo/XS/main/builtin_commands.c
+++ b/tp/Texinfo/XS/main/builtin_commands.c
@@ -23,7 +23,6 @@
#include "element_types.h"
#include "tree_types.h"
#include "types_data.h"
-#include "extra.h"
#include "debug.h"
#include "builtin_commands.h"
diff --git a/tp/Texinfo/XS/main/debug.c b/tp/Texinfo/XS/main/debug.c
index dddf9c93fa..790ced3d14 100644
--- a/tp/Texinfo/XS/main/debug.c
+++ b/tp/Texinfo/XS/main/debug.c
@@ -24,8 +24,9 @@
#include "element_types.h"
#include "tree_types.h"
#include "types_data.h"
-#include "extra.h"
+/* debug_element_command_name */
#include "builtin_commands.h"
+/* for ai_key_names */
#include "tree.h"
/* for directions_length and direction_names */
#include "utils.h"
diff --git a/tp/Texinfo/XS/main/manipulate_indices.h
b/tp/Texinfo/XS/main/manipulate_indices.h
index 94cbd6781a..5c40d69354 100644
--- a/tp/Texinfo/XS/main/manipulate_indices.h
+++ b/tp/Texinfo/XS/main/manipulate_indices.h
@@ -4,6 +4,7 @@
#include "tree_types.h"
#include "document_types.h"
+#include "options_data.h"
/* for TEXT_OPTIONS
#include "convert_to_text.h"
*/
diff --git a/tp/Texinfo/XS/parsetexi/Parsetexi.xs
b/tp/Texinfo/XS/parsetexi/Parsetexi.xs
index 632787a647..5ed0b6bd0d 100644
--- a/tp/Texinfo/XS/parsetexi/Parsetexi.xs
+++ b/tp/Texinfo/XS/parsetexi/Parsetexi.xs
@@ -13,9 +13,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include <config.h>
-
+/* for abort */
#include <stdlib.h>
+#include <stdio.h>
#include <stddef.h>
/* Avoid namespace conflicts. */
@@ -24,15 +24,17 @@
#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
#include "perl.h"
-#if defined _WIN32 && !defined __CYGWIN__
/* For Perl on MS-Windows, it is possible for the header XSUB.h to redefine
'free' (to something like "PerlMem_free"). 'free' was already defined
by gnulib, in config.h (due to the 'free-posix' module which was
brought in as a dependency of other gnulib modules). We need the Perl
redefinition, not the gnulib version. The #undef line here prevents
a warning about the symbol being redefined. */
+/* Gnulib is not included anymore, keep as documentation
+#if defined _WIN32 && !defined __CYGWIN__
#undef free
#endif
+ */
#include "XSUB.h"
#include "ppport.h"
diff --git a/tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs
b/tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs
index 6cddda6425..02694be0bc 100644
--- a/tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs
+++ b/tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs
@@ -13,18 +13,12 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include <config.h>
-
/* Avoid namespace conflicts. */
#define context perl_context
#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
#include "perl.h"
-#if defined _WIN32 && !defined __CYGWIN__
-/* See comment in Parsetexi.xs for why we #undef free. */
-# undef free
-#endif
#include "XSUB.h"
#undef context
@@ -133,7 +127,7 @@ move_index_entries_after_items_in_tree (SV *tree_in)
document->modified_information |= F_DOCM_tree;
}
-# The perl function returns a tree, as the
+# The Perl function returns a tree, as the
# argument could be modified. Here, tree_in is always a container
# that is not modified, so there is no need to return a tree.
void
@@ -146,7 +140,7 @@ reference_to_arg_in_tree (SV *tree_in, SV *document_in=0)
= get_sv_tree_document (tree_in, "reference_to_arg_in_tree");
/* in general will be the same as tree_document, in case it is not,
perhaps if the tree_in is a subtree of document_in tree,
- so here the document is found independently if document_in is set.
+ the document is found independently if document_in is set.
NOTE if the document is different from tree_document, setting
the F_DOCM_tree in reference_to_arg_internal
may not lead to a rebuild of the modified tree in Perl. Getting
@@ -298,7 +292,7 @@ insert_nodes_for_sectioning_commands (SV *document_in)
destroy_list (added_nodes);
}
-# The perl function returns a list of nodes, but it is only used
+# The Perl function returns a list of nodes, but it is only used
# to register in the document. It is better to reserve the return
# value for a return status, if it becomes needed.
void
@@ -313,7 +307,7 @@ nodes_tree (SV *document_in)
register_document_nodes_list (document, nodes_list);
}
-# For the next functions, the perl function returns a tree, as the
+# For the next functions, the Perl function returns a tree, as the
# argument could be modified. Here, tree_in is always a container
# that is not modified, so there is no need to return a tree.
void
@@ -440,10 +434,10 @@ rebuild_output_units (SV *document_in, SV
*output_units_in)
CODE:
document = get_sv_document_document (document_in,
"rebuild_output_units");
- /* This may be called in Texinfo::Convert::Converter::output on
- converters that may or may not have XS information, so no warning */
if (document)
{
+ /* This may be called in converters that may not have
+ XS information set on output units, so no warning */
output_units_descriptor
= get_sv_output_units_descriptor (output_units_in, 0, 0);
if (output_units_descriptor)