[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Texi2html-cvs] texi2html ChangeLog TODO texi2html.init texi2ht...
From: |
Patrice Dumas |
Subject: |
[Texi2html-cvs] texi2html ChangeLog TODO texi2html.init texi2ht... |
Date: |
Sun, 30 Aug 2009 10:27:30 +0000 |
CVSROOT: /cvsroot/texi2html
Module name: texi2html
Changes by: Patrice Dumas <pertusus> 09/08/30 10:27:30
Modified files:
. : ChangeLog TODO texi2html.init texi2html.pl
examples : book.init chm.init
test/contents : do_contents.init
test/manuals : mini_ker_t2h.init
Log message:
* texi2html.*, examples/*: invert the meaning of the 3rd
argument
of set_conf.
Uset set_conf to have the *contents output even if there is no
@c*contents.
Use set_conf/get_conf directly for set*contentsaftertitlepage.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texi2html/ChangeLog?cvsroot=texi2html&r1=1.415&r2=1.416
http://cvs.savannah.gnu.org/viewcvs/texi2html/TODO?cvsroot=texi2html&r1=1.128&r2=1.129
http://cvs.savannah.gnu.org/viewcvs/texi2html/texi2html.init?cvsroot=texi2html&r1=1.221&r2=1.222
http://cvs.savannah.gnu.org/viewcvs/texi2html/texi2html.pl?cvsroot=texi2html&r1=1.317&r2=1.318
http://cvs.savannah.gnu.org/viewcvs/texi2html/examples/book.init?cvsroot=texi2html&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/texi2html/examples/chm.init?cvsroot=texi2html&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/texi2html/test/contents/do_contents.init?cvsroot=texi2html&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/texi2html/test/manuals/mini_ker_t2h.init?cvsroot=texi2html&r1=1.2&r2=1.3
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/texi2html/texi2html/ChangeLog,v
retrieving revision 1.415
retrieving revision 1.416
diff -u -b -r1.415 -r1.416
--- ChangeLog 29 Aug 2009 23:02:11 -0000 1.415
+++ ChangeLog 30 Aug 2009 10:27:29 -0000 1.416
@@ -1,3 +1,11 @@
+2009-08-30 Patrice Dumas <address@hidden>
+
+ * texi2html.*, examples/*: invert the meaning of the 3rd argument
+ of set_conf.
+ Uset set_conf to have the *contents output even if there is no
+ @c*contents.
+ Use set_conf/get_conf directly for set*contentsaftertitlepage.
+
2009-08-29 Patrice Dumas <address@hidden>
* texi2html.pl, test/sectionning/nodename_parentheses:
Index: TODO
===================================================================
RCS file: /cvsroot/texi2html/texi2html/TODO,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -b -r1.128 -r1.129
--- TODO 29 Aug 2009 23:02:12 -0000 1.128
+++ TODO 30 Aug 2009 10:27:29 -0000 1.129
@@ -103,6 +103,8 @@
$Texi2HTML::THISDOC{'split_level'}
$Texi2HTML::THISDOC{'line_nr'}
$Texi2HTML::THISDOC{'input_directory'}
+ $Texi2HTML::THISDOC{'filename'}->{'toc_frame'}
+ $Texi2HTML::THISDOC{'filename'}->{'frame'}
$empty_preformatted
$copying_comment, $titlepage better and $documentdescription
Index: texi2html.init
===================================================================
RCS file: /cvsroot/texi2html/texi2html/texi2html.init,v
retrieving revision 1.221
retrieving revision 1.222
diff -u -b -r1.221 -r1.222
--- texi2html.init 24 Aug 2009 10:26:28 -0000 1.221
+++ texi2html.init 30 Aug 2009 10:27:29 -0000 1.222
@@ -13,7 +13,7 @@
# Afterwards, load the file with command-line
# option --init-file <your_init_file>
#
-# $Id: texi2html.init,v 1.221 2009/08/24 10:26:28 pertusus Exp $
+# $Id: texi2html.init,v 1.222 2009/08/30 10:27:29 pertusus Exp $
######################################################################
# The following variables can also be set by command-line options
@@ -343,6 +343,10 @@
# If true do short table of contents even if there is no @shortcontent
$SHORTCONTENTS = undef;
+#Â set by @setcontentsaftertitlepage/@setshortcontentsaftertitlepage
+$SETCONTENTSAFTERTITLEPAGE = undef;
+$SETSHORTCONTENTSAFTERTITLEPAGE = undef;
+
# if set, the image files are completed to be relative from the
# document directory, to the source manual directory and then to
# the image
Index: texi2html.pl
===================================================================
RCS file: /cvsroot/texi2html/texi2html/texi2html.pl,v
retrieving revision 1.317
retrieving revision 1.318
diff -u -b -r1.317 -r1.318
--- texi2html.pl 29 Aug 2009 23:02:12 -0000 1.317
+++ texi2html.pl 30 Aug 2009 10:27:29 -0000 1.318
@@ -86,7 +86,7 @@
}
# CVS version:
-# $Id: texi2html.pl,v 1.317 2009/08/29 23:02:12 pertusus Exp $
+# $Id: texi2html.pl,v 1.318 2009/08/30 10:27:29 pertusus Exp $
# Homepage:
my $T2H_HOMEPAGE = "http://www.nongnu.org/texi2html/";
@@ -281,6 +281,8 @@
$SHORTCONTENTS
$FOOTNOTESTYLE
$FILLCOLUMN
+$SETCONTENTSAFTERTITLEPAGE
+$SETSHORTCONTENTSAFTERTITLEPAGE
$TOC_LINKS
$L2H
$L2H_L2H
@@ -679,9 +681,9 @@
{
my $name = shift;
my $value = shift;
- my $from_command_line = shift;
+ my $not_global = shift;
- if ($from_command_line)
+ unless ($not_global)
{
if (defined($value))
{
@@ -720,6 +722,8 @@
'headers' => \$HEADERS,
'DOCUMENT_ENCODING' => \$DOCUMENT_ENCODING,
'IN_ENCODING' => \$IN_ENCODING,
+ 'setcontentsaftertitlepage' => \$SETCONTENTSAFTERTITLEPAGE,
+ 'setshortcontentsaftertitlepage' => \$SETSHORTCONTENTSAFTERTITLEPAGE,
);
sub get_conf($)
@@ -2222,7 +2226,7 @@
my $command = 'footnotestyle';
if ($value eq 'end' or $value eq 'separate')
{
- Texi2HTML::Config::set_conf($command, $value, $from_command_line);
+ Texi2HTML::Config::set_conf($command, $value, !$from_command_line);
}
elsif ($from_command_line)
{
@@ -2411,7 +2415,7 @@
if ($value =~ /^([0-9]+)$/ or $value eq 'none' or $value eq 'asis')
{
- Texi2HTML::Config::set_conf($command, $value, $from_command_line);
+ Texi2HTML::Config::set_conf($command, $value, !$from_command_line);
}
elsif ($from_command_line)
{
@@ -2441,7 +2445,7 @@
$T2H_OPTIONS -> {'doctype'} =
{
type => '=s',
- linkage => sub {Texi2HTML::Config::set_conf('doctype', $_[1], 1);},
+ linkage => sub {Texi2HTML::Config::set_conf('doctype', $_[1]);},
verbose => 'document type which is output in header of HTML files',
noHelp => 1
};
@@ -2647,7 +2651,7 @@
{
type => '!',
linkage => sub {
- Texi2HTML::Config::set_conf('headers', $_[1], 1);
+ Texi2HTML::Config::set_conf('headers', $_[1]);
Texi2HTML::Config::t2h_default_load_format('plaintext', 1)
if (!$_[1] and defined($Texi2HTML::Config::OUTPUT_FORMAT) and
$Texi2HTML::Config::OUTPUT_FORMAT eq 'info');
},
@@ -2686,7 +2690,7 @@
$T2H_OPTIONS -> {'no-validate|no-pointer-validate'} =
{
type => '',
- linkage => sub {Texi2HTML::Config::set_conf('novalidate',$_[1],1)},
+ linkage => sub {Texi2HTML::Config::set_conf('novalidate',$_[1])},
verbose => 'suppress node cross-reference validation',
};
@@ -2731,7 +2735,7 @@
$T2H_OPTIONS -> {'document-language'} =
{
type => '=s',
- linkage => sub {Texi2HTML::Config::set_conf('documentlanguage', $_[1], 1)},
+ linkage => sub {Texi2HTML::Config::set_conf('documentlanguage', $_[1])},
verbose => 'use $s as document language',
};
@@ -2869,7 +2873,7 @@
$T2H_OPTIONS -> {'fill-column|f'} =
{
type => '=i',
- linkage => sub {Texi2HTML::Config::set_conf('fillcolumn',$_[1], 1);},
+ linkage => sub {Texi2HTML::Config::set_conf('fillcolumn',$_[1]);},
'verbose' => "break Info lines at NUM characters (default 72).",
};
@@ -2985,7 +2989,7 @@
$T2H_OBSOLETE_OPTIONS -> {'lang'} =
{
type => '=s',
- linkage => sub {Texi2HTML::Config::set_conf('documentlanguage', $_[1], 1)},
+ linkage => sub {Texi2HTML::Config::set_conf('documentlanguage', $_[1])},
verbose => 'obsolete, use "--document-language" instead',
noHelp => 2
};
@@ -3100,7 +3104,7 @@
$T2H_OBSOLETE_OPTIONS -> {sec_nav} =
{
type => '!',
- linkage => sub {Texi2HTML::Config::set_conf('headers', $_[1], 1);},
+ linkage => sub {Texi2HTML::Config::set_conf('headers', $_[1]);},
verbose => 'obsolete, use "-headers" instead',
noHelp => 2
};
@@ -3108,7 +3112,7 @@
$T2H_OBSOLETE_OPTIONS -> {'sec-nav'} =
{
type => '!',
- linkage => sub {Texi2HTML::Config::set_conf('headers', $_[1], 1);},
+ linkage => sub {Texi2HTML::Config::set_conf('headers', $_[1]);},
verbose => 'obsolete, use "--header" instead',
noHelp => 2
};
@@ -3164,7 +3168,7 @@
$T2H_OBSOLETE_OPTIONS -> {'no-section_navigation'} =
{
type => '!',
- linkage => sub {Texi2HTML::Config::set_conf('headers', 0, 1);},
+ linkage => sub {Texi2HTML::Config::set_conf('headers', 0);},
verbose => 'obsolete, use -nosec_nav',
noHelp => 2,
};
@@ -3222,7 +3226,7 @@
$T2H_OBSOLETE_OPTIONS -> {section_navigation} =
{
type => '!',
- linkage => sub {Texi2HTML::Config::set_conf('headers', $_[1], 1);},
+ linkage => sub {Texi2HTML::Config::set_conf('headers', $_[1]);},
verbose => 'obsolete, use --sec-nav instead',
noHelp => 2,
};
@@ -3826,8 +3830,8 @@
}
# for all files
-Texi2HTML::Config::set_conf('IN_ENCODING', $Texi2HTML::Config::IN_ENCODING, 1);
-Texi2HTML::Config::set_conf('DOCUMENT_ENCODING',
$Texi2HTML::Config::DOCUMENT_ENCODING, 1);
+Texi2HTML::Config::set_conf('IN_ENCODING', $Texi2HTML::Config::IN_ENCODING);
+Texi2HTML::Config::set_conf('DOCUMENT_ENCODING',
$Texi2HTML::Config::DOCUMENT_ENCODING);
# Backward compatibility for deprecated $Texi2HTML::Config::ENCODING
$Texi2HTML::Config::ENCODING_NAME = $Texi2HTML::Config::ENCODING
@@ -3941,7 +3945,6 @@
$Texi2HTML::Config::SPLIT = '';
}
-#Â FIXME
$Texi2HTML::Config::SPLIT_INDEX = 0 unless $Texi2HTML::Config::SPLIT;
$Texi2HTML::Config::NODE_FILENAMES = 1 if
((!defined($Texi2HTML::Config::NODE_FILENAMES) and $Texi2HTML::Config::SPLIT eq
'node') or $Texi2HTML::Config::NODE_FILES);
@@ -3961,18 +3964,6 @@
$Texi2HTML::Config::OUT = '';
}
-#Â FIXME
-#Â if the global configuration variable is set, this overrides what
-#Â could be set in the manual. This may be wrong for 'contents' and
-#Â 'shortcontents' since it is inconsistent with how @-commands in
-#Â documents override variables in config files. It is only relevant
-#Â if the variables are set to 0, however, since the @-command is a
-# no-op if already set to 1.
-foreach my $global_conf_vars('contents','shortcontents')
-{
-
Texi2HTML::Config::set_conf($global_conf_vars,Texi2HTML::Config::get_conf($global_conf_vars),1);
-}
-
@Texi2HTML::Config::INCLUDE_DIRS =
split(/$quoted_path_separator/,join($path_separator,@Texi2HTML::Config::INCLUDE_DIRS));
@Texi2HTML::Config::PREPEND_DIRS =
split(/$quoted_path_separator/,join($path_separator,@Texi2HTML::Config::PREPEND_DIRS));
@@ -4323,7 +4314,6 @@
$Texi2HTML::THISDOC{'filename'}->{'stoc'} = $docu_stoc;
$Texi2HTML::THISDOC{'filename'}->{'about'} = $docu_about;
$Texi2HTML::THISDOC{'filename'}->{'toc'} = $docu_toc;
-# FIXME document that
$Texi2HTML::THISDOC{'filename'}->{'toc_frame'} = $docu_toc_frame;
$Texi2HTML::THISDOC{'filename'}->{'frame'} = $docu_frame;
}
@@ -4356,7 +4346,7 @@
'firstparagraphindent', 'paragraphindent', 'clickstyle',
'novalidate', 'documentlanguage')
{
- Texi2HTML::Config::set_conf($init_mac, undef);
+ Texi2HTML::Config::set_conf($init_mac, undef, 1);
}
}
@@ -4453,9 +4443,8 @@
$cline = $text;
$text = '';
if (!defined($cline))
- {# FIXME: remove the error message if it is reported too often
- print STDERR "# \$cline undefined after scan_texi. This may be a
bug, or not.\n";
- print STDERR "# Report (with texinfo file) if you want, otherwise
ignore that message.\n";
+ {
+ msg_debug ("\$cline undefined after scan_texi", $texi_line_number);
next unless ($state->{'bye'});
}
push @lines, split_lines($cline);
@@ -4554,9 +4543,6 @@
#Â holds content elements located with @*contents commands
my %all_content_elements;
-#Â FIXME use directly the @-commands and get_conf setcontentsaftertitlepage
-my %aftertitlepage_command;
-
# common code for headings and sections
sub new_section_heading($$$)
@@ -4988,12 +4974,12 @@
my $lang = $1;
my $prev_lang = Texi2HTML::Config::get_conf('documentlanguage');
#Â This won't be done if the documentlanguage was set on the command
line
- if (Texi2HTML::Config::set_conf('documentlanguage', $lang))
+ if (Texi2HTML::Config::set_conf('documentlanguage', $lang, 1))
{
$language_change_succes = set_document_language($lang, $silent,
$line_nr);
if (!$language_change_succes)
{ #Â reset previous documentlanguage
- Texi2HTML::Config::set_conf('documentlanguage', $prev_lang);
+ Texi2HTML::Config::set_conf('documentlanguage', $prev_lang, 1);
line_error ("Translations for '$lang' not found. Reverting to
'$prev_lang'.", $line_nr) unless ($silent);
}
}
@@ -5049,7 +5035,7 @@
}
elsif ($macro eq 'novalidate')
{
- Texi2HTML::Config::set_conf($macro, 1);
+ Texi2HTML::Config::set_conf($macro, 1, 1);
}
if ($pass)
{ # these commands are only taken into account here in pass_structure 1
@@ -5082,7 +5068,7 @@
{
if (($line =~ /\s+(none)[^\w\-]/) or ($line =~
/\s+(insert)[^\w\-]/))
{
- Texi2HTML::Config::set_conf($macro,$1);
+ Texi2HTML::Config::set_conf($macro, $1, 1);
}
else
{
@@ -5122,7 +5108,7 @@
# an array for user consumption? This should be done for each new
# chapter, section, and page. What is a page is not necessarily
# well defined in html, however...
- # @thisfile is the @include file. Shoule be in $line_nr.
+ # @thisfile is the @include file. Should be in $line_nr.
my $arg = $line;
$arg =~ s/^\s+//;
$Texi2HTML::THISDOC{$macro} = $arg;
@@ -5184,13 +5170,13 @@
{
my $encoding = $2;
$Texi2HTML::THISDOC{'documentencoding'} = $encoding;
- if (Texi2HTML::Config::set_conf('DOCUMENT_ENCODING',
$Texi2HTML::THISDOC{'documentencoding'}))
+ if (Texi2HTML::Config::set_conf('DOCUMENT_ENCODING',
$Texi2HTML::THISDOC{'documentencoding'}, 1))
{
my $from_encoding;
if (!defined($Texi2HTML::Config::IN_ENCODING))
{
$from_encoding = encoding_alias($encoding, $line_nr);
- Texi2HTML::Config::set_conf('IN_ENCODING', $from_encoding)
+ Texi2HTML::Config::set_conf('IN_ENCODING', $from_encoding,
1)
if (defined($from_encoding));
}
if (defined($from_encoding) and $Texi2HTML::Config::USE_UNICODE)
@@ -5287,7 +5273,7 @@
{
$macro = 'shortcontents';
}
- Texi2HTML::Config::set_conf($macro, 1);
+ Texi2HTML::Config::set_conf($macro, 1, 1);
my $new_content_element = new_content_element($macro);
push @{$state->{'place'}}, $new_content_element;
push @{$all_content_elements{$macro}}, $new_content_element;
@@ -5471,11 +5457,7 @@
}
elsif ($macro eq 'setcontentsaftertitlepage' or $macro eq
'setshortcontentsaftertitlepage')
{
- $Texi2HTML::THISDOC{$macro} = 1;
- my $tag = 'contents';
- $tag = 'shortcontents' if ($macro ne 'setcontentsaftertitlepage');
- #$content_element{$tag}->{'aftertitlepage'} = 1;
- $aftertitlepage_command{$tag} = 1;
+ Texi2HTML::Config::set_conf($macro, 1, 1);
}
elsif ($macro eq 'need')
{ # only a warning
@@ -7170,7 +7152,7 @@
$content_element{$content_type} = undef;
}
}
- elsif ($Texi2HTML::Config::INLINE_CONTENTS and
!$aftertitlepage_command{$content_type})
+ elsif ($Texi2HTML::Config::INLINE_CONTENTS and
!Texi2HTML::Config::get_conf('set' . $content_type .'aftertitlepage'))
{
$content_element{$content_type} =
$all_content_elements{$content_type}->[-1];
}
@@ -12877,7 +12859,7 @@
$element_tag = 'shortcontents' if ($element_tag ne 'contents');
# at that point the content_element is defined for sure since
# we already saw the tag
- if ($Texi2HTML::Config::INLINE_CONTENTS and
!$aftertitlepage_command{$element_tag})
+ if ($Texi2HTML::Config::INLINE_CONTENTS and
!Texi2HTML::Config::get_conf('set' . $element_tag . 'aftertitlepage'))
{
my $content_element = shift
(@{$all_content_elements{$element_tag}});
my $toc_lines =
&$Texi2HTML::Config::inline_contents($Texi2HTML::THISDOC{'FH'}, $element_tag,
$content_element, address@hidden);
@@ -15620,8 +15602,6 @@
}
}
- %aftertitlepage_command = ();
-
%sec2level = %reference_sec2level;
$element_before_anything =
Index: examples/book.init
===================================================================
RCS file: /cvsroot/texi2html/texi2html/examples/book.init,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- examples/book.init 10 Aug 2009 10:00:25 -0000 1.23
+++ examples/book.init 30 Aug 2009 10:27:30 -0000 1.24
@@ -2,7 +2,7 @@
html_default_load();
-$CONTENTS = 1;
+set_conf('contents', 1);
$INLINE_CONTENTS = 1;
Index: examples/chm.init
===================================================================
RCS file: /cvsroot/texi2html/texi2html/examples/chm.init,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- examples/chm.init 10 Aug 2009 10:00:25 -0000 1.20
+++ examples/chm.init 30 Aug 2009 10:27:30 -0000 1.21
@@ -33,7 +33,7 @@
#$SECTION_NAVIGATION = 0; # to avoid headers in normal elements
$SHOW_MENU = 0;
$SPLIT = 'node';
-$CONTENTS = 1;
+set_conf('contents', 1);
$SPLIT_INDEX = undef;
$IDX_SUMMARY = 1;
Index: test/contents/do_contents.init
===================================================================
RCS file: /cvsroot/texi2html/texi2html/test/contents/do_contents.init,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- test/contents/do_contents.init 21 May 2009 20:15:59 -0000 1.2
+++ test/contents/do_contents.init 30 Aug 2009 10:27:30 -0000 1.3
@@ -1 +1 @@
-$CONTENTS = 1;
+set_conf('contents', 1);
Index: test/manuals/mini_ker_t2h.init
===================================================================
RCS file: /cvsroot/texi2html/texi2html/test/manuals/mini_ker_t2h.init,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- test/manuals/mini_ker_t2h.init 21 May 2009 20:15:59 -0000 1.2
+++ test/manuals/mini_ker_t2h.init 30 Aug 2009 10:27:30 -0000 1.3
@@ -1,4 +1,4 @@
-$SHORTCONTENTS = 1;
+set_conf('shortcontents', 1);
$print_Top = \&mini_ker_print_Top;