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