[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrice Dumas |
Date: |
Fri, 4 Oct 2024 19:30:02 -0400 (EDT) |
branch: master
commit 288e8023a7dcf11b491bea3faf2a4538a8aa56e1
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Fri Aug 16 14:53:49 2024 +0200
* tp/Texinfo/XS/Makefile.am (libtexinfo_convert_la_SOURCES),
tp/Texinfo/XS/convert/html_converter_api.h,
tp/Texinfo/XS/convert/html_conversion_api.h: split
html_converter_api.h in two with high level API only remaining in
html_converter_api.h, lower level API goes to html_conversion_api.h.
* tp/Texinfo/XS/Makefile.am (libtexinfo_convert_la_SOURCES): remove
tp/Texinfo/XS/convert/html_converter_init_options.h and
tp/Texinfo/XS/convert/html_converter_finish.h, html_converter_api.h
should be used instead.
---
ChangeLog | 13 ++++
tp/Texinfo/XS/Makefile.am | 1 +
tp/Texinfo/XS/convert/ConvertXS.xs | 3 +-
...{html_converter_api.h => html_conversion_api.h} | 37 ++----------
tp/Texinfo/XS/convert/html_converter_api.c | 1 +
tp/Texinfo/XS/convert/html_converter_api.h | 69 ++--------------------
tp/Texinfo/XS/convert/html_converter_finish.c | 2 +-
tp/Texinfo/XS/convert/html_converter_finish.h | 10 ----
.../XS/convert/html_converter_init_options.c | 2 +-
.../XS/convert/html_converter_init_options.h | 12 ----
10 files changed, 31 insertions(+), 119 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 914eaf6912..603807aaa6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2024-08-16 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/Makefile.am (libtexinfo_convert_la_SOURCES),
+ tp/Texinfo/XS/convert/html_converter_api.h,
+ tp/Texinfo/XS/convert/html_conversion_api.h: split
+ html_converter_api.h in two with high level API only remaining in
+ html_converter_api.h, lower level API goes to html_conversion_api.h.
+
+ * tp/Texinfo/XS/Makefile.am (libtexinfo_convert_la_SOURCES): remove
+ tp/Texinfo/XS/convert/html_converter_init_options.h and
+ tp/Texinfo/XS/convert/html_converter_finish.h, html_converter_api.h
+ should be used instead.
+
2024-08-16 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/main/customization_options.c
diff --git a/tp/Texinfo/XS/Makefile.am b/tp/Texinfo/XS/Makefile.am
index 1180b8960d..2d972de89c 100644
--- a/tp/Texinfo/XS/Makefile.am
+++ b/tp/Texinfo/XS/Makefile.am
@@ -399,6 +399,7 @@ C_libtexinfo_convert_sources = \
convert/html_conversion_state.h \
convert/html_prepare_converter.c \
convert/html_prepare_converter.h \
+ convert/html_conversion_api.h \
convert/html_converter_api.c \
convert/html_converter_api.h \
convert/texinfo.c \
diff --git a/tp/Texinfo/XS/convert/ConvertXS.xs
b/tp/Texinfo/XS/convert/ConvertXS.xs
index 764727d073..e36c412688 100644
--- a/tp/Texinfo/XS/convert/ConvertXS.xs
+++ b/tp/Texinfo/XS/convert/ConvertXS.xs
@@ -58,7 +58,8 @@
#include "convert_html.h"
#include "format_html.h"
#include "html_prepare_converter.h"
-#include "html_converter_init_options.h"
+#include "html_conversion_api.h"
+#include "html_converter_api.h"
#include "get_html_perl_info.h"
/* See the NOTE in build_perl_info.c on use of functions related to
diff --git a/tp/Texinfo/XS/convert/html_converter_api.h
b/tp/Texinfo/XS/convert/html_conversion_api.h
similarity index 73%
copy from tp/Texinfo/XS/convert/html_converter_api.h
copy to tp/Texinfo/XS/convert/html_conversion_api.h
index 0df111ef49..d467ea146a 100644
--- a/tp/Texinfo/XS/convert/html_converter_api.h
+++ b/tp/Texinfo/XS/convert/html_conversion_api.h
@@ -1,6 +1,6 @@
-/* html_converter_api.h - selected functions for the html converter API */
-#ifndef HTML_CONVERTER_API_H
-#define HTML_CONVERTER_API_H
+/* html_conversion_api.h - functions for implementation of converter API */
+#ifndef HTML_CONVERSION_API_H
+#define HTML_CONVERSION_API_H
/* Copyright 2010-2024 Free Software Foundation, Inc.
@@ -17,20 +17,14 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-/* HTML functions that are needed to setup and destroy a converter and
- implement conversion with output() or convert() */
+/* HTML functions that are needed to implement converter_initialize()
+ and conversion with output() or convert() */
+#include "tree_types.h"
#include "option_types.h"
#include "document_types.h"
#include "converter_types.h"
-/* in html_prepare_converter.c */
-void html_format_setup (void);
-
-/* in html_converter_init_options.c */
-CONVERTER_INITIALIZATION_INFO *html_converter_defaults (CONVERTER *self,
- CONVERTER_INITIALIZATION_INFO *format_defaults);
-
void html_converter_initialize_beginning (CONVERTER *self);
/* in html_prepare_converter.c */
@@ -57,10 +51,6 @@ FILE_SOURCE_INFO_LIST *html_prepare_units_directions_files
(CONVERTER *self,
const char *output_file, const char *destination_directory,
const char *output_filename, const char *document_name);
-/* in convert_html.c */
-char *html_convert_tree (CONVERTER *self, const ELEMENT *tree,
- const char *explanation);
-
void html_translate_names (CONVERTER *self);
/* next two called separately for convert() */
@@ -87,19 +77,4 @@ void html_do_js_files (CONVERTER *self);
int html_finish_output (CONVERTER *self, const char *output_file,
const char *destination_directory);
-/* in html_converter_finish.c */
-void html_reset_converter (CONVERTER *self);
-
-void html_free_converter (CONVERTER *self);
-
-
-
-/* implemented in html_converter_api.c using above functions */
-
-void html_converter_initialize (CONVERTER *converter);
-
-char *html_output (CONVERTER *converter, DOCUMENT *document);
-
-char *html_convert (CONVERTER *converter, DOCUMENT *document);
-
#endif
diff --git a/tp/Texinfo/XS/convert/html_converter_api.c
b/tp/Texinfo/XS/convert/html_converter_api.c
index 7f8d3bad90..7911e832d1 100644
--- a/tp/Texinfo/XS/convert/html_converter_api.c
+++ b/tp/Texinfo/XS/convert/html_converter_api.c
@@ -23,6 +23,7 @@
#include "document_types.h"
#include "converter.h"
+#include "html_conversion_api.h"
#include "html_converter_api.h"
/* similar to Texinfo::Convert::HTML->converter_initialize */
diff --git a/tp/Texinfo/XS/convert/html_converter_api.h
b/tp/Texinfo/XS/convert/html_converter_api.h
index 0df111ef49..fd989f7a07 100644
--- a/tp/Texinfo/XS/convert/html_converter_api.h
+++ b/tp/Texinfo/XS/convert/html_converter_api.h
@@ -17,10 +17,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-/* HTML functions that are needed to setup and destroy a converter and
- implement conversion with output() or convert() */
+/* High-level API of HTML converter */
-#include "option_types.h"
#include "document_types.h"
#include "converter_types.h"
@@ -31,75 +29,20 @@ void html_format_setup (void);
CONVERTER_INITIALIZATION_INFO *html_converter_defaults (CONVERTER *self,
CONVERTER_INITIALIZATION_INFO *format_defaults);
-void html_converter_initialize_beginning (CONVERTER *self);
-
-/* in html_prepare_converter.c */
-void html_converter_init_special_unit (CONVERTER *self);
-void html_converter_customize (CONVERTER *self);
-
-/* in options_init_free.c */
-void html_fill_options_directions (OPTIONS *options, const CONVERTER
*converter);
-
-void html_initialize_output_state (CONVERTER *self, const char *context);
-
-int html_setup_output (CONVERTER *self, char **paths);
-void html_setup_convert (CONVERTER *self);
-
-void html_prepare_conversion_units (CONVERTER *self);
-
-void html_prepare_conversion_units_targets (CONVERTER *self,
- const char *document_name);
-
-/* called separately for convert() */
-void html_prepare_output_units_global_targets (CONVERTER *self);
-/* only called for output() */
-FILE_SOURCE_INFO_LIST *html_prepare_units_directions_files (CONVERTER *self,
- const char *output_file, const char *destination_directory,
- const char *output_filename, const char *document_name);
+/* implemented in html_converter_api.c using html_conversion_api.h functions */
+void html_converter_initialize (CONVERTER *converter);
/* in convert_html.c */
char *html_convert_tree (CONVERTER *self, const ELEMENT *tree,
const char *explanation);
-void html_translate_names (CONVERTER *self);
-
-/* next two called separately for convert() */
-void html_prepare_simpletitle (CONVERTER *self);
-void html_prepare_title_titlepage (CONVERTER *self, const char *output_file,
- const char *output_filename);
-/* only for output() */
-int html_prepare_converted_output_info (CONVERTER *self,
- const char *output_file,
- const char *output_filename);
-
-char *html_convert_convert (CONVERTER *self, const ELEMENT *root);
-
-char *html_convert_output (CONVERTER *self, const ELEMENT *root,
- const char *output_file,
- const char *destination_directory,
- const char *output_filename,
- const char *document_name);
-
-void html_conversion_finalization (CONVERTER *self);
-
-void html_do_js_files (CONVERTER *self);
-
-int html_finish_output (CONVERTER *self, const char *output_file,
- const char *destination_directory);
+/* implemented in html_converter_api.c using html_conversion_api.h functions */
+char *html_output (CONVERTER *converter, DOCUMENT *document);
+char *html_convert (CONVERTER *converter, DOCUMENT *document);
/* in html_converter_finish.c */
void html_reset_converter (CONVERTER *self);
void html_free_converter (CONVERTER *self);
-
-
-/* implemented in html_converter_api.c using above functions */
-
-void html_converter_initialize (CONVERTER *converter);
-
-char *html_output (CONVERTER *converter, DOCUMENT *document);
-
-char *html_convert (CONVERTER *converter, DOCUMENT *document);
-
#endif
diff --git a/tp/Texinfo/XS/convert/html_converter_finish.c
b/tp/Texinfo/XS/convert/html_converter_finish.c
index cc843e81bc..573598b8dc 100644
--- a/tp/Texinfo/XS/convert/html_converter_finish.c
+++ b/tp/Texinfo/XS/convert/html_converter_finish.c
@@ -33,7 +33,7 @@
/* html_reset_translated_special_unit_info_tree
html_clear_direction_string_type */
#include "convert_html.h"
-#include "html_converter_finish.h"
+#include "html_converter_api.h"
static void
diff --git a/tp/Texinfo/XS/convert/html_converter_finish.h
b/tp/Texinfo/XS/convert/html_converter_finish.h
deleted file mode 100644
index ef2c7cf924..0000000000
--- a/tp/Texinfo/XS/convert/html_converter_finish.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* html_converter_finish.h - convert_html.c functions called in converter.c
- finish */
-#ifndef HTML_CONVERTER_FINISH_H
-#define HTML_CONVERTER_FINISH_H
-
-void html_reset_converter (CONVERTER *self);
-
-void html_free_converter (CONVERTER *self);
-
-#endif
diff --git a/tp/Texinfo/XS/convert/html_converter_init_options.c
b/tp/Texinfo/XS/convert/html_converter_init_options.c
index f77c1387cf..da338424ab 100644
--- a/tp/Texinfo/XS/convert/html_converter_init_options.c
+++ b/tp/Texinfo/XS/convert/html_converter_init_options.c
@@ -29,7 +29,7 @@
#include "create_buttons.h"
/* new_converter_initialization_info */
#include "converter.h"
-#include "html_converter_init_options.h"
+#include "html_converter_api.h"
/* HTML converter options setting and initialization. Not with format
specific converter code, since this code is called from generic
diff --git a/tp/Texinfo/XS/convert/html_converter_init_options.h
b/tp/Texinfo/XS/convert/html_converter_init_options.h
deleted file mode 100644
index 56519ab0af..0000000000
--- a/tp/Texinfo/XS/convert/html_converter_init_options.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/* html_converter_init_options.h - for html_converter_init_options.c */
-#ifndef HTML_CONVERTER_INIT_OPTIONS_H
-#define HTML_CONVERTER_INIT_OPTIONS_H
-
-#include "option_types.h"
-#include "converter_types.h"
-
-CONVERTER_INITIALIZATION_INFO *html_converter_defaults (CONVERTER *self,
- CONVERTER_INITIALIZATION_INFO *format_defaults);
-
-void html_converter_initialize_beginning (CONVERTER *self);
-#endif