aboutsummaryrefslogtreecommitdiff
path: root/contrib/groff
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1996-09-11 17:55:20 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1996-09-11 17:55:20 +0000
commite81918b728a851fc871dbf226131a2a8895084a0 (patch)
tree3fa0f8d099265da429ab9ab8f74ad0504efb8237 /contrib/groff
parentc6e29b892612beed29ed8d2abf25c67a98c52e9b (diff)
downloadsrc-e81918b728a851fc871dbf226131a2a8895084a0.tar.gz
src-e81918b728a851fc871dbf226131a2a8895084a0.zip
Fix latin1 guessing
Add koi8-r guessing
Notes
Notes: svn path=/head/; revision=18248
Diffstat (limited to 'contrib/groff')
-rwxr-xr-xcontrib/groff/nroff/nroff.sh8
-rwxr-xr-xcontrib/groff/src/roff/nroff/nroff.sh8
2 files changed, 14 insertions, 2 deletions
diff --git a/contrib/groff/nroff/nroff.sh b/contrib/groff/nroff/nroff.sh
index 5c6100e75f0f..05b953b54886 100755
--- a/contrib/groff/nroff/nroff.sh
+++ b/contrib/groff/nroff/nroff.sh
@@ -3,12 +3,18 @@
prog="$0"
# Default device.
-if test "X$LC_CTYPE" = "Xiso_8859_1" || test "X$LESSCHARSET" = "Xlatin1"
+if test `expr "$LC_CTYPE" : ".*\.ISO_8859-1"` -gt 0 || \
+ test `expr "$LANG" : ".*\.ISO_8859-1"` -gt 0
then
T=-Tlatin1
else
+if test "X$LC_CTYPE" = "Xru_SU.KOI8-R" || test "X$LANG" = "Xru_SU.KOI8-R"
+then
+ T=-Tkoi8-r
+else
T=-Tascii
fi
+fi
opts=
for i
diff --git a/contrib/groff/src/roff/nroff/nroff.sh b/contrib/groff/src/roff/nroff/nroff.sh
index 5c6100e75f0f..05b953b54886 100755
--- a/contrib/groff/src/roff/nroff/nroff.sh
+++ b/contrib/groff/src/roff/nroff/nroff.sh
@@ -3,12 +3,18 @@
prog="$0"
# Default device.
-if test "X$LC_CTYPE" = "Xiso_8859_1" || test "X$LESSCHARSET" = "Xlatin1"
+if test `expr "$LC_CTYPE" : ".*\.ISO_8859-1"` -gt 0 || \
+ test `expr "$LANG" : ".*\.ISO_8859-1"` -gt 0
then
T=-Tlatin1
else
+if test "X$LC_CTYPE" = "Xru_SU.KOI8-R" || test "X$LANG" = "Xru_SU.KOI8-R"
+then
+ T=-Tkoi8-r
+else
T=-Tascii
fi
+fi
opts=
for i