[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/XS/convert/convert_html.c (html_fina
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/XS/convert/convert_html.c (html_finalize_output_state), tp/Texinfo/XS/convert/indices_in_conversion.c (destroy_merged_indices) (destroy_indices_sorted_by_letter): free merged indices, indices sorted by letter and title_titlepage. |
Date: |
Sat, 11 Nov 2023 04:52:15 -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 c53e653b7e * tp/Texinfo/XS/convert/convert_html.c
(html_finalize_output_state), tp/Texinfo/XS/convert/indices_in_conversion.c
(destroy_merged_indices) (destroy_indices_sorted_by_letter): free merged
indices, indices sorted by letter and title_titlepage.
c53e653b7e is described below
commit c53e653b7e5dfa2f4d53b7b5bbd857d055557643
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Nov 11 10:51:57 2023 +0100
* tp/Texinfo/XS/convert/convert_html.c (html_finalize_output_state),
tp/Texinfo/XS/convert/indices_in_conversion.c (destroy_merged_indices)
(destroy_indices_sorted_by_letter): free merged indices, indices
sorted by letter and title_titlepage.
---
ChangeLog | 7 ++++++
tp/TODO | 26 +++++++++++++++++----
tp/Texinfo/XS/convert/convert_html.c | 15 ++++++++++++
tp/Texinfo/XS/convert/indices_in_conversion.c | 33 +++++++++++++++++++++++++++
tp/Texinfo/XS/convert/indices_in_conversion.h | 4 ++++
5 files changed, 80 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 52cc268b34..0787cbce7d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2023-11-11 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/convert/convert_html.c (html_finalize_output_state),
+ tp/Texinfo/XS/convert/indices_in_conversion.c (destroy_merged_indices)
+ (destroy_indices_sorted_by_letter): free merged indices, indices
+ sorted by letter and title_titlepage.
+
2023-11-11 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/main/tree_types.h (INDEX),
diff --git a/tp/TODO b/tp/TODO
index adbd53fccf..f4a578fae4 100644
--- a/tp/TODO
+++ b/tp/TODO
@@ -42,12 +42,15 @@ command_special_variety_name_index
converter todo get from perl, code in html converter
directions_strings
-converter output state reset
+converter output state/document reset
global_units_directions html_initialize_output_state
special_unit_info_tree html_finalize_output_state
html_targets html_finalize_output_state
seen_ids html_finalize_output_state
html_special_targets html_finalize_output_state
+index_entries html_finalize_output_state/destroy_merged_indices
+index_entries_by_letter (letter string, letter entries...)
html_finalize_output_state/destroy_indices_sorted_by_letter
+title_titlepage html_finalize_output_state
converter free
special_units_direction_name html_finalize_output_state
@@ -58,15 +61,28 @@ html_targets
seen_ids
html_special_targets
special_unit_info_tree
-special_unit_varieties
-pre_class_types
translated_commands translated_command->translation:strdup
expanded_formats
error_messages: with a check that it is empty?
conf
init_conf
-index_entries
-index_entries_by_letter (letter string, letter entries...)
+no_arg_formatted_cmd
+pre_class_types
+special_unit_varieties
+html_command_conversion
+no_arg_formatted_cmd_translated + check
+reset_target_commands + check
+file_changed_counter + check
+
+to check as it should be reset as the HTML state is always synced
+tree_to_build
+document_context_change
+document_contexts_to_pop
+
+to check
+document_global_context
+ignore_notice
++ html_document_context
Bugs
diff --git a/tp/Texinfo/XS/convert/convert_html.c
b/tp/Texinfo/XS/convert/convert_html.c
index 4590467e3b..6948b5bdef 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -2527,12 +2527,27 @@ html_finalize_output_state (CONVERTER *self)
{
reset_html_targets (&self->html_special_targets[i]);
}
+
free (self->special_units_direction_name);
self->special_units_direction_name = 0;
free (self->output_unit_file_indices);
self->output_unit_file_indices = 0;
free (self->special_unit_file_indices);
self->special_unit_file_indices = 0;
+ free (self->title_titlepage);
+ self->title_titlepage = 0;
+
+ if (self->index_entries)
+ {
+ destroy_merged_indices (self->index_entries);
+ self->index_entries = 0;
+ }
+ if (self->index_entries_by_letter)
+ {
+ destroy_indices_sorted_by_letter (self->index_entries_by_letter);
+ self->index_entries_by_letter = 0;
+ }
+
html_pop_document_context (self);
}
diff --git a/tp/Texinfo/XS/convert/indices_in_conversion.c
b/tp/Texinfo/XS/convert/indices_in_conversion.c
index 3e628426bd..6721d4ad12 100644
--- a/tp/Texinfo/XS/convert/indices_in_conversion.c
+++ b/tp/Texinfo/XS/convert/indices_in_conversion.c
@@ -101,6 +101,39 @@ merge_indices (INDEX **index_names)
return merged_indices;
}
+void
+destroy_merged_indices (MERGED_INDEX *merged_indices)
+{
+ MERGED_INDEX *index;
+
+ for (index = merged_indices; index->name; index++)
+ {
+ free (index->index_entries);
+ }
+ free (merged_indices);
+}
+
+void
+destroy_indices_sorted_by_letter (
+ INDEX_SORTED_BY_LETTER *indices_entries_by_letter)
+{
+ INDEX_SORTED_BY_LETTER *index;
+
+ for (index = indices_entries_by_letter; index->name; index++)
+ {
+ int i;
+ free (index->name);
+ for (i = 0; i < index->letter_number; i++)
+ {
+ LETTER_INDEX_ENTRIES *letter_entries = &index->letter_entries[i];
+ free (letter_entries->letter);
+ free (letter_entries->entries);
+ }
+ free (index->letter_entries);
+ }
+ free (indices_entries_by_letter);
+}
+
/* corresponding perl code in Texinfo::Common */
ELEMENT *
diff --git a/tp/Texinfo/XS/convert/indices_in_conversion.h
b/tp/Texinfo/XS/convert/indices_in_conversion.h
index 814f3ac5e6..101a34e5e3 100644
--- a/tp/Texinfo/XS/convert/indices_in_conversion.h
+++ b/tp/Texinfo/XS/convert/indices_in_conversion.h
@@ -6,6 +6,10 @@
#include "indices_in_conversion.h"
MERGED_INDEX *merge_indices (INDEX **index_names);
+void destroy_merged_indices (MERGED_INDEX *merged_indices);
+
+void destroy_indices_sorted_by_letter (
+ INDEX_SORTED_BY_LETTER *indices_entries_by_letter);
ELEMENT *index_content_element (ELEMENT *element,
int prefer_reference_element);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/XS/convert/convert_html.c (html_finalize_output_state), tp/Texinfo/XS/convert/indices_in_conversion.c (destroy_merged_indices) (destroy_indices_sorted_by_letter): free merged indices, indices sorted by letter and title_titlepage.,
Patrice Dumas <=