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
11 ISO-8859-1 | ISO-8859-15
)
16 case "${LC_ALL-${LC_CTYPE-${LANG}}}" in
19 iso_8859_1 |
*.ISO-8859-1 |
*.ISO8859-1 | \
20 iso_8859_15 |
*.ISO-8859-15 |
*.ISO8859-15
)
25 case "$LESSCHARSET" in
39 # `for i; do' doesn't work with some versions of sh
49 # ignore these options
52 echo "$prog: option $1 requires an argument" >&2
54 -[iptSUC
] |
-[dMmrno
]*)
56 -Tascii |
-Tlatin1 |
-Tutf8 |
-Tcp1047)
59 # ignore other devices
62 # Solaris 2.2 through at least Solaris 9 `man' invokes
63 # `nroff -u0 ... | col -x'. Ignore the -u0,
64 # since `less' and `more' can use the emboldening info.
65 # However, disable SGR, since Solaris `col' mishandles it.
68 echo "GNU nroff (groff) version @VERSION@"
71 echo "usage: nroff [-CchipStUv] [-dCS] [-MDIR] [-mNAME] [-nNUM] [-oLIST]"
72 echo " [-rCN] [-Tname] [FILE...]"
80 echo "$prog: invalid option $1" >&2
88 # Set up the `GROFF_BIN_PATH' variable
89 # to be exported in the current `GROFF_RUNTIME' environment.
91 @GROFF_BIN_PATH_SETUP@
94 # This shell script is intended for use with man, so warnings are
95 # probably not wanted. Also load nroff-style character definitions.
97 PATH
="$GROFF_RUNTIME$PATH" groff -mtty-char $T $opts ${1+"$@"}