freebsd-dev/contrib/groff/eqn/neqn.sh
Ruslan Ermilov afcf05e46a setlocale(3) has been fixed to match POSIX standard:
LC_ALL takes precedence over other LC_* envariables.
2001-03-02 16:52:14 +00:00

21 lines
401 B
Bash

#!/bin/sh
# Provision of this shell script should not be taken to imply that use of
# GNU eqn with groff -Tascii|-Tlatin1|-Tutf8|-Tcp1047 is supported.
# $FreeBSD$
# Default device.
locale=${LC_ALL:-${LC_CTYPE:-$LANG}}
if test `expr "$locale" : ".*\.ISO_8859-1"` -gt 0
then
T=latin1
else
if test `expr "$locale" : ".*\.KOI8-R"` -gt 0
then
T=koi8-r
else
T=ascii
fi
fi
exec @g@eqn -T${T} ${1+"$@"}