[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/XS/convert/convert_html.c (default_f
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/XS/convert/convert_html.c (default_format_footnotes_segment): free foot_lines. |
Date: |
Thu, 30 Nov 2023 19:10:29 -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 186bfb9c84 * tp/Texinfo/XS/convert/convert_html.c
(default_format_footnotes_segment): free foot_lines.
186bfb9c84 is described below
commit 186bfb9c846a5aeb0dd984e090168d59c687dfdf
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Fri Dec 1 01:10:20 2023 +0100
* tp/Texinfo/XS/convert/convert_html.c
(default_format_footnotes_segment): free foot_lines.
* tp/Texinfo/XS/convert/convert_html.c (convert_unit_type)
(convert_special_unit_type): free closed strings strings.
* tp/Texinfo/XS/convert/convert_html.c (html_finalize_output_state)
(html_free_converter): clear pending_inline_content,
associated_inline_content and shared_conversion_state.integers in
html_finalize_output_state and free the stack/lists/associated_info
in html_free_converter.
---
ChangeLog | 14 ++++++++++++++
tp/Texinfo/XS/convert/convert_html.c | 34 ++++++++++++++++++++++++++++++++++
tp/Texinfo/XS/main/tree.h | 2 ++
3 files changed, 50 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 765350d6bd..0072c575a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2023-11-30 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/convert/convert_html.c
+ (default_format_footnotes_segment): free foot_lines.
+
+ * tp/Texinfo/XS/convert/convert_html.c (convert_unit_type)
+ (convert_special_unit_type): free closed strings strings.
+
+ * tp/Texinfo/XS/convert/convert_html.c (html_finalize_output_state)
+ (html_free_converter): clear pending_inline_content,
+ associated_inline_content and shared_conversion_state.integers in
+ html_finalize_output_state and free the stack/lists/associated_info
+ in html_free_converter.
+
2023-11-30 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Convert/HTML.pm
diff --git a/tp/Texinfo/XS/convert/convert_html.c
b/tp/Texinfo/XS/convert/convert_html.c
index 63369f0c3b..ed69426cce 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -3841,6 +3841,7 @@ default_format_footnotes_segment (CONVERTER *self, TEXT
*result)
free (footnote_heading);
text_append (result, foot_lines);
+ free (foot_lines);
text_append (result, "</div>\n");
}
@@ -3952,6 +3953,7 @@ void convert_unit_type (CONVERTER *self,
for (i = 0; i < closed_strings->number; i++)
{
text_append (result, closed_strings->list[i]);
+ free (closed_strings->list[i]);
}
free (closed_strings->list);
}
@@ -4011,6 +4013,7 @@ convert_special_unit_type (CONVERTER *self,
for (i = 0; i < closed_strings->number; i++)
{
text_append (result, closed_strings->list[i]);
+ free (closed_strings->list[i]);
}
free (closed_strings->list);
}
@@ -4618,6 +4621,32 @@ html_finalize_output_state (CONVERTER *self)
clear_string_stack (&self->pending_closes);
}
+ if (self->pending_inline_content.top > 0)
+ {
+ char *inline_content = html_get_pending_formatted_inline_content (self);
+ message_list_document_warn (&self->error_messages, self->conf,
+ "%zu registered inline contents: %s",
+ self->pending_inline_content.top, inline_content);
+ free (inline_content);
+ }
+
+ for (i = 0; i < self->associated_inline_content.number; i++)
+ {
+ HTML_ASSOCIATED_INLINE_CONTENT *associated_content
+ = &self->associated_inline_content.list[i];
+ if (associated_content->inline_content)
+ {
+ char *inline_content = associated_content->inline_content;
+ message_list_document_warn (&self->error_messages, self->conf,
+ "associated inline content not used: %s\n",
+ inline_content);
+ free (associated_content->inline_content);
+ }
+ }
+ self->associated_inline_content.number = 0;
+
+ self->shared_conversion_state.integers.info_number = 0;
+
html_pop_document_context (self);
/* could change to 0 in releases? */
@@ -4741,6 +4770,11 @@ html_free_converter (CONVERTER *self)
free (self->no_arg_formatted_cmd.list);
free (self->pending_closes.stack);
+ free (self->pending_inline_content.stack);
+
+ free (self->associated_inline_content.list);
+
+ destroy_associated_info (&self->shared_conversion_state.integers);
free (self->no_arg_formatted_cmd_translated.list);
free (self->reset_target_commands.list);
diff --git a/tp/Texinfo/XS/main/tree.h b/tp/Texinfo/XS/main/tree.h
index dc44adc631..24415d8296 100644
--- a/tp/Texinfo/XS/main/tree.h
+++ b/tp/Texinfo/XS/main/tree.h
@@ -45,6 +45,8 @@ int replace_element_in_contents (ELEMENT *parent, ELEMENT
*removed,
int replace_element_in_list (ELEMENT_LIST *list, ELEMENT *removed,
ELEMENT *added);
void destroy_node_spec (NODE_SPEC_EXTRA *nse);
+void destroy_associated_info (ASSOCIATED_INFO *a);
+
#define element_contents_number(e) ((e)->contents.number)
#define element_args_number(e) ((e)->args.number)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/XS/convert/convert_html.c (default_format_footnotes_segment): free foot_lines.,
Patrice Dumas <=