[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 12/31: [nroff]: Support `-a`, `-D`, `-I`, & `-Z` options.
From: |
G. Branden Robinson |
Subject: |
[groff] 12/31: [nroff]: Support `-a`, `-D`, `-I`, & `-Z` options. |
Date: |
Fri, 12 Jul 2024 16:39:06 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 78394f9f5bbf22f7505c751c122f5b9c5f174073
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu Jul 11 07:51:37 2024 -0500
[nroff]: Support `-a`, `-D`, `-I`, & `-Z` options.
* src/roff/nroff/nroff.sh: Do it.
* src/roff/nroff/nroff.1.man:
* NEWS: Document it.
---
ChangeLog | 8 ++++++++
NEWS | 6 ++++++
src/roff/nroff/nroff.1.man | 14 +++++++++++---
src/roff/nroff/nroff.sh | 20 +++++++++++++++++---
4 files changed, 42 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6bc0115cd..b1087bbe4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-07-11 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * src/roff/nroff/nroff.sh: Support groff `-a`, `-D`, `-I`, and
+ `-Z` options.
+
+ * src/roff/nroff/nroff.1.man:
+ * NEWS: Document it.
+
2024-07-11 G. Branden Robinson <g.branden.robinson@gmail.com>
* src/roff/nroff/nroff.sh: Describe program briefly when invoked
diff --git a/NEWS b/NEWS
index c13d2a299..956a56e97 100644
--- a/NEWS
+++ b/NEWS
@@ -113,6 +113,12 @@ o New parameters tunable with the GNU eqn "set" primitive,
"half_space"
o The new "reset" primitive restores a named parameter to its default.
+nroff
+-----
+
+o nroff now recognizes the -a, -D, -I, and -Z options and passes them
+ through to groff.
+
Macro packages
--------------
diff --git a/src/roff/nroff/nroff.1.man b/src/roff/nroff/nroff.1.man
index 5653fd242..b8b1a566d 100644
--- a/src/roff/nroff/nroff.1.man
+++ b/src/roff/nroff/nroff.1.man
@@ -52,14 +52,18 @@ for TTY (terminal) devices
.\" ====================================================================
.
.SY @g@nroff
-.RB [ \-bcCEhikpRStUVz ]
+.RB [ \-abcCEhikpRStUVzZ ]
.RB [ \-d\~\c
.IR ctext ]
.RB [ \-d\~\c
.IB string =\c
.IR text ]
+.RB [ \-D\~\c
+.IR fallback-input-encoding ]
+.RB [ \-I\~\c
+.IR inclusion-directory ]
.RB [ \-K\~\c
-.IR fallback-encoding ]
+.IR input-encoding ]
.RB [ \-m\~\c
.IR macro-package ]
.RB [ \-M\~\c
@@ -158,12 +162,14 @@ is implied.
.
.P
The
+.BR \-a ,
.BR \-b ,
.BR \-c ,
.BR \-C ,
.BR \-d ,
.BR \-E ,
.BR \-i ,
+.BR \-I ,
.BR \-m ,
.BR \-M ,
.BR \-n ,
@@ -201,14 +207,16 @@ and
.IR nroff ). \" GNU
.
The options
+.BR \-D ,
.BR \-k ,
.BR \-K ,
.BR \-p ,
.BR \-P ,
.BR \-R ,
.BR \-t ,
+.BR \-S ,
and
-.B \-S
+.B \-Z
are documented in
.MR groff @MAN1EXT@ .
.
diff --git a/src/roff/nroff/nroff.sh b/src/roff/nroff/nroff.sh
index 5065f9ba0..c2469da75 100644
--- a/src/roff/nroff/nroff.sh
+++ b/src/roff/nroff/nroff.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Emulate nroff with groff.
#
-# Copyright (C) 1992-2021 Free Software Foundation, Inc.
+# Copyright (C) 1992-2024 Free Software Foundation, Inc.
#
# Written by James Clark, Werner Lemberg, and G. Branden Robinson.
#
@@ -51,6 +51,20 @@ do
continue
fi
+ # groff(1) options we don't support:
+ #
+ # -e
+ # -s because of historical clash in meaning.
+ # -f because terminal devices don't support font families.
+ # -g
+ # -G
+ # -j
+ # -p because terminals don't do graphics. (Some do, but grotty(1)
+ # does not produce ReGIS or Sixel output.)
+ # -l
+ # -L because terminal output is not suitable for a print spooler.
+ # -N because we don't support -e.
+ # -X because gxditview(1) doesn't support terminal documents (why?).
case $arg in
-c)
opts="$opts $arg -P-c" ;;
@@ -59,10 +73,10 @@ do
-[eq] | -s*)
# ignore these options
;;
- -[dKmMnoPrTwW])
+ -[dDIKmMnoPrTwW])
is_option_argument_pending=yes
opts="$opts $arg" ;;
- -[bCEikpRStUz] | -[dKMmrnoPwW]*)
+ -[abCEikpRStUzZ] | -[dDIKMmrnoPwW]*)
opts="$opts $arg" ;;
-T*)
Topt=$arg ;;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 12/31: [nroff]: Support `-a`, `-D`, `-I`, & `-Z` options.,
G. Branden Robinson <=