2 # Emulate nroff with groff.
3 # $FreeBSD: src/contrib/groff/src/roff/nroff/nroff.sh,v 1.11.2.3 2003/02/14 15:22:08 ru Exp $
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 "`#locale charmap 2>/dev/null`" in
17 case "${LC_ALL-${LC_CTYPE-${LANG}}}" in
20 iso_8859_1 | *.ISO*8859-1 | *.ISO*8859-15)
27 case "$LESSCHARSET" in
41 # `for i; do' doesn't work with some versions of sh
51 # ignore these options
54 echo "$prog: option $1 requires an argument" >&2
58 -Tascii | -Tlatin1 | -Tkoi8-r | -Tutf8 | -Tcp1047)
61 # ignore other devices
64 # Solaris 2.2 `man' uses -u0; ignore it,
65 # since `less' and `more' can use the emboldening info.
68 echo "GNU nroff (groff) version @VERSION@"
71 echo "usage: nroff [-cChipt] [-mNAME] [-nNUM] [-oLIST] [-rCN] [-Tname] [FILE...]"
79 echo "$prog: invalid option $1" >&2
87 # This shell script is intended for use with man, so warnings are
88 # probably not wanted. Also load nroff-style character definitions.
90 : ${GROFF_BIN_PATH=@BINDIR@}
92 PATH=$GROFF_BIN_PATH:$PATH groff -mtty-char $T $opts ${1+"$@"}