[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrice Dumas |
Date: |
Wed, 25 Dec 2024 05:28:57 -0500 (EST) |
branch: master
commit 5ad69ff456f2534a4cb4369171669304362b2a3c
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Wed Dec 25 11:28:44 2024 +0100
* tp/Texinfo/XS/main/customization_options.c
(new_converter_initialization_info),
tp/Texinfo/XS/convert/converter.c: move
new_converter_initialization_info to customization_options.c such that
it may be called in get_perl_info.c.
* tp/Texinfo/XS/convert/get_converter_perl_info.c,
tp/Texinfo/XS/main/get_perl_info.c (set_translated_commands)
(get_deprecated_config_directories_sv, get_converter_info_from_sv):
move to get_perl_info.c such that it is available to functions in
call_conversion_perl.c.
* tp/Texinfo/XS/convert/call_conversion_perl.c
(call_converter_converter_defaults), tp/Texinfo/XS/convert/texinfo.c
(txi_converter_format_defaults): add call_converter_converter_defaults
to get converter defaults from Perl. Add module argument to
txi_converter_format_defaults and call
call_converter_converter_defaults if set.
* tp/Texinfo/XS/main/utils.c (main): do not exist explicitely,
handle_errors should exit if there are errors, otherwise there should
be a normal exit.
---
ChangeLog | 25 ++++
tp/Texinfo/XS/convert/call_conversion_perl.c | 49 ++++++
tp/Texinfo/XS/convert/call_conversion_perl.h | 5 +
tp/Texinfo/XS/convert/converter.c | 11 --
tp/Texinfo/XS/convert/converter.h | 1 -
tp/Texinfo/XS/convert/get_converter_perl_info.c | 163 --------------------
tp/Texinfo/XS/convert/get_converter_perl_info.h | 3 -
.../XS/convert/replace_call_conversion_perl.c | 7 +
tp/Texinfo/XS/convert/texinfo.c | 18 ++-
tp/Texinfo/XS/convert/texinfo.h | 3 +-
tp/Texinfo/XS/main/customization_options.c | 14 ++
tp/Texinfo/XS/main/customization_options.h | 5 +
tp/Texinfo/XS/main/get_perl_info.c | 164 +++++++++++++++++++++
tp/Texinfo/XS/main/get_perl_info.h | 4 +
tp/Texinfo/XS/main/utils.c | 1 +
tp/Texinfo/XS/texi2any.c | 5 +-
tp/tests/README | 4 +-
tp/tests/run_parser_all.sh | 1 +
18 files changed, 297 insertions(+), 186 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index bc083071a5..d76f9c061d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2024-12-25 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/main/customization_options.c
+ (new_converter_initialization_info),
+ tp/Texinfo/XS/convert/converter.c: move
+ new_converter_initialization_info to customization_options.c such that
+ it may be called in get_perl_info.c.
+
+ * tp/Texinfo/XS/convert/get_converter_perl_info.c,
+ tp/Texinfo/XS/main/get_perl_info.c (set_translated_commands)
+ (get_deprecated_config_directories_sv, get_converter_info_from_sv):
+ move to get_perl_info.c such that it is available to functions in
+ call_conversion_perl.c.
+
+ * tp/Texinfo/XS/convert/call_conversion_perl.c
+ (call_converter_converter_defaults), tp/Texinfo/XS/convert/texinfo.c
+ (txi_converter_format_defaults): add call_converter_converter_defaults
+ to get converter defaults from Perl. Add module argument to
+ txi_converter_format_defaults and call
+ call_converter_converter_defaults if set.
+
+ * tp/Texinfo/XS/main/utils.c (main): do not exist explicitely,
+ handle_errors should exit if there are errors, otherwise there should
+ be a normal exit.
+
2024-12-25 Patrice Dumas <pertusus@free.fr>
* tp/ctexi2any.pl: add a ctexi2any wrapper that can be called as a
diff --git a/tp/Texinfo/XS/convert/call_conversion_perl.c
b/tp/Texinfo/XS/convert/call_conversion_perl.c
index 0904652e4c..1f21a2a826 100644
--- a/tp/Texinfo/XS/convert/call_conversion_perl.c
+++ b/tp/Texinfo/XS/convert/call_conversion_perl.c
@@ -33,6 +33,7 @@ Uses pTHX_
#include "converter_types.h"
#include "document_types.h"
#include "build_perl_info.h"
+#include "get_perl_info.h"
#include "get_converter_perl_info.h"
#include "xs_utils.h"
#include "converter.h"
@@ -122,6 +123,54 @@ get_sv_converter (SV *sv_in, const char *warn_string)
return converter;
}
+CONVERTER_INITIALIZATION_INFO *
+call_converter_converter_defaults (const char *module_name,
+ OPTIONS_LIST *customizations)
+{
+ SV *options_list_sv;
+ int count;
+ SV *result_sv;
+ CONVERTER_INITIALIZATION_INFO *result;
+
+ dTHX;
+
+ options_list_sv
+ = build_sv_options_from_options_list (customizations, 0);
+
+ dSP;
+
+ ENTER;
+ SAVETMPS;
+
+ PUSHMARK(SP);
+ EXTEND(SP, 2);
+
+ SvREFCNT_inc (options_list_sv);
+
+ PUSHs(sv_2mortal (newSVpv (module_name, 0)));
+ PUSHs(sv_2mortal (options_list_sv));
+ PUTBACK;
+
+ count = call_method ("converter_defaults",
+ G_SCALAR);
+
+ SPAGAIN;
+
+ if (count != 1)
+ croak ("call_convert_converter should return 1 item\n");
+
+ result_sv = POPs;
+
+ result = get_converter_info_from_sv (result_sv, module_name, 0);
+
+ PUTBACK;
+
+ FREETMPS;
+ LEAVE;
+
+ return result;
+}
+
CONVERTER *
call_convert_converter (const char *module_name,
const CONVERTER_INITIALIZATION_INFO *conf)
diff --git a/tp/Texinfo/XS/convert/call_conversion_perl.h
b/tp/Texinfo/XS/convert/call_conversion_perl.h
index eb058ccab3..863994fab0 100644
--- a/tp/Texinfo/XS/convert/call_conversion_perl.h
+++ b/tp/Texinfo/XS/convert/call_conversion_perl.h
@@ -3,11 +3,16 @@
#define CALL_CONVERSION_PERL_H
#include "tree_types.h"
+#include "option_types.h"
#include "document_types.h"
#include "converter_types.h"
void call_eval_use_module (const char *module_name);
+CONVERTER_INITIALIZATION_INFO *call_converter_converter_defaults (
+ const char *module_name,
+ OPTIONS_LIST *customizations);
+
CONVERTER *call_convert_converter (const char *module_name,
const CONVERTER_INITIALIZATION_INFO *conf);
char *call_converter_output (const char *module_name, CONVERTER *self,
diff --git a/tp/Texinfo/XS/convert/converter.c
b/tp/Texinfo/XS/convert/converter.c
index a84b026952..85fbc01e03 100644
--- a/tp/Texinfo/XS/convert/converter.c
+++ b/tp/Texinfo/XS/convert/converter.c
@@ -427,17 +427,6 @@ set_converter_init_information (CONVERTER *converter,
*/
}
-CONVERTER_INITIALIZATION_INFO *
-new_converter_initialization_info (void)
-{
- CONVERTER_INITIALIZATION_INFO *result = (CONVERTER_INITIALIZATION_INFO *)
- malloc (sizeof (CONVERTER_INITIALIZATION_INFO));
- memset (result, 0, sizeof (CONVERTER_INITIALIZATION_INFO));
-
- initialize_options_list (&result->conf);
- return result;
-}
-
void
clear_converter_initialization_info (CONVERTER_INITIALIZATION_INFO *init_info)
{
diff --git a/tp/Texinfo/XS/convert/converter.h
b/tp/Texinfo/XS/convert/converter.h
index 63a20f9cfc..efbaf07f7f 100644
--- a/tp/Texinfo/XS/convert/converter.h
+++ b/tp/Texinfo/XS/convert/converter.h
@@ -148,7 +148,6 @@ CONVERTER *converter_converter (enum converter_format
format,
const CONVERTER_INITIALIZATION_INFO *input_user_conf);
void converter_initialize (CONVERTER *converter);
-CONVERTER_INITIALIZATION_INFO *new_converter_initialization_info (void);
void clear_converter_initialization_info (
CONVERTER_INITIALIZATION_INFO *init_info);
void destroy_converter_initialization_info (
diff --git a/tp/Texinfo/XS/convert/get_converter_perl_info.c
b/tp/Texinfo/XS/convert/get_converter_perl_info.c
index 53a1aa0529..10496e9411 100644
--- a/tp/Texinfo/XS/convert/get_converter_perl_info.c
+++ b/tp/Texinfo/XS/convert/get_converter_perl_info.c
@@ -124,169 +124,6 @@ set_non_customization_sv (HV *converter_hv, SV
*init_info_sv,
}
}
-TRANSLATED_COMMAND *
-set_translated_commands (SV *translated_commands_sv)
-{
- TRANSLATED_COMMAND *translated_commands = 0;
-
- dTHX;
-
- if (translated_commands_sv)
- {
- HV *translated_commands_hv = 0;
- I32 hv_number;
- I32 i;
-
- if (!SvOK (translated_commands_sv))
- hv_number = 0;
- else
- {
- HV *translated_commands_hv
- = (HV *)SvRV (translated_commands_sv);
-
- hv_number = hv_iterinit (translated_commands_hv);
- }
-
- translated_commands = (TRANSLATED_COMMAND *)
- non_perl_malloc ((hv_number +1) * sizeof (TRANSLATED_COMMAND));
- memset (translated_commands, 0,
- (hv_number +1) * sizeof (TRANSLATED_COMMAND));
-
- for (i = 0; i < hv_number; i++)
- {
- char *cmdname;
- I32 retlen;
- SV *translation_sv = hv_iternextsv (translated_commands_hv,
- &cmdname, &retlen);
- if (SvOK (translation_sv))
- {
- enum command_id cmd = lookup_builtin_command (cmdname);
-
- if (!cmd)
- fprintf (stderr, "ERROR: %s: no translated command\n",
cmdname);
- else
- {
- char *tmp_spec = (char *) SvPVutf8_nolen (translation_sv);
- TRANSLATED_COMMAND *translated_command
- = &translated_commands[i];
- translated_command->translation = non_perl_strdup (tmp_spec);
- translated_command->cmd = cmd;
- }
- }
- }
- }
- return translated_commands;
-}
-
-static void
-get_deprecated_config_directories_sv (SV *deprecated_config_directories_sv,
- DEPRECATED_DIRS_LIST *deprecated_dirs)
-{
- dTHX;
-
- if (deprecated_config_directories_sv)
- {
- HV *deprecated_config_directories_hv = 0;
- I32 hv_number;
- I32 i;
-
- if (!SvOK (deprecated_config_directories_sv))
- hv_number = 0;
- else
- {
- deprecated_config_directories_hv
- = (HV *)SvRV (deprecated_config_directories_sv);
-
- hv_number = hv_iterinit (deprecated_config_directories_hv);
- }
-
- for (i = 0; i < hv_number; i++)
- {
- HE *next = hv_iternext (deprecated_config_directories_hv);
- SV *obsolete_dir_sv = hv_iterkeysv (next);
- const char *obsolete_dir = (char *) SvPVutf8_nolen (obsolete_dir_sv);
- SV *value_sv = HeVAL(next);
- if (SvOK (value_sv))
- {
- const char *reference_dir = (char *) SvPVutf8_nolen (value_sv);
- add_new_deprecated_dir_info (deprecated_dirs, obsolete_dir,
- reference_dir);
- }
- }
- }
-}
-
-
-/* CLASS_NAME is Perl converter class for warning message. If NULL, no
message.
- CONVERTER may be NULL (when called from converter_defaults). */
-CONVERTER_INITIALIZATION_INFO *
-get_converter_info_from_sv (SV *conf_sv, const char *class_name,
- CONVERTER *converter)
-{
- CONVERTER_INITIALIZATION_INFO *initialization_info = 0;
-
- dTHX;
-
- if (conf_sv && SvOK (conf_sv))
- {
- I32 hv_number;
- I32 i;
-
- HV *conf_hv = (HV *)SvRV (conf_sv);
-
- initialization_info = new_converter_initialization_info ();
-
- hv_number = hv_iterinit (conf_hv);
-
- if (!hv_number)
- return initialization_info;
-
- for (i = 0; i < hv_number; i++)
- {
- char *key;
- I32 retlen;
- SV *value_sv = hv_iternextsv (conf_hv, &key, &retlen);
-
- OPTION *option = find_option_string (
- initialization_info->conf.sorted_options, key);
- if (option)
- {
- int status = get_sv_option (option, value_sv, 0,
- initialization_info->conf.options,
- converter);
- if (!status)
- options_list_add_option_number (&initialization_info->conf,
- option->number);
- else
- /* can only be an error of bad data value_sv, as the options
- cannot be set already */
- fprintf (stderr, "ERROR: %s unexpected conf error\n", key);
- }
- else
- {
- add_string (key,
- &initialization_info->non_valid_customization);
-
- if (!strcmp (key, "translated_commands"))
- initialization_info->translated_commands
- = set_translated_commands (value_sv);
- else if (!strcmp (key, "deprecated_config_directories"))
- {
- get_deprecated_config_directories_sv (value_sv,
- &initialization_info->deprecated_config_directories);
- }
- else if (class_name)
- {
- fprintf (stderr,
- "%s: %s not a possible configuration\n",
- class_name, key);
- }
- }
- }
- }
- return initialization_info;
-}
-
void
get_expanded_formats (HV *hv, EXPANDED_FORMAT **expanded_formats)
{
diff --git a/tp/Texinfo/XS/convert/get_converter_perl_info.h
b/tp/Texinfo/XS/convert/get_converter_perl_info.h
index 870506016a..9ae001fbaf 100644
--- a/tp/Texinfo/XS/convert/get_converter_perl_info.h
+++ b/tp/Texinfo/XS/convert/get_converter_perl_info.h
@@ -14,11 +14,8 @@
SV in call_conversion_perl.h since it is included from pure C */
CONVERTER *get_sv_converter (SV *sv_in, const char *warn_string);
-
CONVERTER *get_or_create_sv_converter (SV *converter_in,
const char *input_class);
-CONVERTER_INITIALIZATION_INFO * get_converter_info_from_sv (SV *conf_sv,
- const char *class, CONVERTER *converter);
void set_non_customization_sv (HV *converter_hv, SV *init_info_sv,
STRING_LIST *non_valid_customization);
CONVERTER *converter_set_document_from_sv (SV *converter_in, SV *document_in);
diff --git a/tp/Texinfo/XS/convert/replace_call_conversion_perl.c
b/tp/Texinfo/XS/convert/replace_call_conversion_perl.c
index 931ef06ce1..b3377ecd7c 100644
--- a/tp/Texinfo/XS/convert/replace_call_conversion_perl.c
+++ b/tp/Texinfo/XS/convert/replace_call_conversion_perl.c
@@ -17,6 +17,13 @@ call_config_GNUT_load_init_file (const char *file_path)
return 0;
}
+CONVERTER_INITIALIZATION_INFO *
+call_converter_converter_defaults (const char *module_name,
+ OPTIONS_LIST *customizations)
+{
+ return 0;
+}
+
CONVERTER *
call_convert_converter (const char *module_name,
const CONVERTER_INITIALIZATION_INFO *conf)
diff --git a/tp/Texinfo/XS/convert/texinfo.c b/tp/Texinfo/XS/convert/texinfo.c
index 32bd2b0313..b8108c5aa0 100644
--- a/tp/Texinfo/XS/convert/texinfo.c
+++ b/tp/Texinfo/XS/convert/texinfo.c
@@ -212,13 +212,25 @@ txi_converter_output_format_setup (const char
*converted_format,
*/
CONVERTER_INITIALIZATION_INFO *
txi_converter_format_defaults (const char *converted_format,
+ const char *external_module,
OPTIONS_LIST *customizations)
{
- enum converter_format converter_format
- = find_format_name_converter_format (converted_format);
- CONVERTER_INITIALIZATION_INFO *conf = new_converter_initialization_info ();
+ enum converter_format converter_format;
+ CONVERTER_INITIALIZATION_INFO *conf;
CONVERTER_INITIALIZATION_INFO *format_defaults;
+ if (external_module)
+ {
+ format_defaults = call_converter_converter_defaults (external_module,
+ customizations);
+ if (format_defaults)
+ return format_defaults;
+ }
+
+ converter_format
+ = find_format_name_converter_format (converted_format);
+ conf = new_converter_initialization_info ();
+
if (customizations)
copy_options_list (&conf->conf, customizations);
diff --git a/tp/Texinfo/XS/convert/texinfo.h b/tp/Texinfo/XS/convert/texinfo.h
index e7c68f31ef..d35ca38d18 100644
--- a/tp/Texinfo/XS/convert/texinfo.h
+++ b/tp/Texinfo/XS/convert/texinfo.h
@@ -46,7 +46,8 @@ void txi_converter_output_format_setup (const char
*converted_format,
const char *external_module);
CONVERTER_INITIALIZATION_INFO *txi_converter_format_defaults (
- const char *format_str,
+ const char *converted_format,
+ const char *external_module,
OPTIONS_LIST *customizations);
void txi_parser (const char *file_path, const char *locale_encoding,
diff --git a/tp/Texinfo/XS/main/customization_options.c
b/tp/Texinfo/XS/main/customization_options.c
index a63858fc92..6007775eba 100644
--- a/tp/Texinfo/XS/main/customization_options.c
+++ b/tp/Texinfo/XS/main/customization_options.c
@@ -651,3 +651,17 @@ set_global_document_command (GLOBAL_COMMANDS
*global_commands, OPTIONS *options,
return element;
}
+
+/* constructors in particular called from files including perl headers */
+
+CONVERTER_INITIALIZATION_INFO *
+new_converter_initialization_info (void)
+{
+ CONVERTER_INITIALIZATION_INFO *result = (CONVERTER_INITIALIZATION_INFO *)
+ malloc (sizeof (CONVERTER_INITIALIZATION_INFO));
+ memset (result, 0, sizeof (CONVERTER_INITIALIZATION_INFO));
+
+ initialize_options_list (&result->conf);
+ return result;
+}
+
diff --git a/tp/Texinfo/XS/main/customization_options.h
b/tp/Texinfo/XS/main/customization_options.h
index f32d25ac12..5c6f9e3a7b 100644
--- a/tp/Texinfo/XS/main/customization_options.h
+++ b/tp/Texinfo/XS/main/customization_options.h
@@ -84,4 +84,9 @@ void set_informative_command_value (OPTIONS *options, const
ELEMENT *element);
const ELEMENT *set_global_document_command (GLOBAL_COMMANDS *global_commands,
OPTIONS *options, enum command_id cmd,
enum command_location command_location);
+
+
+
+CONVERTER_INITIALIZATION_INFO *new_converter_initialization_info (void);
+
#endif
diff --git a/tp/Texinfo/XS/main/get_perl_info.c
b/tp/Texinfo/XS/main/get_perl_info.c
index ce76708f05..81895200fb 100644
--- a/tp/Texinfo/XS/main/get_perl_info.c
+++ b/tp/Texinfo/XS/main/get_perl_info.c
@@ -1345,4 +1345,168 @@ get_language_document_hv_sorted_indices (HV
*document_hv, const char *key,
return 0;
}
+/* the following is only needed in converters, but we still define here
+ such that it is available for functions called from C */
+static TRANSLATED_COMMAND *
+set_translated_commands (SV *translated_commands_sv)
+{
+ TRANSLATED_COMMAND *translated_commands = 0;
+
+ dTHX;
+
+ if (translated_commands_sv)
+ {
+ HV *translated_commands_hv = 0;
+ I32 hv_number;
+ I32 i;
+
+ if (!SvOK (translated_commands_sv))
+ hv_number = 0;
+ else
+ {
+ HV *translated_commands_hv
+ = (HV *)SvRV (translated_commands_sv);
+
+ hv_number = hv_iterinit (translated_commands_hv);
+ }
+
+ translated_commands = (TRANSLATED_COMMAND *)
+ non_perl_malloc ((hv_number +1) * sizeof (TRANSLATED_COMMAND));
+ memset (translated_commands, 0,
+ (hv_number +1) * sizeof (TRANSLATED_COMMAND));
+
+ for (i = 0; i < hv_number; i++)
+ {
+ char *cmdname;
+ I32 retlen;
+ SV *translation_sv = hv_iternextsv (translated_commands_hv,
+ &cmdname, &retlen);
+ if (SvOK (translation_sv))
+ {
+ enum command_id cmd = lookup_builtin_command (cmdname);
+
+ if (!cmd)
+ fprintf (stderr, "ERROR: %s: no translated command\n",
cmdname);
+ else
+ {
+ char *tmp_spec = (char *) SvPVutf8_nolen (translation_sv);
+ TRANSLATED_COMMAND *translated_command
+ = &translated_commands[i];
+ translated_command->translation = non_perl_strdup (tmp_spec);
+ translated_command->cmd = cmd;
+ }
+ }
+ }
+ }
+ return translated_commands;
+}
+
+static void
+get_deprecated_config_directories_sv (SV *deprecated_config_directories_sv,
+ DEPRECATED_DIRS_LIST *deprecated_dirs)
+{
+ dTHX;
+
+ if (deprecated_config_directories_sv)
+ {
+ HV *deprecated_config_directories_hv = 0;
+ I32 hv_number;
+ I32 i;
+
+ if (!SvOK (deprecated_config_directories_sv))
+ hv_number = 0;
+ else
+ {
+ deprecated_config_directories_hv
+ = (HV *)SvRV (deprecated_config_directories_sv);
+
+ hv_number = hv_iterinit (deprecated_config_directories_hv);
+ }
+
+ for (i = 0; i < hv_number; i++)
+ {
+ HE *next = hv_iternext (deprecated_config_directories_hv);
+ SV *obsolete_dir_sv = hv_iterkeysv (next);
+ const char *obsolete_dir = (char *) SvPVutf8_nolen (obsolete_dir_sv);
+ SV *value_sv = HeVAL(next);
+ if (SvOK (value_sv))
+ {
+ const char *reference_dir = (char *) SvPVutf8_nolen (value_sv);
+ add_new_deprecated_dir_info (deprecated_dirs, obsolete_dir,
+ reference_dir);
+ }
+ }
+ }
+}
+
+
+/* CLASS_NAME is Perl converter class for warning message. If NULL, no
message.
+ CONVERTER may be NULL (when called from converter_defaults). */
+CONVERTER_INITIALIZATION_INFO *
+get_converter_info_from_sv (SV *conf_sv, const char *class_name,
+ CONVERTER *converter)
+{
+ CONVERTER_INITIALIZATION_INFO *initialization_info = 0;
+
+ dTHX;
+
+ if (conf_sv && SvOK (conf_sv))
+ {
+ I32 hv_number;
+ I32 i;
+
+ HV *conf_hv = (HV *)SvRV (conf_sv);
+
+ initialization_info = new_converter_initialization_info ();
+
+ hv_number = hv_iterinit (conf_hv);
+
+ if (!hv_number)
+ return initialization_info;
+
+ for (i = 0; i < hv_number; i++)
+ {
+ char *key;
+ I32 retlen;
+ SV *value_sv = hv_iternextsv (conf_hv, &key, &retlen);
+
+ OPTION *option = find_option_string (
+ initialization_info->conf.sorted_options, key);
+ if (option)
+ {
+ int status = get_sv_option (option, value_sv, 0,
+ initialization_info->conf.options,
+ converter);
+ if (!status)
+ options_list_add_option_number (&initialization_info->conf,
+ option->number);
+ else
+ /* can only be an error of bad data value_sv, as the options
+ cannot be set already */
+ fprintf (stderr, "ERROR: %s unexpected conf error\n", key);
+ }
+ else
+ {
+ add_string (key,
+ &initialization_info->non_valid_customization);
+
+ if (!strcmp (key, "translated_commands"))
+ initialization_info->translated_commands
+ = set_translated_commands (value_sv);
+ else if (!strcmp (key, "deprecated_config_directories"))
+ {
+ get_deprecated_config_directories_sv (value_sv,
+ &initialization_info->deprecated_config_directories);
+ }
+ else if (class_name)
+ {
+ fprintf (stderr,
+ "%s: %s not a possible configuration\n",
+ class_name, key);
+ }
+ }
+ }
+ }
+ return initialization_info;
+}
diff --git a/tp/Texinfo/XS/main/get_perl_info.h
b/tp/Texinfo/XS/main/get_perl_info.h
index b75fed0a2a..7758c2e6ad 100644
--- a/tp/Texinfo/XS/main/get_perl_info.h
+++ b/tp/Texinfo/XS/main/get_perl_info.h
@@ -63,4 +63,8 @@ const ELEMENT *find_element_from_sv (const CONVERTER
*converter,
SV *get_language_document_hv_sorted_indices (HV *document_hv, const char *key,
const char *language, HV **out_sorted_indices_hv);
+
+CONVERTER *get_sv_converter (SV *sv_in, const char *warn_string);
+CONVERTER_INITIALIZATION_INFO * get_converter_info_from_sv (SV *conf_sv,
+ const char *class, CONVERTER *converter);
#endif
diff --git a/tp/Texinfo/XS/main/utils.c b/tp/Texinfo/XS/main/utils.c
index 161ce6b782..3a63506d5d 100644
--- a/tp/Texinfo/XS/main/utils.c
+++ b/tp/Texinfo/XS/main/utils.c
@@ -1931,3 +1931,4 @@ new_formatted_button_info (void)
return result;
}
+
diff --git a/tp/Texinfo/XS/texi2any.c b/tp/Texinfo/XS/texi2any.c
index 1a2dd0ee1a..10da9e82b1 100644
--- a/tp/Texinfo/XS/texi2any.c
+++ b/tp/Texinfo/XS/texi2any.c
@@ -1786,6 +1786,7 @@ main (int argc, char *argv[], char *env[])
possibly different customization variable values.
*/
format_defaults = txi_converter_format_defaults (converted_format,
+ external_module,
&cmdline_options);
format_menu_option_nr = program_options.options->FORMAT_MENU.number;
@@ -2248,7 +2249,6 @@ main (int argc, char *argv[], char *env[])
destroy_converter_initialization_info (converter_init_info);
- free_strings_list (&opened_files);
free_strings_list (&prepended_include_directories);
free_options_list (&convert_options);
@@ -2279,6 +2279,5 @@ main (int argc, char *argv[], char *env[])
txi_customization_loading_finish (embedded_interpreter);
- if (errors_count > 0)
- exit (EXIT_FAILURE);
+ free_strings_list (&opened_files);
}
diff --git a/tp/tests/README b/tp/tests/README
index d550798ba5..d933089fe3 100644
--- a/tp/tests/README
+++ b/tp/tests/README
@@ -157,7 +157,9 @@ Other tests requiring specific softwares
========================================
Other tests requiring specific software are not run automatically, as
they may depend on the version of these specific software and require
-these software to be present. The required software is source-highlight.
+these software to be present. The required software are source-highlight
+and latex with the preview package. dvipng is also required for some
+tests, if not found the tests will be skipped.
These tests may be run by
make other-checks
diff --git a/tp/tests/run_parser_all.sh b/tp/tests/run_parser_all.sh
index bfd9a34060..9768dc11f3 100755
--- a/tp/tests/run_parser_all.sh
+++ b/tp/tests/run_parser_all.sh
@@ -211,6 +211,7 @@ prepended_command=
#prepended_command='valgrind -q'
main_command='texi2any.pl'
+#main_command='ctexi2any.pl'
# formats can be specified by first line of list-of-tests.
#commands='texi2any.pl:_html texi2any.pl:_info'