#!/bin/athena/tcsh -f
# 

if (`machtype` == rsaix) then
	setenv ZWGC /usr/athena/bin/zwgc
else
	setenv ZWGC /mit/warlord/bin/zwgc
endif

if ($#argv) then
	if ("$1" == "-d") then
		shift
		setenv NEWDISPLAY "$DISPLAY [${argv}]"
	else
		setenv NEWDISPLAY "${argv}"
	endif

	setenv OLDDISPLAY $DISPLAY

	(xterm -T Zephyr -name xzwgc -e csh -fc 'setenv DISPLAY "${NEWDISPLAY}" ; $ZWGC -nofork -display $OLDDISPLAY' &)
else
	(xterm -T Zephyr -name xzwgc -e $ZWGC -nofork &)
endif
