[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Gavin D. Smith |
Date: |
Tue, 22 Oct 2024 18:17:26 -0400 (EDT) |
branch: master
commit 5315be50662e688546b7d96aa499df8ffaf1fdaa
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Mon Oct 21 20:50:54 2024 +0100
* tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash):
Place all calls of store_flag macro together.
---
ChangeLog | 5 +++
tp/Texinfo/XS/main/build_perl_info.c | 59 ++++++++++++++++--------------------
2 files changed, 31 insertions(+), 33 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ab6d5ced50..c401dbb611 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-10-21 Gavin Smith <gavinsmith0123@gmail.com>
+
+ * tp/Texinfo/XS/main/build_perl_info.c (element_to_perl_hash):
+ Place all calls of store_flag macro together.
+
2024-10-22 Patrice Dumas <pertusus@free.fr>
Rename tp/Texinfo/XS/main/options_types.h as options_data.h
diff --git a/tp/Texinfo/XS/main/build_perl_info.c
b/tp/Texinfo/XS/main/build_perl_info.c
index 59c38d510d..fa7e0fd077 100644
--- a/tp/Texinfo/XS/main/build_perl_info.c
+++ b/tp/Texinfo/XS/main/build_perl_info.c
@@ -773,6 +773,32 @@ element_to_perl_hash (ELEMENT *e, int avoid_recursion)
if (e->flags & EF_##flag) \
store_extra_flag (e, #flag, &extra_hv); \
+ /* node */
+ store_flag(isindex)
+ /* node (anchor, float) */
+ store_flag(is_target)
+ /* def_line for block/line for @def*x */
+ store_flag(omit_def_name_space)
+ /* @def*x */
+ store_flag(not_after_command)
+ /* (node, anchor) float */
+ store_flag(is_target)
+ /* @*table */
+ store_flag(command_as_argument_kbd_code)
+ store_flag(invalid_syntax)
+ /* (node,) anchor, (float) */
+ store_flag(is_target)
+ /* kbd */
+ store_flag(code)
+ /* def_line for block/line for @def*x */
+ store_flag(omit_def_name_space)
+ /* ET_paragraph */
+ store_flag(indent)
+ /* ET_paragraph */
+ store_flag(noindent)
+
+#undef store_flag
+
if (e->e.c->cmd)
{
enum command_id data_cmd;
@@ -804,17 +830,6 @@ element_to_perl_hash (ELEMENT *e, int avoid_recursion)
e->e.c->string_info[sit_command_name],
"command_name", &info_hv);
}
- else
- {
- /* node */
- store_flag(isindex)
- /* node (anchor, float) */
- store_flag(is_target)
- /* def_line for block/line for @def*x */
- store_flag(omit_def_name_space)
- /* @def*x */
- store_flag(not_after_command)
- }
}
else
{
@@ -830,16 +845,11 @@ element_to_perl_hash (ELEMENT *e, int avoid_recursion)
store_info_element (e, e->elt_info[eit_spaces_before_argument],
"spaces_before_argument",
avoid_recursion, &info_hv);
- /* (node, anchor) float */
- store_flag(is_target)
- /* @*table */
- store_flag(command_as_argument_kbd_code)
} else {
/* @*macro */
if (e->e.c->string_info[sit_arg_line])
store_info_string (e, e->e.c->string_info[sit_arg_line],
"arg_line", &info_hv);
- store_flag(invalid_syntax)
}
}
else if (e->type != ET_nobrace_command
@@ -869,10 +879,6 @@ element_to_perl_hash (ELEMENT *e, int avoid_recursion)
store_info_string (e, e->e.c->string_info[sit_delimiter],
"delimiter", &info_hv);
}
- /* (node,) anchor, (float) */
- store_flag(is_target)
- /* kbd */
- store_flag(code)
}
}
}
@@ -883,11 +889,6 @@ element_to_perl_hash (ELEMENT *e, int avoid_recursion)
store_info_element (e, e->elt_info[eit_spaces_before_argument],
"spaces_before_argument",
avoid_recursion, &info_hv);
- if (e->type == ET_def_line)
- {
- /* def_line for block/line for @def*x */
- store_flag(omit_def_name_space)
- }
}
if (type_data[e->type].flags & TF_spaces_after)
@@ -902,13 +903,6 @@ element_to_perl_hash (ELEMENT *e, int avoid_recursion)
avoid_recursion, &info_hv);
}
}
- else if (e->type == ET_paragraph)
- {
- /* ET_paragraph */
- store_flag(indent)
- /* ET_paragraph */
- store_flag(noindent)
- }
else if (type_data[e->type].flags & TF_macro_call)
{
if (e->e.c->string_info[sit_alias_of])
@@ -928,7 +922,6 @@ element_to_perl_hash (ELEMENT *e, int avoid_recursion)
}
}
-#undef store_flag
if (e->e.c->contents.number > 0)
{