texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: Patrice Dumas
Date: Thu, 3 Oct 2024 14:37:59 -0400 (EDT)

branch: master
commit ca5c50b26b87ca2705a9e483dbe5fe7c75ea645b
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Wed Aug 7 18:06:31 2024 +0200

    * tp/Texinfo/XS/main/builtin_commands.c (ref_3_args_order)
    (ref_5_args_order), tp/Texinfo/XS/main/builtin_commands.h,
    tp/Texinfo/XS/main/node_name_normalization.c,
    tp/Texinfo/XS/structuring_transfo/transformations.c: move definitions
    of ref_3_args_order and ref_5_args_order to builtin_commands.c such
    that they are defined in one file only.
---
 ChangeLog                                           | 9 +++++++++
 tp/Texinfo/XS/main/builtin_commands.c               | 5 +++++
 tp/Texinfo/XS/main/builtin_commands.h               | 3 +++
 tp/Texinfo/XS/main/node_name_normalization.c        | 3 ---
 tp/Texinfo/XS/structuring_transfo/transformations.c | 4 ----
 5 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7c9bc4ea56..201e262a92 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-08-07  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/XS/main/builtin_commands.c (ref_3_args_order)
+       (ref_5_args_order), tp/Texinfo/XS/main/builtin_commands.h,
+       tp/Texinfo/XS/main/node_name_normalization.c,
+       tp/Texinfo/XS/structuring_transfo/transformations.c: move definitions
+       of ref_3_args_order and ref_5_args_order to builtin_commands.c such
+       that they are defined in one file only.
+
 2024-10-03  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/main/get_perl_info.h: remove
diff --git a/tp/Texinfo/XS/main/builtin_commands.c 
b/tp/Texinfo/XS/main/builtin_commands.c
index 3cdc136eb1..6fd0aff826 100644
--- a/tp/Texinfo/XS/main/builtin_commands.c
+++ b/tp/Texinfo/XS/main/builtin_commands.c
@@ -29,6 +29,11 @@
 
 #include "command_data.c"
 
+/* order of argument to use to find a non empty argument to use to represent
+   the command content for ref commands with 3 or 5 arguments */
+int ref_3_args_order[] = {0, 1, 2, -1};
+int ref_5_args_order[] = {0, 1, 2, 4, 3, -1};
+
 static int
 compare_command_fn (const void *a, const void *b)
 {
diff --git a/tp/Texinfo/XS/main/builtin_commands.h 
b/tp/Texinfo/XS/main/builtin_commands.h
index eb5c2be1df..5efd596ebb 100644
--- a/tp/Texinfo/XS/main/builtin_commands.h
+++ b/tp/Texinfo/XS/main/builtin_commands.h
@@ -37,6 +37,9 @@ extern COMMAND builtin_command_data[];
 #define command_other_flags(elt) \
    (!(elt) ? 0 : (builtin_command_data[(elt)->e.c->cmd].other_flags))
 
+extern int ref_3_args_order[];
+extern int ref_5_args_order[];
+
 enum command_id lookup_builtin_command (const char *cmdname);
 const char *element_command_name (const ELEMENT *e);
 enum command_id element_builtin_cmd (const ELEMENT *e);
diff --git a/tp/Texinfo/XS/main/node_name_normalization.c 
b/tp/Texinfo/XS/main/node_name_normalization.c
index 5ade1fa621..42ef2f9f4a 100644
--- a/tp/Texinfo/XS/main/node_name_normalization.c
+++ b/tp/Texinfo/XS/main/node_name_normalization.c
@@ -41,9 +41,6 @@
 /* put in another file? Add an extern declaration in the .h file?*/
 #include "cmd_normalization.c"
 
-int ref_3_args_order[] = {0, 1, 2, -1};
-int ref_5_args_order[] = {0, 1, 2, 4, 3, -1};
-
 #define ADD(x) text_append (result, x)
 void
 convert_to_normalized_internal (const ELEMENT *e, TEXT *result)
diff --git a/tp/Texinfo/XS/structuring_transfo/transformations.c 
b/tp/Texinfo/XS/structuring_transfo/transformations.c
index 9973f587a9..8230f1341a 100644
--- a/tp/Texinfo/XS/structuring_transfo/transformations.c
+++ b/tp/Texinfo/XS/structuring_transfo/transformations.c
@@ -845,10 +845,6 @@ insert_nodes_for_sectioning_commands (DOCUMENT *document)
   return added_nodes;
 }
 
-/* also in node_name_normalization.c */
-int ref_3_args_order[] = {0, 1, 2, -1};
-int ref_5_args_order[] = {0, 1, 2, 4, 3, -1};
-
 /*
  This converts a reference @-command to simple text using one of the
  arguments.  This is used to remove reference @-command from



reply via email to

[Prev in Thread] Current Thread [Next in Thread]