[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/XS/convert/html_converter_finish.c (
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/XS/convert/html_converter_finish.c (reset_html_targets_list): free command_description. |
Date: |
Sat, 05 Oct 2024 04:57:13 -0400 |
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 416fb52337 * tp/Texinfo/XS/convert/html_converter_finish.c
(reset_html_targets_list): free command_description.
416fb52337 is described below
commit 416fb52337dd5e656ae569087bcdc865d0d57f7d
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Oct 5 10:56:04 2024 +0200
* tp/Texinfo/XS/convert/html_converter_finish.c
(reset_html_targets_list): free command_description.
* tp/Texinfo/XS/convert/convert_html.c: remove duplicate
default_css_string_format_protect_text, the function used is in
format_html.c.
* tp/Texinfo/XS/convert/format_html.c (html_command_description):
do not set immediately a variable.
---
ChangeLog | 12 ++++++++++++
tp/Texinfo/XS/convert/convert_html.c | 28 ---------------------------
tp/Texinfo/XS/convert/format_html.c | 4 +++-
tp/Texinfo/XS/convert/html_converter_finish.c | 3 +++
4 files changed, 18 insertions(+), 29 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 14ddeebd5f..bdfdc83436 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2024-10-05 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/convert/html_converter_finish.c
+ (reset_html_targets_list): free command_description.
+
+ * tp/Texinfo/XS/convert/convert_html.c: remove duplicate
+ default_css_string_format_protect_text, the function used is in
+ format_html.c.
+
+ * tp/Texinfo/XS/convert/format_html.c (html_command_description):
+ do not set immediately a variable.
+
2024-10-05 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/convert/ConvertXS.xs (html_command_description):
diff --git a/tp/Texinfo/XS/convert/convert_html.c
b/tp/Texinfo/XS/convert/convert_html.c
index c05664b993..d1293afaaf 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -296,34 +296,6 @@ html_convert_tree_new_formatting_context (CONVERTER *self,
const ELEMENT *tree,
-void
-default_css_string_format_protect_text (const char *text, TEXT *result)
-{
- const char *p = text;
-
- while (*p)
- {
- int before_sep_nr = strcspn (p, "\\'");
- if (before_sep_nr)
- {
- text_append_n (result, p, before_sep_nr);
- p += before_sep_nr;
- }
- if (!*p)
- break;
- switch (*p)
- {
- case '\\':
- text_append_n (result, "\\\\", 2);
- break;
- case '\'':
- text_append_n (result, "\\'", 2);
- break;
- }
- p++;
- }
-}
-
/* NOTE these switches are not done in perl, so the only perl functions
that can be called are perl functions that do not call formatting/conversion
functions or the formatting/conversion functions for HTML will be used. */
diff --git a/tp/Texinfo/XS/convert/format_html.c
b/tp/Texinfo/XS/convert/format_html.c
index e2256b4faa..bb0fd35b1e 100644
--- a/tp/Texinfo/XS/convert/format_html.c
+++ b/tp/Texinfo/XS/convert/format_html.c
@@ -1383,11 +1383,13 @@ html_command_description (CONVERTER *self, const
ELEMENT *command,
char *multiple_formatted = 0;
ELEMENT *description_element;
const char *command_name;
- enum command_id cmd = element_builtin_cmd (command);
+ enum command_id cmd;
if (command->type == ET_special_unit_element)
return 0;
+ cmd = element_builtin_cmd (command);
+
if (cmd == CM_float || cmd == CM_anchor)
return 0;
diff --git a/tp/Texinfo/XS/convert/html_converter_finish.c
b/tp/Texinfo/XS/convert/html_converter_finish.c
index c2b9c6bb45..e859665d4d 100644
--- a/tp/Texinfo/XS/convert/html_converter_finish.c
+++ b/tp/Texinfo/XS/convert/html_converter_finish.c
@@ -77,6 +77,9 @@ reset_html_targets_list (CONVERTER *self, HTML_TARGET_LIST
*targets)
for (j = 0; j < HTT_string_nonumber+1; j++)
free (html_target->command_text[j]);
+ for (j = 0; j < HTT_string_nonumber+1; j++)
+ free (html_target->command_description[j]);
+
free_tree_added_elements (self, &html_target->tree);
free_tree_added_elements (self, &html_target->tree_nonumber);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/XS/convert/html_converter_finish.c (reset_html_targets_list): free command_description.,
Patrice Dumas <=