aboutsummaryrefslogtreecommitdiff
path: root/contrib/groff/src/preproc/eqn/neqn.sh
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2001-04-17 12:28:31 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2001-04-17 12:28:31 +0000
commit96cdc9a0500624ea535a322d7d55c9ff41a5095a (patch)
treecdf9c36d68612ffb1a9f5c3f6ea459da9cfcad0a /contrib/groff/src/preproc/eqn/neqn.sh
parent74cf10f1aa1bf0e01d9dc2d6367b37b9009224d6 (diff)
downloadsrc-96cdc9a0500624ea535a322d7d55c9ff41a5095a.tar.gz
src-96cdc9a0500624ea535a322d7d55c9ff41a5095a.zip
Merge Groff 1.17 changes.
Notes
Notes: svn path=/head/; revision=75590
Diffstat (limited to 'contrib/groff/src/preproc/eqn/neqn.sh')
-rw-r--r--contrib/groff/src/preproc/eqn/neqn.sh30
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