[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/XS/main/convert_to_text.c (text_acce
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/XS/main/convert_to_text.c (text_accents), tp/Texinfo/XS/main/convert_utils.c (find_innermost_accent_contents) (destroy_accent_stack), tp/Texinfo/XS/main/convert_utils.h (ACCENTS_STACK): put the stack in ACCENTS_STACK directly, not as a pointer. |
Date: |
Sun, 12 Nov 2023 12:50:06 -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 5cb1604ac1 * tp/Texinfo/XS/main/convert_to_text.c (text_accents),
tp/Texinfo/XS/main/convert_utils.c (find_innermost_accent_contents)
(destroy_accent_stack), tp/Texinfo/XS/main/convert_utils.h (ACCENTS_STACK): put
the stack in ACCENTS_STACK directly, not as a pointer.
5cb1604ac1 is described below
commit 5cb1604ac1f0f2fbb641dbcb67eaec182476eb48
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Nov 12 18:49:59 2023 +0100
* tp/Texinfo/XS/main/convert_to_text.c (text_accents),
tp/Texinfo/XS/main/convert_utils.c (find_innermost_accent_contents)
(destroy_accent_stack), tp/Texinfo/XS/main/convert_utils.h
(ACCENTS_STACK): put the stack in ACCENTS_STACK directly, not as a
pointer.
---
ChangeLog | 8 ++++++++
tp/Texinfo/XS/main/convert_to_text.c | 4 ++--
tp/Texinfo/XS/main/convert_utils.c | 8 +++-----
tp/Texinfo/XS/main/convert_utils.h | 2 +-
4 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 424bc3c6af..bfceb859cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-11-12 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/main/convert_to_text.c (text_accents),
+ tp/Texinfo/XS/main/convert_utils.c (find_innermost_accent_contents)
+ (destroy_accent_stack), tp/Texinfo/XS/main/convert_utils.h
+ (ACCENTS_STACK): put the stack in ACCENTS_STACK directly, not as a
+ pointer.
+
2023-11-12 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/main/convert_to_text.c (ascii_accent)
diff --git a/tp/Texinfo/XS/main/convert_to_text.c
b/tp/Texinfo/XS/main/convert_to_text.c
index 1870c40d17..a0befb329c 100644
--- a/tp/Texinfo/XS/main/convert_to_text.c
+++ b/tp/Texinfo/XS/main/convert_to_text.c
@@ -191,11 +191,11 @@ text_accents (ELEMENT *accent, char *encoding, int
set_case)
else
text = strdup ("");
- result = encoded_accents (text, accent_stack->stack, encoding,
+ result = encoded_accents (text, &accent_stack->stack, encoding,
ascii_accent, set_case);
if (!result)
- result = ascii_accents_internal (text, accent_stack->stack, set_case);
+ result = ascii_accents_internal (text, &accent_stack->stack, set_case);
free (text);
destroy_accent_stack (accent_stack);
destroy_text_options (text_options);
diff --git a/tp/Texinfo/XS/main/convert_utils.c
b/tp/Texinfo/XS/main/convert_utils.c
index d5307496b9..5b20746cb1 100644
--- a/tp/Texinfo/XS/main/convert_utils.c
+++ b/tp/Texinfo/XS/main/convert_utils.c
@@ -58,9 +58,7 @@ find_innermost_accent_contents (ELEMENT *element)
ELEMENT *argument = 0;
ACCENTS_STACK *accent_stack = (ACCENTS_STACK *)
malloc (sizeof (ACCENTS_STACK));
-
- accent_stack->stack = new_list ();
- accent_stack->argument = 0;
+ memset (accent_stack, 0, sizeof (ACCENTS_STACK));
while (1)
{
@@ -70,7 +68,7 @@ find_innermost_accent_contents (ELEMENT *element)
/* the following can happen if called with a bad tree */
if (!current->cmd || !(builtin_command_flags(current) & CF_accent))
return accent_stack;
- add_to_element_list (accent_stack->stack, current);
+ add_to_element_list (&accent_stack->stack, current);
/* A bogus accent, that may happen */
if (current->args.number <= 0)
return accent_stack;
@@ -113,7 +111,7 @@ find_innermost_accent_contents (ELEMENT *element)
void
destroy_accent_stack (ACCENTS_STACK *accent_stack)
{
- destroy_list (accent_stack->stack);
+ free (accent_stack->stack.list);
if (accent_stack->argument)
destroy_element (accent_stack->argument);
free (accent_stack);
diff --git a/tp/Texinfo/XS/main/convert_utils.h
b/tp/Texinfo/XS/main/convert_utils.h
index 3c1b31dc13..d56c49444a 100644
--- a/tp/Texinfo/XS/main/convert_utils.h
+++ b/tp/Texinfo/XS/main/convert_utils.h
@@ -13,7 +13,7 @@
extern char *convert_utils_month_name[12];
typedef struct ACCENTS_STACK {
- ELEMENT_LIST *stack;
+ ELEMENT_LIST stack;
ELEMENT *argument;
} ACCENTS_STACK;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/XS/main/convert_to_text.c (text_accents), tp/Texinfo/XS/main/convert_utils.c (find_innermost_accent_contents) (destroy_accent_stack), tp/Texinfo/XS/main/convert_utils.h (ACCENTS_STACK): put the stack in ACCENTS_STACK directly, not as a pointer.,
Patrice Dumas <=
- Prev by Date:
branch master updated: * tp/Texinfo/XS/main/convert_to_text.c (ascii_accent) (ascii_accents_internal), tp/Texinfo/XS/main/unicode.c (unicode_accent, format_eight_bit_accents_stack) (format_unicode_accents_stack_internal, encoded_accents), tp/Texinfo/XS/main/utils.c (normalize_encoding_name): make some variables const to make sure that the accent formatting function do not modify their associated elements, texts or accent commands lists.
- Next by Date:
branch master updated: * tp/Texinfo/XS/convert/convert_html.c (prepare_index_entries_targets), tp/Texinfo/XS/convert/converter.c (comma_index_subentries_tree, free_comma_index_subentries_tree): have comma_index_subentries_tree return an ELEMENT_LIST.
- Previous by thread:
branch master updated: * tp/Texinfo/XS/main/convert_to_text.c (ascii_accent) (ascii_accents_internal), tp/Texinfo/XS/main/unicode.c (unicode_accent, format_eight_bit_accents_stack) (format_unicode_accents_stack_internal, encoded_accents), tp/Texinfo/XS/main/utils.c (normalize_encoding_name): make some variables const to make sure that the accent formatting function do not modify their associated elements, texts or accent commands lists.
- Next by thread:
branch master updated: * tp/Texinfo/XS/convert/convert_html.c (prepare_index_entries_targets), tp/Texinfo/XS/convert/converter.c (comma_index_subentries_tree, free_comma_index_subentries_tree): have comma_index_subentries_tree return an ELEMENT_LIST.
- Index(es):