groff-commit
[Top][All Lists]
Advanced

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

[groff] 20/23: [groff]: -I now implies -g, calling grn with -M.


From: G. Branden Robinson
Subject: [groff] 20/23: [groff]: -I now implies -g, calling grn with -M.
Date: Thu, 23 Sep 2021 08:12:37 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 3dded2bf89220cc986deb3ce57f51725188f5da3
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu Sep 23 18:11:45 2021 +1000

    [groff]: -I now implies -g, calling grn with -M.
    
    * src/roff/groff/groff.cpp (main): If the `-I` option is given, run the
      grn preprocessor and pass it an `-M` option with `-I`'s argument.
    
    * NEWS:
    * src/roff/groff/groff.1.man (Options): Document it.  Also document that
      `-I` options are passed to the output driver.
---
 ChangeLog                  | 10 ++++++++++
 NEWS                       |  6 ++++++
 src/roff/groff/groff.1.man | 17 ++++++++++++++---
 src/roff/groff/groff.cpp   |  2 ++
 4 files changed, 32 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a301c63..6e055e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2021-09-23  G. Branden Robinson <g.branden.robinson@gmail.com>
 
+       * src/roff/groff/groff.cpp (main): If the `-I` option is given,
+       run the grn preprocessor and pass it an `-M` option with `-I`'s
+       argument.
+
+       * NEWS:
+       * src/roff/groff/groff.1.man (Options): Document it.  Also
+       document that `-I` options are passed to the output driver.
+
+2021-09-23  G. Branden Robinson <g.branden.robinson@gmail.com>
+
        * src/utils/grog/grog.pl (do_line): Don't strip groff-style
        comments \# if AT&T compatibility mode is enabled.
 
diff --git a/NEWS b/NEWS
index cb161ac..1a7ab30 100644
--- a/NEWS
+++ b/NEWS
@@ -108,6 +108,12 @@ o nroff now recognizes the -b, -E, -k, -K, and -z options 
and passes
 o nroff now supports whitespace between option flag letters and option
   arguments, like groff and troff themselves.
 
+groff
+-----
+
+o The -I option now implies "-g" (run the grn(1) preprocessor), and
+  supplies grn an "-M" option with the argument to -I.
+
 Macro Packages
 --------------
 
diff --git a/src/roff/groff/groff.1.man b/src/roff/groff/groff.1.man
index bede8bf..6ee7990 100644
--- a/src/roff/groff/groff.1.man
+++ b/src/roff/groff/groff.1.man
@@ -206,9 +206,20 @@ Works as
 option
 (see below),
 but also implies
-.B \-s
-and is passed to
-.IR \%@g@soelim (@MAN1EXT@).
+.B \-g
+and
+.BR \-s .
+.
+It is passed to
+.IR \%@g@soelim (@MAN1EXT@)
+and the output driver,
+and
+.I \%@g@grn
+is passed an
+.B \-M
+option with
+.I dir
+as its argument.
 .
 .
 .TP
diff --git a/src/roff/groff/groff.cpp b/src/roff/groff/groff.cpp
index 39c21e9..66e6483 100644
--- a/src/roff/groff/groff.cpp
+++ b/src/roff/groff/groff.cpp
@@ -152,6 +152,8 @@ int main(int argc, char **argv)
       iflag = 1;
       break;
     case 'I':
+      commands[GRN_INDEX].set_name(command_prefix, "grn");
+      commands[GRN_INDEX].append_arg("-M", optarg);
       commands[SOELIM_INDEX].set_name(command_prefix, "soelim");
       commands[SOELIM_INDEX].append_arg(buf, optarg);
       // .psbb may need to search for files



reply via email to

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