texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: Patrice Dumas
Date: Fri, 4 Oct 2024 05:59:38 -0400 (EDT)

branch: master
commit 6d37bd76a57c189b4e418e91001d547e8c88a962
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Aug 10 21:26:28 2024 +0200

    * tp/Texinfo/XS/convert/texinfo.c: add some comments.
---
 ChangeLog                       |  4 ++++
 tp/Texinfo/XS/convert/texinfo.c | 14 ++++++++++++++
 tp/Texinfo/XS/convert/texinfo.h |  7 +++----
 3 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4082272827..b5118eb293 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2024-08-10  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/XS/convert/texinfo.c: add some comments.
+
 2024-08-10  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/main/utils.c (add_new_option_value): function to add
diff --git a/tp/Texinfo/XS/convert/texinfo.c b/tp/Texinfo/XS/convert/texinfo.c
index 85d43fd5dc..8780bb872f 100644
--- a/tp/Texinfo/XS/convert/texinfo.c
+++ b/tp/Texinfo/XS/convert/texinfo.c
@@ -13,6 +13,12 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
+/* Interface similar to the Perl modules interface for Texinfo parsing,
+   Document structure and transformations and conversion */
+
+/* not used in code called from texi2any/Perl, meant to be used exclusively
+   from C code */
+
 #include <config.h>
 
 #include <stdlib.h>
@@ -33,6 +39,7 @@
 #include "convert_html.h"
 #include "texinfo.h"
 
+/* initialization of the library. */
 void
 txi_setup (const char *localesdir, int texinfo_uninstalled,
                  const char *tp_builddir,
@@ -45,6 +52,7 @@ txi_setup (const char *localesdir, int texinfo_uninstalled,
   html_format_setup ();
 }
 
+/* parser initialization, similar to Texinfo::Parser::parser in Perl */
 void
 txi_parser (const char *file_path, const char *locale_encoding,
             const char **expanded_formats, const VALUE_LIST *values,
@@ -259,6 +267,7 @@ txi_complete_document (DOCUMENT *document, unsigned long 
flags,
                                          document->options);
 }
 
+/* converter initialization. Similar to Texinfo::Convert::X::converter */
 void
 txi_converter (CONVERTER *converter,
                const char *format, const char *locale_encoding,
@@ -328,6 +337,11 @@ txi_converter (CONVERTER *converter,
   destroy_converter_initialization_info (conf);
 }
 
+
+
+/* formats conversion */
+
+/* similar to Texinfo::Convert::HTML->output */
 char *
 txi_html_output (CONVERTER *converter, DOCUMENT *document)
 {
diff --git a/tp/Texinfo/XS/convert/texinfo.h b/tp/Texinfo/XS/convert/texinfo.h
index 2f3d181d91..0b949a96fc 100644
--- a/tp/Texinfo/XS/convert/texinfo.h
+++ b/tp/Texinfo/XS/convert/texinfo.h
@@ -30,10 +30,9 @@ void txi_setup (const char *localesdir, int 
texinfo_uninstalled,
                 const char *tp_builddir,
                 const char *pkgdatadir, const char *top_srcdir);
 
-void
-txi_parser (const char *file_path, const char *locale_encoding,
-            const char **expanded_formats, const VALUE_LIST *values,
-            OPTIONS_LIST *options);
+void txi_parser (const char *file_path, const char *locale_encoding,
+                const char **expanded_formats, const VALUE_LIST *values,
+                OPTIONS_LIST *options);
 
 void txi_complete_document (DOCUMENT *document, unsigned long flags,
                             int format_menu);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]