#!/bin/sh
#			Copyright (c) 1994 by
#			Advanced Visual Systems Inc.
#			All Rights Reserved
#
#	This software comprises unpublished confidential information of
#	Advanced Visual Systems Inc. and may not be used, copied or made
#	available to anyone, except in accordance with the license
#	under which it is furnished.
#
#	This file is under Perforce control
#	$Id: //depot/express/fcs70/build/xp_edit.sh#1 $
#

#
# if there is no default path to XP_XTERM set, we need to look in standard
# places in case our user does not have the path set properly.
#
if [ "$XP_XTERM" = "" ] ; then
   if [ -x /usr/bin/X11/xterm ] ; then 
      XP_XTERM=/usr/bin/X11/xterm
   elif [ -x /usr/openwin/bin/xterm ] ; then
      XP_XTERM=/usr/openwin/bin/xterm
   elif [ -x /usr/X11R6/bin/xterm ] ; then
      XP_XTERM=/usr/X11R6/bin/xterm
   else
      XP_XTERM=xterm
   fi
fi

DEFAULTEDITOR=vi

USEEDITOR="$XP_XTERM -e ${EDITOR:-$DEFAULTEDITOR}"

$USEEDITOR $*
