#
# @(#)S118cle	1.12 99/11/22 SMI
#
# Launch Desktop X Input Method Server for CLE
# Locale: ja,ja_JP.PCK,ja_JP.UTF-8
#

if [ -x /usr/openwin/bin/htt -a -f /usr/lib/im/leif/cle.so ]; then 
	# OpenWindows
	if [ "_$_sunximswm" = "_olwm" ] ; then
		: # CLE does not support OpenWindows
		: # do not unset DTSTARTIMS in this case

		: # for Motif or others which use XIMStatusArea
		echo "*disableStatusArea: true" \
			| /usr/openwin/bin/xrdb -m
		: # for XView which use XIMStatusCallback
		echo "OpenWindows.ImStatusStyle: none" \
			| /usr/openwin/bin/xrdb -m

	# CDE
	else
		echo "*preeditType: rootwindow" | /usr/openwin/bin/xrdb -m

		LC_ALL=zh_CN.GB18030 LANG=zh_CN.GB18030 \
		/usr/openwin/bin/htt \
			-if cle -so -nosm -lc_basiclocale zh_CN.GB18030 -xim htt_xbe \
			> /dev/null 2>&1 &
		DISABLE_MULTI_SCRIPT_IM=true; export DISABLE_MULTI_SCRIPT_IM
		unset DTSTARTIMS
	fi
fi
