#! /bin/sh
# @(#) vt100 1.4 Delta: 91/12/13 14:11:10 Extraction: 94/11/21 11:18:44 @(#)
system=`/usr/local/bin/funame -s`
T="vt100 terminal"
if test $# -gt 0
then
	case $system in
	  "IRIX")
		case $1 in
		  -*)	;;
		  *)
			if test x"`nslookup $1 2>&1 1>/dev/null | \
			   	grep 'Non-existent domain'`" != x
			then
				E=""
			else
				E="$1"
				T="$1 $T"
				shift
			fi;;
		esac;;
	  "AIX")
        	case $1 in
        	  -*)     ;;
        	  *)
		  	
                       	E="$1"
                       	T="$1 $T"
                       	shift;;
        	esac;;
	  *)
		echo "vt100 not supported on this system"
		exit 1;;
	esac
fi
if test x$E != x
then
	case $system in
	  "IRIX")
		/usr/bin/X11/xterm -132 -sb -sk -tn vt100 \
		  -T "$T" -s -j $* \
		  -e sh -c "exec telnet $E" &;;
	  "AIX")
        	/usr/bin/X11/aixterm -132 -sb -sk -v -fullcursor \
                  -T "$T" -name myxterm -s -j $* \
                  -e sh -c "exec telnet $E" &;;
	  *)
		echo "vt100 not supported on this system"
		exit 1;;
	esac
else
	case $system in
	  "IRIX")
		/usr/bin/X11/xterm -ls -132 -sb -sk -tn vt100 \
	  	  -T "$T" -s -j $* &;;
	  "AIX")
        	/usr/bin/X11/aixterm -ls -132 -sb -sk -v -fullcursor \
                  -T "$T" -name myxterm -s -j $* &;;
	  *)
		echo "vt100 not supported on this system"
		exit 1;;
	esac
fi
