[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Config.pm, texi2any.pl, tp/init/*.pm
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/Config.pm, texi2any.pl, tp/init/*.pm, tp/t/init/*.init: rename _load_init_file as GNUT_load_init_file, _load_config as GNUT_load_config, set_from_init_file as texinfo_set_from_init_file, set_from_cmdline as GNUT_set_from_cmdline and get_conf as texinfo_get_conf to follow the convention that functions that should not be called by user init files codes are prefixed by GNUT_ while functions that can be called by user init files codes are prefixed by texinfo_. |
Date: |
Wed, 01 Sep 2021 06:00:40 -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 b7119e0 * tp/Texinfo/Config.pm, texi2any.pl, tp/init/*.pm,
tp/t/init/*.init: rename _load_init_file as GNUT_load_init_file, _load_config
as GNUT_load_config, set_from_init_file as texinfo_set_from_init_file,
set_from_cmdline as GNUT_set_from_cmdline and get_conf as texinfo_get_conf to
follow the convention that functions that should not be called by user init
files codes are prefixed by GNUT_ while functions that can be called by user
init files codes are prefixed by texinfo_.
b7119e0 is described below
commit b7119e08ecda10e0c3a9303893294d169c4bff90
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Wed Sep 1 12:00:32 2021 +0200
* tp/Texinfo/Config.pm, texi2any.pl, tp/init/*.pm, tp/t/init/*.init:
rename _load_init_file as GNUT_load_init_file,
_load_config as GNUT_load_config, set_from_init_file as
texinfo_set_from_init_file, set_from_cmdline as GNUT_set_from_cmdline
and get_conf as texinfo_get_conf to follow the convention that
functions that should not be called by user init files codes are
prefixed by GNUT_ while functions that can be called by user init
files codes are prefixed by texinfo_.
* tp/Texinfo/Config.pm: use explicitly Texinfo::Common for __(
instead of using main program function.
---
ChangeLog | 14 ++++++++++++++
tp/Texinfo/Config.pm | 29 ++++++++++++++++++-----------
tp/init/book.pm | 26 +++++++++++++-------------
tp/init/chm.pm | 18 +++++++++---------
tp/init/html32.pm | 28 ++++++++++++++--------------
tp/init/latex2html.pm | 10 +++++-----
tp/t/init/icons.init | 6 +++---
tp/t/init/mini_ker_t2h.init | 2 +-
tp/t/init/misc_file_collision.init | 2 +-
tp/t/init/t2h_singular.init | 38 +++++++++++++++++++-------------------
tp/t/init/test_directions.init | 8 ++++----
tp/t/test_utils.pl | 2 +-
tp/texi2any.pl | 14 +++++---------
13 files changed, 107 insertions(+), 90 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 309e517..171957f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
2021-09-01 Patrice Dumas <pertusus@free.fr>
+ * tp/Texinfo/Config.pm, texi2any.pl, tp/init/*.pm, tp/t/init/*.init:
+ rename _load_init_file as GNUT_load_init_file,
+ _load_config as GNUT_load_config, set_from_init_file as
+ texinfo_set_from_init_file, set_from_cmdline as GNUT_set_from_cmdline
+ and get_conf as texinfo_get_conf to follow the convention that
+ functions that should not be called by user init files codes are
+ prefixed by GNUT_ while functions that can be called by user init
+ files codes are prefixed by texinfo_.
+
+ * tp/Texinfo/Config.pm: use explicitly Texinfo::Common for __(
+ instead of using main program function.
+
+2021-09-01 Patrice Dumas <pertusus@free.fr>
+
* tp/Texinfo/Config.pm, texi2any.pl, tp/Texinfo/Convert/HTML.pm,
tp/Makefile.am (dist_modules_DATA): put Texinfo::Config namespace
in a separate file. This is not perfect as Texinfo::Config is still
diff --git a/tp/Texinfo/Config.pm b/tp/Texinfo/Config.pm
index 928c074..03d3dda 100644
--- a/tp/Texinfo/Config.pm
+++ b/tp/Texinfo/Config.pm
@@ -16,9 +16,16 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Original author: Patrice Dumas <pertusus@free.fr>
+#
+# functions that should not be called by user init files codes are
+# prefixed by GNUT_ while functions that can be called by user init
+# files codes are prefixed by texinfo_.
package Texinfo::Config;
+# for __(
+use Texinfo::Common;
+
# for %Texinfo::Convert::HTML::default_formatting_references
use Texinfo::Convert::HTML;
@@ -27,14 +34,13 @@ use Carp;
# not that there is no use strict to avoid warnings for users code
-# eval init file in the Texinfo::Config namespace. Needed functions are in
-# the Texinfo::Convert::HTML Texinfo::Config package namespace code.
-sub _load_init_file($) {
+# eval init file in the Texinfo::Config namespace.
+sub GNUT_load_init_file($) {
my $file = shift;
eval { require($file) ;};
my $e = $@;
if ($e ne '') {
- main::document_warn(sprintf(main::__("error loading %s: %s\n"),
+ main::document_warn(sprintf(__("error loading %s: %s\n"),
$file, $e));
}
}
@@ -44,7 +50,7 @@ our $options = {};
my $cmdline_options;
my $default_options;
-sub _load_config($$) {
+sub GNUT_load_config($$) {
$default_options = shift;
$cmdline_options = shift;
#print STDERR "cmdline_options: ".join('|',keys(%$cmdline_options))."\n";
@@ -54,13 +60,13 @@ sub _load_config($$) {
# an error message?
#
# Called from init files to set configuration options.
-sub set_from_init_file($$) {
+sub texinfo_set_from_init_file($$) {
my $var = shift;
my $value = shift;
if (!Texinfo::Common::valid_option($var)) {
# carp may be better, but infortunately, it points to the routine that
# loads the file, and not to the init file.
- main::document_warn(sprintf(main::__("%s: unknown variable %s"),
+ main::document_warn(sprintf(__("%s: unknown variable %s"),
'set_from_init_file', $var));
return 0;
}
@@ -71,7 +77,7 @@ sub set_from_init_file($$) {
}
# set option from the command line. Highest precedence.
-sub set_from_cmdline($$) {
+sub GNUT_set_from_cmdline($$) {
my $var = shift;
my $value = shift;
delete $options->{$var};
@@ -88,7 +94,7 @@ sub set_from_cmdline($$) {
# This also could get and set some @-command results.
# FIXME But it does not take into account what happens during conversion,
# for that something like $converter->get_conf(...) has to be used.
-sub get_conf($) {
+sub texinfo_get_conf($) {
my $var = shift;
if (exists($cmdline_options->{$var})) {
return $cmdline_options->{$var};
@@ -109,8 +115,9 @@ sub texinfo_add_valid_option($)
}
# FIXME this is unclean, but it is texi2any.pl that loads init files
-# so it needs to knwow the %default_formatting_references for
-# texinfo_register_formatting_function.
+# so it needs to know the %default_formatting_references for
+# texinfo_register_formatting_function when eval'ing files in load_init_file
+# which appears early.
my %default_formatting_references =
%Texinfo::Convert::HTML::default_formatting_references;
# FIXME would be better to do the reverse, but Texinfo::Convert::HTML
diff --git a/tp/init/book.pm b/tp/init/book.pm
index 0e2feb4..2a29016 100644
--- a/tp/init/book.pm
+++ b/tp/init/book.pm
@@ -12,31 +12,31 @@ use strict;
use vars qw($element_file_name);
-set_from_init_file('contents', 1);
-set_from_init_file('CONTENTS_OUTPUT_LOCATION', 'inline');
-set_from_init_file('USE_TITLEPAGE_FOR_TITLE', 1);
+texinfo_set_from_init_file('contents', 1);
+texinfo_set_from_init_file('CONTENTS_OUTPUT_LOCATION', 'inline');
+texinfo_set_from_init_file('USE_TITLEPAGE_FOR_TITLE', 1);
my @book_buttons = ('Back', 'Forward', ' ', 'Contents', 'Index', 'About');
foreach my $buttons ('SECTION_BUTTONS', 'CHAPTER_BUTTONS', 'TOP_BUTTONS') {
- set_from_init_file($buttons, \@book_buttons);
+ texinfo_set_from_init_file($buttons, \@book_buttons);
}
my @book_footer_buttons = ('Contents', 'Index', 'About');
foreach my $buttons ('MISC_BUTTONS', 'SECTION_FOOTER_BUTTONS',
'CHAPTER_FOOTER_BUTTONS') {
- set_from_init_file($buttons, \@book_footer_buttons);
+ texinfo_set_from_init_file($buttons, \@book_footer_buttons);
}
-set_from_init_file('NODE_FOOTER_BUTTONS', ['Back', 'Forward']);
-set_from_init_file('LINKS_BUTTONS',
+texinfo_set_from_init_file('NODE_FOOTER_BUTTONS', ['Back', 'Forward']);
+texinfo_set_from_init_file('LINKS_BUTTONS',
['Top', 'Index', 'Contents', 'About', 'Up', 'NextFile', 'PrevFile']);
-set_from_init_file('WORDS_IN_PAGE', undef);
-set_from_init_file('FORMAT_MENU', 'nomenu');
-set_from_init_file('USE_NODES', undef);
+texinfo_set_from_init_file('WORDS_IN_PAGE', undef);
+texinfo_set_from_init_file('FORMAT_MENU', 'nomenu');
+texinfo_set_from_init_file('USE_NODES', undef);
-set_from_init_file('BIG_RULE', '<hr>');
+texinfo_set_from_init_file('BIG_RULE', '<hr>');
my ($book_previous_default_filename, $book_previous_file_name,
$book_unumbered_nr);
@@ -135,14 +135,14 @@ sub book_print_sub_toc($$$)
}
#print STDERR "SUB_TOC $element->{'text'}\n"; #sleep 1;
if ($command->{'section_childs'} and @{$command->{'section_childs'}}) {
-#print STDERR "SUB_TOC child $element->{'child'}->{'text'}\n";
+#print STDERR "SUB_TOC child $element->{'child'}->{'text'}\n";
$result .= '<li>'.$converter->_attribute_class('ul',$NO_BULLET_LIST_CLASS)
.">\n". book_print_sub_toc($converter, $parent_command,
$command->{'section_childs'}->[0])
."</ul></li>\n";
}
if (exists($command->{'section_next'})) {
-#print STDERR "SUB_TOC next($element->{'text'})
$element->{'next'}->{'text'}\n";
+#print STDERR "SUB_TOC next($element->{'text'})
$element->{'next'}->{'text'}\n";
$result .= book_print_sub_toc($converter, $parent_command,
$command->{'section_next'});
}
diff --git a/tp/init/chm.pm b/tp/init/chm.pm
index 72d4a2c..58efaa2 100644
--- a/tp/init/chm.pm
+++ b/tp/init/chm.pm
@@ -33,21 +33,21 @@ use Texinfo::Common;
main::set_global_format('html');
-set_from_init_file('TOP_FILE', undef);
+texinfo_set_from_init_file('TOP_FILE', undef);
#$SECTION_NAVIGATION = 0; # to avoid headers in normal elements
-set_from_init_file('FORMAT_MENU', 'nomenu');
-set_from_init_file('SPLIT', 'node');
-set_from_init_file('contents', 1);
+texinfo_set_from_init_file('FORMAT_MENU', 'nomenu');
+texinfo_set_from_init_file('SPLIT', 'node');
+texinfo_set_from_init_file('contents', 1);
-set_from_init_file('DEFAULT_RULE', '');
-set_from_init_file('BIG_RULE', '');
-set_from_init_file('HEADERS', 0);
+texinfo_set_from_init_file('DEFAULT_RULE', '');
+texinfo_set_from_init_file('BIG_RULE', '');
+texinfo_set_from_init_file('HEADERS', 0);
-set_from_init_file('footnotestyle', 'end');
+texinfo_set_from_init_file('footnotestyle', 'end');
#FIXME remove that later?
-set_from_init_file('USE_NODES', 0);
+texinfo_set_from_init_file('USE_NODES', 0);
use vars qw(%commands_formatting);
texinfo_register_formatting_function('format_end_file', \&chm_format_end_file);
diff --git a/tp/init/html32.pm b/tp/init/html32.pm
index 9396cad..a0f2bcc 100644
--- a/tp/init/html32.pm
+++ b/tp/init/html32.pm
@@ -28,32 +28,32 @@ use Texinfo::Convert::Converter qw(xml_protect_text);
use vars qw(%commands_formatting %style_commands_formatting);
-set_from_init_file('COMPLEX_FORMAT_IN_TABLE', 1);
+texinfo_set_from_init_file('COMPLEX_FORMAT_IN_TABLE', 1);
-set_from_init_file('DOCTYPE', '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML
3.2//EN" "http://www.w3.org/TR/html32/loose.dtd">');
+texinfo_set_from_init_file('DOCTYPE', '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML
3.2//EN" "http://www.w3.org/TR/html32/loose.dtd">');
-set_from_init_file('FRAMESET_DOCTYPE', get_conf('DOCTYPE'));
+texinfo_set_from_init_file('FRAMESET_DOCTYPE', texinfo_get_conf('DOCTYPE'));
-set_from_init_file('BODYTEXT', 'bgcolor="#FFFFFF" text="#000000"
link="#0000FF" vlink="#800080" alink="#FF0000"');
+texinfo_set_from_init_file('BODYTEXT', 'bgcolor="#FFFFFF" text="#000000"
link="#0000FF" vlink="#800080" alink="#FF0000"');
-set_from_init_file('BEFORE_OVERVIEW', '');
-set_from_init_file('AFTER_OVERVIEW', '');
-set_from_init_file('BEFORE_TOC_LINES', '');
-set_from_init_file('AFTER_TOC_LINES', '');
+texinfo_set_from_init_file('BEFORE_OVERVIEW', '');
+texinfo_set_from_init_file('AFTER_OVERVIEW', '');
+texinfo_set_from_init_file('BEFORE_TOC_LINES', '');
+texinfo_set_from_init_file('AFTER_TOC_LINES', '');
# html version for latex2html
-set_from_init_file('L2H_HTML_VERSION', '3.2');
+texinfo_set_from_init_file('L2H_HTML_VERSION', '3.2');
# no css, no class
-set_from_init_file('NO_CSS', 1);
+texinfo_set_from_init_file('NO_CSS', 1);
# no accesskey in html 3.2
-set_from_init_file('USE_ACCESSKEY', 0);
+texinfo_set_from_init_file('USE_ACCESSKEY', 0);
-set_from_init_file('MENU_SYMBOL', '*');
+texinfo_set_from_init_file('MENU_SYMBOL', '*');
-set_from_init_file('OPEN_QUOTE_SYMBOL', '`');
-set_from_init_file('CLOSE_QUOTE_SYMBOL', "'");
+texinfo_set_from_init_file('OPEN_QUOTE_SYMBOL', '`');
+texinfo_set_from_init_file('CLOSE_QUOTE_SYMBOL', "'");
foreach my $command ('euro', 'geq', 'leq',
'bullet', 'equiv', 'expansion', 'point', 'result', 'arrow',
diff --git a/tp/init/latex2html.pm b/tp/init/latex2html.pm
index d774bfe..7444d58 100644
--- a/tp/init/latex2html.pm
+++ b/tp/init/latex2html.pm
@@ -42,26 +42,26 @@ texinfo_register_command_formatting('tex', \&l2h_do_tex);
texinfo_register_command_formatting('displaymath', \&l2h_do_tex);
# name/location of latex2html program
-set_from_init_file('L2H_L2H', 'latex2html');
+texinfo_set_from_init_file('L2H_L2H', 'latex2html');
# If this is set the actual call to latex2html is skipped. The previously
# generated content is reused, instead.
# If set to 0, the cache is not used.
# If undef the cache is used for as many tex fragments as possible
# and for the remaining the command is run.
-set_from_init_file('L2H_SKIP', undef);
+texinfo_set_from_init_file('L2H_SKIP', undef);
# If this is set l2h uses the specified directory for temporary files. The path
# leading to this directory may not contain a dot (i.e., a ".");
# otherwise, l2h will fail.
-set_from_init_file('L2H_TMP', '');
+texinfo_set_from_init_file('L2H_TMP', '');
# If set, l2h uses the file as latex2html init file
-set_from_init_file('L2H_FILE', undef);
+texinfo_set_from_init_file('L2H_FILE', undef);
# if this is set the intermediate files generated by texi2html in relation with
# latex2html are cleaned (they all have the prefix <document name>_l2h_).
-set_from_init_file('L2H_CLEAN', 1);
+texinfo_set_from_init_file('L2H_CLEAN', 1);
# latex2html conversions consist of 2 stages:
diff --git a/tp/t/init/icons.init b/tp/t/init/icons.init
index 075865c..db76e56 100644
--- a/tp/t/init/icons.init
+++ b/tp/t/init/icons.init
@@ -1,5 +1,5 @@
-set_from_init_file('ICONS', 1);
+texinfo_set_from_init_file('ICONS', 1);
# insert here name of icon images for buttons
@@ -54,7 +54,7 @@ set_from_init_file('ICONS', 1);
'Last', '',
);
-set_from_init_file('ACTIVE_ICONS', \%ACTIVE_ICONS);
-set_from_init_file('PASSIVE_ICONS', \%PASSIVE_ICONS);
+texinfo_set_from_init_file('ACTIVE_ICONS', \%ACTIVE_ICONS);
+texinfo_set_from_init_file('PASSIVE_ICONS', \%PASSIVE_ICONS);
1;
diff --git a/tp/t/init/mini_ker_t2h.init b/tp/t/init/mini_ker_t2h.init
index bc944f0..555d2de 100644
--- a/tp/t/init/mini_ker_t2h.init
+++ b/tp/t/init/mini_ker_t2h.init
@@ -1,4 +1,4 @@
-set_from_init_file('shortcontents', 1);
+texinfo_set_from_init_file('shortcontents', 1);
sub mini_ker_element_type($$$$)
{
diff --git a/tp/t/init/misc_file_collision.init
b/tp/t/init/misc_file_collision.init
index fd73399..a25caea 100644
--- a/tp/t/init/misc_file_collision.init
+++ b/tp/t/init/misc_file_collision.init
@@ -21,6 +21,6 @@ sub test_misc_file_name($$$)
return $filename;
}
-set_from_init_file('DO_ABOUT', 1);
+texinfo_set_from_init_file('DO_ABOUT', 1);
1;
diff --git a/tp/t/init/t2h_singular.init b/tp/t/init/t2h_singular.init
index f13c3d4..3a8a498 100644
--- a/tp/t/init/t2h_singular.init
+++ b/tp/t/init/t2h_singular.init
@@ -15,39 +15,39 @@ my $T2H_BLUE_BUTTONS = 0;
# -prefix
# Set the output file prefix, prepended to all .html, .png and .pl files.
-set_from_init_file('setfilename', 'sing');
+texinfo_set_from_init_file('setfilename', 'sing');
# -expand
# if set to "tex" (or, "info") expand @iftex and @tex (or, @ifinfo) sections
# else, neither expand @iftex, @tex, nor @ifinfo sections
-set_from_init_file('EXPANDED_FORMATS', ['html', 'tex']);
+texinfo_set_from_init_file('EXPANDED_FORMATS', ['html', 'tex']);
# if set, creates one html file per node
-set_from_init_file('SPLIT', 'node');
+texinfo_set_from_init_file('SPLIT', 'node');
#if set cross-references use the xref node name argument
-set_from_init_file('XREF_USE_NODE_NAME_ARG', 1);
+texinfo_set_from_init_file('XREF_USE_NODE_NAME_ARG', 1);
# if set, chatter about what we are doing
-set_from_init_file('VERBOSE', 1);
+texinfo_set_from_init_file('VERBOSE', 1);
my $T2H_SING_base_images = '../singular_images/';
# inside <BODY ..>
-set_from_init_file('BODYTEXT','lang="en"
background="'.${T2H_SING_base_images}.'Mybg.png"');
+texinfo_set_from_init_file('BODYTEXT','lang="en"
background="'.${T2H_SING_base_images}.'Mybg.png"');
# after <BODY>
-set_from_init_file('AFTER_BODY_OPEN', "\n");
+texinfo_set_from_init_file('AFTER_BODY_OPEN', "\n");
# before </BODY>
-set_from_init_file('PRE_BODY_CLOSE', "\n");
+texinfo_set_from_init_file('PRE_BODY_CLOSE', "\n");
# if using tex4ht, must be in latex mode due to \textbf
$Texinfo::TeX4HT::STYLE='latex';
# title is already in the manual
#$print_title = \&T2H_DEFAULT_print_title;
-set_from_init_file('SHOW_TITLE', 0);
+texinfo_set_from_init_file('SHOW_TITLE', 0);
# footer
@@ -138,9 +138,9 @@ EOT
}
# always use bottom navigation
-set_from_init_file('WORDS_IN_PAGE', 0);
+texinfo_set_from_init_file('WORDS_IN_PAGE', 0);
-set_from_init_file('VERTICAL_HEAD_NAVIGATION', 1);
+texinfo_set_from_init_file('VERTICAL_HEAD_NAVIGATION', 1);
my @SECTION_BUTTONS =
(
\&singular_banner,
@@ -148,19 +148,19 @@ my @SECTION_BUTTONS =
'Up', 'Top', 'Contents', 'Index', 'About'
);
-set_from_init_file ('SECTION_BUTTONS', \@SECTION_BUTTONS);
+texinfo_set_from_init_file ('SECTION_BUTTONS', \@SECTION_BUTTONS);
my @NODE_FOOTER_BUTTONS = @SECTION_BUTTONS;
-set_from_init_file ('NODE_FOOTER_BUTTONS', \@SECTION_BUTTONS);
+texinfo_set_from_init_file ('NODE_FOOTER_BUTTONS', \@SECTION_BUTTONS);
# buttons for misc stuff
my @MISC_BUTTONS = (\&singular_banner, 'Top', 'Contents', 'Index', 'About');
my @TOP_BUTTONS = (\&singular_banner, 'Top', 'Contents', 'Index', 'About');
-set_from_init_file ('MISC_BUTTONS', \@MISC_BUTTONS);
-set_from_init_file ('TOP_BUTTONS', \@TOP_BUTTONS);
+texinfo_set_from_init_file ('MISC_BUTTONS', \@MISC_BUTTONS);
+texinfo_set_from_init_file ('TOP_BUTTONS', \@TOP_BUTTONS);
-set_from_init_file('ICONS', 1);
+texinfo_set_from_init_file('ICONS', 1);
my %ACTIVE_ICONS;
my %PASSIVE_ICONS;
@@ -243,8 +243,8 @@ foreach my $hash_ref((\%ACTIVE_ICONS, \%PASSIVE_ICONS)) {
}
}
-set_from_init_file ('ACTIVE_ICONS', \%ACTIVE_ICONS);
-set_from_init_file ('PASSIVE_ICONS', \%PASSIVE_ICONS);
+texinfo_set_from_init_file ('ACTIVE_ICONS', \%ACTIVE_ICONS);
+texinfo_set_from_init_file ('PASSIVE_ICONS', \%PASSIVE_ICONS);
sub T2H_SING_pre_about($$)
{
@@ -272,7 +272,7 @@ EOT
return $result;
}
-set_from_init_file ('PRE_ABOUT', \&T2H_SING_pre_about);
+texinfo_set_from_init_file ('PRE_ABOUT', \&T2H_SING_pre_about);
# a whole menu
texinfo_register_command_formatting('menu', \&t2h_sing_menu);
diff --git a/tp/t/init/test_directions.init b/tp/t/init/test_directions.init
index 2976d43..a7c058a 100644
--- a/tp/t/init/test_directions.init
+++ b/tp/t/init/test_directions.init
@@ -6,7 +6,7 @@ my @directions = ('Up', 'Forward', 'Back', 'Next',
my @all_directions = @directions;
-if (Texinfo::Config::get_conf('SPLIT')) {
+if (texinfo_get_conf('SPLIT')) {
foreach my $direction (@directions) {
push @all_directions, 'FirstInFile'.$direction;
}
@@ -22,9 +22,9 @@ foreach my $direction (@all_directions) {
@MISC_BUTTONS = @SECTION_BUTTONS;
@TOP_BUTTONS = @SECTION_BUTTONS;
-set_from_init_file('MISC_BUTTONS', \@MISC_BUTTONS);
-set_from_init_file('SECTION_BUTTONS', \@SECTION_BUTTONS);
-set_from_init_file('TOP_BUTTONS', \@TOP_BUTTONS);
+texinfo_set_from_init_file('MISC_BUTTONS', \@MISC_BUTTONS);
+texinfo_set_from_init_file('SECTION_BUTTONS', \@SECTION_BUTTONS);
+texinfo_set_from_init_file('TOP_BUTTONS', \@TOP_BUTTONS);
1;
diff --git a/tp/t/test_utils.pl b/tp/t/test_utils.pl
index c6ef3af..e2cd0ec 100644
--- a/tp/t/test_utils.pl
+++ b/tp/t/test_utils.pl
@@ -819,7 +819,7 @@ sub test($$)
foreach my $filename (@{$parser_options->{'init_files'}}) {
my $file = Texinfo::Common::locate_init_file($filename,
$init_file_directories, 0);
if (defined($file)) {
- Texinfo::Config::_load_init_file($file);
+ Texinfo::Config::GNUT_load_init_file($file);
} else {
warn (sprintf("could not read init file %s", $filename));
}
diff --git a/tp/texi2any.pl b/tp/texi2any.pl
index 30c2010..faa055e 100755
--- a/tp/texi2any.pl
+++ b/tp/texi2any.pl
@@ -329,7 +329,7 @@ sub locate_and_load_init_file($$)
my $file = Texinfo::Common::locate_init_file($filename, $directories, 0);
if (defined($file)) {
- Texinfo::Config::_load_init_file($file);
+ Texinfo::Config::GNUT_load_init_file($file);
} else {
document_warn(sprintf(__("could not read init file %s"), $filename));
}
@@ -338,19 +338,15 @@ sub locate_and_load_init_file($$)
# read initialization files
foreach my $file (Texinfo::Common::locate_init_file($conf_file_name,
[ reverse(@program_config_dirs) ], 1)) {
- Texinfo::Config::_load_init_file($file);
+ Texinfo::Config::GNUT_load_init_file($file);
}
sub set_from_cmdline($$) {
- return &Texinfo::Config::set_from_cmdline(@_);
-}
-
-sub set_from_init_file($$) {
- return &Texinfo::Config::set_from_init_file(@_);
+ return &Texinfo::Config::GNUT_set_from_cmdline(@_);
}
sub get_conf($) {
- return &Texinfo::Config::get_conf(@_);
+ return &Texinfo::Config::texinfo_get_conf(@_);
}
my @input_file_suffixes = ('.txi','.texinfo','.texi','.txinfo','');
@@ -378,7 +374,7 @@ my @prepend_dirs = ();
my $parser_options = {'EXPANDED_FORMATS' => [],
'values' => {'txicommandconditionals' => 1}};
-Texinfo::Config::_load_config($converter_default_options, $cmdline_options);
+Texinfo::Config::GNUT_load_config($converter_default_options,
$cmdline_options);
sub set_expansion($$) {
my $region = shift;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Config.pm, texi2any.pl, tp/init/*.pm, tp/t/init/*.init: rename _load_init_file as GNUT_load_init_file, _load_config as GNUT_load_config, set_from_init_file as texinfo_set_from_init_file, set_from_cmdline as GNUT_set_from_cmdline and get_conf as texinfo_get_conf to follow the convention that functions that should not be called by user init files codes are prefixed by GNUT_ while functions that can be called by user init files codes are prefixed by texinfo_.,
Patrice Dumas <=
- Prev by Date:
branch master updated: * tp/Texinfo/Config.pm, texi2any.pl, tp/Texinfo/Convert/HTML.pm, tp/Makefile.am (dist_modules_DATA): put Texinfo::Config namespace in a separate file. This is not perfect as Texinfo::Config is still entangled with Texinfo::Convert::HTML. In particular delayed loading of converter modules in texi2any.pl is now ineffective for Texinfo::Convert::HTML.
- Next by Date:
branch master updated: * tp/Texinfo/Config.pm (GNUT_get_stage_handlers) (GNUT_get_formatting_references, GNUT_get_commands_conversion) (GNUT_get_types_conversion), tp/Texinfo/Convert/HTML.pm: use a proper interface between Texinfo::Config and Texinfo::Convert::HTML for handlers.
- Previous by thread:
branch master updated: * tp/Texinfo/Config.pm, texi2any.pl, tp/Texinfo/Convert/HTML.pm, tp/Makefile.am (dist_modules_DATA): put Texinfo::Config namespace in a separate file. This is not perfect as Texinfo::Config is still entangled with Texinfo::Convert::HTML. In particular delayed loading of converter modules in texi2any.pl is now ineffective for Texinfo::Convert::HTML.
- Next by thread:
branch master updated: * tp/Texinfo/Config.pm (GNUT_get_stage_handlers) (GNUT_get_formatting_references, GNUT_get_commands_conversion) (GNUT_get_types_conversion), tp/Texinfo/Convert/HTML.pm: use a proper interface between Texinfo::Config and Texinfo::Convert::HTML for handlers.
- Index(es):