[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrice Dumas |
Date: |
Wed, 2 Oct 2024 11:42:48 -0400 (EDT) |
branch: master
commit 38f705a203ea3081b27d9b8070bb7c252e73fd4b
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Aug 1 11:34:48 2024 +0200
* tp/Texinfo/XS/main/utils.c (html_get_direction_index),
tp/Texinfo/XS/convert/converter.c: move html_get_direction_index
from converter.c to utils.c.
---
ChangeLog | 6 ++++++
tp/Texinfo/XS/convert/converter.c | 20 --------------------
tp/Texinfo/XS/convert/converter.h | 3 ---
tp/Texinfo/XS/main/utils.c | 22 ++++++++++++++++++++++
tp/Texinfo/XS/main/utils.h | 2 ++
5 files changed, 30 insertions(+), 23 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index aa545a5e83..5e0b9c01f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,12 @@
Add TODO item from Bruno CI.
+2024-08-01 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/main/utils.c (html_get_direction_index),
+ tp/Texinfo/XS/convert/converter.c: move html_get_direction_index
+ from converter.c to utils.c.
+
2024-08-01 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Convert/Converter.pm,
diff --git a/tp/Texinfo/XS/convert/converter.c
b/tp/Texinfo/XS/convert/converter.c
index 70aa82d1aa..63e3d34409 100644
--- a/tp/Texinfo/XS/convert/converter.c
+++ b/tp/Texinfo/XS/convert/converter.c
@@ -1482,26 +1482,6 @@ free_generic_converter (CONVERTER *self)
}
-/* here because it is used in main/get_perl_info.c */
-
-/* return -2 if there are info and not found. */
-int
-html_get_direction_index (const CONVERTER *converter, const char *direction)
-{
- int i;
- if (converter && converter->direction_unit_direction_name)
- {
- for (i = 0; converter->direction_unit_direction_name[i]; i++)
- {
- if (!strcmp (direction, converter->direction_unit_direction_name[i]))
- return i;
- }
- return -2;
- }
- return -1;
-}
-
-
/* XML conversion functions */
diff --git a/tp/Texinfo/XS/convert/converter.h
b/tp/Texinfo/XS/convert/converter.h
index dda4db52c2..ce24c33fa6 100644
--- a/tp/Texinfo/XS/convert/converter.h
+++ b/tp/Texinfo/XS/convert/converter.h
@@ -181,9 +181,6 @@ void free_output_unit_files (FILE_NAME_PATH_COUNTER_LIST
*output_unit_files);
void free_generic_converter (CONVERTER *self);
-int html_get_direction_index (const CONVERTER *converter,
- const char *direction);
-
void xml_format_text_with_numeric_entities (const char *text, TEXT *result);
char *xml_numeric_entity_accent (enum command_id cmd, const char *text);
char *xml_comment (CONVERTER *converter, const char *text);
diff --git a/tp/Texinfo/XS/main/utils.c b/tp/Texinfo/XS/main/utils.c
index 653407ea94..b52c7481e9 100644
--- a/tp/Texinfo/XS/main/utils.c
+++ b/tp/Texinfo/XS/main/utils.c
@@ -1612,6 +1612,9 @@ enumerate_item_representation (char *specification, int
number)
return result.text;
}
+
+/* html options */
+
void
html_free_button_specification_list (BUTTON_SPECIFICATION_LIST *buttons)
{
@@ -1667,6 +1670,25 @@ html_free_direction_icons (DIRECTION_ICON_LIST
*direction_icons)
direction_icons->list = 0;
}
+/* here because it is used in main/get_perl_info.c */
+
+/* return -2 if there are info and not found. */
+int
+html_get_direction_index (const CONVERTER *converter, const char *direction)
+{
+ int i;
+ if (converter && converter->direction_unit_direction_name)
+ {
+ for (i = 0; converter->direction_unit_direction_name[i]; i++)
+ {
+ if (!strcmp (direction, converter->direction_unit_direction_name[i]))
+ return i;
+ }
+ return -2;
+ }
+ return -1;
+}
+
/* options and converters */
OPTIONS *
diff --git a/tp/Texinfo/XS/main/utils.h b/tp/Texinfo/XS/main/utils.h
index a4b15f8523..a64e89f1aa 100644
--- a/tp/Texinfo/XS/main/utils.h
+++ b/tp/Texinfo/XS/main/utils.h
@@ -261,6 +261,8 @@ const ELEMENT *get_cmd_global_uniq_command (
void html_free_button_specification_list (BUTTON_SPECIFICATION_LIST *buttons);
void html_clear_direction_icons (DIRECTION_ICON_LIST *direction_icons);
void html_free_direction_icons (DIRECTION_ICON_LIST *direction_icons);
+int html_get_direction_index (const CONVERTER *converter,
+ const char *direction);
void initialize_option (OPTION *option, enum global_option_type type);
void clear_option (OPTION *option);