[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Solaris 9 'man' command runs afoul of groff 1.19 SGR
From: |
Paul Eggert |
Subject: |
Solaris 9 'man' command runs afoul of groff 1.19 SGR |
Date: |
Fri, 6 Jun 2003 14:30:48 -0700 |
GROFF VERSION:
1.19
MACHINE:
SunUltra 1/170E
OS:
Solaris 9
COMPILER:
GCC 3.3
INPUT FILES:
none
COMMAND LINE:
man sh
DESCRIPTION OF INCORRECT BEHAVIOUR:
The output looks terrible; there are all sorts of [m's in it.
The problem is that Sun's "man" command runs
"nroff -u0 ... | col -x". Groff's nroff outputs SGR commands,
but the Solaris 'col' command doesn't understand them and
strips off the escapes.
SUGGESTED FIX [optional]:
2003-06-06 Paul Eggert <address@hidden>
* src/roff/nroff/nroff.sh: Disable SGR when ignoring -u.
===================================================================
RCS file: src/roff/nroff/nroff.sh,v
retrieving revision 1.19
retrieving revision 1.19.0.1
diff -pu -r1.19 -r1.19.0.1
--- src/roff/nroff/nroff.sh 2003/01/28 08:40:44 1.19
+++ src/roff/nroff/nroff.sh 2003/06/06 21:18:30 1.19.0.1
@@ -58,9 +58,12 @@ for i
# ignore other devices
;;
-u*)
- # Solaris 2.2 `man' uses -u0; ignore it,
+ # Solaris 2.2 through at least Solaris 9 `man' invokes
+ # 'nroff -u0 ... | col -x'. Ignore the -u0,
# since `less' and `more' can use the emboldening info.
- ;;
+ # However, disable SGR, since Solaris 'col' mishandles it.
+ GROFF_NO_SGR=1
+ export GROFF_NO_SGR ;;
-v | --version)
echo "GNU nroff (groff) version @VERSION@"
exit 0 ;;
- Solaris 9 'man' command runs afoul of groff 1.19 SGR,
Paul Eggert <=