texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: Fix man page bold, italic, underline for Debian m


From: Gavin D. Smith
Subject: branch master updated: Fix man page bold, italic, underline for Debian man
Date: Sat, 05 Mar 2022 16:35:12 -0500

This is an automated email from the git hooks/post-receive script.

gavin pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 2afdb42b65 Fix man page bold, italic, underline for Debian man
2afdb42b65 is described below

commit 2afdb42b65d0842f617755ed7cb65364b25ef4a6
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sat Mar 5 21:35:03 2022 +0000

    Fix man page bold, italic, underline for Debian man
    
    * info/man.c (get_manpage_from_formatter): Set MAN_KEEP_FORMATTING=1
    and GROFF_SGR=1 in environment.
    * doc/info-stnd.texi (Invoking Info) <-R>: Comment out text about
    GROFF_SGR as it is hardcoded now.
---
 ChangeLog          | 9 +++++++++
 doc/info-stnd.texi | 2 ++
 info/man.c         | 7 +++++--
 3 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b41dcd7212..b0e1689c64 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2022-03-05  Gavin Smith  <gavinsmith0123@gmail.com>
+
+       Fix man page bold, italic, underline for Debian man
+
+       * info/man.c (get_manpage_from_formatter): Set MAN_KEEP_FORMATTING=1
+       and GROFF_SGR=1 in environment.
+       * doc/info-stnd.texi (Invoking Info) <-R>: Comment out text about
+       GROFF_SGR as it is hardcoded now.
+
 2022-03-05  Patrice Dumas  <pertusus@free.fr>
 
        Pass created directory charcter string for error messages
diff --git a/doc/info-stnd.texi b/doc/info-stnd.texi
index 52e38eb595..b4eaefa859 100644
--- a/doc/info-stnd.texi
+++ b/doc/info-stnd.texi
@@ -453,6 +453,7 @@ sequences are displayed as other control characters are; 
for example, an
 @key{ESC} byte is displayed as @samp{^[}.  The @code{--raw-escapes} and
 @code{-R} options do not do anything, but are included for completeness.
 
+@ignore
 @cindex man pages, bold and underline
 @vindex GROFF_SGR
 Some versions of Groff (@pxref{Top,,,groff,Groff}) produce man pages
@@ -463,6 +464,7 @@ your terminal supports these sequences, Info will display 
any bold or
 underlined text in man pages.  Some distributions have modified Groff
 to require setting the @code{GROFF_SGR} environment variable to get
 these sequences.  @xref{Invoking grotty,,, groff, Groff}.
+@end ignore
 
 @item --restore=@var{dribble-file}
 @cindex @code{--restore} command line option
diff --git a/info/man.c b/info/man.c
index 8935f27536..a9fb3a63e6 100644
--- a/info/man.c
+++ b/info/man.c
@@ -1,7 +1,6 @@
 /* man.c: How to read and format man files.
 
-   Copyright 1995-2019 Free Software Foundation, 
-   Inc.
+   Copyright 1995-2022 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -302,6 +301,10 @@ get_manpage_from_formatter (char *formatter_args[])
   pid_t child;
   int formatter_status = 0;
 
+  putenv ("MAN_KEEP_FORMATTING=1"); /* Get codes for bold etc. */
+  putenv ("GROFF_SGR=1"); /* for Debian whose man outputs
+                             'overstrike' sequences without this */
+
   /* Open a pipe to this program, read the output, and save it away
      in FORMATTED_PAGE.  The reader end of the pipe is pipes[0]; the
      writer end is pipes[1]. */



reply via email to

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