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/convert_html.c (convert_f


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/XS/convert/convert_html.c (convert_float_command) (convert_quotation_command): free cancelled pending_formatted_inline_content.
Date: Fri, 05 Jan 2024 09:18:48 -0500

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 448cf1b9b3 * tp/Texinfo/XS/convert/convert_html.c 
(convert_float_command) (convert_quotation_command): free cancelled 
pending_formatted_inline_content.
448cf1b9b3 is described below

commit 448cf1b9b35997005c6fdc2fd8ed5942fb134cfe
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Fri Jan 5 15:18:47 2024 +0100

    * tp/Texinfo/XS/convert/convert_html.c (convert_float_command)
    (convert_quotation_command): free cancelled
    pending_formatted_inline_content.
    
    * tp/Texinfo/XS/convert/convert_html.c (convert_printindex_command):
    destroy elements created for subentries formatting.
---
 ChangeLog                            |  9 +++++++++
 tp/Texinfo/XS/convert/convert_html.c | 26 +++++++++++++++++++++-----
 2 files changed, 30 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 6d2d24f514..f67b369c59 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-01-05  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/XS/convert/convert_html.c (convert_float_command)
+       (convert_quotation_command): free cancelled
+       pending_formatted_inline_content.
+
+       * tp/Texinfo/XS/convert/convert_html.c (convert_printindex_command):
+       destroy elements created for subentries formatting.
+
 2024-01-05  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Convert/HTML.pm (_default_format_element_footer):
diff --git a/tp/Texinfo/XS/convert/convert_html.c 
b/tp/Texinfo/XS/convert/convert_html.c
index 57565722dd..095a3b65f9 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -10536,6 +10536,8 @@ convert_float_command (CONVERTER *self, const enum 
command_id cmd,
                   free (prepended_text);
                   prepended_text = 0;
                 }
+              else
+                free (cancelled_prepended);
             }
         }
       if (prepended_text && strlen (prepended_text))
@@ -10592,8 +10594,10 @@ convert_quotation_command (CONVERTER *self, const enum 
command_id cmd,
 {
   ELEMENT_LIST *authors;
 
-  html_cancel_pending_formatted_inline_content (self,
+  char *cancelled = html_cancel_pending_formatted_inline_content (self,
                                             builtin_command_name (cmd));
+  if (cancelled)
+    free (cancelled);
 
   if (!html_in_string (self))
     {
@@ -12241,11 +12245,17 @@ convert_printindex_command (CONVERTER *self, const 
enum command_id cmd,
                 {
                   char *convert_info;
                   char *entry;
+
+
                   if (!with_new_formatted_entry
                       && prev_normalized_entry_levels[level]
                       && !strcmp (prev_normalized_entry_levels[level],
                                   new_normalized_entry_levels[level]))
-                    continue;
+                    {
+                      if (level > 0)
+                        destroy_element (entry_trees[level]);
+                      continue;
+                    }
 
                   with_new_formatted_entry = 1;
                   xasprintf (&convert_info,
@@ -12269,8 +12279,11 @@ convert_printindex_command (CONVERTER *self, const 
enum command_id cmd,
                                                  convert_info);
                     }
                   if (level > 0)
-                    remove_element_from_list (&self->tree_to_build,
-                                              entry_trees[level]);
+                    {
+                      remove_element_from_list (&self->tree_to_build,
+                                                entry_trees[level]);
+                      destroy_element (entry_trees[level]);
+                    }
                   free (convert_info);
 
                   add_string (cmd_index_entry_class, entry_classes);
@@ -12325,7 +12338,10 @@ convert_printindex_command (CONVERTER *self, const 
enum command_id cmd,
                                          convert_info);
             }
           if (last_entry_level > 0)
-            remove_element_from_list (&self->tree_to_build, entry_tree);
+            {
+              remove_element_from_list (&self->tree_to_build, entry_tree);
+              destroy_element (entry_tree);
+            }
           free (convert_info);
 
           if (other_subentries_tree)



reply via email to

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