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, 2 Oct 2024 11:42:49 -0400 (EDT)

branch: master
commit 48097fcfab9637951a05307767f698ed4f8149ce
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Fri Aug 2 23:25:53 2024 +0200

    * tp/Texinfo/Convert/HTML.pm (html_attribute_class, _convert_text),
    tp/Texinfo/Convert/Plaintext.pm (new_formatter): always access
    configuration through get_conf() in case it is in C data only.
    
    * tp/Texinfo/XS/convert/convert_html.c: change in comments.
---
 ChangeLog                            | 16 ++++++++++++----
 tp/Texinfo/Common.pm                 |  3 ++-
 tp/Texinfo/Convert/HTML.pm           | 16 ++++------------
 tp/Texinfo/Convert/Plaintext.pm      |  4 +---
 tp/Texinfo/XS/convert/convert_html.c |  5 ++++-
 5 files changed, 23 insertions(+), 21 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 01b109ff8c..91ade40d19 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,10 @@
 2024-10-02  Patrice Dumas  <pertusus@free.fr>
 
-       * tp/maintain/regenerate_C_options_info.pl: use basename of generating
-       program in comments.
-       
-       Add TODO item from Bruno CI.
+       * tp/Texinfo/Convert/HTML.pm (html_attribute_class, _convert_text),
+       tp/Texinfo/Convert/Plaintext.pm (new_formatter): always access
+       configuration through get_conf() in case it is in C data only.
+
+       * tp/Texinfo/XS/convert/convert_html.c: change in comments.
 
 2024-08-01  Patrice Dumas  <pertusus@free.fr>
 
@@ -31,6 +32,13 @@
        tp/Texinfo/XS/convert/converter.c: move html_get_direction_index
        from converter.c to utils.c.
 
+2024-10-02  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/maintain/regenerate_C_options_info.pl: use basename of generating
+       program in comments.
+       
+       Add TODO item from Bruno CI.
+
 2024-08-01  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Convert/Converter.pm,
diff --git a/tp/Texinfo/Common.pm b/tp/Texinfo/Common.pm
index aa7b9afe7b..92ec5d827f 100644
--- a/tp/Texinfo/Common.pm
+++ b/tp/Texinfo/Common.pm
@@ -1226,7 +1226,8 @@ sub set_informative_command_value($$)
   my $value = informative_command_value($element);
 
   if (defined($value)) {
-    return $self->set_conf($cmdname, $value);
+    my $set = $self->set_conf($cmdname, $value);
+    return $set;
   }
   return 0;
 }
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 9aa6734324..307bf7424b 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -419,9 +419,7 @@ sub html_attribute_class($$;$)
     confess("html_attribute_class: $classes not an array ref (for $element)");
   }
   if (!defined($classes) or scalar(@$classes) == 0
-      # API info: get_conf() API code conforming would be:
-      #  or $self->get_conf('NO_CSS')) {
-        or $self->{'conf'}->{'NO_CSS'}) {
+      or $self->get_conf('NO_CSS')) {
     if ($element eq 'span') {
       return '';
     } else {
@@ -431,9 +429,7 @@ sub html_attribute_class($$;$)
 
   my $style = '';
 
-  # API info: get_conf() API code conforming would be:
-  #  if ($self->get_conf('INLINE_CSS_STYLE')) {
-  if ($self->{'conf'}->{'INLINE_CSS_STYLE'}) {
+  if ($self->get_conf('INLINE_CSS_STYLE')) {
     my @styles = ();
     foreach my $style_class (@$classes) {
       if (not defined($style_class)) {
@@ -7091,13 +7087,9 @@ sub _convert_text($$$)
     $text = Texinfo::Convert::Unicode::unicode_text($text,
                                         (in_code($self) or in_math($self)));
   } elsif (!in_code($self) and !in_math($self)) {
-    # API info: get_conf() API code conforming would be:
-    #if ($self->get_conf('USE_NUMERIC_ENTITY')) {
-    if ($self->{'conf'}->{'USE_NUMERIC_ENTITY'}) {
+    if ($self->get_conf('USE_NUMERIC_ENTITY')) {
       $text = $self->xml_format_text_with_numeric_entities($text);
-    # API info: get_conf() API code conforming would be:
-    #} elsif ($self->get_conf('USE_ISO')) {
-    } elsif ($self->{'conf'}->{'USE_ISO'}) {
+    } elsif ($self->get_conf('USE_ISO')) {
       $text = _entity_text($text);
     } else {
       $text =~ s/``/&quot;/g;
diff --git a/tp/Texinfo/Convert/Plaintext.pm b/tp/Texinfo/Convert/Plaintext.pm
index 2ffc00a0fe..d3cd043954 100644
--- a/tp/Texinfo/Convert/Plaintext.pm
+++ b/tp/Texinfo/Convert/Plaintext.pm
@@ -876,9 +876,7 @@ sub new_formatter($$;$)
       = $indent_length*($self->{'format_context'}->[-1]->{'indent_level'});
   }
 
-  my $frenchspacing_conf = $self->{'conf'}->{'frenchspacing'};
-  #my $frenchspacing_conf = $self->get_conf('frenchspacing');
-  # access 'conf' hash directly for efficiency
+  my $frenchspacing_conf = $self->get_conf('frenchspacing');
 
   $container_conf->{'frenchspacing'} = 1
     if ($frenchspacing_conf eq 'on');
diff --git a/tp/Texinfo/XS/convert/convert_html.c 
b/tp/Texinfo/XS/convert/convert_html.c
index 8497f0cdbc..f7c0b682a3 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -18242,7 +18242,10 @@ html_converter_initialize (CONVERTER *self)
         + external_formatting_function;
 
    /*
-  fprintf (stderr, "sbf %d ouc %d cc %d co %d tc %d to %d f %d\n",
+  fprintf (stderr, "TOTAL: %d. conf %d fi %d sbf %d ouc %d cc %d co %d tc %d 
to %d f %d\n",
+           self->external_references_number,
+           self->conf->BIT_user_function_number,
+           self->file_id_setting_ref_number,
            external_special_unit_body_formatting_function,
            external_output_unit_conversion_function,
            external_command_conversion_function,



reply via email to

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