[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp texi2any.pl Texinfo/Report.pm
From: |
Patrice Dumas |
Subject: |
texinfo/tp texi2any.pl Texinfo/Report.pm |
Date: |
Mon, 28 Jan 2013 23:49:07 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 13/01/28 23:49:07
Modified files:
tp : texi2any.pl
tp/Texinfo : Report.pm
Log message:
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/texi2any.pl?cvsroot=texinfo&r1=1.169&r2=1.170
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Report.pm?cvsroot=texinfo&r1=1.25&r2=1.26
Patches:
Index: texi2any.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/texi2any.pl,v
retrieving revision 1.169
retrieving revision 1.170
diff -u -b -r1.169 -r1.170
--- texi2any.pl 28 Jan 2013 23:34:11 -0000 1.169
+++ texi2any.pl 28 Jan 2013 23:49:07 -0000 1.170
@@ -603,10 +603,11 @@
# previous_format should be in argument if there is a possibility of error.
# as a fallback, the $format global variable is used.
-sub set_format($;$)
+sub set_format($;$$)
{
my $set_format = shift;
my $previous_format = shift;
+ my $do_not_override_command_line = shift;
my $new_format;
if ($format_command_line_names{$set_format}) {
@@ -621,6 +622,10 @@
$new_format = $previous_format;
$new_format = $format if (!defined($new_format));
} else {
+ if ($format_from_command_line and $do_not_override_command_line) {
+ $new_format = $previous_format;
+ $new_format = $format if (!defined($new_format));
+ } else {
if ($formats_table{$new_format}->{'texi2dvi_format'}) {
$call_texi2dvi = 1;
push @texi2dvi_args, '--'.$new_format;
@@ -628,7 +633,9 @@
}
$default_expanded_format = [$expanded_format]
if ($Texinfo::Common::texinfo_output_formats{$expanded_format});
- $format_from_command_line = 1;
+ $format_from_command_line = 1
+ unless ($do_not_override_command_line);
+ }
}
return $new_format;
}
@@ -907,12 +914,12 @@
}
# special case, this is a pseudo format for debug
if ($var eq 'TEXINFO_OUTPUT_FORMAT') {
- $format = set_format($value, $format);
+ $format = set_format($value, $format, 1);
} elsif ($var eq 'TEXI2HTML') {
$format = set_format('html');
$parser_default_options->{'values'}->{'texi2html'} = 1;
}
- set_from_cmdline ($var, $value);
+ set_from_cmdline($var, $value);
# FIXME do that here or when all command line options are processed?
if ($var eq 'L2H' and get_conf('L2H')) {
locate_and_load_init_file($latex2html_file,
@@ -923,7 +930,7 @@
'css-include=s' => address@hidden,
'css-ref=s' => address@hidden,
'transliterate-file-names!' =>
- sub {set_from_cmdline ('TRANSLITERATE_FILE_NAMES', $_[1]);},
+ sub {set_from_cmdline('TRANSLITERATE_FILE_NAMES', $_[1]);},
'error-limit|e=i' => sub { set_from_cmdline('ERROR_LIMIT', $_[1]); },
'split-size=s' => sub {set_from_cmdline('SPLIT_SIZE', $_[1])},
'paragraph-indent|p=s' => sub {
@@ -1001,9 +1008,9 @@
}
-if (!$format_from_command_line and defined($ENV{'TEXINFO_OUTPUT_FORMAT'})
+if (defined($ENV{'TEXINFO_OUTPUT_FORMAT'})
and $ENV{'TEXINFO_OUTPUT_FORMAT'} ne '') {
- $format = set_format($ENV{'TEXINFO_OUTPUT_FORMAT'}, $format);
+ $format = set_format($ENV{'TEXINFO_OUTPUT_FORMAT'}, $format, 1);
}
if ($call_texi2dvi) {
Index: Texinfo/Report.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Report.pm,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- Texinfo/Report.pm 16 Dec 2012 22:14:45 -0000 1.25
+++ Texinfo/Report.pm 28 Jan 2013 23:49:07 -0000 1.26
@@ -51,7 +51,7 @@
use Texinfo::Parser;
# return the errors and warnings
-sub errors ($)
+sub errors($)
{
my $self = shift;
#print STDERR "REPORT ERRORS $self $self->{'errors_warnings'}\n";
@@ -137,7 +137,7 @@
$self->{'error_nrs'}++ unless ($continuation);
}
-sub document_warn ($$)
+sub document_warn($$)
{
my $self = shift;
my $text = shift;
@@ -148,7 +148,7 @@
{ 'type' => 'warning', 'text' => $text, 'error_line' => $warn_line};
}
-sub document_error ($$)
+sub document_error($$)
{
my $self = shift;
my $text = shift;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo/tp texi2any.pl Texinfo/Report.pm,
Patrice Dumas <=