summaryrefslogtreecommitdiffstats
path: root/contrib/groff/nroff
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1999-07-30 16:34:06 +0000
committerache <ache@FreeBSD.org>1999-07-30 16:34:06 +0000
commite72fd6b32f22180779062f24249341b89834296f (patch)
treedf6fe685acb8a97b45b22c29ba417bf819005ea4 /contrib/groff/nroff
parent0425b8852b252deb8a658caf3c40fd68ce625996 (diff)
downloadFreeBSD-src-e72fd6b32f22180779062f24249341b89834296f.zip
FreeBSD-src-e72fd6b32f22180779062f24249341b89834296f.tar.gz
Sense $LANG only if $LC_CTYPE is not set
Diffstat (limited to 'contrib/groff/nroff')
-rwxr-xr-xcontrib/groff/nroff/nroff.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/contrib/groff/nroff/nroff.sh b/contrib/groff/nroff/nroff.sh
index 25d9db2..2515968 100755
--- a/contrib/groff/nroff/nroff.sh
+++ b/contrib/groff/nroff/nroff.sh
@@ -3,13 +3,12 @@
prog="$0"
# Default device.
-if test `expr "$LC_CTYPE" : ".*\.ISO_8859-1"` -gt 0 || \
- test `expr "$LANG" : ".*\.ISO_8859-1"` -gt 0
+locale=${LC_CTYPE:-$LANG}
+if test `expr "$locale" : ".*\.ISO_8859-1"` -gt 0
then
T=-Tlatin1
else
-if test `expr "$LC_CTYPE" : ".*\.KOI8-R"` -gt 0 || \
- test `expr "$LANG" : ".*\.KOI8-R"` -gt 0
+if test `expr "$locale" : ".*\.KOI8-R"` -gt 0
then
T=-Tkoi8-r
else
OpenPOWER on IntegriCloud