texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/maintain/regenerate_C_options_info.pl: reall


From: Patrice Dumas
Subject: branch master updated: * tp/maintain/regenerate_C_options_info.pl: really output html_free_button_specification_list for options. Add missing include files for options_init_free.c.
Date: Tue, 12 Dec 2023 16:41:00 -0500

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 27ce938823 * tp/maintain/regenerate_C_options_info.pl: really output 
html_free_button_specification_list for options.  Add missing include files for 
options_init_free.c.
27ce938823 is described below

commit 27ce938823473941772a100c57ee4bcdd4f84f2f
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Tue Dec 12 22:40:53 2023 +0100

    * tp/maintain/regenerate_C_options_info.pl: really output
    html_free_button_specification_list for options.  Add missing include
    files for options_init_free.c.
    
    * tp/Texinfo/XS/Makefile.am (libtexinfo_la_SOURCES, EXTRA_DIST)
    (libtexinfoxs_la_SOURCES), tp/Texinfo/XS/main/get_perl_info.c,
    tp/Texinfo/XS/main/get_perl_info.h, tp/Texinfo/XS/main/utils.c,
    tp/Texinfo/XS/main/utils.h: do not include options_init_free.c nor
    options_get_perl.c directly in code.  Move .c files declaration form
    EXTRA_DIST to *la_SOURCES if they are not included in other file and
    move .h files declarations too.
---
 ChangeLog                                | 14 ++++++++++++++
 tp/Texinfo/XS/Makefile.am                | 10 +++++-----
 tp/Texinfo/XS/main/get_perl_info.c       |  3 ---
 tp/Texinfo/XS/main/get_perl_info.h       |  4 ++++
 tp/Texinfo/XS/main/utils.c               |  2 --
 tp/Texinfo/XS/main/utils.h               |  7 +++++--
 tp/maintain/regenerate_C_options_info.pl |  5 ++++-
 7 files changed, 32 insertions(+), 13 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0f110c7087..63e48d8d88 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2023-12-12  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/maintain/regenerate_C_options_info.pl: really output
+       html_free_button_specification_list for options.  Add missing include
+       files for options_init_free.c.
+
+       * tp/Texinfo/XS/Makefile.am (libtexinfo_la_SOURCES, EXTRA_DIST)
+       (libtexinfoxs_la_SOURCES), tp/Texinfo/XS/main/get_perl_info.c,
+       tp/Texinfo/XS/main/get_perl_info.h, tp/Texinfo/XS/main/utils.c,
+       tp/Texinfo/XS/main/utils.h: do not include options_init_free.c nor
+       options_get_perl.c directly in code.  Move .c files declaration form
+       EXTRA_DIST to *la_SOURCES if they are not included in other file and
+       move .h files declarations too.
+
 2023-12-12  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/main/get_perl_info.c (get_source_info): do not check
diff --git a/tp/Texinfo/XS/Makefile.am b/tp/Texinfo/XS/Makefile.am
index 77434f9fda..de9eca12cb 100644
--- a/tp/Texinfo/XS/Makefile.am
+++ b/tp/Texinfo/XS/Makefile.am
@@ -138,6 +138,9 @@ libtexinfo_la_SOURCES= \
                      main/cmd_structuring.c \
                      main/targets.c \
                      main/targets.h \
+                     main/options_init_free.c \
+                     main/options_types.h \
+                     main/global_commands_types.h \
                      main/utils.c \
                      main/utils.h \
                      main/converter_types.h \
@@ -193,12 +196,8 @@ EXTRA_DIST += main/cmd_normalization.c
 EXTRA_DIST += main/cmd_unicode.c
 EXTRA_DIST += main/cmd_symbol.c
 EXTRA_DIST += main/cmd_text.c
-EXTRA_DIST += main/global_commands_types.h
 EXTRA_DIST += main/global_multi_commands_case.c
 EXTRA_DIST += main/global_unique_commands_case.c
-EXTRA_DIST += main/options_init_free.c
-EXTRA_DIST += main/options_get_perl.c
-EXTRA_DIST += main/options_types.h
 
 # locate include files under out-of-source builds.
 libtexinfo_la_CPPFLAGS = -I$(srcdir)/main -I$(srcdir)/parsetexi $(AM_CPPFLAGS) 
$(GNULIB_CPPFLAGS)
@@ -283,7 +282,8 @@ libtexinfoxs_la_SOURCES= \
                      main/get_perl_info.c \
                      main/get_perl_info.h \
                      main/call_perl_function.c \
-                     main/call_perl_function.h
+                     main/call_perl_function.h \
+                     main/options_get_perl.c
 
 # locate include files under out-of-source builds.
 libtexinfoxs_la_CPPFLAGS = -I$(srcdir)/main -I$(srcdir)/convert $(AM_CPPFLAGS) 
