[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/XS/Makefile.am (BUILT_SOURCES, optio
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/XS/Makefile.am (BUILT_SOURCES, options_init_free.c), (libtexinfo_convert_la_SOURCES, EXTRA_DIST): rename convert/converters_defaults.c as convert/converters_options.c. Update users. |
Date: |
Sat, 05 Oct 2024 02:26:59 -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 37eaab9c6c * tp/Texinfo/XS/Makefile.am (BUILT_SOURCES,
options_init_free.c), (libtexinfo_convert_la_SOURCES, EXTRA_DIST): rename
convert/converters_defaults.c as convert/converters_options.c. Update users.
37eaab9c6c is described below
commit 37eaab9c6c4c38eb8c58f221a2d2913e9947022e
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Aug 18 14:22:40 2024 +0200
* tp/Texinfo/XS/Makefile.am (BUILT_SOURCES, options_init_free.c),
(libtexinfo_convert_la_SOURCES, EXTRA_DIST): rename
convert/converters_defaults.c as convert/converters_options.c.
Update users.
* tp/Texinfo/XS/convert/converter.c (init_generic_converter),
tp/Texinfo/XS/main/customization_options.c (setup_sorted_options)
(new_sorted_options), tp/Texinfo/XS/main/get_perl_info.c
(init_copy_sv_options), tp/Texinfo/XS/main/document.c
(initialize_document_options),
tp/maintain/regenerate_C_options_info.pl: pass OPTION pointers array
to setup_sortable_options and to setup_sorted_options. Add
new_sorted_options that allocate an OPTION pointers array and call
setup_sortable_options and setup_sorted_options. Update callers.
* tp/Texinfo/XS/main/customization_options.c
(txi_initialise_base_options, txi_base_options)
(txi_base_sorted_options), tp/maintain/regenerate_C_options_info.pl,
tp/Texinfo/XS/main/document.c (txi_setup_lib_data): put
txi_base_sorted_options in customization_options.c. Add
txi_base_options with the options set to their default values. Set
txi_base_sorted_options dynamically, associated to txi_base_options
in txi_initialise_base_options in customization_options.c. Call
txi_initialise_base_options in txi_setup_lib_data.
* tp/maintain/regenerate_C_options_info.pl: generate
html_fill_options_directions in converters_options.c. Add all header
files where functions are defined.
---
ChangeLog | 31 ++++++++
tp/Texinfo/XS/Makefile.am | 22 +++---
tp/Texinfo/XS/convert/converter.c | 4 +-
...{converters_defaults.c => converters_options.c} | 39 +++++++++-
...{converters_defaults.h => converters_options.h} | 2 +
.../XS/convert/html_converter_init_options.c | 2 +-
tp/Texinfo/XS/main/customization_options.c | 28 ++++++-
tp/Texinfo/XS/main/customization_options.h | 12 ++-
tp/Texinfo/XS/main/document.c | 3 +-
tp/Texinfo/XS/main/get_perl_info.c | 2 +-
tp/Texinfo/XS/main/options_defaults.h | 2 +
tp/maintain/regenerate_C_options_info.pl | 86 +++++++++-------------
12 files changed, 158 insertions(+), 75 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 94fc0fd388..b3deee7a2b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,34 @@
+2024-08-18 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/Makefile.am (BUILT_SOURCES, options_init_free.c),
+ (libtexinfo_convert_la_SOURCES, EXTRA_DIST): rename
+ convert/converters_defaults.c as convert/converters_options.c.
+ Update users.
+
+ * tp/Texinfo/XS/convert/converter.c (init_generic_converter),
+ tp/Texinfo/XS/main/customization_options.c (setup_sorted_options)
+ (new_sorted_options), tp/Texinfo/XS/main/get_perl_info.c
+ (init_copy_sv_options), tp/Texinfo/XS/main/document.c
+ (initialize_document_options),
+ tp/maintain/regenerate_C_options_info.pl: pass OPTION pointers array
+ to setup_sortable_options and to setup_sorted_options. Add
+ new_sorted_options that allocate an OPTION pointers array and call
+ setup_sortable_options and setup_sorted_options. Update callers.
+
+ * tp/Texinfo/XS/main/customization_options.c
+ (txi_initialise_base_options, txi_base_options)
+ (txi_base_sorted_options), tp/maintain/regenerate_C_options_info.pl,
+ tp/Texinfo/XS/main/document.c (txi_setup_lib_data): put
+ txi_base_sorted_options in customization_options.c. Add
+ txi_base_options with the options set to their default values. Set
+ txi_base_sorted_options dynamically, associated to txi_base_options
+ in txi_initialise_base_options in customization_options.c. Call
+ txi_initialise_base_options in txi_setup_lib_data.
+
+ * tp/maintain/regenerate_C_options_info.pl: generate
+ html_fill_options_directions in converters_options.c. Add all header
+ files where functions are defined.
+
2024-08-18 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/main/document.c (txi_setup_lib_data),
diff --git a/tp/Texinfo/XS/Makefile.am b/tp/Texinfo/XS/Makefile.am
index a3f40f87e0..f8df8c74e6 100644
--- a/tp/Texinfo/XS/Makefile.am
+++ b/tp/Texinfo/XS/Makefile.am
@@ -242,8 +242,8 @@ libtexinfo_la_LDFLAGS = -version-info 0:0:0
$(perl_conf_LDFLAGS) $(LTLIBINTL) $(
BUILT_SOURCES = main/accent_tables_8bit_codepoints.c \
convert/cmd_converter.c \
- convert/converters_defaults.c \
- convert/converters_defaults.h \
+ convert/converters_options.c \
+ convert/converters_options.h \
main/cmd_normalization.c \
main/cmd_structuring.c \
main/cmd_text.c \
@@ -269,6 +269,8 @@ EXTRA_DIST+=main/element_types.txt main/element_types.awk \
EXTRA_DIST += convert/cmd_converter.c
EXTRA_DIST += convert/converters_defaults.c
EXTRA_DIST += convert/converters_defaults.h
+EXTRA_DIST += convert/converters_options.c
+EXTRA_DIST += convert/converters_options.h
$(srcdir)/main/element_types.c $(srcdir)/main/element_types.h:
main/element_types.txt main/element_types.awk
$(GAWK) -v srcdir=$(srcdir)/main -f $(srcdir)/main/element_types.awk \
@@ -318,7 +320,7 @@ $(srcdir)/main/accent_tables_8bit_codepoints.c:
$(srcdir)/../../maintain/setup_a
MAINTAINERCLEANFILES += main/accent_tables_8bit_codepoints.c
-$(srcdir)/main/options_init_free.c $(srcdir)/main/options_types.h
$(srcdir)/main/options_defaults.c $(srcdir)/main/options_defaults.h
$(srcdir)/convert/converters_defaults.c $(srcdir)/convert/converters_defaults.h
$(srcdir)/main/options_get_perl.c: ../options_data.txt
../Convert/converters_defaults.txt main/command_data.c
$(srcdir)/../../maintain/regenerate_C_options_info.pl
+$(srcdir)/main/options_init_free.c $(srcdir)/main/options_types.h
$(srcdir)/main/options_defaults.c $(srcdir)/main/options_defaults.h
$(srcdir)/convert/converters_options.c $(srcdir)/convert/converters_options.h
$(srcdir)/main/options_get_perl.c: ../options_data.txt
../Convert/converters_defaults.txt main/command_data.c
$(srcdir)/../../maintain/regenerate_C_options_info.pl
$(PERL) $(srcdir)/../../maintain/regenerate_C_options_info.pl \
< $(srcdir)/../options_data.txt \
$(srcdir)/main/command_data.c \
@@ -327,14 +329,14 @@ $(srcdir)/main/options_init_free.c
$(srcdir)/main/options_types.h $(srcdir)/main
$(srcdir)/main/options_types.h \
$(srcdir)/main/options_defaults.c \
$(srcdir)/main/options_defaults.h \
- $(srcdir)/convert/converters_defaults.c \
- $(srcdir)/convert/converters_defaults.h \
+ $(srcdir)/convert/converters_options.c \
+ $(srcdir)/convert/converters_options.h \
$(srcdir)/main/options_get_perl.c
MAINTAINERCLEANFILES += main/options_init_free.c main/options_types.h \
main/options_defaults.c main/options_defaults.h \
- convert/converters_defaults.c \
- convert/converters_defaults.h \
+ convert/converters_options.c \
+ convert/converters_options.h \
main/options_get_perl.c
$(srcdir)/main/conversion_data.c $(srcdir)/main/conversion_data.h:
main/command_data.c $(srcdir)/../Data/default_css_element_class_styles.csv
$(srcdir)/../Data/default_direction_strings.csv
$(srcdir)/../Data/default_special_unit_info.csv
$(srcdir)/../Data/html_style_commands_element.csv
$(srcdir)/../../maintain/generate_code_convert_data.pl
@@ -390,8 +392,8 @@ C_libtexinfo_convert_sources = \
convert/converter.c \
convert/converter.h \
convert/cmd_converter.c \
- convert/converters_defaults.c \
- convert/converters_defaults.h \
+ convert/converters_options.c \
+ convert/converters_options.h \
convert/create_buttons.c \
convert/create_buttons.h \
convert/convert_html.h \
@@ -400,9 +402,7 @@ C_libtexinfo_convert_sources = \
convert/format_html.c \
convert/html_converter_types.h \
convert/html_converter_init_options.c \
- convert/html_converter_init_options.h \
convert/html_converter_finish.c \
- convert/html_converter_finish.h \
convert/html_conversion_state.c \
convert/html_conversion_state.h \
convert/html_prepare_converter.c \
diff --git a/tp/Texinfo/XS/convert/converter.c
b/tp/Texinfo/XS/convert/converter.c
index 88def05b65..71c5f8c656 100644
--- a/tp/Texinfo/XS/convert/converter.c
+++ b/tp/Texinfo/XS/convert/converter.c
@@ -40,7 +40,7 @@
#include "document_types.h"
#include "converter_types.h"
#include "options_defaults.h"
-#include "converters_defaults.h"
+#include "converters_options.h"
#include "tree.h"
#include "extra.h"
/* for COMMAND_OPTION_DEFAULT ACCENTS_STACK
@@ -222,7 +222,7 @@ static void
init_generic_converter (CONVERTER *self)
{
self->conf = new_options ();
- self->sorted_options = setup_sorted_options (self->conf);
+ self->sorted_options = new_sorted_options (self->conf);
set_generic_converter_options (self->conf);
diff --git a/tp/Texinfo/XS/convert/converters_defaults.c
b/tp/Texinfo/XS/convert/converters_options.c
similarity index 88%
rename from tp/Texinfo/XS/convert/converters_defaults.c
rename to tp/Texinfo/XS/convert/converters_options.c
index 34ed8e52a3..abd6c13ffd 100644
--- a/tp/Texinfo/XS/convert/converters_defaults.c
+++ b/tp/Texinfo/XS/convert/converters_options.c
@@ -4,8 +4,13 @@
#include "option_types.h"
#include "options_types.h"
+#include "converters_options.h"
+
+/* for html_fill_button_directions_specification_list */
+#include "utils.h"
#include "customization_options.h"
-#include "converters_defaults.h"
+/* external definition of html_fill_options_directions */
+#include "html_conversion_api.h"
void
set_common_regular_options_defaults (OPTIONS *options)
@@ -207,3 +212,35 @@ add_texi2html_regular_options_defaults (OPTIONS_LIST
*options_list)
add_new_option_value (options_list, GOT_integer,
"FOOTNOTE_SEPARATE_HEADER_LEVEL", 1, 0);
}
+void
+html_fill_options_directions (OPTIONS *options, const CONVERTER *converter)
+{
+ if (options->LINKS_BUTTONS.o.buttons)
+ html_fill_button_directions_specification_list (converter,
options->LINKS_BUTTONS.o.buttons);
+
+ if (options->TOP_BUTTONS.o.buttons)
+ html_fill_button_directions_specification_list (converter,
options->TOP_BUTTONS.o.buttons);
+
+ if (options->TOP_FOOTER_BUTTONS.o.buttons)
+ html_fill_button_directions_specification_list (converter,
options->TOP_FOOTER_BUTTONS.o.buttons);
+
+ if (options->SECTION_BUTTONS.o.buttons)
+ html_fill_button_directions_specification_list (converter,
options->SECTION_BUTTONS.o.buttons);
+
+ if (options->CHAPTER_FOOTER_BUTTONS.o.buttons)
+ html_fill_button_directions_specification_list (converter,
options->CHAPTER_FOOTER_BUTTONS.o.buttons);
+
+ if (options->SECTION_FOOTER_BUTTONS.o.buttons)
+ html_fill_button_directions_specification_list (converter,
options->SECTION_FOOTER_BUTTONS.o.buttons);
+
+ if (options->NODE_FOOTER_BUTTONS.o.buttons)
+ html_fill_button_directions_specification_list (converter,
options->NODE_FOOTER_BUTTONS.o.buttons);
+
+ if (options->MISC_BUTTONS.o.buttons)
+ html_fill_button_directions_specification_list (converter,
options->MISC_BUTTONS.o.buttons);
+
+ if (options->CHAPTER_BUTTONS.o.buttons)
+ html_fill_button_directions_specification_list (converter,
options->CHAPTER_BUTTONS.o.buttons);
+
+}
+
diff --git a/tp/Texinfo/XS/convert/converters_defaults.h
b/tp/Texinfo/XS/convert/converters_options.h
similarity index 93%
rename from tp/Texinfo/XS/convert/converters_defaults.h
rename to tp/Texinfo/XS/convert/converters_options.h
index 9fb07979c2..3a8eba4c12 100644
--- a/tp/Texinfo/XS/convert/converters_defaults.h
+++ b/tp/Texinfo/XS/convert/converters_options.h
@@ -1,6 +1,8 @@
#ifndef CONVERTERS_DEFAULTS_H
#define CONVERTERS_DEFAULTS_H
+/* Automatically generated from regenerate_C_options_info.pl */
+
#include "main/option_types.h"
#include "main/options_types.h"
diff --git a/tp/Texinfo/XS/convert/html_converter_init_options.c
b/tp/Texinfo/XS/convert/html_converter_init_options.c
index 8a4354e8a5..275d6dde3e 100644
--- a/tp/Texinfo/XS/convert/html_converter_init_options.c
+++ b/tp/Texinfo/XS/convert/html_converter_init_options.c
@@ -21,7 +21,7 @@
#include "option_types.h"
#include "converter_types.h"
-#include "converters_defaults.h"
+#include "converters_options.h"
/* html_get_direction_index html_free_button_specification_list */
#include "utils.h"
/* add_new_button_option */
diff --git a/tp/Texinfo/XS/main/customization_options.c
b/tp/Texinfo/XS/main/customization_options.c
index 5a9cd01a60..e3fe0bdee8 100644
--- a/tp/Texinfo/XS/main/customization_options.c
+++ b/tp/Texinfo/XS/main/customization_options.c
@@ -21,6 +21,7 @@
#include "option_types.h"
#include "options_types.h"
#include "converter_types.h"
+#include "options_defaults.h"
#include "api_to_perl.h"
/* *_strings_list html_clear_direction_icons
html_free_button_specification_list
*/
@@ -28,6 +29,19 @@
#include "builtin_commands.h"
#include "customization_options.h"
+OPTIONS txi_base_options;
+OPTION *txi_base_sorted_options[TXI_OPTIONS_NR];
+
+/* initialization */
+
+void
+txi_initialise_base_options (void)
+{
+ initialize_options (&txi_base_options);
+ set_all_options_defaults (&txi_base_options);
+ setup_sorted_options (txi_base_sorted_options, &txi_base_options);
+}
+
/* single option and options structure functions */
@@ -364,18 +378,26 @@ compare_option_str (const void *a, const void *b)
/* sort options and set the index in the option structure to the index in
the sorted array */
-OPTION **
-setup_sorted_options (OPTIONS *options)
+void
+setup_sorted_options (OPTION **sorted_options, OPTIONS *options)
{
size_t i;
- OPTION **sorted_options = setup_sortable_options (options);
+ setup_sortable_options (sorted_options, options);
qsort (sorted_options, TXI_OPTIONS_NR, sizeof (OPTION *),
compare_option_str);
for (i = 0; i < TXI_OPTIONS_NR; i++)
{
sorted_options[i]->number = i + 1;
}
+}
+
+OPTION **
+new_sorted_options (OPTIONS *options)
+{
+ OPTION **sorted_options
+ = (OPTION **) malloc (sizeof (OPTION *) * TXI_OPTIONS_NR);
+ setup_sorted_options (sorted_options, options);
return sorted_options;
}
diff --git a/tp/Texinfo/XS/main/customization_options.h
b/tp/Texinfo/XS/main/customization_options.h
index 9ad3a3ecb7..6eba37020f 100644
--- a/tp/Texinfo/XS/main/customization_options.h
+++ b/tp/Texinfo/XS/main/customization_options.h
@@ -23,13 +23,20 @@
#include "document_types.h"
#include "converter_types.h"
+extern OPTION *txi_base_sorted_options[TXI_OPTIONS_NR];
+
/* in options_init_free.c */
void initialize_options (OPTIONS *options);
-OPTION **setup_sortable_options (OPTIONS *options);
+void setup_sortable_options (OPTION **to_sort, OPTIONS *options);
void clear_options (OPTIONS *options);
void free_options (OPTIONS *options);
void copy_options (OPTIONS *destination, const OPTIONS *source);
+
+
+void txi_initialise_base_options (void);
+
+
OPTIONS *new_options (void);
@@ -45,7 +52,8 @@ void copy_option (OPTION *destination, const OPTION *source);
-OPTION **setup_sorted_options (OPTIONS *options);
+void setup_sorted_options (OPTION **sorted_options, OPTIONS *options);
+OPTION **new_sorted_options (OPTIONS *options);
OPTION *find_option_string (OPTION **sorted_options, const char *name);
void copy_numbered_options_list_options (OPTIONS *options,
OPTION **sorted_options,
diff --git a/tp/Texinfo/XS/main/document.c b/tp/Texinfo/XS/main/document.c
index 72bb917fae..7ee7a0ef46 100644
--- a/tp/Texinfo/XS/main/document.c
+++ b/tp/Texinfo/XS/main/document.c
@@ -55,6 +55,7 @@ void
txi_setup_lib_data (void)
{
set_element_type_name_info ();
+ txi_initialise_base_options ();
}
DOCUMENT *
@@ -157,7 +158,7 @@ void
initialize_document_options (DOCUMENT *document)
{
OPTIONS *options = new_options ();
- OPTION **sorted_options = setup_sorted_options (options);
+ OPTION **sorted_options = new_sorted_options (options);
const ELEMENT *document_language;
register_document_options (document, options, sorted_options);
diff --git a/tp/Texinfo/XS/main/get_perl_info.c
b/tp/Texinfo/XS/main/get_perl_info.c
index 17d1b9670e..81734b8e41 100644
--- a/tp/Texinfo/XS/main/get_perl_info.c
+++ b/tp/Texinfo/XS/main/get_perl_info.c
@@ -557,7 +557,7 @@ init_copy_sv_options (SV *sv_in, CONVERTER *converter, int
force,
OPTION ***sorted_options_out)
{
OPTIONS *options = new_options ();
- OPTION **sorted_options = setup_sorted_options (options);
+ OPTION **sorted_options = new_sorted_options (options);
get_sv_options (sv_in, options, sorted_options, converter, force);
if (sorted_options_out)
*sorted_options_out = sorted_options;
diff --git a/tp/Texinfo/XS/main/options_defaults.h
b/tp/Texinfo/XS/main/options_defaults.h
index 357d3afede..56afff5364 100644
--- a/tp/Texinfo/XS/main/options_defaults.h
+++ b/tp/Texinfo/XS/main/options_defaults.h
@@ -1,6 +1,8 @@
#ifndef OPTIONS_DEFAULTS_H
#define OPTIONS_DEFAULTS_H
+/* Automatically generated from regenerate_C_options_info.pl */
+
#include "main/option_types.h"
#include "main/options_types.h"
diff --git a/tp/maintain/regenerate_C_options_info.pl
b/tp/maintain/regenerate_C_options_info.pl
index 836138f7fa..85abf87140 100755
--- a/tp/maintain/regenerate_C_options_info.pl
+++ b/tp/maintain/regenerate_C_options_info.pl
@@ -173,9 +173,6 @@ print HEADER "#undef PACKAGE_VERSION\n\n";
print HEADER "#define TXI_OPTIONS_NR $options_nr\n\n";
-my $base_sorted_options_name = 'txi_base_sorted_options';
-print HEADER "extern OPTION
*${base_sorted_options_name}\[TXI_OPTIONS_NR\];\n\n";
-
print HEADER "typedef struct OPTIONS {\n";
print HEADER " size_t BIT_user_function_number;\n";
@@ -204,9 +201,9 @@ print CODE '#include <string.h>'."\n\n";
print CODE '#include "option_types.h"'."\n";
print CODE '#include "options_types.h"'."\n";
print CODE '#include "converter_types.h"'."\n";
-# for html_fill_button_directions_specification_list
+print CODE '/* for COMMAND_OPTION_DEFAULT */'."\n";
print CODE '#include "utils.h"'."\n";
-print CODE '#include "customization_options.h"'."\n\n";
+print CODE '#include "customization_options.h"'."\n";
print CODE "void\ninitialize_options (OPTIONS *options)\n{\n";
print CODE " options->BIT_user_function_number = 0;\n";
@@ -256,60 +253,16 @@ print CODE "}\n\n";
my @sorted_options = sort(keys(%options));
# returns an array of options ready to be sorted (and already sorted).
-print CODE "OPTION **\nsetup_sortable_options (OPTIONS *options)\n{\n";
-print CODE " OPTION **result = (OPTION **)\n"
- ." malloc (sizeof (OPTION *) * TXI_OPTIONS_NR);\n\n";
+print CODE "void\nsetup_sortable_options (OPTION **to_sort, OPTIONS
*options)\n{\n";
my $index = 0;
foreach my $option (@sorted_options) {
my $option_info = $options{$option};
my ($category, $main_default, $type) = @$option_info;
- print CODE " result[$index] = &options->$option; /* ${category} */\n";
+ print CODE " to_sort[$index] = &options->$option; /* ${category} */\n";
$index++;
}
-print CODE "\n return result;\n"
-."}\n\n\n";
-
-# Static sorted options by name. Can be used to find the number and type.
-# First define the internal OPTION structures, in a second step set the
-# array. Could not find a way to do it in one step.
-print CODE "/* static OPTION structure pointers used as fields of sorted
options just below */\n";
-my $option_nr = 0;
-foreach my $option (@sorted_options) {
- $option_nr++;
- my $option_info = $options{$option};
- my ($category, $main_default, $type) = @$option_info;
- print CODE "static OPTION _sorted_options_${option}_tmp = {GOT_${type},
\"$option\", $option_nr, 0, -1}; /* $category */\n";
-}
-
-print CODE "\n\n";
-
-print CODE "/* sorted options pointers array (for number and type, without
values) */\n";
-print CODE "OPTION *${base_sorted_options_name}\[TXI_OPTIONS_NR\] = {\n";
-foreach my $option (@sorted_options) {
- $option_nr++;
- my $option_info = $options{$option};
- my ($category, $main_default, $type) = @$option_info;
- #print CODE "{GOT_${type}, \"$option\", $option_nr, 0, -1}, /* $category
*/\n";
- print CODE "&_sorted_options_${option}_tmp,\n";
-}
-print CODE "};\n\n";
-
-# call function to fill options directions for all the buttons options
-print CODE 'void
-html_fill_options_directions (OPTIONS *options, const CONVERTER *converter)
-{
-';
-foreach my $category (sort(keys(%option_categories))) {
- foreach my $option_info (@{$option_categories{$category}}) {
- my ($option, $value, $type) = @$option_info;
- if ($type eq 'buttons') {
- print CODE " if (options->$option.o.buttons)\n"
- ." html_fill_button_directions_specification_list
(converter, options->$option.o.buttons);\n\n";
- }
- }
-}
-print CODE "}\n\n";
+print CODE "}\n\n\n";
# associate commands to options
@@ -388,6 +341,7 @@ print CODE "};\n\n";
close(CODE);
+
open(ODCF, ">$options_defaults_code_file")
or die "Open $options_defaults_code_file: $!\n";
@@ -405,6 +359,8 @@ open(ODHF, ">$options_defaults_header_file")
print ODHF "#ifndef OPTIONS_DEFAULTS_H\n#define OPTIONS_DEFAULTS_H\n\n";
+print ODHF "/* Automatically generated from $program_name */\n\n";
+
print ODHF "#include \"main/option_types.h\"\n";
print ODHF "#include \"main/options_types.h\"\n\n";
@@ -476,6 +432,7 @@ print ODHF "void $all_options_fun;\n\n";
close (ODCF);
print ODHF "#endif\n";
+
close(ODHF);
@@ -488,14 +445,20 @@ print CDCF '#include <config.h>'."\n\n";
print CDCF '#include "option_types.h"'."\n";
print CDCF '#include "options_types.h"'."\n";
+print CDCF '#include "converters_options.h"'."\n\n";
+print CDCF '/* for html_fill_button_directions_specification_list */'."\n";
+print CDCF '#include "utils.h"'."\n";
print CDCF '#include "customization_options.h"'."\n";
-print CDCF '#include "converters_defaults.h"'."\n\n";
+print CDCF '/* external definition of html_fill_options_directions */'."\n";
+print CDCF '#include "html_conversion_api.h"'."\n\n";
open(CDHF, ">$converter_defaults_header_file")
or die "Open $converter_defaults_header_file: $!\n";
print CDHF "#ifndef CONVERTERS_DEFAULTS_H\n#define CONVERTERS_DEFAULTS_H\n\n";
+print CDHF "/* Automatically generated from $program_name */\n\n";
+
print CDHF "#include \"main/option_types.h\"\n";
print CDHF "#include \"main/options_types.h\"\n\n";
@@ -541,9 +504,26 @@ foreach my $format (@sorted_formats) {
print CDCF "}\n\n";
}
+# call function to fill options directions for all the buttons options
+print CDCF 'void
+html_fill_options_directions (OPTIONS *options, const CONVERTER *converter)
+{
+';
+foreach my $category (sort(keys(%option_categories))) {
+ foreach my $option_info (@{$option_categories{$category}}) {
+ my ($option, $value, $type) = @$option_info;
+ if ($type eq 'buttons') {
+ print CDCF " if (options->$option.o.buttons)\n"
+ ." html_fill_button_directions_specification_list
(converter, options->$option.o.buttons);\n\n";
+ }
+ }
+}
+print CDCF "}\n\n";
+
close(CDCF);
print CDHF "#endif\n";
+
close(CDHF);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/XS/Makefile.am (BUILT_SOURCES, options_init_free.c), (libtexinfo_convert_la_SOURCES, EXTRA_DIST): rename convert/converters_defaults.c as convert/converters_options.c. Update users.,
Patrice Dumas <=