texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Patrice Dumas
Date: Wed, 13 Mar 2024 19:23:24 -0400 (EDT)

branch: master
commit 10c68d0c70f314553471c6c8525d1a843cab9922
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Mar 14 00:23:22 2024 +0100

    * tp/Texinfo/Convert/HTML.pm (_prepare_title_titlepage)
    (_html_convert_output, tp/Texinfo/XS/convert/ConvertXS.xs
    (html_prepare_title_titlepage, html_convert_convert)
    (html_convert_output): change arguments orders if it simplifies
    ignoring unused arguments in XS.  Ignore unused arguments in XS.
    Update callers.
---
 ChangeLog                          |  9 +++++++++
 tp/Texinfo/Convert/HTML.pm         | 18 +++++++++---------
 tp/Texinfo/XS/convert/ConvertXS.xs | 16 ++++++++++------
 3 files changed, 28 insertions(+), 15 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b04d3ad5ce..4aa98d1e34 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-03-13  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Convert/HTML.pm (_prepare_title_titlepage)
+       (_html_convert_output, tp/Texinfo/XS/convert/ConvertXS.xs
+       (html_prepare_title_titlepage, html_convert_convert)
+       (html_convert_output): change arguments orders if it simplifies
+       ignoring unused arguments in XS.  Ignore unused arguments in XS.
+       Update callers.
+
 2024-03-13  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/convert/ConvertXS.xs (html_convert_convert)
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index d2dd5fcaac..b4d00dd816 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -11926,9 +11926,9 @@ sub conversion_finalization($)
 sub _prepare_title_titlepage($$$$)
 {
   my $self = shift;
-  my $output_units = shift;
   my $output_file = shift;
   my $output_filename = shift;
+  my $output_units = shift;
 
   # set file name to be the first file name for formatting of title page.
   # The title page prepared here is thus only fit to be used in the first
@@ -12051,7 +12051,7 @@ sub convert($$)
   # title.  Not often set in the default case, as convert() is only
   # used in the *.t tests, and a title requires both simpletitle_tree
   # and SHOW_TITLE set, with the default formatting function.
-  $self->_prepare_title_titlepage($output_units, '', '');
+  $self->_prepare_title_titlepage('', '', $output_units);
 
   # complete information should be available.
   $self->_reset_info();
@@ -12429,8 +12429,8 @@ sub _prepare_converted_output_info($)
 # units or root conversion
 sub _html_convert_output($$$$$$$$)
 {
-  my ($self, $document, $output_units, $special_units, $output_file,
-      $destination_directory, $output_filename, $document_name) = @_;
+  my ($self, $output_file, $destination_directory, $output_filename,
+      $document_name, $document, $output_units, $special_units) = @_;
 
   my $text_output = '';
   if ($output_file eq '') {
@@ -12955,8 +12955,8 @@ sub output($$)
   }
 
   # information settable by customization files is passed to XS too
-  $self->_prepare_title_titlepage($output_units, $output_file,
-                                  $output_filename);
+  $self->_prepare_title_titlepage($output_file, $output_filename,
+                                  $output_units);
 
   $self->set_global_document_commands('before', ['documentlanguage']);
 
@@ -12968,9 +12968,9 @@ sub output($$)
   $self->_reset_info();
 
   # conversion
-  my $text_output = $self->_html_convert_output($document, $output_units,
-                       $special_units, $output_file, $destination_directory,
-                       $output_filename, $document_name);
+  my $text_output = $self->_html_convert_output($output_file,
+                       $destination_directory, $output_filename, 
$document_name,
+                       $document, $output_units, $special_units);
 
   $self->get_output_files_XS_unclosed_streams();
 
diff --git a/tp/Texinfo/XS/convert/ConvertXS.xs 
b/tp/Texinfo/XS/convert/ConvertXS.xs
index 8ec4655e27..e161cd0359 100644
--- a/tp/Texinfo/XS/convert/ConvertXS.xs
+++ b/tp/Texinfo/XS/convert/ConvertXS.xs
@@ -2060,10 +2060,12 @@ html_prepare_converted_output_info (SV *converter_in)
                }
            }
 
+# $output_units
 void
-html_prepare_title_titlepage (SV *converter_in, SV *output_units_in, 
output_file, output_filename)
+html_prepare_title_titlepage (SV *converter_in, output_file, output_filename, 
...)
          const char *output_file = (char *)SvPVutf8_nolen($arg);
          const char *output_filename = (char *)SvPVutf8_nolen($arg);
+  PROTOTYPE: $$$$
   PREINIT:
          CONVERTER *self = 0;
      CODE:
@@ -2092,18 +2094,18 @@ html_prepare_title_titlepage (SV *converter_in, SV 
*output_units_in, output_file
                }
            }
 
+# $document, $output_units, $special_units
 SV *
-html_convert_convert (SV *converter_in, SV *document_in, SV *output_units_in, 
SV *special_units_in)
+html_convert_convert (SV *converter_in, ...)
+  PROTOTYPE: $$$$
   PREINIT:
          CONVERTER *self = 0;
-         DOCUMENT *document = 0;
          char *result;
      CODE:
          self = get_sv_converter (converter_in, "html_convert_convert");
          /* there could be strange results if the document and the converter 
document
             do not match.  There is no reason why it would happen, though */
-         document = self->document;
-         result = html_convert_convert (self, document->tree);
+         result = html_convert_convert (self, self->document->tree);
          if (self->modified_state)
            {
              build_html_formatting_state (self, self->modified_state);
@@ -2143,12 +2145,14 @@ html_convert_tree (SV *converter_in, SV *tree_in, 
explanation)
     OUTPUT:
         RETVAL
 
+# $document, $output_units, $special_units
 SV *
-html_convert_output (SV *converter_in, SV *document_in, SV *output_units_in, 
SV *special_units_in, output_file, destination_directory, output_filename, 
document_name)
+html_convert_output (SV *converter_in, output_file, destination_directory, 
output_filename, document_name, ...)
          const char *output_file = (char *)SvPVutf8_nolen($arg);
          const char *destination_directory = (char *)SvPVutf8_nolen($arg);
          const char *output_filename = (char *)SvPVutf8_nolen($arg);
          const char *document_name = (char *)SvPVutf8_nolen($arg);
+  PROTOTYPE: $$$$$$$$
   PREINIT:
          CONVERTER *self = 0;
          SV *result_sv = 0;



reply via email to

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