[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp texi2any.pl tests/formatting/tests-p...
From: |
Patrice Dumas |
Subject: |
texinfo/tp texi2any.pl tests/formatting/tests-p... |
Date: |
Thu, 17 Jan 2013 00:13:52 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 13/01/17 00:13:52
Modified files:
tp : texi2any.pl
tp/tests/formatting: tests-parser.txt
Added files:
tp/tests/formatting/res_parser/split_for_format_not_split:
simplest.1
simplest.2
simplest.xml
Log message:
Use formatted output format names in error messages.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/texi2any.pl?cvsroot=texinfo&r1=1.161&r2=1.162
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/tests/formatting/tests-parser.txt?cvsroot=texinfo&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/tests/formatting/res_parser/split_for_format_not_split/simplest.1?cvsroot=texinfo&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/tests/formatting/res_parser/split_for_format_not_split/simplest.2?cvsroot=texinfo&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/tests/formatting/res_parser/split_for_format_not_split/simplest.xml?cvsroot=texinfo&rev=1.1
Patches:
Index: texi2any.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/texi2any.pl,v
retrieving revision 1.161
retrieving revision 1.162
diff -u -b -r1.161 -r1.162
--- texi2any.pl 16 Jan 2013 22:02:29 -0000 1.161
+++ texi2any.pl 17 Jan 2013 00:13:51 -0000 1.162
@@ -978,6 +978,24 @@
},
);
+my %format_names = (
+ 'info' => 'Info',
+ 'html' => 'HTML',
+ 'docbook' => 'DocBook',
+ 'texinfoxml' => 'Texinfo XML',
+ 'plaintext' => 'Plain Text',
+);
+
+sub format_name($)
+{
+ my $format = shift;
+ if ($format_names{$format}) {
+ return $format_names{$format};
+ } else {
+ return $format;
+ }
+}
+
if (!$format_from_command_line and defined($ENV{'TEXINFO_OUTPUT_FORMAT'})
and $ENV{'TEXINFO_OUTPUT_FORMAT'} ne '') {
@@ -996,10 +1014,10 @@
if ($call_texi2dvi) {
if (defined(get_conf('OUT')) and @ARGV > 1) {
die sprintf(__('when generating %s, only one input FILE may be specified
with -o'),
- $format);
+ format_name($format));
}
} elsif($Xopt_arg_nr) {
- document_warn (__('--Xopt option without printed output'));
+ document_warn(__('--Xopt option without printed output'));
}
my %tree_transformations;
@@ -1016,13 +1034,13 @@
}
if (get_conf('SPLIT') and !$formats_table{$format}->{'split'}) {
- document_warn (sprintf(__('Ignoring splitting for format %s'), $format));
+ document_warn (sprintf(__('Ignoring splitting for format %s'),
format_name($format)));
set_from_cmdline('SPLIT', '');
}
-foreach my $format (@{$default_expanded_format}) {
- push @{$parser_default_options->{'expanded_formats'}}, $format
- unless (grep {$_ eq $format}
@{$parser_default_options->{'expanded_formats'}});
+foreach my $expanded_format (@{$default_expanded_format}) {
+ push @{$parser_default_options->{'expanded_formats'}}, $expanded_format
+ unless (grep {$_ eq $expanded_format}
@{$parser_default_options->{'expanded_formats'}});
}
my $converter_class;
Index: tests/formatting/tests-parser.txt
===================================================================
RCS file: /sources/texinfo/texinfo/tp/tests/formatting/tests-parser.txt,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- tests/formatting/tests-parser.txt 18 Dec 2012 00:07:17 -0000 1.11
+++ tests/formatting/tests-parser.txt 17 Jan 2013 00:13:52 -0000 1.12
@@ -38,3 +38,4 @@
documentlanguage_set_option_info documentlanguage_set.texi --info
--document-language fr
float_copying float_copying.texi --split chapter
simple_with_menu_docbook_info simple_with_menu.texi --docbook --info
+split_for_format_not_split simplest.texi --xml --split chapter
Index: tests/formatting/res_parser/split_for_format_not_split/simplest.1
===================================================================
RCS file: tests/formatting/res_parser/split_for_format_not_split/simplest.1
diff -N tests/formatting/res_parser/split_for_format_not_split/simplest.1
Index: tests/formatting/res_parser/split_for_format_not_split/simplest.2
===================================================================
RCS file: tests/formatting/res_parser/split_for_format_not_split/simplest.2
diff -N tests/formatting/res_parser/split_for_format_not_split/simplest.2
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ tests/formatting/res_parser/split_for_format_not_split/simplest.2 17 Jan
2013 00:13:52 -0000 1.1
@@ -0,0 +1 @@
+warning: Ignoring splitting for format Texinfo XML
Index: tests/formatting/res_parser/split_for_format_not_split/simplest.xml
===================================================================
RCS file: tests/formatting/res_parser/split_for_format_not_split/simplest.xml
diff -N tests/formatting/res_parser/split_for_format_not_split/simplest.xml
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ tests/formatting/res_parser/split_for_format_not_split/simplest.xml 17 Jan
2013 00:13:52 -0000 1.1
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<!DOCTYPE texinfo PUBLIC "-//GNU//DTD TexinfoML V5.0//EN"
"http://www.gnu.org/software/texinfo/dtd/5.0/texinfo.dtd">
+<texinfo xml:lang="en">
+<filename file="simplest.xml"></filename>
+<preamble>\input texinfo @c -*-texinfo-*-
+
+</preamble><setfilename file="simplest.info" spaces="
">simplest.info</setfilename>
+
+<node name="Top" spaces=" "><nodename>Top</nodename><nodeup
automatic="on">(dir)</nodeup></node>
+
+<para>This is a very simple texi manual <spacecmd type="spc"/> <>.
+</para>
+<bye></bye>
+</texinfo>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo/tp texi2any.pl tests/formatting/tests-p...,
Patrice Dumas <=