texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Patrice Dumas
Date: Tue, 12 Mar 2024 19:09:28 -0400 (EDT)

branch: master
commit 95dc6027421c35ef162d299bd71ee108dc6a3f84
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Tue Mar 12 19:37:11 2024 +0100

    * tp/Texinfo/XS/convert/ConvertXS.xs
    (html_prepare_units_directions_files),
    tp/Texinfo/XS/convert/convert_html.c
    (html_prepare_units_directions_files): get output units descriptors
    from converter.
---
 ChangeLog                            |  8 ++++++++
 tp/Texinfo/XS/convert/ConvertXS.xs   | 29 +++++++----------------------
 tp/Texinfo/XS/convert/convert_html.c | 14 ++++++--------
 tp/Texinfo/XS/convert/convert_html.h |  2 --
 4 files changed, 21 insertions(+), 32 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 42ff7147a0..ffd03f7d5f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,14 @@
        the example.  Move discussion of having at least one @item, index
        entries and comments, and blank lines after the example usage.
 
+2024-03-12  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/XS/convert/ConvertXS.xs
+       (html_prepare_units_directions_files),
+       tp/Texinfo/XS/convert/convert_html.c
+       (html_prepare_units_directions_files): get output units descriptors
+       from converter.
+
 2024-03-12  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/convert/ConvertXS.xs (html_prepare_conversion_units)
diff --git a/tp/Texinfo/XS/convert/ConvertXS.xs 
b/tp/Texinfo/XS/convert/ConvertXS.xs
index e414292b3e..f73e22278c 100644
--- a/tp/Texinfo/XS/convert/ConvertXS.xs
+++ b/tp/Texinfo/XS/convert/ConvertXS.xs
@@ -1914,36 +1914,21 @@ html_prepare_units_directions_files (SV *converter_in, 
SV *output_units_in, SV *
          const char *document_name = (char *)SvPVutf8_nolen($arg);
   PREINIT:
          CONVERTER *self = 0;
-         int output_units_descriptor = 0;
-         int special_units_descriptor = 0;
-         int associated_special_units_descriptor = 0;
          FILE_SOURCE_INFO_LIST *files_source_info = 0;
          SV *files_source_info_sv;
      CODE:
          self = get_sv_converter (converter_in,
                                   "html_prepare_units_directions_files");
-         if (SvOK (output_units_in))
-           output_units_descriptor
-             = get_sv_output_units_descriptor (output_units_in,
-                         "html_prepare_units_directions_files output units");
-         if (SvOK (special_units_in))
-           special_units_descriptor
-             = get_sv_output_units_descriptor (special_units_in,
-                        "html_prepare_units_directions_files special units");
-         if (SvOK (associated_special_units_in))
-           associated_special_units_descriptor
-             = get_sv_output_units_descriptor (associated_special_units_in,
-             "html_prepare_units_directions_files associated special units");
-
          files_source_info = html_prepare_units_directions_files (self,
-                    output_units_descriptor, special_units_descriptor,
-                    associated_special_units_descriptor, output_file,
-                    destination_directory, output_filename, document_name);
+                    output_file, destination_directory, output_filename,
+                                 document_name);
 
-         rebuild_output_units_list (output_units_in, output_units_descriptor);
-         rebuild_output_units_list (special_units_in, 
special_units_descriptor);
+         rebuild_output_units_list (output_units_in,
+                           self->output_units_descriptors[OUDT_units]);
+         rebuild_output_units_list (special_units_in,
+                      self->output_units_descriptors[OUDT_special_units]);
          rebuild_output_units_list (associated_special_units_in,
-                                    associated_special_units_descriptor);
+             self->output_units_descriptors[OUDT_associated_special_units]);
 
          files_source_info_sv
            = build_html_files_source_info (files_source_info);
diff --git a/tp/Texinfo/XS/convert/convert_html.c 
b/tp/Texinfo/XS/convert/convert_html.c
index a8f8cb6414..51d8558608 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -5753,19 +5753,17 @@ prepare_special_units_directions (CONVERTER *self,
 /* Return structure to be freed by the caller */
 FILE_SOURCE_INFO_LIST *
 html_prepare_units_directions_files (CONVERTER *self,
-          int output_units_descriptor,
-          int special_units_descriptor, int 
associated_special_units_descriptor,
           const char *output_file, const char *destination_directory,
           const char *output_filename, const char *document_name)
 {
   int i;
   FILE_SOURCE_INFO_LIST *files_source_info = 0;
-  OUTPUT_UNIT_LIST *output_units
-    = retrieve_output_units (output_units_descriptor);
-  OUTPUT_UNIT_LIST *special_units
-    = retrieve_output_units (special_units_descriptor);
-  OUTPUT_UNIT_LIST *associated_special_units
-    = retrieve_output_units (associated_special_units_descriptor);
+  OUTPUT_UNIT_LIST *output_units = retrieve_output_units
+    (self->output_units_descriptors[OUDT_units]);
+  OUTPUT_UNIT_LIST *special_units = retrieve_output_units
+    (self->output_units_descriptors[OUDT_special_units]);
+  OUTPUT_UNIT_LIST *associated_special_units = retrieve_output_units
+    (self->output_units_descriptors[OUDT_associated_special_units]);
 
   html_prepare_output_units_global_targets (self);
 
diff --git a/tp/Texinfo/XS/convert/convert_html.h 
b/tp/Texinfo/XS/convert/convert_html.h
index 50f982f7c8..b60c242b70 100644
--- a/tp/Texinfo/XS/convert/convert_html.h
+++ b/tp/Texinfo/XS/convert/convert_html.h
@@ -196,8 +196,6 @@ void html_prepare_conversion_units_targets (CONVERTER *self,
                                      const char *document_name);
 
 FILE_SOURCE_INFO_LIST * html_prepare_units_directions_files (CONVERTER *self,
-          int output_units_descriptor,
-          int special_units_descriptor, int 
associated_special_units_descriptor,
           const char *output_file, const char *destination_directory,
           const char *output_filename, const char *document_name);
 



reply via email to

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