diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 1997-09-15 02:03:13 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 1997-09-15 02:03:13 +0000 |
commit | dfb33229a0e6cbd0e2f723c32c39aa05d8cae693 (patch) | |
tree | bce80427ee0c26337886cad9f84e34915df6ddf2 | |
parent | 40d747632170cde6819c1d6d9278f3358f61007a (diff) | |
download | src-dfb33229a0e6cbd0e2f723c32c39aa05d8cae693.tar.gz src-dfb33229a0e6cbd0e2f723c32c39aa05d8cae693.zip |
Sense *.ISO_8859-1 and *.KOI8-R locales from environment
PR: 4290
Submitted by: "Anatoly A. Orehovsky" <tolik@www.tomsk.su>
Notes
Notes:
svn path=/head/; revision=29438
-rw-r--r-- | contrib/groff/eqn/neqn.sh | 17 | ||||
-rw-r--r-- | contrib/groff/src/preproc/eqn/neqn.sh | 17 |
2 files changed, 32 insertions, 2 deletions
diff --git a/contrib/groff/eqn/neqn.sh b/contrib/groff/eqn/neqn.sh index 770376732b29..cc32e66406b3 100644 --- a/contrib/groff/eqn/neqn.sh +++ b/contrib/groff/eqn/neqn.sh @@ -2,4 +2,19 @@ # Provision of this shell script should not be taken to imply that use of # GNU eqn with groff -Tascii|-Tlatin1 is supported. -exec @g@eqn -Tascii ${1+"$@"} +# Default device. +if test `expr "$LC_CTYPE" : ".*\.ISO_8859-1"` -gt 0 || \ + test `expr "$LANG" : ".*\.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 +then + T=-Tkoi8-r +else + T=-Tascii +fi +fi + +exec @g@eqn -T${T} ${1+"$@"} diff --git a/contrib/groff/src/preproc/eqn/neqn.sh b/contrib/groff/src/preproc/eqn/neqn.sh index 770376732b29..cc32e66406b3 100644 --- a/contrib/groff/src/preproc/eqn/neqn.sh +++ b/contrib/groff/src/preproc/eqn/neqn.sh @@ -2,4 +2,19 @@ # Provision of this shell script should not be taken to imply that use of # GNU eqn with groff -Tascii|-Tlatin1 is supported. -exec @g@eqn -Tascii ${1+"$@"} +# Default device. +if test `expr "$LC_CTYPE" : ".*\.ISO_8859-1"` -gt 0 || \ + test `expr "$LANG" : ".*\.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 +then + T=-Tkoi8-r +else + T=-Tascii +fi +fi + +exec @g@eqn -T${T} ${1+"$@"} |