[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/XS/convert/converter.c (converter_co
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/XS/convert/converter.c (converter_converter), tp/Texinfo/XS/convert/texinfo.c (txi_converter_setup), tp/Texinfo/XS/teximakehtml.c (main): add C converter specific flags argument to converter_converter and txi_converter_setup. |
Date: |
Sun, 06 Oct 2024 03:22:28 -0400 |
This is an automated email from the git hooks/post-receive script.
pertusus pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 9b6d9f8f81 * tp/Texinfo/XS/convert/converter.c (converter_converter),
tp/Texinfo/XS/convert/texinfo.c (txi_converter_setup),
tp/Texinfo/XS/teximakehtml.c (main): add C converter specific flags argument to
converter_converter and txi_converter_setup.
9b6d9f8f81 is described below
commit 9b6d9f8f81cb7c7308063108f2df7607eb8b9996
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Oct 6 09:22:35 2024 +0200
* tp/Texinfo/XS/convert/converter.c (converter_converter),
tp/Texinfo/XS/convert/texinfo.c (txi_converter_setup),
tp/Texinfo/XS/teximakehtml.c (main): add C converter specific flags
argument to converter_converter and txi_converter_setup.
* tp/Texinfo/XS/convert/texinfo.c: remove txi_converter.
---
ChangeLog | 9 +++++++++
tp/Texinfo/XS/convert/converter.c | 15 ++++++++++++---
tp/Texinfo/XS/convert/converter.h | 3 ++-
tp/Texinfo/XS/convert/texinfo.c | 12 +++---------
tp/Texinfo/XS/convert/texinfo.h | 5 ++---
tp/Texinfo/XS/teximakehtml.c | 7 ++++++-
6 files changed, 34 insertions(+), 17 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 721c7036ac..932e969579 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-10-06 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/convert/converter.c (converter_converter),
+ tp/Texinfo/XS/convert/texinfo.c (txi_converter_setup),
+ tp/Texinfo/XS/teximakehtml.c (main): add C converter specific flags
+ argument to converter_converter and txi_converter_setup.
+
+ * tp/Texinfo/XS/convert/texinfo.c: remove txi_converter.
+
2024-10-05 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/Makefile.am (noinst_PROGRAMS): build teximakehtml only
diff --git a/tp/Texinfo/XS/convert/converter.c
b/tp/Texinfo/XS/convert/converter.c
index 2412615eec..9a547bc256 100644
--- a/tp/Texinfo/XS/convert/converter.c
+++ b/tp/Texinfo/XS/convert/converter.c
@@ -445,18 +445,27 @@ converter_initialize (CONVERTER *converter)
}
/* Texinfo::Convert::XXXX->converter($conf) in Perl */
+/* only called from C, not from Perl */
CONVERTER *
converter_converter (enum converter_format format,
- const CONVERTER_INITIALIZATION_INFO *input_user_conf)
+ const CONVERTER_INITIALIZATION_INFO *input_user_conf,
+ unsigned long converter_flags)
{
CONVERTER_INITIALIZATION_INFO *format_defaults;
+ unsigned long flags;
+
/* NOTE if HAVE_CXX_HASHMAP is not set, even with CONVF_cxx_hashmap
string lists will be used */
- size_t converter_descriptor = new_converter (format, CONVF_cxx_hashmap);
+ if (!converter_flags)
+ flags = CONVF_cxx_hashmap;
/*
To use a string list. Slower.
- size_t converter_descriptor = new_converter (format, CONVF_string_list);
+ flags = CONVF_string_list;
*/
+ else
+ flags = converter_flags;
+
+ size_t converter_descriptor = new_converter (format, flags);
CONVERTER *converter = retrieve_converter (converter_descriptor);
CONVERTER_INITIALIZATION_INFO *user_conf
diff --git a/tp/Texinfo/XS/convert/converter.h
b/tp/Texinfo/XS/convert/converter.h
index 6306b86f58..e7c4cf713a 100644
--- a/tp/Texinfo/XS/convert/converter.h
+++ b/tp/Texinfo/XS/convert/converter.h
@@ -138,7 +138,8 @@ CONVERTER_INITIALIZATION_INFO *converter_defaults (
enum converter_format converter_format,
CONVERTER_INITIALIZATION_INFO *user_conf);
CONVERTER *converter_converter (enum converter_format format,
- const CONVERTER_INITIALIZATION_INFO *user_conf);
+ const CONVERTER_INITIALIZATION_INFO *input_user_conf,
+ unsigned long converter_flags);
CONVERTER_INITIALIZATION_INFO *new_converter_initialization_info (void);
void destroy_converter_initialization_info (
diff --git a/tp/Texinfo/XS/convert/texinfo.c b/tp/Texinfo/XS/convert/texinfo.c
index f1b64da7f6..bc9291675f 100644
--- a/tp/Texinfo/XS/convert/texinfo.c
+++ b/tp/Texinfo/XS/convert/texinfo.c
@@ -274,13 +274,6 @@ txi_complete_document (DOCUMENT *document, unsigned long
flags,
document->options);
}
-CONVERTER *
-txi_converter (enum converter_format format,
- CONVERTER_INITIALIZATION_INFO *user_conf)
-{
- return converter_converter (format, user_conf);
-}
-
static void
err_add_option_string_value (OPTIONS_LIST *options_list,
OPTION **sorted_options,
@@ -300,7 +293,8 @@ txi_converter_setup (const char *format_str,
const char *locale_encoding,
const char *program_file,
const STRING_LIST *texinfo_language_config_dirs,
- OPTIONS_LIST *customizations)
+ OPTIONS_LIST *customizations,
+ unsigned long converter_flags)
{
enum converter_format converter_format
= find_format_name_converter_format (format_str);
@@ -366,7 +360,7 @@ txi_converter_setup (const char *format_str,
copy_options_list (&conf->conf, customizations);
}
- self = converter_converter (converter_format, conf);
+ self = converter_converter (converter_format, conf, converter_flags);
destroy_converter_initialization_info (conf);
return self;
diff --git a/tp/Texinfo/XS/convert/texinfo.h b/tp/Texinfo/XS/convert/texinfo.h
index fb56e840c0..48ddb7362d 100644
--- a/tp/Texinfo/XS/convert/texinfo.h
+++ b/tp/Texinfo/XS/convert/texinfo.h
@@ -39,14 +39,13 @@ DOCUMENT *txi_parse_texi_file (const char *input_file_path,
int *status);
void txi_complete_document (DOCUMENT *document, unsigned long flags,
int format_menu);
-CONVERTER *txi_converter (enum converter_format format,
- CONVERTER_INITIALIZATION_INFO *conf);
CONVERTER *txi_converter_setup (const char *converter_format,
const char *output_format,
const char *locale_encoding,
const char *program_file,
const STRING_LIST *texinfo_language_config_dirs,
- OPTIONS_LIST *customizations);
+ OPTIONS_LIST *customizations,
+ unsigned long converter_flags);
char *txi_html_output (CONVERTER *converter, DOCUMENT *document);
diff --git a/tp/Texinfo/XS/teximakehtml.c b/tp/Texinfo/XS/teximakehtml.c
index 11c5db292e..73fc5beffc 100644
--- a/tp/Texinfo/XS/teximakehtml.c
+++ b/tp/Texinfo/XS/teximakehtml.c
@@ -298,7 +298,12 @@ main (int argc, char *argv[])
converter = txi_converter_setup ("html", "html", locale_encoding,
program_file,
&converter_texinfo_language_config_dirs,
- &convert_options);
+ &convert_options,
+ /* default, use C++ hashmap if available */
+ 0);
+ /* to test linear search
+ CONVF_string_list);
+ */
free_strings_list (&converter_texinfo_language_config_dirs);
free_strings_list (&texinfo_language_config_dirs);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/XS/convert/converter.c (converter_converter), tp/Texinfo/XS/convert/texinfo.c (txi_converter_setup), tp/Texinfo/XS/teximakehtml.c (main): add C converter specific flags argument to converter_converter and txi_converter_setup.,
Patrice Dumas <=