[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrice Dumas |
Date: |
Tue, 1 Oct 2024 17:24:30 -0400 (EDT) |
branch: master
commit b88b923adbcfaec6eda3d05c8536ec33558100bb
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Mon Jul 29 12:56:21 2024 +0200
* doc/texi2any_api.texi (Directions), tp/Texinfo/OutputUnits.pm
(@relative_directions_order), tp/Texinfo/XS/main/tree_types.h
(RUD_DIRECTIONS_TYPES_LIST): remove SectionNext, SectionPrev and
SectionUp, they have no associated strings and have not be set for a
long time.
* tp/Texinfo/XS/convert/get_html_perl_info.c
(html_converter_initialize_sv), tp/Texinfo/XS/main/converter_types.h,
tp/Texinfo/XS/main/option_types.h: add comment, move code around.
---
ChangeLog | 12 ++++++++++++
doc/texi2any_api.texi | 9 ---------
tp/Texinfo/OutputUnits.pm | 4 ++--
tp/Texinfo/XS/convert/get_converter_perl_info.c | 1 -
tp/Texinfo/XS/convert/get_html_perl_info.c | 7 +++++++
tp/Texinfo/XS/main/converter_types.h | 6 +++---
tp/Texinfo/XS/main/option_types.h | 4 ++++
tp/Texinfo/XS/main/tree_types.h | 3 ---
8 files changed, 28 insertions(+), 18 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 69ea6b9e9b..812e1e69fe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2024-07-29 Patrice Dumas <pertusus@free.fr>
+
+ * doc/texi2any_api.texi (Directions), tp/Texinfo/OutputUnits.pm
+ (@relative_directions_order), tp/Texinfo/XS/main/tree_types.h
+ (RUD_DIRECTIONS_TYPES_LIST): remove SectionNext, SectionPrev and
+ SectionUp, they have no associated strings and have not be set for a
+ long time.
+
+ * tp/Texinfo/XS/convert/get_html_perl_info.c
+ (html_converter_initialize_sv), tp/Texinfo/XS/main/converter_types.h,
+ tp/Texinfo/XS/main/option_types.h: add comment, move code around.
+
2024-07-29 Patrice Dumas <pertusus@free.fr>
* tp/maintain/generate_convert_data_perl_code.pl: process special
diff --git a/doc/texi2any_api.texi b/doc/texi2any_api.texi
index b220e1903e..d0cab68d4c 100644
--- a/doc/texi2any_api.texi
+++ b/doc/texi2any_api.texi
@@ -1004,15 +1004,6 @@ Previous section output unit at the same level.
@item Up
Up section.
-@item SectionNext
-Next output unit in section reading order.
-
-@item SectionPrev
-Previous output unit in section reading order.
-
-@item SectionUp
-Up in section reading order.
-
@item NodeNext
Next node output unit.
diff --git a/tp/Texinfo/OutputUnits.pm b/tp/Texinfo/OutputUnits.pm
index 4189e16652..2e02948f10 100644
--- a/tp/Texinfo/OutputUnits.pm
+++ b/tp/Texinfo/OutputUnits.pm
@@ -655,8 +655,8 @@ sub output_unit_texi($)
# Should be in the same order as relative_unit_direction_name
# in main/output_unit.c
my @relative_directions_order = ('This', 'Forward', 'Back', 'FastForward',
- 'FastBack', 'Next', 'Prev', 'Up', 'SectionNext', 'SectionPrev',
- 'SectionUp', 'NodeNext', 'NodePrev', 'NodeUp', 'NodeForward', 'NodeBack');
+ 'FastBack', 'Next', 'Prev', 'Up', 'NodeNext', 'NodePrev', 'NodeUp',
+ 'NodeForward', 'NodeBack');
my @file_directions_order = ('PrevFile', 'NextFile');
my @all_directions_order
= (@relative_directions_order, @file_directions_order,
diff --git a/tp/Texinfo/XS/convert/get_converter_perl_info.c
b/tp/Texinfo/XS/convert/get_converter_perl_info.c
index 00dacef589..13ef9a5377 100644
--- a/tp/Texinfo/XS/convert/get_converter_perl_info.c
+++ b/tp/Texinfo/XS/convert/get_converter_perl_info.c
@@ -213,7 +213,6 @@ converter_initialize (SV *converter_sv)
FETCH(configured);
-
if (configured_sv && SvOK (*configured_sv))
{
get_sv_configured_options (*configured_sv, converter->conf);
diff --git a/tp/Texinfo/XS/convert/get_html_perl_info.c
b/tp/Texinfo/XS/convert/get_html_perl_info.c
index 1e6fb9afdc..cae30a2027 100644
--- a/tp/Texinfo/XS/convert/get_html_perl_info.c
+++ b/tp/Texinfo/XS/convert/get_html_perl_info.c
@@ -339,6 +339,13 @@ html_converter_initialize_sv (SV *converter_sv,
converter->default_converted_directions_strings[DS_type][i]
= strdup (SvPVutf8_nolen (*spec_sv));
}
+ /*
+ No direction strings for Footnotes
+ else
+ {
+ fprintf (stderr, "NNN no string: %s\n", direction_name);
+ }
+ */
}
}
}
diff --git a/tp/Texinfo/XS/main/converter_types.h
b/tp/Texinfo/XS/main/converter_types.h
index 1d4306d362..07a99bc2bc 100644
--- a/tp/Texinfo/XS/main/converter_types.h
+++ b/tp/Texinfo/XS/main/converter_types.h
@@ -113,6 +113,9 @@ enum special_target_type {
tds_type(example) \
tds_type(rel)
+#define TDS_TRANSLATED_MAX_NR TDS_type_text +1
+#define TDS_TYPE_MAX_NR TDS_type_rel +1
+
enum direction_string_type {
#define tds_type(name) TDS_type_ ## name,
TDS_TRANSLATED_TYPES_LIST
@@ -120,9 +123,6 @@ enum direction_string_type {
#undef tds_type
};
-#define TDS_TRANSLATED_MAX_NR TDS_type_text +1
-#define TDS_TYPE_MAX_NR TDS_type_rel +1
-
enum direction_string_context {
TDS_context_normal,
TDS_context_string,
diff --git a/tp/Texinfo/XS/main/option_types.h
b/tp/Texinfo/XS/main/option_types.h
index 605dcd78d8..e52b57ac02 100644
--- a/tp/Texinfo/XS/main/option_types.h
+++ b/tp/Texinfo/XS/main/option_types.h
@@ -51,10 +51,14 @@ enum direction_unit_direction {
#undef rud_type
};
+/* TODO next two very dangerous */
#define FIRSTINFILE_MIN_IDX D_direction_FirstInFileThis
#define FIRSTINFILE_MAX_IDX D_direction_FirstInFileNodeBack
+
#define FIRSTINFILE_OFFSET (D_direction_This - D_direction_FirstInFileThis)
#define FIRSTINFILE_NR (FIRSTINFILE_MAX_IDX - FIRSTINFILE_MIN_IDX +1)
+/* used for the three directions like D_direction_Next to retrieve the
+ node direction (independentely) if USE_NODE_DIRECTIONS is set */
#define NODE_DIRECTIONS_OFFSET (D_direction_NodeNext - D_direction_Next)
#define NON_SPECIAL_DIRECTIONS_NR (FIRSTINFILE_MAX_IDX +1)
diff --git a/tp/Texinfo/XS/main/tree_types.h b/tp/Texinfo/XS/main/tree_types.h
index 0b372f5c4f..5b80dc1404 100644
--- a/tp/Texinfo/XS/main/tree_types.h
+++ b/tp/Texinfo/XS/main/tree_types.h
@@ -188,9 +188,6 @@ enum global_unit_direction {
rud_type(Next) \
rud_type(Prev) \
rud_type(Up) \
- rud_type(SectionNext) \
- rud_type(SectionPrev) \
- rud_type(SectionUp) \
rud_type(NodeNext) \
rud_type(NodePrev) \
rud_type(NodeUp) \