1996-09-07 16:18:32 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# Emulate nroff with groff.
|
|
|
|
|
|
|
|
prog="$0"
|
|
|
|
# Default device.
|
1996-09-11 17:55:20 +00:00
|
|
|
if test `expr "$LC_CTYPE" : ".*\.ISO_8859-1"` -gt 0 || \
|
|
|
|
test `expr "$LANG" : ".*\.ISO_8859-1"` -gt 0
|
1996-09-07 16:18:32 +00:00
|
|
|
then
|
|
|
|
T=-Tlatin1
|
1996-09-11 17:55:20 +00:00
|
|
|
else
|
1996-11-23 02:31:40 +00:00
|
|
|
if test `expr "$LC_CTYPE" : ".*\.KOI8-R"` -gt 0 || \
|
|
|
|
test `expr "$LANG" : ".*\.KOI8-R"` -gt 0
|
1996-09-11 17:55:20 +00:00
|
|
|
then
|
|
|
|
T=-Tkoi8-r
|
1996-09-07 16:18:32 +00:00
|
|
|
else
|
|
|
|
T=-Tascii
|
|
|
|
fi
|
1996-09-11 17:55:20 +00:00
|
|
|
fi
|
1996-09-07 16:18:32 +00:00
|
|
|
opts=
|
|
|
|
|
|
|
|
for i
|
|
|
|
do
|
|
|
|
case $1 in
|
|
|
|
-h)
|
|
|
|
opts="$opts -P-h"
|
|
|
|
;;
|
|
|
|
-[eq]|-s*)
|
|
|
|
# ignore these options
|
|
|
|
;;
|
|
|
|
-[mrnoT])
|
|
|
|
echo "$prog: option $1 requires an argument" >&2
|
|
|
|
exit 1
|
|
|
|
;;
|
1999-07-30 05:20:17 +00:00
|
|
|
-i|-S|-[mrno]*)
|
1996-09-07 16:18:32 +00:00
|
|
|
opts="$opts $1";
|
|
|
|
;;
|
|
|
|
|
1996-09-08 00:28:32 +00:00
|
|
|
-Tascii|-Tlatin1|-Tkoi8-r)
|
1996-09-07 16:18:32 +00:00
|
|
|
T=$1
|
|
|
|
;;
|
|
|
|
-T*)
|
|
|
|
# ignore other devices
|
|
|
|
;;
|
|
|
|
-u*)
|
|
|
|
# Solaris 2.2 `man' uses -u0; ignore it,
|
|
|
|
# since `less' and `more' can use the emboldening info.
|
|
|
|
;;
|
|
|
|
--)
|
|
|
|
shift
|
|
|
|
break
|
|
|
|
;;
|
|
|
|
-)
|
|
|
|
break
|
|
|
|
;;
|
|
|
|
-*)
|
|
|
|
echo "$prog: invalid option $1" >&2
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
break
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
|
|
|
|
# This shell script is intended for use with man, so warnings are
|
|
|
|
# probably not wanted. Also load nroff-style character definitions.
|
1999-07-30 05:20:17 +00:00
|
|
|
exec groff -S -Wall -mtty-char $T $opts ${1+"$@"}
|