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 $
4 # $DragonFly: src/contrib/groff/src/roff/nroff/Attic/nroff.sh,v 1.2 2003/06/17 04:24:02 dillon Exp $
8 # First try the "locale charmap" command, because it's most reliable.
9 # On systems where it doesn't exist, look at the environment variables.
10 case "`#locale charmap 2>/dev/null`" in
18 case "${LC_ALL-${LC_CTYPE-${LANG}}}" in
21 iso_8859_1 | *.ISO*8859-1 | *.ISO*8859-15)
28 case "$LESSCHARSET" in
42 # `for i; do' doesn't work with some versions of sh
52 # ignore these options
55 echo "$prog: option $1 requires an argument" >&2
59 -Tascii | -Tlatin1 | -Tkoi8-r | -Tutf8 | -Tcp1047)
62 # ignore other devices
65 # Solaris 2.2 `man' uses -u0; ignore it,
66 # since `less' and `more' can use the emboldening info.
69 echo "GNU nroff (groff) version @VERSION@"
72 echo "usage: nroff [-cChipt] [-mNAME] [-nNUM] [-oLIST] [-rCN] [-Tname] [FILE...]"
80 echo "$prog: invalid option $1" >&2
88 # This shell script is intended for use with man, so warnings are
89 # probably not wanted. Also load nroff-style character definitions.
91 : ${GROFF_BIN_PATH=@BINDIR@}
93 PATH=$GROFF_BIN_PATH:$PATH groff -mtty-char $T $opts ${1+"$@"}