[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrice Dumas |
Date: |
Wed, 31 Jan 2024 19:43:15 -0500 (EST) |
branch: master
commit f7cd9ef6f1f189734916b34a31bf56a7d552ed04
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Wed Jan 31 22:54:19 2024 +0100
* tp/Texinfo/XS/main/document.c (document_merged_indices): rename
merged_indices as document_merged_indices.
* tp/Texinfo/XS/convert/convert_html.c (html_sort_index_entries): use
document_merged_indices.
* tp/Texinfo/XS/main/manipulate_indices.c
(index_entry_element_sort_string, index_entry_element_sort_string_key)
(setup_sortable_index_entries, sort_indices_by_letter): use const for
merged_indices.
---
ChangeLog | 13 +++++++++++++
tp/Texinfo/XS/convert/convert_html.c | 3 ++-
tp/Texinfo/XS/main/document.c | 2 +-
tp/Texinfo/XS/main/document.h | 2 +-
tp/Texinfo/XS/main/manipulate_indices.c | 17 +++++++++--------
tp/Texinfo/XS/main/manipulate_indices.h | 8 ++++----
6 files changed, 30 insertions(+), 15 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ef9ccf5c7a..b13d713500 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2024-01-31 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/main/document.c (document_merged_indices): rename
+ merged_indices as document_merged_indices.
+
+ * tp/Texinfo/XS/convert/convert_html.c (html_sort_index_entries): use
+ document_merged_indices.
+
+ * tp/Texinfo/XS/main/manipulate_indices.c
+ (index_entry_element_sort_string, index_entry_element_sort_string_key)
+ (setup_sortable_index_entries, sort_indices_by_letter): use const for
+ merged_indices.
+
2024-01-31 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Common.pm (locate_include_file): change code used to
diff --git a/tp/Texinfo/XS/convert/convert_html.c
b/tp/Texinfo/XS/convert/convert_html.c
index 926e921b49..e68847a6f1 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -4672,7 +4672,8 @@ get_copiable_anchor (CONVERTER *self, const char *id)
void
html_sort_index_entries (CONVERTER *self)
{
- MERGED_INDICES *merged_indices = merge_indices (self->document->index_names);
+ const MERGED_INDICES *merged_indices
+ = document_merged_indices (self->document);
if (self->document->index_names)
{
diff --git a/tp/Texinfo/XS/main/document.c b/tp/Texinfo/XS/main/document.c
index e72e6e9ed7..0c1f71ecc9 100644
--- a/tp/Texinfo/XS/main/document.c
+++ b/tp/Texinfo/XS/main/document.c
@@ -135,7 +135,7 @@ register_document_options (DOCUMENT *document, OPTIONS
*options)
}
const MERGED_INDICES *
-merged_indices (DOCUMENT *document)
+document_merged_indices (DOCUMENT *document)
{
if (document->index_names)
{
diff --git a/tp/Texinfo/XS/main/document.h b/tp/Texinfo/XS/main/document.h
index 6cb843a838..398345b0e0 100644
--- a/tp/Texinfo/XS/main/document.h
+++ b/tp/Texinfo/XS/main/document.h
@@ -35,7 +35,7 @@ void register_document_options (DOCUMENT *document, OPTIONS
*options);
void register_document_convert_index_text_options (DOCUMENT *document,
struct TEXT_OPTIONS *text_options);
-const MERGED_INDICES *merged_indices (DOCUMENT *document);
+const MERGED_INDICES *document_merged_indices (DOCUMENT *document);
void remove_document_descriptor (int document_descriptor);
TREE_AND_STRINGS *unregister_document_descriptor_tree (int
document_descriptor);
diff --git a/tp/Texinfo/XS/main/manipulate_indices.c
b/tp/Texinfo/XS/main/manipulate_indices.c
index 50c05ea9fe..c1cc8101a4 100644
--- a/tp/Texinfo/XS/main/manipulate_indices.c
+++ b/tp/Texinfo/XS/main/manipulate_indices.c
@@ -180,8 +180,8 @@ index_content_element (const ELEMENT *element, int
prefer_reference_element)
}
char *
-index_entry_element_sort_string (INDEX_ENTRY *main_entry,
- ELEMENT *index_entry_element,
+index_entry_element_sort_string (const INDEX_ENTRY *main_entry,
+ const ELEMENT *index_entry_element,
TEXT_OPTIONS *options, int in_code,
int prefer_reference_element)
{
@@ -269,8 +269,8 @@ typedef struct INDEX_SORT_STRING_KEY {
} INDEX_SORT_STRING_KEY;
static INDEX_SORT_STRING_KEY *
-index_entry_element_sort_string_key (INDEX_ENTRY *main_entry,
- ELEMENT *index_entry_element,
+index_entry_element_sort_string_key (const INDEX_ENTRY *main_entry,
+ const ELEMENT *index_entry_element,
TEXT_OPTIONS *options, int in_code,
locale_t collation_locale,
int prefer_reference_element)
@@ -288,8 +288,9 @@ index_entry_element_sort_string_key (INDEX_ENTRY
*main_entry,
INDICES_SORTABLE_ENTRIES *
setup_sortable_index_entries (ERROR_MESSAGE_LIST *error_messages,
- OPTIONS *options, MERGED_INDICES *merged_indices,
- INDEX **indices_information, locale_t *collation_locale)
+ OPTIONS *options, const MERGED_INDICES *merged_indices,
+ INDEX **indices_information,
+ locale_t *collation_locale)
{
size_t i;
TEXT_OPTIONS *convert_text_options
@@ -561,8 +562,8 @@ compare_sortable_index_entry (const void *a, const void *b)
INDEX_SORTED_BY_LETTER *
sort_indices_by_letter (ERROR_MESSAGE_LIST *error_messages,
- OPTIONS *options, MERGED_INDICES *merged_indices,
- INDEX **indices_information)
+ OPTIONS *options, const MERGED_INDICES *merged_indices,
+ INDEX **indices_information)
{
size_t i;
int index_nr = 0;
diff --git a/tp/Texinfo/XS/main/manipulate_indices.h
b/tp/Texinfo/XS/main/manipulate_indices.h
index 14f500527c..1655972208 100644
--- a/tp/Texinfo/XS/main/manipulate_indices.h
+++ b/tp/Texinfo/XS/main/manipulate_indices.h
@@ -41,13 +41,13 @@ void destroy_indices_sorted_by_letter (
ELEMENT *index_content_element (const ELEMENT *element,
int prefer_reference_element);
-char *index_entry_element_sort_string (INDEX_ENTRY *main_entry,
- ELEMENT *index_entry_element,
+char *index_entry_element_sort_string (const INDEX_ENTRY *main_entry,
+ const ELEMENT *index_entry_element,
TEXT_OPTIONS *options, int in_code,
int prefer_reference_element);
INDEX_SORTED_BY_LETTER *sort_indices_by_letter (
ERROR_MESSAGE_LIST *error_messages,
- OPTIONS *options, MERGED_INDICES *merged_indices,
- INDEX **indices_information);
+ OPTIONS *options, const MERGED_INDICES *merged_indices,
+ INDEX **indices_information);
#endif