groff-commit
[Top][All Lists]
Advanced

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

[groff] 01/01: grog: repair handling of filespec arguments


From: Bernd Warken
Subject: [groff] 01/01: grog: repair handling of filespec arguments
Date: Sat, 14 Jun 2014 15:30:53 +0000

bwarken pushed a commit to branch master
in repository groff.

commit 796e0bbf4ec77eeac6ca7449883e8c01108889ff
Author: Bernd Warken <address@hidden>
Date:   Sat Jun 14 17:30:46 2014 +0200

    grog: repair handling of filespec arguments
---
 ChangeLog             |    4 ++++
 src/roff/grog/subs.pl |   14 +++++++++++---
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b367ee3..af162f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-06-14  Bernd Warken  <address@hidden>
+
+       * src/roff/grog/subs.pl: Repair handling of filespec arguments.
+
 2014-06-12  Bernd Warken  <address@hidden>
 
        * src/roff/grog/grog.pl, src/roff/grog/subs.pl: Add testing
diff --git a/src/roff/grog/subs.pl b/src/roff/grog/subs.pl
index f753717..933cc3f 100644
--- a/src/roff/grog/subs.pl
+++ b/src/roff/grog/subs.pl
@@ -30,7 +30,7 @@
 # <http://www.gnu.org/licenses/gpl-2.0.html>.
 
 ########################################################################
-# Last_Update = '12 Jun 2014';
+# Last_Update = '14 Jun 2014';
 ########################################################################
 
 require v5.6;
@@ -739,11 +739,17 @@ EOF
   ######################################################################
   # create groff command
 
+  @FILES = ( '-' ) unless ( @FILES );
+
+  for (@FILES) {
+    print STDERR 'filearg: ' . $_;
+  }
+
   unshift @Command, 'groff';
   if ( @preprograms ) {
     my @progs;
     $progs[0] = shift @preprograms;
-    push(@progs, @ARGV);
+    push(@progs, @FILES);
     for ( @preprograms ) {
       push @progs, '|';
       push @progs, $_;
@@ -778,7 +784,9 @@ EOF
   # execute the `groff' command here with option `--run'
   if ( $do_run ) {
     print STDERR "@Command";
-    system(join ' ', @Command);
+    my $cmd = join ' ', @Command;
+    print 'command will be: ' . $cmd;
+    # system($cmd);
   } else {
     print "@Command";
   }



reply via email to

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