File: mterm

package info (click to toggle)
mined 2000.15.4-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 16,616 kB
  • ctags: 2,957
  • sloc: ansic: 123,254; sh: 10,042; makefile: 266; sed: 221; perl: 172; cpp: 30
file content (42 lines) | stat: -rwxr-xr-x 1,498 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#! /bin/sh

# invoke mlterm in UTF-8 mode with suitable options
# and set environment variables

#############################################################################
# Font selection
font="-w 20"

#############################################################################
# Configure environment for UTF-8

# If the effective locale variable (defined and "non-null" environment 
# variable in the order of precedence LC_ALL, LC_CTYPE, LANG) 
# already indicates UTF-8, nothing needs to be modified.
# Otherwise the first of these variables that is defined and "non-null" 
# needs to be manipulated to have the suffix ".UTF-8".
case "${LC_ALL:-${LC_CTYPE:-$LANG}}" in
*.UTF-8 | *.utf8)	true;;
*)	def=en_US	# .UTF-8 locale most likely to be installed at least
	case "${LC_ALL:-null}" in
	"$LC_ALL")	LC_ALL=`echo ${LC_ALL:-$def} | sed -e "s,[.@].*,,"`.UTF-8
			export LC_ALL;;
	*)	case "${LC_CTYPE:-null}" in
		"$LC_CTYPE")	LC_CTYPE=`echo ${LC_CTYPE:-$def} | sed -e "s,[.@].*,,"`.UTF-8
				export LC_CTYPE;;
		*)	case "${LANG:-null}" in
			"$LANG")	LANG=`echo ${LANG:-$def} | sed -e "s,[.@].*,,"`.UTF-8
					export LANG;;
			*)	LC_CTYPE=$def.UTF-8
				export LC_CTYPE;;
			esac
		esac
	esac
esac
#echo LC_ALL=${LC_ALL-<undefined>}, LC_CTYPE=${LC_CTYPE-<undefined>}, LANG=${LANG-<undefined>}

#############################################################################
# Further mlterm options for full Unicode support, true by default:
# -m -Z -D

exec mlterm -E utf8 -k esc -Y $font $*