2 # Emulate nroff with groff.
6 # First try the "locale charmap" command, because it's most reliable.
7 # On systems where it doesn't exist, look at the environment variables.
8 case "`exec 2>/dev/null ; locale charmap`" in
16 case "${LC_ALL-${LC_CTYPE-${LANG}}}" in
19 iso_8859_1 |
*.ISO-8859-1 |
*.ISO8859-1
)
24 case "$LESSCHARSET" in
38 # `for i; do' doesn't work with some versions of sh
48 # ignore these options
51 echo "$prog: option $1 requires an argument" >&2
53 -[iptSUC
] |
-[dMmrno
]*)
55 -Tascii |
-Tlatin1 |
-Tutf8 |
-Tcp1047)
58 # ignore other devices
61 # Solaris 2.2 through at least Solaris 9 `man' invokes
62 # `nroff -u0 ... | col -x'. Ignore the -u0,
63 # since `less' and `more' can use the emboldening info.
64 # However, disable SGR, since Solaris `col' mishandles it.
67 echo "GNU nroff (groff) version @VERSION@"
70 echo "usage: nroff [-CchipStUv] [-dCS] [-MDIR] [-mNAME] [-nNUM] [-oLIST]"
71 echo " [-rCN] [-Tname] [FILE...]"
79 echo "$prog: invalid option $1" >&2
87 # Set up the `GROFF_BIN_PATH' variable
88 # to be exported in the current `GROFF_RUNTIME' environment.
90 @GROFF_BIN_PATH_SETUP@
93 # This shell script is intended for use with man, so warnings are
94 # probably not wanted. Also load nroff-style character definitions.
96 PATH
="$GROFF_RUNTIME$PATH" groff -mtty-char $T $opts ${1+"$@"}