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 "`locale charmap 2>/dev/null`" in
16 case "${LC_ALL-${LC_CTYPE-${LANG}}}" in
19 iso_8859_1 |
*.ISO-8859-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
55 -Tascii |
-Tlatin1 |
-Tutf8 |
-Tcp1047)
58 # ignore other devices
61 # Solaris 2.2 `man' uses -u0; ignore it,
62 # since `less' and `more' can use the emboldening info.
65 echo "GNU nroff (groff) version @VERSION@"
68 echo "usage: nroff [-CchipStUv] [-mNAME] [-nNUM] [-oLIST] [-rCN] [-Tname] [FILE...]"
76 echo "$prog: invalid option $1" >&2
84 # This shell script is intended for use with man, so warnings are
85 # probably not wanted. Also load nroff-style character definitions.
87 : ${GROFF_BIN_PATH=@BINDIR@}
89 PATH
=$GROFF_BIN_PATH@SEP@
$PATH groff -mtty-char $T $opts ${1+"$@"}