[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/XS/structuring_transfo/transformatio
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/XS/structuring_transfo/transformations.c (reference_to_arg_internal, reference_to_arg_in_tree): add document as argument to reference_to_arg_in_tree and reference_to_arg_internal. Update callers. Remove destroyed element from document->internal_references. |
Date: |
Sat, 06 Jan 2024 11:34:00 -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 e1a5616958 * tp/Texinfo/XS/structuring_transfo/transformations.c
(reference_to_arg_internal, reference_to_arg_in_tree): add document as argument
to reference_to_arg_in_tree and reference_to_arg_internal. Update callers.
Remove destroyed element from document->internal_references.
e1a5616958 is described below
commit e1a561695809b16a8c19114f147f1d7cb73e9cdb
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Jan 6 17:34:00 2024 +0100
* tp/Texinfo/XS/structuring_transfo/transformations.c
(reference_to_arg_internal, reference_to_arg_in_tree): add document as
argument to reference_to_arg_in_tree and reference_to_arg_internal.
Update callers. Remove destroyed element from
document->internal_references.
---
ChangeLog | 8 ++++++++
man/pod2texi.1 | 2 +-
tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs | 2 +-
tp/Texinfo/XS/structuring_transfo/transformations.c | 12 +++++++++---
tp/Texinfo/XS/structuring_transfo/transformations.h | 2 +-
5 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 9b97eb0402..41e606e183 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-01-06 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/structuring_transfo/transformations.c
+ (reference_to_arg_internal, reference_to_arg_in_tree): add document as
+ argument to reference_to_arg_in_tree and reference_to_arg_internal.
+ Update callers. Remove destroyed element from
+ document->internal_references.
+
2024-01-06 Patrice Dumas <pertusus@free.fr>
* Pod-Simple-Texinfo/Makefile.am (AM_TESTS_ENVIRONMENT): set for out
diff --git a/man/pod2texi.1 b/man/pod2texi.1
index 0300035f4d..fd36c1e70f 100644
--- a/man/pod2texi.1
+++ b/man/pod2texi.1
@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "POD2TEXI 1"
-.TH POD2TEXI 1 "2023-12-27" "perl" "User Contributed Perl Documentation"
+.TH POD2TEXI 1 "2024-01-06" "perl" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs
b/tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs
index 73cedd1499..d1cad4a903 100644
--- a/tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs
+++ b/tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs
@@ -136,7 +136,7 @@ reference_to_arg_in_tree (SV *tree_in)
_new_node, for example */
document = get_sv_tree_document (tree_in, 0);
if (document)
- reference_to_arg_in_tree (document->tree);
+ reference_to_arg_in_tree (document->tree, document);
void
associate_internal_references (SV *document_in, ...)
diff --git a/tp/Texinfo/XS/structuring_transfo/transformations.c
b/tp/Texinfo/XS/structuring_transfo/transformations.c
index a6d8c02452..536700f639 100644
--- a/tp/Texinfo/XS/structuring_transfo/transformations.c
+++ b/tp/Texinfo/XS/structuring_transfo/transformations.c
@@ -578,7 +578,7 @@ new_node (ELEMENT *node_tree, DOCUMENT *document)
node_tree = protect_colon_in_tree (node_tree);
/* in menu entry with label */
node_tree = protect_node_after_label_in_tree (node_tree);
- node_tree = reference_to_arg_in_tree (node_tree);
+ node_tree = reference_to_arg_in_tree (node_tree, document);
if (node_tree->contents.number <= 0)
{
@@ -838,6 +838,7 @@ reference_to_arg_internal (const char *type,
if (e->cmd
&& builtin_command_data[e->cmd].flags & CF_ref)
{
+ DOCUMENT *document = (DOCUMENT *) argument;
int index = 0;
int *arguments_order = ref_5_args_order;
/* container for the new elements to insert, will be destroyed
@@ -877,6 +878,11 @@ reference_to_arg_internal (const char *type,
}
index++;
}
+ if (document && document->internal_references
+ && document->internal_references->number > 0)
+ {
+ remove_element_from_list (document->internal_references, e);
+ }
destroy_element_and_children (e);
if (new->contents.number == 0)
text_append (&new->text, "");
@@ -887,9 +893,9 @@ reference_to_arg_internal (const char *type,
}
ELEMENT *
-reference_to_arg_in_tree (ELEMENT *tree)
+reference_to_arg_in_tree (ELEMENT *tree, DOCUMENT *document)
{
- return modify_tree (tree, &reference_to_arg_internal, 0);
+ return modify_tree (tree, &reference_to_arg_internal, document);
}
void
diff --git a/tp/Texinfo/XS/structuring_transfo/transformations.h
b/tp/Texinfo/XS/structuring_transfo/transformations.h
index 5b6b0a21d5..efaab3d6b8 100644
--- a/tp/Texinfo/XS/structuring_transfo/transformations.h
+++ b/tp/Texinfo/XS/structuring_transfo/transformations.h
@@ -10,7 +10,7 @@ ELEMENT_LIST *fill_gaps_in_sectioning (ELEMENT *root,
void relate_index_entries_to_table_items_in_tree (ELEMENT *tree,
INDEX **indices_information);
void move_index_entries_after_items_in_tree (ELEMENT *tree);
-ELEMENT *reference_to_arg_in_tree (ELEMENT *tree);
+ELEMENT *reference_to_arg_in_tree (ELEMENT *tree, DOCUMENT *document);
ELEMENT *protect_comma_in_tree (ELEMENT *tree);
ELEMENT *protect_node_after_label_in_tree (ELEMENT *tree);
void complete_tree_nodes_menus (ELEMENT *root, int use_sections);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/XS/structuring_transfo/transformations.c (reference_to_arg_internal, reference_to_arg_in_tree): add document as argument to reference_to_arg_in_tree and reference_to_arg_internal. Update callers. Remove destroyed element from document->internal_references.,
Patrice Dumas <=