diff options
author | ache <ache@FreeBSD.org> | 1997-09-15 02:03:13 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1997-09-15 02:03:13 +0000 |
commit | 9f3f97929ea5144d8303649a14ff1a519a3c6996 (patch) | |
tree | f7894ff8dee96ee8de9ba4a9faa0a5a393eeaeb4 /contrib | |
parent | 2738d4da18f6571eaf8d75d74c21ba15b75e83a5 (diff) | |
download | FreeBSD-src-9f3f97929ea5144d8303649a14ff1a519a3c6996.zip FreeBSD-src-9f3f97929ea5144d8303649a14ff1a519a3c6996.tar.gz |
Sense *.ISO_8859-1 and *.KOI8-R locales from environment
PR: 4290
Submitted by: "Anatoly A. Orehovsky" <tolik@www.tomsk.su>
Diffstat (limited to 'contrib')
-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 7703767..cc32e66 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 7703767..cc32e66 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+"$@"} |