diff options
Diffstat (limited to 'contrib/groff/src/preproc')
-rw-r--r-- | contrib/groff/src/preproc/eqn/neqn.sh | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/contrib/groff/src/preproc/eqn/neqn.sh b/contrib/groff/src/preproc/eqn/neqn.sh index 49cd70f3e1d4..745599b46a7b 100644 --- a/contrib/groff/src/preproc/eqn/neqn.sh +++ b/contrib/groff/src/preproc/eqn/neqn.sh @@ -1,20 +1,24 @@ #!/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. +# GNU eqn with groff -Tascii|-Tlatin1|-Tkoi8-r|-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 +case "${LC_ALL-${LC_CTYPE-${LANG}}}" in + *.UTF-8) + T=utf8 ;; + iso_8859_1 | *.ISO-8859-1 | *.ISO_8859-1) + T=latin1 ;; + *.IBM-1047) + T=cp1047 ;; + *.KOI8-R) + T=koi8-r ;; + *) + T=ascii ;; +esac +: ${GROFF_BIN_PATH=@BINDIR@} +export PATH=$GROFF_BIN_PATH:$PATH exec @g@eqn -T${T} ${1+"$@"} + +# eof |