texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/XS/main/get_perl_info.c: move copy_s


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/XS/main/get_perl_info.c: move copy_sv_options_for_convert_text to the end of the file.
Date: Tue, 07 Nov 2023 14:31:07 -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 15ddae84d4 * tp/Texinfo/XS/main/get_perl_info.c: move 
copy_sv_options_for_convert_text to the end of the file.
15ddae84d4 is described below

commit 15ddae84d47391beb2cedc5b984fd637dc89fa06
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Tue Nov 7 20:30:57 2023 +0100

    * tp/Texinfo/XS/main/get_perl_info.c: move
    copy_sv_options_for_convert_text to the end of the file.
---
 ChangeLog                          |   5 ++
 tp/Texinfo/XS/main/get_perl_info.c | 126 +++++++++++++++++++------------------
 2 files changed, 69 insertions(+), 62 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index acc099d618..06f7335b1d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-11-07  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/XS/main/get_perl_info.c: move
+       copy_sv_options_for_convert_text to the end of the file.
+
 2023-11-07  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/Makefile.am (ConvertXS_la_SOURCES),
diff --git a/tp/Texinfo/XS/main/get_perl_info.c 
b/tp/Texinfo/XS/main/get_perl_info.c
index d722faa2fd..10a85dcbd9 100644
--- a/tp/Texinfo/XS/main/get_perl_info.c
+++ b/tp/Texinfo/XS/main/get_perl_info.c
@@ -256,68 +256,6 @@ get_expanded_formats (HV *hv, EXPANDED_FORMAT 
**expanded_formats)
     }
 }
 
-/* map hash reference of Convert::Text options to TEXT_OPTIONS */
-/* TODO more to do */
-TEXT_OPTIONS *
-copy_sv_options_for_convert_text (SV *sv_in)
-{
-  HV *hv_in;
-  SV **test_option_sv;
-  SV **include_directories_sv;
-  SV **other_converter_options_sv;
-  SV **self_converter_options_sv;
-  SV **enabled_encoding_sv;
-  SV **sort_string_option_sv;
-  TEXT_OPTIONS *text_options = new_text_options ();
-
-  dTHX;
-
-  hv_in = (HV *)SvRV (sv_in);
-
-  test_option_sv = hv_fetch (hv_in, "TEST", strlen ("TEST"), 0);
-  if (test_option_sv)
-    text_options->TEST = SvIV (*test_option_sv);
-
-  sort_string_option_sv = hv_fetch (hv_in, "sort_string",
-                                    strlen ("sort_string"), 0);
-  if (sort_string_option_sv)
-    text_options->sort_string = SvIV (*sort_string_option_sv);
-
-  enabled_encoding_sv = hv_fetch (hv_in, "enabled_encoding",
-                                  strlen ("enabled_encoding"), 0);
-  if (enabled_encoding_sv)
-    text_options->encoding = strdup (SvPVutf8_nolen (*enabled_encoding_sv));
-
-  include_directories_sv = hv_fetch (hv_in, "INCLUDE_DIRECTORIES",
-                                     strlen ("INCLUDE_DIRECTORIES"), 0);
-
-  if (include_directories_sv)
-    add_svav_to_string_list (*include_directories_sv,
-                             &text_options->include_directories, 1);
-
-  get_expanded_formats (hv_in, &text_options->expanded_formats);
-
-  other_converter_options_sv = hv_fetch (hv_in, "other_converter_options",
-                                         strlen ("other_converter_options"), 
0);
-
-  if (other_converter_options_sv)
-    {
-      text_options->other_converter_options
-         = copy_sv_options (*other_converter_options_sv);
-    }
-
-  self_converter_options_sv = hv_fetch (hv_in, "self_converter_options",
-                                         strlen ("self_converter_options"), 0);
-
-  if (self_converter_options_sv)
-    {
-      text_options->self_converter_options
-         = copy_sv_options (*self_converter_options_sv);
-    }
-
-  return text_options;
-}
-
 CONVERTER *
 get_sv_converter (SV *sv_in, char *warn_string)
 {
@@ -703,3 +641,67 @@ set_conf (CONVERTER *converter, const char *conf, SV 
*value)
     */
 }
 
+/* output format specific */
+
+/* map hash reference of Convert::Text options to TEXT_OPTIONS */
+/* TODO more to do */
+TEXT_OPTIONS *
+copy_sv_options_for_convert_text (SV *sv_in)
+{
+  HV *hv_in;
+  SV **test_option_sv;
+  SV **include_directories_sv;
+  SV **other_converter_options_sv;
+  SV **self_converter_options_sv;
+  SV **enabled_encoding_sv;
+  SV **sort_string_option_sv;
+  TEXT_OPTIONS *text_options = new_text_options ();
+
+  dTHX;
+
+  hv_in = (HV *)SvRV (sv_in);
+
+  test_option_sv = hv_fetch (hv_in, "TEST", strlen ("TEST"), 0);
+  if (test_option_sv)
+    text_options->TEST = SvIV (*test_option_sv);
+
+  sort_string_option_sv = hv_fetch (hv_in, "sort_string",
+                                    strlen ("sort_string"), 0);
+  if (sort_string_option_sv)
+    text_options->sort_string = SvIV (*sort_string_option_sv);
+
+  enabled_encoding_sv = hv_fetch (hv_in, "enabled_encoding",
+                                  strlen ("enabled_encoding"), 0);
+  if (enabled_encoding_sv)
+    text_options->encoding = strdup (SvPVutf8_nolen (*enabled_encoding_sv));
+
+  include_directories_sv = hv_fetch (hv_in, "INCLUDE_DIRECTORIES",
+                                     strlen ("INCLUDE_DIRECTORIES"), 0);
+
+  if (include_directories_sv)
+    add_svav_to_string_list (*include_directories_sv,
+                             &text_options->include_directories, 1);
+
+  get_expanded_formats (hv_in, &text_options->expanded_formats);
+
+  other_converter_options_sv = hv_fetch (hv_in, "other_converter_options",
+                                         strlen ("other_converter_options"), 
0);
+
+  if (other_converter_options_sv)
+    {
+      text_options->other_converter_options
+         = copy_sv_options (*other_converter_options_sv);
+    }
+
+  self_converter_options_sv = hv_fetch (hv_in, "self_converter_options",
+                                         strlen ("self_converter_options"), 0);
+
+  if (self_converter_options_sv)
+    {
+      text_options->self_converter_options
+         = copy_sv_options (*self_converter_options_sv);
+    }
+
+  return text_options;
+}
+



reply via email to

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