#!/bin/sh
#
# cxterm startup script
# Mar 26, 2001 by Heng Yuan
#
# I made this script stick to gb16fs/gb16st since Exceed has them.
# XFree86 includes hanzigb16fs/hanzigb16st, but in reality they
# use exactly the same font files.  cxterm-5.1p1 RPM install script
# simply patches fonts.alias in X11/fonts/misc/fonts.alias with new
# aliases.

# CXterm contains the key bindings
CXTERM_RC=/usr/X11R6/lib/X11/app-defaults/CXterm

# the default cxterm should look like this
CXTERM="/usr/X11R6/bin/cxterm-bin -bg black -fg lightgrey -sb -sl 300"

# NAME		= resource name in CXTERM_RC
# ENCODING	= encoding
# FONT		= specify normal and bold language fonts
# INPUTDIR	= input tables

NAME=cxterm
ENCODING=GB
FONT="-fh gb16fs -fhb gb16fs"
INPUTDIR=/usr/X11R6/lib/X11/cxterm.dict/gb

case "$1" in
	-gb* | -GB* )
		# this is the default configuration
		shift
		;;
	-big5 | -Big5 | -BIG5 | -b5 | -B5 )
		FONT="-fh hku16et"
		ENCODING=BIG5
		NAME=cxtermb5
		INPUTDIR=/usr/X11R6/lib/X11/cxterm.dict/big5
		shift
		;;
	-ks | -KS | -ko | -KO )
		NAME=cxtermks
		ENCODING=KS
		INPUTDIR=/usr/X11R6/lib/X11/cxterm.dict/ks
		shift
		;;
	-jis | -jpn | -jp )
		NAME=cxtermjis
		ENCODING=JIS
		INPUTDIR=/usr/X11R6/lib/X11/cxterm.dict/jis
		shift
		;;
esac

XENVIRONMENT=$CXTERM_RC
export XENVIRONMENT

$CXTERM -hz $ENCODING -name $NAME -hid $INPUTDIR $FONT "$@"&
