groff-commit
[Top][All Lists]
Advanced

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

[groff] 07/22: [nroff]: Fix oversights.


From: G. Branden Robinson
Subject: [groff] 07/22: [nroff]: Fix oversights.
Date: Tue, 27 Jul 2021 22:34:23 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 7da376ae9857562ce0ae2d65f03f5fd97e28fd2b
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Tue Jul 27 19:46:07 2021 +1000

    [nroff]: Fix oversights.
    
    * src/roff/nroff/nroff.sh: Fix straggling use of `$1`, which might not
      have a clear meaning in some shells after being shifted (what if we
      just shifted the last argument?).  Also `continue` after processing a
      (groff) option argument, as we should make no attempt to parse it.
    
    Should have been part of 2b955c57, 20 July.
---
 ChangeLog               | 8 ++++++++
 src/roff/nroff/nroff.sh | 3 ++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index f82b499..3fe08bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2021-07-27  G. Branden Robinson <g.branden.robinson@gmail.com>
 
+       * src/roff/nroff/nroff.sh: Fix straggling use of `$1`, which
+       might not have a clear meaning in some shells after being
+       shifted (what if we just shifted the last argument?).  Also
+       `continue` after processing a (groff) option argument, as we
+       should make no attempt to parse it.
+
+2021-07-27  G. Branden Robinson <g.branden.robinson@gmail.com>
+
        * src/roff/groff/tests/regression_savannah_59202.sh: Remove any
        core file before running troff so we don't throw a false
        positive.
diff --git a/src/roff/nroff/nroff.sh b/src/roff/nroff/nroff.sh
index 684fb95..a1d752e 100644
--- a/src/roff/nroff/nroff.sh
+++ b/src/roff/nroff/nroff.sh
@@ -35,9 +35,10 @@ do
     is_option_argument_pending=
     opts="$opts $arg"
     shift
+    continue
   fi
 
-  case $1 in
+  case $arg in
     -c)
       opts="$opts $arg -P-c" ;;
     -h)



reply via email to

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