texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: * tp/Texinfo/XS/convert/ConvertXS.xs (init), tp/T


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/XS/convert/ConvertXS.xs (init), tp/Texinfo/XS/convert/converter.c (converter_setup): add directories as converter_setup arguments. Call setup_converter_paths_information and set_element_type_name_info in converter_setup, not in ConvertXS.xs init.
Date: Wed, 02 Oct 2024 12:15:56 -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 54cb33268a * tp/Texinfo/XS/convert/ConvertXS.xs (init), 
tp/Texinfo/XS/convert/converter.c (converter_setup): add directories as 
converter_setup arguments.  Call setup_converter_paths_information and 
set_element_type_name_info in converter_setup, not in ConvertXS.xs init.
54cb33268a is described below

commit 54cb33268a1a95dde6ef787d3017130d79bca3a1
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Aug 3 12:15:18 2024 +0200

    * tp/Texinfo/XS/convert/ConvertXS.xs (init),
    tp/Texinfo/XS/convert/converter.c (converter_setup): add directories
    as converter_setup arguments.  Call setup_converter_paths_information
    and set_element_type_name_info in converter_setup, not in ConvertXS.xs
    init.
---
 ChangeLog                          |  8 ++++++
 tp/Texinfo/XS/convert/ConvertXS.xs |  7 +++---
 tp/Texinfo/XS/convert/converter.c  | 51 ++++++++++++++++++++++----------------
 tp/Texinfo/XS/convert/converter.h  |  6 ++---
 4 files changed, 43 insertions(+), 29 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b60f95e55b..08379b01fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-08-03  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/XS/convert/ConvertXS.xs (init),
+       tp/Texinfo/XS/convert/converter.c (converter_setup): add directories
+       as converter_setup arguments.  Call setup_converter_paths_information
+       and set_element_type_name_info in converter_setup, not in ConvertXS.xs
+       init.
+
 2024-08-03  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Convert/Converter.pm (%common_converters_defaults),
diff --git a/tp/Texinfo/XS/convert/ConvertXS.xs 
b/tp/Texinfo/XS/convert/ConvertXS.xs
index 8173a03b4b..7c932cbfd7 100644
--- a/tp/Texinfo/XS/convert/ConvertXS.xs
+++ b/tp/Texinfo/XS/convert/ConvertXS.xs
@@ -82,10 +82,9 @@ init (int texinfo_uninstalled, SV *pkgdatadir_sv, SV 
*tp_builddir_sv, SV *top_sr
           }
         else
           pkgdatadir = SvPVbyte_nolen (pkgdatadir_sv);
-        setup_converter_paths_information (texinfo_uninstalled,
-                             pkgdatadir, tp_builddir, top_srcdir);
-        set_element_type_name_info ();
-        converter_setup ();
+
+        converter_setup (texinfo_uninstalled, pkgdatadir, tp_builddir,
+                         top_srcdir);
         RETVAL = 1;
     OUTPUT:
         RETVAL
diff --git a/tp/Texinfo/XS/convert/converter.c 
b/tp/Texinfo/XS/convert/converter.c
index c19c3718ad..bbf8c1a464 100644
--- a/tp/Texinfo/XS/convert/converter.c
+++ b/tp/Texinfo/XS/convert/converter.c
@@ -104,11 +104,37 @@ PATHS_INFORMATION conversion_paths_info;
 
 const char *xml_text_entity_no_arg_commands_formatting[BUILTIN_CMD_NUMBER];
 
+static void
+setup_converter_paths_information (int texinfo_uninstalled,
+                                   const char *tp_builddir,
+                             const char *pkgdatadir, const char *top_srcdir)
+{
+  memset (&conversion_paths_info, 0, sizeof (PATHS_INFORMATION));
+  conversion_paths_info.texinfo_uninstalled = texinfo_uninstalled;
+  if (texinfo_uninstalled)
+    {
+      if (tp_builddir)
+        conversion_paths_info.p.uninstalled.tp_builddir
+          = strdup (tp_builddir);
+      if (top_srcdir)
+        conversion_paths_info.p.uninstalled.top_srcdir
+          = strdup (top_srcdir);
+    }
+  else
+    conversion_paths_info.p.installed.pkgdatadir
+      = strdup (pkgdatadir);
+}
+
 /* called only once */
 void
-converter_setup (void)
+converter_setup (int texinfo_uninstalled, const char *tp_builddir,
+                 const char *pkgdatadir, const char *top_srcdir)
 {
   int i;
+
+  setup_converter_paths_information (texinfo_uninstalled,
+                             pkgdatadir, tp_builddir, top_srcdir);
+
   for (i = 0; i < BUILTIN_CMD_NUMBER; i++)
     {
       if (xml_text_entity_no_arg_commands[i])
@@ -121,6 +147,8 @@ converter_setup (void)
           = text_brace_no_arg_commands[i];
     }
 
+  set_element_type_name_info ();
+
   /* For translation of in document string. */
   if (0)
     {
@@ -129,26 +157,7 @@ converter_setup (void)
     }
 }
 
-void
-setup_converter_paths_information (int texinfo_uninstalled,
-                                   const char *tp_builddir,
-                             const char *pkgdatadir, const char *top_srcdir)
-{
-  memset (&conversion_paths_info, 0, sizeof (PATHS_INFORMATION));
-  conversion_paths_info.texinfo_uninstalled = texinfo_uninstalled;
-  if (texinfo_uninstalled)
-    {
-      if (tp_builddir)
-        conversion_paths_info.p.uninstalled.tp_builddir
-          = strdup (tp_builddir);
-      if (top_srcdir)
-        conversion_paths_info.p.uninstalled.top_srcdir
-          = strdup (top_srcdir);
-    }
-  else
-    conversion_paths_info.p.installed.pkgdatadir
-      = strdup (pkgdatadir);
-}
+
 
 CONVERTER *
 retrieve_converter (int converter_descriptor)
diff --git a/tp/Texinfo/XS/convert/converter.h 
b/tp/Texinfo/XS/convert/converter.h
index 76d1b65928..60783dd18e 100644
--- a/tp/Texinfo/XS/convert/converter.h
+++ b/tp/Texinfo/XS/convert/converter.h
@@ -105,10 +105,8 @@ extern COMMAND_ACCENT_ENTITY_INFO 
xml_accent_text_entities[];
 
 extern PATHS_INFORMATION conversion_paths_info;
 
-void converter_setup (void);
-void setup_converter_paths_information (int texinfo_uninstalled,
-                                        const char *tp_builddir,
-                             const char *pkgdatadir, const char *top_srcdir);
+void converter_setup (int texinfo_uninstalled, const char *tp_builddir,
+                      const char *pkgdatadir, const char *top_srcdir);
 
 CONVERTER *retrieve_converter (int converter_descriptor);
 size_t new_converter (void);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]