groff-commit
[Top][All Lists]
Advanced

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

[groff] 06/15: [nroff]: Pass `-c` option to groff.


From: G. Branden Robinson
Subject: [groff] 06/15: [nroff]: Pass `-c` option to groff.
Date: Tue, 20 Jul 2021 18:13:12 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit ac596dd951acf3d1cc18068cd2c0ee353c6d7c40
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Jul 21 02:23:37 2021 +1000

    [nroff]: Pass `-c` option to groff.
    
    While at present this does little more than `-P-c` already achieves,
    that might not be true forever.  Further, there is a distinction between
    ignoring color-related requests in groff input documents and ignoring
    color-related commands in device-independent output.  This distinction
    would make it unwise to adapt `-c` to any other purpose in nroff in the
    future.
    
    * NEWS: Update item from commit dd725dce, 10 February 2020.
    
    * src/roff/nroff/nroff.sh: Pass `-c` option to groff in addition to
      synthesizing a `-P-c` option (for grotty) when it is seen.
    
    * src/roff/nroff/nroff.1.man (Options): Document `-c` as an option
      recognized by troff(1).
---
 ChangeLog                  | 16 ++++++++++++++++
 NEWS                       |  4 ++--
 src/roff/nroff/nroff.1.man |  8 ++++++--
 src/roff/nroff/nroff.sh    |  2 +-
 4 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 413c370..dbc9b52 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2021-07-21  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       [nroff]: Pass `-c` option to groff.  While at present this does
+       little more than `-P-c` already achieves, that might not be true
+       forever.  Further, there is a distinction between ignoring
+       color-related requests in groff input documents and ignoring
+       color-related commands in device-independent output.  This
+       distinction would make it unwise to adapt `-c` to any other
+       purpose in nroff in the future.
+
+       * NEWS: Update item from commit dd725dce, 10 February 2020.
+       * src/roff/nroff/nroff.sh: Pass `-c` option to groff in addition
+       to synthesizing a `-P-c` option (for grotty) when it is seen.
+       * src/roff/nroff/nroff.1.man (Options): Document `-c` as an
+       option recognized by troff(1).
+
 2021-07-20  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        [nroff]: Support space between option flags and their arguments.
diff --git a/NEWS b/NEWS
index fa80cd3..1211218 100644
--- a/NEWS
+++ b/NEWS
@@ -92,8 +92,8 @@ o The new option -P takes an argument to pass to the output 
driver
   (always grotty(1)).  "-P-i" directs the terminal device to display
   real italic (oblique) characters instead of underlining: it is up to
   your terminal (emulator) to support italics (xterm does since patch
-  #314 [2014-12-28]).  "-P-c" and "-P-h" can now be used instead of "-c"
-  and "-h"; the latter pair may eventually be deprecated and repurposed.
+  #314 [2014-12-28]).  "-P-h" can now be used instead of "-h"; the
+  latter may eventually be deprecated and repurposed.
 
 o The new option -V emits the constructed groff command that nroff would
   run to standard output instead of executing it.  Arguments to nroff
diff --git a/src/roff/nroff/nroff.1.man b/src/roff/nroff/nroff.1.man
index 83fa9e5..7199bf2 100644
--- a/src/roff/nroff/nroff.1.man
+++ b/src/roff/nroff/nroff.1.man
@@ -140,6 +140,7 @@ is implied.
 .P
 The
 .BR \-b ,
+.BR \-c ,
 .BR \-C ,
 .BR \-d ,
 .BR \-E ,
@@ -162,11 +163,14 @@ options have the effects described in
 .B \-c
 and
 .B \-h
-are equivalent to
+imply
 .RB \[lq] \-P\-c \[rq]
 and
 .RB \[lq] \-P\-h \[rq],
-respectively.
+respectively;
+.B \-c
+is also interpreted directly by
+.IR \%@g@troff .
 .
 In addition,
 this implementation ignores the AT&T
diff --git a/src/roff/nroff/nroff.sh b/src/roff/nroff/nroff.sh
index 3e8837d..d4be5f5 100644
--- a/src/roff/nroff/nroff.sh
+++ b/src/roff/nroff/nroff.sh
@@ -77,7 +77,7 @@ do
 
   case $1 in
     -c)
-      opts="$opts -P-c" ;;
+      opts="$opts $1 -P-c" ;;
     -h)
       opts="$opts -P-h" ;;
     -[eq] | -s*)



reply via email to

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