texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

texinfo/Pod-Simple-Texinfo pod2texi.pl


From: Patrice Dumas
Subject: texinfo/Pod-Simple-Texinfo pod2texi.pl
Date: Sat, 28 Jan 2012 12:21:59 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        12/01/28 12:21:59

Modified files:
        Pod-Simple-Texinfo: pod2texi.pl 

Log message:
        Output to stdout in the default case.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/Pod-Simple-Texinfo/pod2texi.pl?cvsroot=texinfo&r1=1.5&r2=1.6

Patches:
Index: pod2texi.pl
===================================================================
RCS file: /sources/texinfo/texinfo/Pod-Simple-Texinfo/pod2texi.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- pod2texi.pl 24 Jan 2012 22:50:13 -0000      1.5
+++ pod2texi.pl 28 Jan 2012 12:21:57 -0000      1.6
@@ -63,7 +63,7 @@
 
 sub pod2texi_help()
 {
-  print __("Usage: pod2texi [OPTION]... POD-FILE...
+  return __("Usage: pod2texi [OPTION]... POD-FILE...
 
 Translate Pod to Texinfo.  If the base level is higher than 0, 
 a main manual including all the files is done otherwise all
@@ -72,14 +72,15 @@
 Options:
     --base-level=NUM        level of the head1 commands.
     --unnumbered-sections   use unumbered sections.
-    --output=NAME           output name for the first or the main manual.
+    --output=NAME           output to <NAME> for the first or the main manual
+                            instead of standard out.
     --top                   top for the main manual.
     --version               display version information and exit.\n");
 }
 
 my $base_level = 0;
 my $unnumbered_sections = 0;
-my $output = undef;
+my $output = '-';
 my $top = 'top';
 
 my $result_options = Getopt::Long::GetOptions (
@@ -129,7 +130,7 @@
 foreach my $file (@input_files) {
   my $outfile;
   my $name = shift @all_manual_names;
-  if ($base_level == 0 and !$file_nr and defined($output)) {
+  if ($base_level == 0 and !$file_nr) {
     $outfile = $output;
   } else {
     if (defined($name)) {
@@ -169,7 +170,6 @@
 
 my $STDOUT_DOCU_NAME = 'stdout';
 if ($base_level > 0) {
-  $output = '-' if (!defined($output));
   my $fh;
   if ($output ne '-') {
     open (OUT, ">$output") or die "Open $output: $!\n";
@@ -235,6 +235,7 @@
 =item B<--output>=I<NAME>
 
 Name for the first manual, or the main manual if there is a main manual.
+Default is output on standard out.
 
 =item B<--unnumbered-sections>
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]