[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp texi2any.pl Texinfo/Parser.pm Texinf...
From: |
Patrice Dumas |
Subject: |
texinfo/tp texi2any.pl Texinfo/Parser.pm Texinf... |
Date: |
Sun, 27 Feb 2011 15:57:19 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 11/02/27 15:57:19
Modified files:
tp : texi2any.pl
tp/Texinfo : Parser.pm Structuring.pm
tp/Texinfo/Convert: Info.pm
tp/t : 30sectioning.t
tp/t/results/info_tests: top_node_normalization.pl
tp/t/results/sectioning: double_top.pl
Log message:
Obey the TOP_NODE_UP setting.
Normalize Top node in node directions too.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/texi2any.pl?cvsroot=texinfo&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Parser.pm?cvsroot=texinfo&r1=1.211&r2=1.212
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Structuring.pm?cvsroot=texinfo&r1=1.35&r2=1.36
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Info.pm?cvsroot=texinfo&r1=1.40&r2=1.41
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/30sectioning.t?cvsroot=texinfo&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/info_tests/top_node_normalization.pl?cvsroot=texinfo&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/sectioning/double_top.pl?cvsroot=texinfo&r1=1.12&r2=1.13
Patches:
Index: texi2any.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/texi2any.pl,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- texi2any.pl 26 Feb 2011 10:52:59 -0000 1.20
+++ texi2any.pl 27 Feb 2011 15:57:18 -0000 1.21
@@ -556,9 +556,10 @@
unless (grep {$_ eq $format}
@{$parser_default_options->{'expanded_formats'}});
}
-$parser_default_options->{'MAX_MACRO_CALL_NESTING'} =
get_conf('MAX_MACRO_CALL_NESTING')
- if (defined(get_conf('MAX_MACRO_CALL_NESTING')));
-
+foreach my $parser_settable_option ('TOP_NODE_UP', 'MAX_MACRO_CALL_NESTING') {
+ $parser_default_options->{$parser_settable_option} =
get_conf($parser_settable_option)
+ if (defined(get_conf($parser_settable_option)));
+}
# Main processing, process all the files given on the command line
Index: Texinfo/Parser.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Parser.pm,v
retrieving revision 1.211
retrieving revision 1.212
diff -u -b -r1.211 -r1.212
--- Texinfo/Parser.pm 27 Feb 2011 12:06:54 -0000 1.211
+++ Texinfo/Parser.pm 27 Feb 2011 15:57:19 -0000 1.212
@@ -248,6 +248,7 @@
# @documentlanguage
'ENABLE_ENCODING' => 1, # corresponds to --enable-encoding.
'MAX_MACRO_CALL_NESTING' => 100000, # max number of nested macro calls
+ 'TOP_NODE_UP' => '(dir)' #Â up node of Top node
);
# The commands in initialization_overrides are not set in the document if
Index: Texinfo/Structuring.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Structuring.pm,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -b -r1.35 -r1.36
--- Texinfo/Structuring.pm 24 Feb 2011 01:24:05 -0000 1.35
+++ Texinfo/Structuring.pm 27 Feb 2011 15:57:19 -0000 1.36
@@ -56,8 +56,6 @@
$VERSION = '0.01';
-my $TOP_NODE_UP = '(dir)';
-
my %types_to_enter;
foreach my $type_to_enter ('brace_command_arg', 'misc_line_arg',
'paragraph') {
@@ -419,7 +417,8 @@
} else {
# Special case for Top node.
$node->{'node_up'} = {'extra' => Texinfo::Parser::_parse_node_manual(
- {'contents' => [ {'text' => $TOP_NODE_UP} ]})};
+ {'contents' => [ {'text'
+ => $self->{'TOP_NODE_UP'} }
]})};
if ($node->{'menu_child'}) {
$node->{'node_next'} = $node->{'menu_child'};
$node->{'menu_child'}->{'node_prev'} = $node;
Index: Texinfo/Convert/Info.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Info.pm,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- Texinfo/Convert/Info.pm 27 Feb 2011 15:24:38 -0000 1.40
+++ Texinfo/Convert/Info.pm 27 Feb 2011 15:57:19 -0000 1.41
@@ -547,8 +547,8 @@
{'text' => ')'}]});
}
if ($node_direction->{'extra'}->{'node_content'}) {
- $result .= $self->convert_line({'type' => 'code',
- 'contents' => $node_direction->{'extra'}->{'node_content'}});
+ $result .= _normalize_top_node($self->convert_line({'type' => 'code',
+ 'contents' => $node_direction->{'extra'}->{'node_content'}}));
}
}
}
Index: t/30sectioning.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/30sectioning.t,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- t/30sectioning.t 27 Feb 2011 15:24:38 -0000 1.23
+++ t/30sectioning.t 27 Feb 2011 15:57:19 -0000 1.24
@@ -321,6 +321,13 @@
@node float1
'],
+['double_top',
+'@node ToP, top
+
address@hidden top,,ToP,Top
+
address@hidden
+'],
);
my @test_cases = (
@@ -460,13 +467,6 @@
'@anchor{}.
@anchor{ }.
'],
-['double_top',
-'@node ToP, top
-
address@hidden top,,ToP,Top
-
address@hidden
-'],
['double_top_in_menu',
'@node ToP, top
Top node
Index: t/results/info_tests/top_node_normalization.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/info_tests/top_node_normalization.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- t/results/info_tests/top_node_normalization.pl 20 Feb 2011 12:18:38
-0000 1.2
+++ t/results/info_tests/top_node_normalization.pl 27 Feb 2011 15:57:19
-0000 1.3
@@ -340,7 +340,7 @@
$result_converted{'info'}->{'top_node_normalization'} = 'This is , produced by
makeinfo version 4.13 from .
-File: , Node: Top, Next: ToP, Prev: ToP, Up: (dir)
+File: , Node: Top, Next: Top, Prev: Top, Up: (dir)
*Note TOP::. *Note tOP::.
Index: t/results/sectioning/double_top.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/sectioning/double_top.pl,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- t/results/sectioning/double_top.pl 6 Feb 2011 00:03:52 -0000 1.12
+++ t/results/sectioning/double_top.pl 27 Feb 2011 15:57:19 -0000 1.13
@@ -316,4 +316,19 @@
];
+
+$result_converted{'info'}->{'double_top'} = 'This is , produced by makeinfo
version 4.13 from .
+
+
+File: , Node: Top, Next: Top
+
+.
+
+
+Tag Table:
+Node: Top52
+
+End Tag Table
+';
+
1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo/tp texi2any.pl Texinfo/Parser.pm Texinf...,
Patrice Dumas <=