$(XSLIBS_CPPFLAGS)
diff --git a/tp/Texinfo/XS/main/get_perl_info.c 
b/tp/Texinfo/XS/main/get_perl_info.c
index 246038ac3c..f2735ce53e 100644
--- a/tp/Texinfo/XS/main/get_perl_info.c
+++ b/tp/Texinfo/XS/main/get_perl_info.c
@@ -253,9 +253,6 @@ get_line_message (CONVERTER *self, enum error_type type, 
int continuation,
   free (source_info);
 }
 
-/* contains get_sv_option (), automatically generated from options_data.txt */
-#include "options_get_perl.c"
-
 void
 get_sv_options (SV *sv, OPTIONS *options, CONVERTER *converter)
 {
diff --git a/tp/Texinfo/XS/main/get_perl_info.h 
b/tp/Texinfo/XS/main/get_perl_info.h
index 167e358e52..89d9ff8a7b 100644
--- a/tp/Texinfo/XS/main/get_perl_info.h
+++ b/tp/Texinfo/XS/main/get_perl_info.h
@@ -17,6 +17,10 @@ enum sv_string_type {
   svt_char,
 };
 
+/* in options_get_perl.c */
+void get_sv_option (OPTIONS *options, const char *key, SV *value,
+                    CONVERTER *converter);
+
 DOCUMENT *get_sv_tree_document (SV *tree_in, char *warn_string);
 DOCUMENT *get_sv_document_document (SV *document_in, char *warn_string);
 
diff --git a/tp/Texinfo/XS/main/utils.c b/tp/Texinfo/XS/main/utils.c
index 2ecf5e0dc4..734185715e 100644
--- a/tp/Texinfo/XS/main/utils.c
+++ b/tp/Texinfo/XS/main/utils.c
@@ -43,8 +43,6 @@
 #include "api_to_perl.h"
 #include "utils.h"
 
-#include "options_init_free.c"
-
 #define min_level command_structuring_level[CM_chapter]
 #define max_level command_structuring_level[CM_subsubsection]
 
diff --git a/tp/Texinfo/XS/main/utils.h b/tp/Texinfo/XS/main/utils.h
index fdd4860b25..dfbc6205c0 100644
--- a/tp/Texinfo/XS/main/utils.h
+++ b/tp/Texinfo/XS/main/utils.h
@@ -207,10 +207,12 @@ void destroy_accent_stack (ACCENTS_STACK *accent_stack);
 void wipe_index (INDEX *idx);
 void wipe_index_names (INDEX **index_names);
 
-OPTIONS *new_options (void);
+/* in options_init_free.c */
+void initialize_options (OPTIONS *options);
 void free_options (OPTIONS *options);
-COMMAND_OPTION_REF *get_command_option (OPTIONS *options, enum command_id cmd);
 
+OPTIONS *new_options (void);
+COMMAND_OPTION_REF *get_command_option (OPTIONS *options, enum command_id cmd);
 
 void add_include_directory (char *filename, STRING_LIST *include_dirs_list);
 char *locate_include_file (char *filename, STRING_LIST *include_dirs_list);
@@ -246,4 +248,5 @@ ELEMENT *get_cmd_global_uniq_command (GLOBAL_COMMANDS 
*global_commands_ref,
                                       enum command_id cmd);
 
 void html_free_button_specification_list (BUTTON_SPECIFICATION_LIST *buttons);
+
 #endif
diff --git a/tp/maintain/regenerate_C_options_info.pl 
b/tp/maintain/regenerate_C_options_info.pl
index 4b4e517779..adb51c2cdf 100755
--- a/tp/maintain/regenerate_C_options_info.pl
+++ b/tp/maintain/regenerate_C_options_info.pl
@@ -130,7 +130,10 @@ close(HEADER);
 open (CODE, ">$code_file") or die "Open $code_file: $!\n";
 print CODE "/* Automatically generated from $0 */\n\n";
 
+print CODE '#include <config.h>'."\n\n";
+
 print CODE '#include <stdlib.h>'."\n\n";
+print CODE '#include <string.h>'."\n\n";
 
 print CODE '#include "options_types.h"'."\n";
 print CODE '#include "converter_types.h"'."\n";
@@ -165,7 +168,7 @@ foreach my $category (sort(keys(%option_categories))) {
     } elsif ($type eq 'char *') {
       print CODE " free (options->$option);\n";
     } elsif ($type eq 'BUTTON_SPECIFICATION_LIST *') {
-      print GET "  html_free_button_specification_list (options->$option);\n";
+      print CODE "  html_free_button_specification_list (options->$option);\n";
     }
   }
 }



reply via email to

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